@teambit/readme 1.0.491 → 1.0.492
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/env-template/public/{389.8d8983ade8cb95021435.js → 107.539e4e8640e7e2d990fa.js} +1 -1
- package/artifacts/env-template/public/{8.4e602a63a7cf45fcdf08.js → 8.f90a8a23c4a7d073dd61.js} +2 -2
- package/artifacts/env-template/public/assets-manifest.json +12 -14
- package/artifacts/env-template/public/{compositions.c70f46461fc270978525.js → compositions.54ba0785322ad72d4fbe.js} +1 -1
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.c8b19eb71ce25e1aafd0.js → overview.c1e5ac7c509a3fc86ad4.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/{peers.ea26f5f55df76ef54062.js → peers.b582362c41636847dd08.js} +1 -1
- package/artifacts/env-template/public/{795.6796d1e797d9b07da370.js → preview-root.3f9b28cb5a830e733682.js} +3 -3
- package/{compositions-1733887202407.js → compositions-1733950992344.js} +1 -1
- package/{overview-1733887202407.js → overview-1733950992344.js} +1 -1
- package/package.json +7 -7
- package/artifacts/env-template/public/preview-root.10a98509d776e44af3a2.js +0 -1
- /package/dist/{preview-1733887202407.js → preview-1733950992344.js} +0 -0
package/artifacts/env-template/public/{8.4e602a63a7cf45fcdf08.js → 8.f90a8a23c4a7d073dd61.js}
RENAMED
|
@@ -296,7 +296,7 @@ globstar while`,file,fr,pattern,pr,swallowee),this.matchOne(file.slice(fr),patte
|
|
|
296
296
|
const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
|
|
297
297
|
return result == null ? true : result;
|
|
298
298
|
}
|
|
299
|
-
`};class HelperManager{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(nameManager){this.nameManager=nameManager,HelperManager.prototype.__init.call(this),HelperManager.prototype.__init2.call(this)}getHelperName(baseName){let helperName=this.helperNames[baseName];return helperName||(helperName=this.nameManager.claimFreeName(`_${baseName}`),this.helperNames[baseName]=helperName,helperName)}emitHelpers(){let resultCode="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[baseName,helperCodeTemplate]of Object.entries(HELPERS)){const helperName=this.helperNames[baseName];let helperCode=helperCodeTemplate;baseName==="optionalChainDelete"?helperCode=helperCode.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):baseName==="asyncOptionalChainDelete"?helperCode=helperCode.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):baseName==="require"&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),helperCode=helperCode.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),helperName&&(resultCode+=" ",resultCode+=helperCode.replace(baseName,helperName).replace(/\s+/g," ").trim())}return resultCode}}function identifyShadowedGlobals(tokens,scopes,globalNames){!hasShadowedGlobals(tokens,globalNames)||markShadowedGlobals(tokens,scopes,globalNames)}function hasShadowedGlobals(tokens,globalNames){for(const token of tokens.tokens)if(token.type===TokenType.name&&!token.isType&&isNonTopLevelDeclaration(token)&&globalNames.has(tokens.identifierNameForToken(token)))return!0;return!1}function markShadowedGlobals(tokens,scopes,globalNames){const scopeStack=[];let scopeIndex=scopes.length-1;for(let i=tokens.tokens.length-1;;i--){for(;scopeStack.length>0&&scopeStack[scopeStack.length-1].startTokenIndex===i+1;)scopeStack.pop();for(;scopeIndex>=0&&scopes[scopeIndex].endTokenIndex===i+1;)scopeStack.push(scopes[scopeIndex]),scopeIndex--;if(i<0)break;const token=tokens.tokens[i],name=tokens.identifierNameForToken(token);if(scopeStack.length>1&&!token.isType&&token.type===TokenType.name&&globalNames.has(name)){if(isBlockScopedDeclaration(token))markShadowedForScope(scopeStack[scopeStack.length-1],tokens,name);else if(isFunctionScopedDeclaration(token)){let stackIndex=scopeStack.length-1;for(;stackIndex>0&&!scopeStack[stackIndex].isFunctionScope;)stackIndex--;if(stackIndex<0)throw new Error("Did not find parent function scope.");markShadowedForScope(scopeStack[stackIndex],tokens,name)}}}if(scopeStack.length>0)throw new Error("Expected empty scope stack after processing file.")}function markShadowedForScope(scope,tokens,name){for(let i=scope.startTokenIndex;i<scope.endTokenIndex;i++){const token=tokens.tokens[i];(token.type===TokenType.name||token.type===TokenType.jsxName)&&tokens.identifierNameForToken(token)===name&&(token.shadowsGlobal=!0)}}function getIdentifierNames(code,tokens){const names=[];for(const token of tokens)token.type===TokenType.name&&names.push(code.slice(token.start,token.end));return names}class NameManager{__init(){this.usedNames=new Set}constructor(code,tokens){NameManager.prototype.__init.call(this),this.usedNames=new Set(getIdentifierNames(code,tokens))}claimFreeName(name){const newName=this.findFreeName(name);return this.usedNames.add(newName),newName}findFreeName(name){if(!this.usedNames.has(name))return name;let suffixNum=2;for(;this.usedNames.has(name+String(suffixNum));)suffixNum++;return name+String(suffixNum)}}var ts_interface_checker_dist=__webpack_require__(59541);const Transform=ts_interface_checker_dist.union(ts_interface_checker_dist.lit("jsx"),ts_interface_checker_dist.lit("typescript"),ts_interface_checker_dist.lit("flow"),ts_interface_checker_dist.lit("imports"),ts_interface_checker_dist.lit("react-hot-loader"),ts_interface_checker_dist.lit("jest")),SourceMapOptions=ts_interface_checker_dist.iface([],{compiledFilename:"string"}),Options=ts_interface_checker_dist.iface([],{transforms:ts_interface_checker_dist.array("Transform"),disableESTransforms:ts_interface_checker_dist.opt("boolean"),jsxRuntime:ts_interface_checker_dist.opt(ts_interface_checker_dist.union(ts_interface_checker_dist.lit("classic"),ts_interface_checker_dist.lit("automatic"),ts_interface_checker_dist.lit("preserve"))),production:ts_interface_checker_dist.opt("boolean"),jsxImportSource:ts_interface_checker_dist.opt("string"),jsxPragma:ts_interface_checker_dist.opt("string"),jsxFragmentPragma:ts_interface_checker_dist.opt("string"),keepUnusedImports:ts_interface_checker_dist.opt("boolean"),preserveDynamicImport:ts_interface_checker_dist.opt("boolean"),injectCreateRequireForImportRequire:ts_interface_checker_dist.opt("boolean"),enableLegacyTypeScriptModuleInterop:ts_interface_checker_dist.opt("boolean"),enableLegacyBabel5ModuleInterop:ts_interface_checker_dist.opt("boolean"),sourceMapOptions:ts_interface_checker_dist.opt("SourceMapOptions"),filePath:ts_interface_checker_dist.opt("string")}),Options_gen_types={Transform,SourceMapOptions,Options},{Options:OptionsChecker}=(0,ts_interface_checker_dist.createCheckers)(Options_gen_types);function validateOptions(options){OptionsChecker.strictCheck(options)}function parseSpread(){next(),parseMaybeAssign(!1)}function parseRest(isBlockScope){next(),parseBindingAtom(isBlockScope)}function parseBindingIdentifier(isBlockScope){parseIdentifier(),markPriorBindingIdentifier(isBlockScope)}function parseImportedIdentifier(){parseIdentifier(),state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportDeclaration}function markPriorBindingIdentifier(isBlockScope){let identifierRole;state.scopeDepth===0?identifierRole=IdentifierRole.TopLevelDeclaration:isBlockScope?identifierRole=IdentifierRole.BlockScopedDeclaration:identifierRole=IdentifierRole.FunctionScopedDeclaration,state.tokens[state.tokens.length-1].identifierRole=identifierRole}function parseBindingAtom(isBlockScope){switch(state.type){case TokenType._this:{const oldIsType=pushTypeContext(0);next(),popTypeContext(oldIsType);return}case TokenType._yield:case TokenType.name:{state.type=TokenType.name,parseBindingIdentifier(isBlockScope);return}case TokenType.bracketL:{next(),parseBindingList(TokenType.bracketR,isBlockScope,!0);return}case TokenType.braceL:parseObj(!0,isBlockScope);return;default:unexpected()}}function parseBindingList(close,isBlockScope,allowEmpty=!1,allowModifiers=!1,contextId=0){let first=!0,hasRemovedComma=!1;const firstItemTokenIndex=state.tokens.length;for(;!eat(close)&&!state.error;)if(first?first=!1:(expect(TokenType.comma),state.tokens[state.tokens.length-1].contextId=contextId,!hasRemovedComma&&state.tokens[firstItemTokenIndex].isType&&(state.tokens[state.tokens.length-1].isType=!0,hasRemovedComma=!0)),!(allowEmpty&&match(TokenType.comma))){if(eat(close))break;if(match(TokenType.ellipsis)){parseRest(isBlockScope),parseAssignableListItemTypes(),eat(TokenType.comma),expect(close);break}else parseAssignableListItem(allowModifiers,isBlockScope)}}function parseAssignableListItem(allowModifiers,isBlockScope){allowModifiers&&tsParseModifiers([ContextualKeyword._public,ContextualKeyword._protected,ContextualKeyword._private,ContextualKeyword._readonly,ContextualKeyword._override]),parseMaybeDefault(isBlockScope),parseAssignableListItemTypes(),parseMaybeDefault(isBlockScope,!0)}function parseAssignableListItemTypes(){isFlowEnabled?flowParseAssignableListItemTypes():isTypeScriptEnabled&&tsParseAssignableListItemTypes()}function parseMaybeDefault(isBlockScope,leftAlreadyParsed=!1){if(leftAlreadyParsed||parseBindingAtom(isBlockScope),!eat(TokenType.eq))return;const eqIndex=state.tokens.length-1;parseMaybeAssign(),state.tokens[eqIndex].rhsEndIndex=state.tokens.length}function tsIsIdentifier(){return match(TokenType.name)}function isLiteralPropertyName(){return match(TokenType.name)||Boolean(state.type&TokenType.IS_KEYWORD)||match(TokenType.string)||match(TokenType.num)||match(TokenType.bigint)||match(TokenType.decimal)}function tsNextTokenCanFollowModifier(){const snapshot=state.snapshot();return next(),(match(TokenType.bracketL)||match(TokenType.braceL)||match(TokenType.star)||match(TokenType.ellipsis)||match(TokenType.hash)||isLiteralPropertyName())&&!hasPrecedingLineBreak()?!0:(state.restoreFromSnapshot(snapshot),!1)}function tsParseModifiers(allowedModifiers){for(;tsParseModifier(allowedModifiers)!==null;);}function tsParseModifier(allowedModifiers){if(!match(TokenType.name))return null;const modifier=state.contextualKeyword;if(allowedModifiers.indexOf(modifier)!==-1&&tsNextTokenCanFollowModifier()){switch(modifier){case ContextualKeyword._readonly:state.tokens[state.tokens.length-1].type=TokenType._readonly;break;case ContextualKeyword._abstract:state.tokens[state.tokens.length-1].type=TokenType._abstract;break;case ContextualKeyword._static:state.tokens[state.tokens.length-1].type=TokenType._static;break;case ContextualKeyword._public:state.tokens[state.tokens.length-1].type=TokenType._public;break;case ContextualKeyword._private:state.tokens[state.tokens.length-1].type=TokenType._private;break;case ContextualKeyword._protected:state.tokens[state.tokens.length-1].type=TokenType._protected;break;case ContextualKeyword._override:state.tokens[state.tokens.length-1].type=TokenType._override;break;case ContextualKeyword._declare:state.tokens[state.tokens.length-1].type=TokenType._declare;break;default:break}return modifier}return null}function tsParseEntityName(){for(parseIdentifier();eat(TokenType.dot);)parseIdentifier()}function tsParseTypeReference(){tsParseEntityName(),!hasPrecedingLineBreak()&&match(TokenType.lessThan)&&tsParseTypeArguments()}function tsParseThisTypePredicate(){next(),tsParseTypeAnnotation()}function tsParseThisTypeNode(){next()}function tsParseTypeQuery(){expect(TokenType._typeof),match(TokenType._import)?tsParseImportType():tsParseEntityName(),!hasPrecedingLineBreak()&&match(TokenType.lessThan)&&tsParseTypeArguments()}function tsParseImportType(){expect(TokenType._import),expect(TokenType.parenL),expect(TokenType.string),expect(TokenType.parenR),eat(TokenType.dot)&&tsParseEntityName(),match(TokenType.lessThan)&&tsParseTypeArguments()}function tsParseTypeParameter(){eat(TokenType._const);const hadIn=eat(TokenType._in),hadOut=eatContextual(ContextualKeyword._out);eat(TokenType._const),(hadIn||hadOut)&&!match(TokenType.name)?state.tokens[state.tokens.length-1].type=TokenType.name:parseIdentifier(),eat(TokenType._extends)&&tsParseType(),eat(TokenType.eq)&&tsParseType()}function tsTryParseTypeParameters(){match(TokenType.lessThan)&&tsParseTypeParameters()}function tsParseTypeParameters(){const oldIsType=pushTypeContext(0);for(match(TokenType.lessThan)||match(TokenType.typeParameterStart)?next():unexpected();!eat(TokenType.greaterThan)&&!state.error;)tsParseTypeParameter(),eat(TokenType.comma);popTypeContext(oldIsType)}function tsFillSignature(returnToken){const returnTokenRequired=returnToken===TokenType.arrow;tsTryParseTypeParameters(),expect(TokenType.parenL),state.scopeDepth++,tsParseBindingListForSignature(!1),state.scopeDepth--,(returnTokenRequired||match(returnToken))&&tsParseTypeOrTypePredicateAnnotation(returnToken)}function tsParseBindingListForSignature(isBlockScope){parseBindingList(TokenType.parenR,isBlockScope)}function tsParseTypeMemberSemicolon(){eat(TokenType.comma)||semicolon()}function tsParseSignatureMember(){tsFillSignature(TokenType.colon),tsParseTypeMemberSemicolon()}function tsIsUnambiguouslyIndexSignature(){const snapshot=state.snapshot();next();const isIndexSignature=eat(TokenType.name)&&match(TokenType.colon);return state.restoreFromSnapshot(snapshot),isIndexSignature}function tsTryParseIndexSignature(){if(!(match(TokenType.bracketL)&&tsIsUnambiguouslyIndexSignature()))return!1;const oldIsType=pushTypeContext(0);return expect(TokenType.bracketL),parseIdentifier(),tsParseTypeAnnotation(),expect(TokenType.bracketR),tsTryParseTypeAnnotation(),tsParseTypeMemberSemicolon(),popTypeContext(oldIsType),!0}function tsParsePropertyOrMethodSignature(isReadonly){eat(TokenType.question),!isReadonly&&(match(TokenType.parenL)||match(TokenType.lessThan))?(tsFillSignature(TokenType.colon),tsParseTypeMemberSemicolon()):(tsTryParseTypeAnnotation(),tsParseTypeMemberSemicolon())}function tsParseTypeMember(){if(match(TokenType.parenL)||match(TokenType.lessThan)){tsParseSignatureMember();return}if(match(TokenType._new)){next(),match(TokenType.parenL)||match(TokenType.lessThan)?tsParseSignatureMember():tsParsePropertyOrMethodSignature(!1);return}const readonly=!!tsParseModifier([ContextualKeyword._readonly]);tsTryParseIndexSignature()||((isContextual(ContextualKeyword._get)||isContextual(ContextualKeyword._set))&&tsNextTokenCanFollowModifier(),parsePropertyName(-1),tsParsePropertyOrMethodSignature(readonly))}function tsParseTypeLiteral(){tsParseObjectTypeMembers()}function tsParseObjectTypeMembers(){for(expect(TokenType.braceL);!eat(TokenType.braceR)&&!state.error;)tsParseTypeMember()}function tsLookaheadIsStartOfMappedType(){const snapshot=state.snapshot(),isStartOfMappedType=tsIsStartOfMappedType();return state.restoreFromSnapshot(snapshot),isStartOfMappedType}function tsIsStartOfMappedType(){return next(),eat(TokenType.plus)||eat(TokenType.minus)?isContextual(ContextualKeyword._readonly):(isContextual(ContextualKeyword._readonly)&&next(),!match(TokenType.bracketL)||(next(),!tsIsIdentifier())?!1:(next(),match(TokenType._in)))}function tsParseMappedTypeParameter(){parseIdentifier(),expect(TokenType._in),tsParseType()}function tsParseMappedType(){expect(TokenType.braceL),match(TokenType.plus)||match(TokenType.minus)?(next(),expectContextual(ContextualKeyword._readonly)):eatContextual(ContextualKeyword._readonly),expect(TokenType.bracketL),tsParseMappedTypeParameter(),eatContextual(ContextualKeyword._as)&&tsParseType(),expect(TokenType.bracketR),match(TokenType.plus)||match(TokenType.minus)?(next(),expect(TokenType.question)):eat(TokenType.question),tsTryParseType(),semicolon(),expect(TokenType.braceR)}function tsParseTupleType(){for(expect(TokenType.bracketL);!eat(TokenType.bracketR)&&!state.error;)tsParseTupleElementType(),eat(TokenType.comma)}function tsParseTupleElementType(){eat(TokenType.ellipsis)?tsParseType():(tsParseType(),eat(TokenType.question)),eat(TokenType.colon)&&tsParseType()}function tsParseParenthesizedType(){expect(TokenType.parenL),tsParseType(),expect(TokenType.parenR)}function tsParseTemplateLiteralType(){for(nextTemplateToken(),nextTemplateToken();!match(TokenType.backQuote)&&!state.error;)expect(TokenType.dollarBraceL),tsParseType(),nextTemplateToken(),nextTemplateToken();next()}var FunctionType;(function(FunctionType2){FunctionType2[FunctionType2.TSFunctionType=0]="TSFunctionType";const TSConstructorType=0+1;FunctionType2[FunctionType2.TSConstructorType=TSConstructorType]="TSConstructorType";const TSAbstractConstructorType=TSConstructorType+1;FunctionType2[FunctionType2.TSAbstractConstructorType=TSAbstractConstructorType]="TSAbstractConstructorType"})(FunctionType||(FunctionType={}));function tsParseFunctionOrConstructorType(type){type===FunctionType.TSAbstractConstructorType&&expectContextual(ContextualKeyword._abstract),(type===FunctionType.TSConstructorType||type===FunctionType.TSAbstractConstructorType)&&expect(TokenType._new);const oldInDisallowConditionalTypesContext=state.inDisallowConditionalTypesContext;state.inDisallowConditionalTypesContext=!1,tsFillSignature(TokenType.arrow),state.inDisallowConditionalTypesContext=oldInDisallowConditionalTypesContext}function tsParseNonArrayType(){switch(state.type){case TokenType.name:tsParseTypeReference();return;case TokenType._void:case TokenType._null:next();return;case TokenType.string:case TokenType.num:case TokenType.bigint:case TokenType.decimal:case TokenType._true:case TokenType._false:parseLiteral();return;case TokenType.minus:next(),parseLiteral();return;case TokenType._this:{tsParseThisTypeNode(),isContextual(ContextualKeyword._is)&&!hasPrecedingLineBreak()&&tsParseThisTypePredicate();return}case TokenType._typeof:tsParseTypeQuery();return;case TokenType._import:tsParseImportType();return;case TokenType.braceL:tsLookaheadIsStartOfMappedType()?tsParseMappedType():tsParseTypeLiteral();return;case TokenType.bracketL:tsParseTupleType();return;case TokenType.parenL:tsParseParenthesizedType();return;case TokenType.backQuote:tsParseTemplateLiteralType();return;default:if(state.type&TokenType.IS_KEYWORD){next(),state.tokens[state.tokens.length-1].type=TokenType.name;return}break}unexpected()}function tsParseArrayTypeOrHigher(){for(tsParseNonArrayType();!hasPrecedingLineBreak()&&eat(TokenType.bracketL);)eat(TokenType.bracketR)||(tsParseType(),expect(TokenType.bracketR))}function tsParseInferType(){if(expectContextual(ContextualKeyword._infer),parseIdentifier(),match(TokenType._extends)){const snapshot=state.snapshot();expect(TokenType._extends);const oldInDisallowConditionalTypesContext=state.inDisallowConditionalTypesContext;state.inDisallowConditionalTypesContext=!0,tsParseType(),state.inDisallowConditionalTypesContext=oldInDisallowConditionalTypesContext,(state.error||!state.inDisallowConditionalTypesContext&&match(TokenType.question))&&state.restoreFromSnapshot(snapshot)}}function tsParseTypeOperatorOrHigher(){if(isContextual(ContextualKeyword._keyof)||isContextual(ContextualKeyword._unique)||isContextual(ContextualKeyword._readonly))next(),tsParseTypeOperatorOrHigher();else if(isContextual(ContextualKeyword._infer))tsParseInferType();else{const oldInDisallowConditionalTypesContext=state.inDisallowConditionalTypesContext;state.inDisallowConditionalTypesContext=!1,tsParseArrayTypeOrHigher(),state.inDisallowConditionalTypesContext=oldInDisallowConditionalTypesContext}}function tsParseIntersectionTypeOrHigher(){if(eat(TokenType.bitwiseAND),tsParseTypeOperatorOrHigher(),match(TokenType.bitwiseAND))for(;eat(TokenType.bitwiseAND);)tsParseTypeOperatorOrHigher()}function tsParseUnionTypeOrHigher(){if(eat(TokenType.bitwiseOR),tsParseIntersectionTypeOrHigher(),match(TokenType.bitwiseOR))for(;eat(TokenType.bitwiseOR);)tsParseIntersectionTypeOrHigher()}function tsIsStartOfFunctionType(){return match(TokenType.lessThan)?!0:match(TokenType.parenL)&&tsLookaheadIsUnambiguouslyStartOfFunctionType()}function tsSkipParameterStart(){if(match(TokenType.name)||match(TokenType._this))return next(),!0;if(match(TokenType.braceL)||match(TokenType.bracketL)){let depth=1;for(next();depth>0&&!state.error;)match(TokenType.braceL)||match(TokenType.bracketL)?depth++:(match(TokenType.braceR)||match(TokenType.bracketR))&&depth--,next();return!0}return!1}function tsLookaheadIsUnambiguouslyStartOfFunctionType(){const snapshot=state.snapshot(),isUnambiguouslyStartOfFunctionType=tsIsUnambiguouslyStartOfFunctionType();return state.restoreFromSnapshot(snapshot),isUnambiguouslyStartOfFunctionType}function tsIsUnambiguouslyStartOfFunctionType(){return next(),!!(match(TokenType.parenR)||match(TokenType.ellipsis)||tsSkipParameterStart()&&(match(TokenType.colon)||match(TokenType.comma)||match(TokenType.question)||match(TokenType.eq)||match(TokenType.parenR)&&(next(),match(TokenType.arrow))))}function tsParseTypeOrTypePredicateAnnotation(returnToken){const oldIsType=pushTypeContext(0);expect(returnToken),tsParseTypePredicateOrAssertsPrefix()||tsParseType(),popTypeContext(oldIsType)}function tsTryParseTypeOrTypePredicateAnnotation(){match(TokenType.colon)&&tsParseTypeOrTypePredicateAnnotation(TokenType.colon)}function tsTryParseTypeAnnotation(){match(TokenType.colon)&&tsParseTypeAnnotation()}function tsTryParseType(){eat(TokenType.colon)&&tsParseType()}function tsParseTypePredicateOrAssertsPrefix(){const snapshot=state.snapshot();return isContextual(ContextualKeyword._asserts)?(next(),eatContextual(ContextualKeyword._is)?(tsParseType(),!0):tsIsIdentifier()||match(TokenType._this)?(next(),eatContextual(ContextualKeyword._is)&&tsParseType(),!0):(state.restoreFromSnapshot(snapshot),!1)):tsIsIdentifier()||match(TokenType._this)?(next(),isContextual(ContextualKeyword._is)&&!hasPrecedingLineBreak()?(next(),tsParseType(),!0):(state.restoreFromSnapshot(snapshot),!1)):!1}function tsParseTypeAnnotation(){const oldIsType=pushTypeContext(0);expect(TokenType.colon),tsParseType(),popTypeContext(oldIsType)}function tsParseType(){if(tsParseNonConditionalType(),state.inDisallowConditionalTypesContext||hasPrecedingLineBreak()||!eat(TokenType._extends))return;const oldInDisallowConditionalTypesContext=state.inDisallowConditionalTypesContext;state.inDisallowConditionalTypesContext=!0,tsParseNonConditionalType(),state.inDisallowConditionalTypesContext=oldInDisallowConditionalTypesContext,expect(TokenType.question),tsParseType(),expect(TokenType.colon),tsParseType()}function isAbstractConstructorSignature(){return isContextual(ContextualKeyword._abstract)&&lookaheadType()===TokenType._new}function tsParseNonConditionalType(){if(tsIsStartOfFunctionType()){tsParseFunctionOrConstructorType(FunctionType.TSFunctionType);return}if(match(TokenType._new)){tsParseFunctionOrConstructorType(FunctionType.TSConstructorType);return}else if(isAbstractConstructorSignature()){tsParseFunctionOrConstructorType(FunctionType.TSAbstractConstructorType);return}tsParseUnionTypeOrHigher()}function tsParseTypeAssertion(){const oldIsType=pushTypeContext(1);tsParseType(),expect(TokenType.greaterThan),popTypeContext(oldIsType),parseMaybeUnary()}function tsTryParseJSXTypeArgument(){if(eat(TokenType.jsxTagStart)){state.tokens[state.tokens.length-1].type=TokenType.typeParameterStart;const oldIsType=pushTypeContext(1);for(;!match(TokenType.greaterThan)&&!state.error;)tsParseType(),eat(TokenType.comma);nextJSXTagToken(),popTypeContext(oldIsType)}}function tsParseHeritageClause(){for(;!match(TokenType.braceL)&&!state.error;)tsParseExpressionWithTypeArguments(),eat(TokenType.comma)}function tsParseExpressionWithTypeArguments(){tsParseEntityName(),match(TokenType.lessThan)&&tsParseTypeArguments()}function tsParseInterfaceDeclaration(){parseBindingIdentifier(!1),tsTryParseTypeParameters(),eat(TokenType._extends)&&tsParseHeritageClause(),tsParseObjectTypeMembers()}function tsParseTypeAliasDeclaration(){parseBindingIdentifier(!1),tsTryParseTypeParameters(),expect(TokenType.eq),tsParseType(),semicolon()}function tsParseEnumMember(){if(match(TokenType.string)?parseLiteral():parseIdentifier(),eat(TokenType.eq)){const eqIndex=state.tokens.length-1;parseMaybeAssign(),state.tokens[eqIndex].rhsEndIndex=state.tokens.length}}function tsParseEnumDeclaration(){for(parseBindingIdentifier(!1),expect(TokenType.braceL);!eat(TokenType.braceR)&&!state.error;)tsParseEnumMember(),eat(TokenType.comma)}function tsParseModuleBlock(){expect(TokenType.braceL),parseBlockBody(TokenType.braceR)}function tsParseModuleOrNamespaceDeclaration(){parseBindingIdentifier(!1),eat(TokenType.dot)?tsParseModuleOrNamespaceDeclaration():tsParseModuleBlock()}function tsParseAmbientExternalModuleDeclaration(){isContextual(ContextualKeyword._global)?parseIdentifier():match(TokenType.string)?parseExprAtom():unexpected(),match(TokenType.braceL)?tsParseModuleBlock():semicolon()}function tsParseImportEqualsDeclaration(){parseImportedIdentifier(),expect(TokenType.eq),tsParseModuleReference(),semicolon()}function tsIsExternalModuleReference(){return isContextual(ContextualKeyword._require)&&lookaheadType()===TokenType.parenL}function tsParseModuleReference(){tsIsExternalModuleReference()?tsParseExternalModuleReference():tsParseEntityName()}function tsParseExternalModuleReference(){expectContextual(ContextualKeyword._require),expect(TokenType.parenL),match(TokenType.string)||unexpected(),parseLiteral(),expect(TokenType.parenR)}function tsTryParseDeclare(){if(isLineTerminator())return!1;switch(state.type){case TokenType._function:{const oldIsType=pushTypeContext(1);next();const functionStart=state.start;return parseFunction(functionStart,!0),popTypeContext(oldIsType),!0}case TokenType._class:{const oldIsType=pushTypeContext(1);return parseClass(!0,!1),popTypeContext(oldIsType),!0}case TokenType._const:if(match(TokenType._const)&&isLookaheadContextual(ContextualKeyword._enum)){const oldIsType=pushTypeContext(1);return expect(TokenType._const),expectContextual(ContextualKeyword._enum),state.tokens[state.tokens.length-1].type=TokenType._enum,tsParseEnumDeclaration(),popTypeContext(oldIsType),!0}case TokenType._var:case TokenType._let:{const oldIsType=pushTypeContext(1);return parseVarStatement(state.type!==TokenType._var),popTypeContext(oldIsType),!0}case TokenType.name:{const oldIsType=pushTypeContext(1),contextualKeyword=state.contextualKeyword;let matched=!1;return contextualKeyword===ContextualKeyword._global?(tsParseAmbientExternalModuleDeclaration(),matched=!0):matched=tsParseDeclaration(contextualKeyword,!0),popTypeContext(oldIsType),matched}default:return!1}}function tsTryParseExportDeclaration(){return tsParseDeclaration(state.contextualKeyword,!0)}function tsParseExpressionStatement(contextualKeyword){switch(contextualKeyword){case ContextualKeyword._declare:{const declareTokenIndex=state.tokens.length-1;if(tsTryParseDeclare())return state.tokens[declareTokenIndex].type=TokenType._declare,!0;break}case ContextualKeyword._global:if(match(TokenType.braceL))return tsParseModuleBlock(),!0;break;default:return tsParseDeclaration(contextualKeyword,!1)}return!1}function tsParseDeclaration(contextualKeyword,isBeforeToken){switch(contextualKeyword){case ContextualKeyword._abstract:if(tsCheckLineTerminator(isBeforeToken)&&match(TokenType._class))return state.tokens[state.tokens.length-1].type=TokenType._abstract,parseClass(!0,!1),!0;break;case ContextualKeyword._enum:if(tsCheckLineTerminator(isBeforeToken)&&match(TokenType.name))return state.tokens[state.tokens.length-1].type=TokenType._enum,tsParseEnumDeclaration(),!0;break;case ContextualKeyword._interface:if(tsCheckLineTerminator(isBeforeToken)&&match(TokenType.name)){const oldIsType=pushTypeContext(isBeforeToken?2:1);return tsParseInterfaceDeclaration(),popTypeContext(oldIsType),!0}break;case ContextualKeyword._module:if(tsCheckLineTerminator(isBeforeToken)){if(match(TokenType.string)){const oldIsType=pushTypeContext(isBeforeToken?2:1);return tsParseAmbientExternalModuleDeclaration(),popTypeContext(oldIsType),!0}else if(match(TokenType.name)){const oldIsType=pushTypeContext(isBeforeToken?2:1);return tsParseModuleOrNamespaceDeclaration(),popTypeContext(oldIsType),!0}}break;case ContextualKeyword._namespace:if(tsCheckLineTerminator(isBeforeToken)&&match(TokenType.name)){const oldIsType=pushTypeContext(isBeforeToken?2:1);return tsParseModuleOrNamespaceDeclaration(),popTypeContext(oldIsType),!0}break;case ContextualKeyword._type:if(tsCheckLineTerminator(isBeforeToken)&&match(TokenType.name)){const oldIsType=pushTypeContext(isBeforeToken?2:1);return tsParseTypeAliasDeclaration(),popTypeContext(oldIsType),!0}break;default:break}return!1}function tsCheckLineTerminator(isBeforeToken){return isBeforeToken?(next(),!0):!isLineTerminator()}function tsTryParseGenericAsyncArrowFunction(){const snapshot=state.snapshot();return tsParseTypeParameters(),parseFunctionParams(),tsTryParseTypeOrTypePredicateAnnotation(),expect(TokenType.arrow),state.error?(state.restoreFromSnapshot(snapshot),!1):(parseFunctionBody(!0),!0)}function tsParseTypeArgumentsWithPossibleBitshift(){state.type===TokenType.bitShiftL&&(state.pos-=1,finishToken(TokenType.lessThan)),tsParseTypeArguments()}function tsParseTypeArguments(){const oldIsType=pushTypeContext(0);for(expect(TokenType.lessThan);!match(TokenType.greaterThan)&&!state.error;)tsParseType(),eat(TokenType.comma);oldIsType?(expect(TokenType.greaterThan),popTypeContext(oldIsType)):(popTypeContext(oldIsType),rescan_gt(),expect(TokenType.greaterThan),state.tokens[state.tokens.length-1].isType=!0)}function tsIsDeclarationStart(){if(match(TokenType.name))switch(state.contextualKeyword){case ContextualKeyword._abstract:case ContextualKeyword._declare:case ContextualKeyword._enum:case ContextualKeyword._interface:case ContextualKeyword._module:case ContextualKeyword._namespace:case ContextualKeyword._type:return!0;default:break}return!1}function tsParseFunctionBodyAndFinish(functionStart,funcContextId){if(match(TokenType.colon)&&tsParseTypeOrTypePredicateAnnotation(TokenType.colon),!match(TokenType.braceL)&&isLineTerminator()){let i=state.tokens.length-1;for(;i>=0&&(state.tokens[i].start>=functionStart||state.tokens[i].type===TokenType._default||state.tokens[i].type===TokenType._export);)state.tokens[i].isType=!0,i--;return}parseFunctionBody(!1,funcContextId)}function tsParseSubscript(startTokenIndex,noCalls,stopState){if(!hasPrecedingLineBreak()&&eat(TokenType.bang)){state.tokens[state.tokens.length-1].type=TokenType.nonNullAssertion;return}if(match(TokenType.lessThan)||match(TokenType.bitShiftL)){const snapshot=state.snapshot();if(!noCalls&&atPossibleAsync()&&tsTryParseGenericAsyncArrowFunction())return;if(tsParseTypeArgumentsWithPossibleBitshift(),!noCalls&&eat(TokenType.parenL)?(state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex,parseCallExpressionArguments()):match(TokenType.backQuote)?parseTemplate():(state.type===TokenType.greaterThan||state.type!==TokenType.parenL&&Boolean(state.type&TokenType.IS_EXPRESSION_START)&&!hasPrecedingLineBreak())&&unexpected(),state.error)state.restoreFromSnapshot(snapshot);else return}else!noCalls&&match(TokenType.questionDot)&&lookaheadType()===TokenType.lessThan&&(next(),state.tokens[startTokenIndex].isOptionalChainStart=!0,state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex,tsParseTypeArguments(),expect(TokenType.parenL),parseCallExpressionArguments());baseParseSubscript(startTokenIndex,noCalls,stopState)}function tsTryParseExport(){if(eat(TokenType._import))return isContextual(ContextualKeyword._type)&&lookaheadType()!==TokenType.eq&&expectContextual(ContextualKeyword._type),tsParseImportEqualsDeclaration(),!0;if(eat(TokenType.eq))return parseExpression(),semicolon(),!0;if(eatContextual(ContextualKeyword._as))return expectContextual(ContextualKeyword._namespace),parseIdentifier(),semicolon(),!0;if(isContextual(ContextualKeyword._type)){const nextType=lookaheadType();(nextType===TokenType.braceL||nextType===TokenType.star)&&next()}return!1}function tsParseImportSpecifier(){if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportDeclaration;return}if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportDeclaration,state.tokens[state.tokens.length-2].isType=!0,state.tokens[state.tokens.length-1].isType=!0;return}if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-3].identifierRole=IdentifierRole.ImportAccess,state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportDeclaration;return}parseIdentifier(),state.tokens[state.tokens.length-3].identifierRole=IdentifierRole.ImportAccess,state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportDeclaration,state.tokens[state.tokens.length-4].isType=!0,state.tokens[state.tokens.length-3].isType=!0,state.tokens[state.tokens.length-2].isType=!0,state.tokens[state.tokens.length-1].isType=!0}function tsParseExportSpecifier(){if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ExportAccess;return}if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ExportAccess,state.tokens[state.tokens.length-2].isType=!0,state.tokens[state.tokens.length-1].isType=!0;return}if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-3].identifierRole=IdentifierRole.ExportAccess;return}parseIdentifier(),state.tokens[state.tokens.length-3].identifierRole=IdentifierRole.ExportAccess,state.tokens[state.tokens.length-4].isType=!0,state.tokens[state.tokens.length-3].isType=!0,state.tokens[state.tokens.length-2].isType=!0,state.tokens[state.tokens.length-1].isType=!0}function tsTryParseExportDefaultExpression(){if(isContextual(ContextualKeyword._abstract)&&lookaheadType()===TokenType._class)return state.type=TokenType._abstract,next(),parseClass(!0,!0),!0;if(isContextual(ContextualKeyword._interface)){const oldIsType=pushTypeContext(2);return tsParseDeclaration(ContextualKeyword._interface,!0),popTypeContext(oldIsType),!0}return!1}function tsTryParseStatementContent(){if(state.type===TokenType._const){const ahead=lookaheadTypeAndKeyword();if(ahead.type===TokenType.name&&ahead.contextualKeyword===ContextualKeyword._enum)return expect(TokenType._const),expectContextual(ContextualKeyword._enum),state.tokens[state.tokens.length-1].type=TokenType._enum,tsParseEnumDeclaration(),!0}return!1}function tsTryParseClassMemberWithIsStatic(isStatic){const memberStartIndexAfterStatic=state.tokens.length;tsParseModifiers([ContextualKeyword._abstract,ContextualKeyword._readonly,ContextualKeyword._declare,ContextualKeyword._static,ContextualKeyword._override]);const modifiersEndIndex=state.tokens.length;if(tsTryParseIndexSignature()){const memberStartIndex=isStatic?memberStartIndexAfterStatic-1:memberStartIndexAfterStatic;for(let i=memberStartIndex;i<modifiersEndIndex;i++)state.tokens[i].isType=!0;return!0}return!1}function tsParseIdentifierStatement(contextualKeyword){tsParseExpressionStatement(contextualKeyword)||semicolon()}function tsParseExportDeclaration(){const isDeclare=eatContextual(ContextualKeyword._declare);isDeclare&&(state.tokens[state.tokens.length-1].type=TokenType._declare);let matchedDeclaration=!1;if(match(TokenType.name))if(isDeclare){const oldIsType=pushTypeContext(2);matchedDeclaration=tsTryParseExportDeclaration(),popTypeContext(oldIsType)}else matchedDeclaration=tsTryParseExportDeclaration();if(!matchedDeclaration)if(isDeclare){const oldIsType=pushTypeContext(2);parseStatement(!0),popTypeContext(oldIsType)}else parseStatement(!0)}function tsAfterParseClassSuper(hasSuper){if(hasSuper&&(match(TokenType.lessThan)||match(TokenType.bitShiftL))&&tsParseTypeArgumentsWithPossibleBitshift(),eatContextual(ContextualKeyword._implements)){state.tokens[state.tokens.length-1].type=TokenType._implements;const oldIsType=pushTypeContext(1);tsParseHeritageClause(),popTypeContext(oldIsType)}}function tsStartParseObjPropValue(){tsTryParseTypeParameters()}function tsStartParseFunctionParams(){tsTryParseTypeParameters()}function tsAfterParseVarHead(){const oldIsType=pushTypeContext(0);hasPrecedingLineBreak()||eat(TokenType.bang),tsTryParseTypeAnnotation(),popTypeContext(oldIsType)}function tsStartParseAsyncArrowFromCallExpression(){match(TokenType.colon)&&tsParseTypeAnnotation()}function tsParseMaybeAssign(noIn,isWithinParens){return isJSXEnabled?tsParseMaybeAssignWithJSX(noIn,isWithinParens):tsParseMaybeAssignWithoutJSX(noIn,isWithinParens)}function tsParseMaybeAssignWithJSX(noIn,isWithinParens){if(!match(TokenType.lessThan))return baseParseMaybeAssign(noIn,isWithinParens);const snapshot=state.snapshot();let wasArrow=baseParseMaybeAssign(noIn,isWithinParens);if(state.error)state.restoreFromSnapshot(snapshot);else return wasArrow;return state.type=TokenType.typeParameterStart,tsParseTypeParameters(),wasArrow=baseParseMaybeAssign(noIn,isWithinParens),wasArrow||unexpected(),wasArrow}function tsParseMaybeAssignWithoutJSX(noIn,isWithinParens){if(!match(TokenType.lessThan))return baseParseMaybeAssign(noIn,isWithinParens);const snapshot=state.snapshot();tsParseTypeParameters();const wasArrow=baseParseMaybeAssign(noIn,isWithinParens);if(wasArrow||unexpected(),state.error)state.restoreFromSnapshot(snapshot);else return wasArrow;return baseParseMaybeAssign(noIn,isWithinParens)}function tsParseArrow(){if(match(TokenType.colon)){const snapshot=state.snapshot();tsParseTypeOrTypePredicateAnnotation(TokenType.colon),canInsertSemicolon()&&unexpected(),match(TokenType.arrow)||unexpected(),state.error&&state.restoreFromSnapshot(snapshot)}return eat(TokenType.arrow)}function tsParseAssignableListItemTypes(){const oldIsType=pushTypeContext(0);eat(TokenType.question),tsTryParseTypeAnnotation(),popTypeContext(oldIsType)}function tsParseMaybeDecoratorArguments(){(match(TokenType.lessThan)||match(TokenType.bitShiftL))&&tsParseTypeArgumentsWithPossibleBitshift(),baseParseMaybeDecoratorArguments()}function jsxReadToken(){let sawNewline=!1,sawNonWhitespace=!1;for(;;){if(state.pos>=input.length){unexpected("Unterminated JSX contents");return}const ch=input.charCodeAt(state.pos);if(ch===charCodes.lessThan||ch===charCodes.leftCurlyBrace){if(state.pos===state.start){if(ch===charCodes.lessThan){state.pos++,finishToken(TokenType.jsxTagStart);return}getTokenFromCode(ch);return}finishToken(sawNewline&&!sawNonWhitespace?TokenType.jsxEmptyText:TokenType.jsxText);return}ch===charCodes.lineFeed?sawNewline=!0:ch!==charCodes.space&&ch!==charCodes.carriageReturn&&ch!==charCodes.tab&&(sawNonWhitespace=!0),state.pos++}}function jsxReadString(quote){for(state.pos++;;){if(state.pos>=input.length){unexpected("Unterminated string constant");return}if(input.charCodeAt(state.pos)===quote){state.pos++;break}state.pos++}finishToken(TokenType.string)}function jsxReadWord(){let ch;do{if(state.pos>input.length){unexpected("Unexpectedly reached the end of input.");return}ch=input.charCodeAt(++state.pos)}while(IS_IDENTIFIER_CHAR[ch]||ch===charCodes.dash);finishToken(TokenType.jsxName)}function jsxParseIdentifier(){nextJSXTagToken()}function jsxParseNamespacedName(identifierRole){if(jsxParseIdentifier(),!eat(TokenType.colon)){state.tokens[state.tokens.length-1].identifierRole=identifierRole;return}jsxParseIdentifier()}function jsxParseElementName(){const firstTokenIndex=state.tokens.length;jsxParseNamespacedName(IdentifierRole.Access);let hadDot=!1;for(;match(TokenType.dot);)hadDot=!0,nextJSXTagToken(),jsxParseIdentifier();if(!hadDot){const firstToken=state.tokens[firstTokenIndex],firstChar=input.charCodeAt(firstToken.start);firstChar>=charCodes.lowercaseA&&firstChar<=charCodes.lowercaseZ&&(firstToken.identifierRole=null)}}function jsxParseAttributeValue(){switch(state.type){case TokenType.braceL:next(),parseExpression(),nextJSXTagToken();return;case TokenType.jsxTagStart:jsxParseElement(),nextJSXTagToken();return;case TokenType.string:nextJSXTagToken();return;default:unexpected("JSX value should be either an expression or a quoted JSX text")}}function jsxParseSpreadChild(){expect(TokenType.ellipsis),parseExpression()}function jsxParseOpeningElement(initialTokenIndex){if(match(TokenType.jsxTagEnd))return!1;jsxParseElementName(),isTypeScriptEnabled&&tsTryParseJSXTypeArgument();let hasSeenPropSpread=!1;for(;!match(TokenType.slash)&&!match(TokenType.jsxTagEnd)&&!state.error;){if(eat(TokenType.braceL)){hasSeenPropSpread=!0,expect(TokenType.ellipsis),parseMaybeAssign(),nextJSXTagToken();continue}hasSeenPropSpread&&state.end-state.start===3&&input.charCodeAt(state.start)===charCodes.lowercaseK&&input.charCodeAt(state.start+1)===charCodes.lowercaseE&&input.charCodeAt(state.start+2)===charCodes.lowercaseY&&(state.tokens[initialTokenIndex].jsxRole=JSXRole.KeyAfterPropSpread),jsxParseNamespacedName(IdentifierRole.ObjectKey),match(TokenType.eq)&&(nextJSXTagToken(),jsxParseAttributeValue())}const isSelfClosing=match(TokenType.slash);return isSelfClosing&&nextJSXTagToken(),isSelfClosing}function jsxParseClosingElement(){match(TokenType.jsxTagEnd)||jsxParseElementName()}function jsxParseElementAt(){const initialTokenIndex=state.tokens.length-1;state.tokens[initialTokenIndex].jsxRole=JSXRole.NoChildren;let numExplicitChildren=0;if(!jsxParseOpeningElement(initialTokenIndex))for(nextJSXExprToken();;)switch(state.type){case TokenType.jsxTagStart:if(nextJSXTagToken(),match(TokenType.slash)){nextJSXTagToken(),jsxParseClosingElement(),state.tokens[initialTokenIndex].jsxRole!==JSXRole.KeyAfterPropSpread&&(numExplicitChildren===1?state.tokens[initialTokenIndex].jsxRole=JSXRole.OneChild:numExplicitChildren>1&&(state.tokens[initialTokenIndex].jsxRole=JSXRole.StaticChildren));return}numExplicitChildren++,jsxParseElementAt(),nextJSXExprToken();break;case TokenType.jsxText:numExplicitChildren++,nextJSXExprToken();break;case TokenType.jsxEmptyText:nextJSXExprToken();break;case TokenType.braceL:next(),match(TokenType.ellipsis)?(jsxParseSpreadChild(),nextJSXExprToken(),numExplicitChildren+=2):(match(TokenType.braceR)||(numExplicitChildren++,parseExpression()),nextJSXExprToken());break;default:unexpected();return}}function jsxParseElement(){nextJSXTagToken(),jsxParseElementAt()}function nextJSXTagToken(){state.tokens.push(new Token),skipSpace(),state.start=state.pos;const code=input.charCodeAt(state.pos);if(IS_IDENTIFIER_START[code])jsxReadWord();else if(code===charCodes.quotationMark||code===charCodes.apostrophe)jsxReadString(code);else switch(++state.pos,code){case charCodes.greaterThan:finishToken(TokenType.jsxTagEnd);break;case charCodes.lessThan:finishToken(TokenType.jsxTagStart);break;case charCodes.slash:finishToken(TokenType.slash);break;case charCodes.equalsTo:finishToken(TokenType.eq);break;case charCodes.leftCurlyBrace:finishToken(TokenType.braceL);break;case charCodes.dot:finishToken(TokenType.dot);break;case charCodes.colon:finishToken(TokenType.colon);break;default:unexpected()}}function nextJSXExprToken(){state.tokens.push(new Token),state.start=state.pos,jsxReadToken()}function typedParseConditional(noIn){if(match(TokenType.question)){const nextType=lookaheadType();if(nextType===TokenType.colon||nextType===TokenType.comma||nextType===TokenType.parenR)return}baseParseConditional(noIn)}function typedParseParenItem(){eatTypeToken(TokenType.question),match(TokenType.colon)&&(isTypeScriptEnabled?tsParseTypeAnnotation():isFlowEnabled&&flowParseTypeAnnotation())}class StopState{constructor(stop){this.stop=stop}}function parseExpression(noIn=!1){if(parseMaybeAssign(noIn),match(TokenType.comma))for(;eat(TokenType.comma);)parseMaybeAssign(noIn)}function parseMaybeAssign(noIn=!1,isWithinParens=!1){return isTypeScriptEnabled?tsParseMaybeAssign(noIn,isWithinParens):isFlowEnabled?flowParseMaybeAssign(noIn,isWithinParens):baseParseMaybeAssign(noIn,isWithinParens)}function baseParseMaybeAssign(noIn,isWithinParens){if(match(TokenType._yield))return parseYield(),!1;(match(TokenType.parenL)||match(TokenType.name)||match(TokenType._yield))&&(state.potentialArrowAt=state.start);const wasArrow=parseMaybeConditional(noIn);return isWithinParens&&parseParenItem(),state.type&TokenType.IS_ASSIGN?(next(),parseMaybeAssign(noIn),!1):wasArrow}function parseMaybeConditional(noIn){return parseExprOps(noIn)?!0:(parseConditional(noIn),!1)}function parseConditional(noIn){isTypeScriptEnabled||isFlowEnabled?typedParseConditional(noIn):baseParseConditional(noIn)}function baseParseConditional(noIn){eat(TokenType.question)&&(parseMaybeAssign(),expect(TokenType.colon),parseMaybeAssign(noIn))}function parseExprOps(noIn){const startTokenIndex=state.tokens.length;return parseMaybeUnary()?!0:(parseExprOp(startTokenIndex,-1,noIn),!1)}function parseExprOp(startTokenIndex,minPrec,noIn){if(isTypeScriptEnabled&&(TokenType._in&TokenType.PRECEDENCE_MASK)>minPrec&&!hasPrecedingLineBreak()&&(eatContextual(ContextualKeyword._as)||eatContextual(ContextualKeyword._satisfies))){const oldIsType=pushTypeContext(1);tsParseType(),popTypeContext(oldIsType),rescan_gt(),parseExprOp(startTokenIndex,minPrec,noIn);return}const prec=state.type&TokenType.PRECEDENCE_MASK;if(prec>0&&(!noIn||!match(TokenType._in))&&prec>minPrec){const op=state.type;next(),op===TokenType.nullishCoalescing&&(state.tokens[state.tokens.length-1].nullishStartIndex=startTokenIndex);const rhsStartTokenIndex=state.tokens.length;parseMaybeUnary(),parseExprOp(rhsStartTokenIndex,op&TokenType.IS_RIGHT_ASSOCIATIVE?prec-1:prec,noIn),op===TokenType.nullishCoalescing&&(state.tokens[startTokenIndex].numNullishCoalesceStarts++,state.tokens[state.tokens.length-1].numNullishCoalesceEnds++),parseExprOp(startTokenIndex,minPrec,noIn)}}function parseMaybeUnary(){if(isTypeScriptEnabled&&!isJSXEnabled&&eat(TokenType.lessThan))return tsParseTypeAssertion(),!1;if(isContextual(ContextualKeyword._module)&&lookaheadCharCode()===charCodes.leftCurlyBrace&&!hasFollowingLineBreak())return parseModuleExpression(),!1;if(state.type&TokenType.IS_PREFIX)return next(),parseMaybeUnary(),!1;if(parseExprSubscripts())return!0;for(;state.type&TokenType.IS_POSTFIX&&!canInsertSemicolon();)state.type===TokenType.preIncDec&&(state.type=TokenType.postIncDec),next();return!1}function parseExprSubscripts(){const startTokenIndex=state.tokens.length;return parseExprAtom()?!0:(parseSubscripts(startTokenIndex),state.tokens.length>startTokenIndex&&state.tokens[startTokenIndex].isOptionalChainStart&&(state.tokens[state.tokens.length-1].isOptionalChainEnd=!0),!1)}function parseSubscripts(startTokenIndex,noCalls=!1){isFlowEnabled?flowParseSubscripts(startTokenIndex,noCalls):baseParseSubscripts(startTokenIndex,noCalls)}function baseParseSubscripts(startTokenIndex,noCalls=!1){const stopState=new StopState(!1);do parseSubscript(startTokenIndex,noCalls,stopState);while(!stopState.stop&&!state.error)}function parseSubscript(startTokenIndex,noCalls,stopState){isTypeScriptEnabled?tsParseSubscript(startTokenIndex,noCalls,stopState):isFlowEnabled?flowParseSubscript(startTokenIndex,noCalls,stopState):baseParseSubscript(startTokenIndex,noCalls,stopState)}function baseParseSubscript(startTokenIndex,noCalls,stopState){if(!noCalls&&eat(TokenType.doubleColon))parseNoCallExpr(),stopState.stop=!0,parseSubscripts(startTokenIndex,noCalls);else if(match(TokenType.questionDot)){if(state.tokens[startTokenIndex].isOptionalChainStart=!0,noCalls&&lookaheadType()===TokenType.parenL){stopState.stop=!0;return}next(),state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex,eat(TokenType.bracketL)?(parseExpression(),expect(TokenType.bracketR)):eat(TokenType.parenL)?parseCallExpressionArguments():parseMaybePrivateName()}else if(eat(TokenType.dot))state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex,parseMaybePrivateName();else if(eat(TokenType.bracketL))state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex,parseExpression(),expect(TokenType.bracketR);else if(!noCalls&&match(TokenType.parenL))if(atPossibleAsync()){const snapshot=state.snapshot(),asyncStartTokenIndex=state.tokens.length;next(),state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex;const callContextId=getNextContextId();state.tokens[state.tokens.length-1].contextId=callContextId,parseCallExpressionArguments(),state.tokens[state.tokens.length-1].contextId=callContextId,shouldParseAsyncArrow()&&(state.restoreFromSnapshot(snapshot),stopState.stop=!0,state.scopeDepth++,parseFunctionParams(),parseAsyncArrowFromCallExpression(asyncStartTokenIndex))}else{next(),state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex;const callContextId=getNextContextId();state.tokens[state.tokens.length-1].contextId=callContextId,parseCallExpressionArguments(),state.tokens[state.tokens.length-1].contextId=callContextId}else match(TokenType.backQuote)?parseTemplate():stopState.stop=!0}function atPossibleAsync(){return state.tokens[state.tokens.length-1].contextualKeyword===ContextualKeyword._async&&!canInsertSemicolon()}function parseCallExpressionArguments(){let first=!0;for(;!eat(TokenType.parenR)&&!state.error;){if(first)first=!1;else if(expect(TokenType.comma),eat(TokenType.parenR))break;parseExprListItem(!1)}}function shouldParseAsyncArrow(){return match(TokenType.colon)||match(TokenType.arrow)}function parseAsyncArrowFromCallExpression(startTokenIndex){isTypeScriptEnabled?tsStartParseAsyncArrowFromCallExpression():isFlowEnabled&&flowStartParseAsyncArrowFromCallExpression(),expect(TokenType.arrow),parseArrowExpression(startTokenIndex)}function parseNoCallExpr(){const startTokenIndex=state.tokens.length;parseExprAtom(),parseSubscripts(startTokenIndex,!0)}function parseExprAtom(){if(eat(TokenType.modulo))return parseIdentifier(),!1;if(match(TokenType.jsxText)||match(TokenType.jsxEmptyText))return parseLiteral(),!1;if(match(TokenType.lessThan)&&isJSXEnabled)return state.type=TokenType.jsxTagStart,jsxParseElement(),next(),!1;const canBeArrow=state.potentialArrowAt===state.start;switch(state.type){case TokenType.slash:case TokenType.assign:retokenizeSlashAsRegex();case TokenType._super:case TokenType._this:case TokenType.regexp:case TokenType.num:case TokenType.bigint:case TokenType.decimal:case TokenType.string:case TokenType._null:case TokenType._true:case TokenType._false:return next(),!1;case TokenType._import:return next(),match(TokenType.dot)&&(state.tokens[state.tokens.length-1].type=TokenType.name,next(),parseIdentifier()),!1;case TokenType.name:{const startTokenIndex=state.tokens.length,functionStart=state.start,contextualKeyword=state.contextualKeyword;return parseIdentifier(),contextualKeyword===ContextualKeyword._await?(parseAwait(),!1):contextualKeyword===ContextualKeyword._async&&match(TokenType._function)&&!canInsertSemicolon()?(next(),parseFunction(functionStart,!1),!1):canBeArrow&&contextualKeyword===ContextualKeyword._async&&!canInsertSemicolon()&&match(TokenType.name)?(state.scopeDepth++,parseBindingIdentifier(!1),expect(TokenType.arrow),parseArrowExpression(startTokenIndex),!0):match(TokenType._do)&&!canInsertSemicolon()?(next(),parseBlock(),!1):canBeArrow&&!canInsertSemicolon()&&match(TokenType.arrow)?(state.scopeDepth++,markPriorBindingIdentifier(!1),expect(TokenType.arrow),parseArrowExpression(startTokenIndex),!0):(state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.Access,!1)}case TokenType._do:return next(),parseBlock(),!1;case TokenType.parenL:return parseParenAndDistinguishExpression(canBeArrow);case TokenType.bracketL:return next(),parseExprList(TokenType.bracketR,!0),!1;case TokenType.braceL:return parseObj(!1,!1),!1;case TokenType._function:return parseFunctionExpression(),!1;case TokenType.at:parseDecorators();case TokenType._class:return parseClass(!1),!1;case TokenType._new:return parseNew(),!1;case TokenType.backQuote:return parseTemplate(),!1;case TokenType.doubleColon:return next(),parseNoCallExpr(),!1;case TokenType.hash:{const code=lookaheadCharCode();return IS_IDENTIFIER_START[code]||code===charCodes.backslash?parseMaybePrivateName():next(),!1}default:return unexpected(),!1}}function parseMaybePrivateName(){eat(TokenType.hash),parseIdentifier()}function parseFunctionExpression(){const functionStart=state.start;parseIdentifier(),eat(TokenType.dot)&&parseIdentifier(),parseFunction(functionStart,!1)}function parseLiteral(){next()}function parseParenExpression(){expect(TokenType.parenL),parseExpression(),expect(TokenType.parenR)}function parseParenAndDistinguishExpression(canBeArrow){const snapshot=state.snapshot(),startTokenIndex=state.tokens.length;expect(TokenType.parenL);let first=!0;for(;!match(TokenType.parenR)&&!state.error;){if(first)first=!1;else if(expect(TokenType.comma),match(TokenType.parenR))break;if(match(TokenType.ellipsis)){parseRest(!1),parseParenItem();break}else parseMaybeAssign(!1,!0)}return expect(TokenType.parenR),canBeArrow&&shouldParseArrow()&&parseArrow()?(state.restoreFromSnapshot(snapshot),state.scopeDepth++,parseFunctionParams(),parseArrow(),parseArrowExpression(startTokenIndex),state.error?(state.restoreFromSnapshot(snapshot),parseParenAndDistinguishExpression(!1),!1):!0):!1}function shouldParseArrow(){return match(TokenType.colon)||!canInsertSemicolon()}function parseArrow(){return isTypeScriptEnabled?tsParseArrow():isFlowEnabled?flowParseArrow():eat(TokenType.arrow)}function parseParenItem(){(isTypeScriptEnabled||isFlowEnabled)&&typedParseParenItem()}function parseNew(){if(expect(TokenType._new),eat(TokenType.dot)){parseIdentifier();return}parseNewCallee(),isFlowEnabled&&flowStartParseNewArguments(),eat(TokenType.parenL)&&parseExprList(TokenType.parenR)}function parseNewCallee(){parseNoCallExpr(),eat(TokenType.questionDot)}function parseTemplate(){for(nextTemplateToken(),nextTemplateToken();!match(TokenType.backQuote)&&!state.error;)expect(TokenType.dollarBraceL),parseExpression(),nextTemplateToken(),nextTemplateToken();next()}function parseObj(isPattern,isBlockScope){const contextId=getNextContextId();let first=!0;for(next(),state.tokens[state.tokens.length-1].contextId=contextId;!eat(TokenType.braceR)&&!state.error;){if(first)first=!1;else if(expect(TokenType.comma),eat(TokenType.braceR))break;let isGenerator=!1;if(match(TokenType.ellipsis)){const previousIndex=state.tokens.length;if(parseSpread(),isPattern&&(state.tokens.length===previousIndex+2&&markPriorBindingIdentifier(isBlockScope),eat(TokenType.braceR)))break;continue}isPattern||(isGenerator=eat(TokenType.star)),!isPattern&&isContextual(ContextualKeyword._async)?(isGenerator&&unexpected(),parseIdentifier(),match(TokenType.colon)||match(TokenType.parenL)||match(TokenType.braceR)||match(TokenType.eq)||match(TokenType.comma)||(match(TokenType.star)&&(next(),isGenerator=!0),parsePropertyName(contextId))):parsePropertyName(contextId),parseObjPropValue(isPattern,isBlockScope,contextId)}state.tokens[state.tokens.length-1].contextId=contextId}function isGetterOrSetterMethod(isPattern){return!isPattern&&(match(TokenType.string)||match(TokenType.num)||match(TokenType.bracketL)||match(TokenType.name)||!!(state.type&TokenType.IS_KEYWORD))}function parseObjectMethod(isPattern,objectContextId){const functionStart=state.start;return match(TokenType.parenL)?(isPattern&&unexpected(),parseMethod(functionStart,!1),!0):isGetterOrSetterMethod(isPattern)?(parsePropertyName(objectContextId),parseMethod(functionStart,!1),!0):!1}function parseObjectProperty(isPattern,isBlockScope){if(eat(TokenType.colon)){isPattern?parseMaybeDefault(isBlockScope):parseMaybeAssign(!1);return}let identifierRole;isPattern?state.scopeDepth===0?identifierRole=IdentifierRole.ObjectShorthandTopLevelDeclaration:isBlockScope?identifierRole=IdentifierRole.ObjectShorthandBlockScopedDeclaration:identifierRole=IdentifierRole.ObjectShorthandFunctionScopedDeclaration:identifierRole=IdentifierRole.ObjectShorthand,state.tokens[state.tokens.length-1].identifierRole=identifierRole,parseMaybeDefault(isBlockScope,!0)}function parseObjPropValue(isPattern,isBlockScope,objectContextId){isTypeScriptEnabled?tsStartParseObjPropValue():isFlowEnabled&&flowStartParseObjPropValue(),parseObjectMethod(isPattern,objectContextId)||parseObjectProperty(isPattern,isBlockScope)}function parsePropertyName(objectContextId){isFlowEnabled&&flowParseVariance(),eat(TokenType.bracketL)?(state.tokens[state.tokens.length-1].contextId=objectContextId,parseMaybeAssign(),expect(TokenType.bracketR),state.tokens[state.tokens.length-1].contextId=objectContextId):(match(TokenType.num)||match(TokenType.string)||match(TokenType.bigint)||match(TokenType.decimal)?parseExprAtom():parseMaybePrivateName(),state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ObjectKey,state.tokens[state.tokens.length-1].contextId=objectContextId)}function parseMethod(functionStart,isConstructor){const funcContextId=getNextContextId();state.scopeDepth++;const startTokenIndex=state.tokens.length;parseFunctionParams(isConstructor,funcContextId),parseFunctionBodyAndFinish(functionStart,funcContextId);const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,!0)),state.scopeDepth--}function parseArrowExpression(startTokenIndex){parseFunctionBody(!0);const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,!0)),state.scopeDepth--}function parseFunctionBodyAndFinish(functionStart,funcContextId=0){isTypeScriptEnabled?tsParseFunctionBodyAndFinish(functionStart,funcContextId):isFlowEnabled?flowParseFunctionBodyAndFinish(funcContextId):parseFunctionBody(!1,funcContextId)}function parseFunctionBody(allowExpression,funcContextId=0){allowExpression&&!match(TokenType.braceL)?parseMaybeAssign():parseBlock(!0,funcContextId)}function parseExprList(close,allowEmpty=!1){let first=!0;for(;!eat(close)&&!state.error;){if(first)first=!1;else if(expect(TokenType.comma),eat(close))break;parseExprListItem(allowEmpty)}}function parseExprListItem(allowEmpty){allowEmpty&&match(TokenType.comma)||(match(TokenType.ellipsis)?(parseSpread(),parseParenItem()):match(TokenType.question)?next():parseMaybeAssign(!1,!0))}function parseIdentifier(){next(),state.tokens[state.tokens.length-1].type=TokenType.name}function parseAwait(){parseMaybeUnary()}function parseYield(){next(),!match(TokenType.semi)&&!canInsertSemicolon()&&(eat(TokenType.star),parseMaybeAssign())}function parseModuleExpression(){expectContextual(ContextualKeyword._module),expect(TokenType.braceL),parseBlockBody(TokenType.braceR)}function isMaybeDefaultImport(lookahead){return(lookahead.type===TokenType.name||!!(lookahead.type&TokenType.IS_KEYWORD))&&lookahead.contextualKeyword!==ContextualKeyword._from}function flowParseTypeInitialiser(tok){const oldIsType=pushTypeContext(0);expect(tok||TokenType.colon),flowParseType(),popTypeContext(oldIsType)}function flowParsePredicate(){expect(TokenType.modulo),expectContextual(ContextualKeyword._checks),eat(TokenType.parenL)&&(parseExpression(),expect(TokenType.parenR))}function flowParseTypeAndPredicateInitialiser(){const oldIsType=pushTypeContext(0);expect(TokenType.colon),match(TokenType.modulo)?flowParsePredicate():(flowParseType(),match(TokenType.modulo)&&flowParsePredicate()),popTypeContext(oldIsType)}function flowParseDeclareClass(){next(),flowParseInterfaceish(!0)}function flowParseDeclareFunction(){next(),parseIdentifier(),match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),expect(TokenType.parenL),flowParseFunctionTypeParams(),expect(TokenType.parenR),flowParseTypeAndPredicateInitialiser(),semicolon()}function flowParseDeclare(){match(TokenType._class)?flowParseDeclareClass():match(TokenType._function)?flowParseDeclareFunction():match(TokenType._var)?flowParseDeclareVariable():eatContextual(ContextualKeyword._module)?eat(TokenType.dot)?flowParseDeclareModuleExports():flowParseDeclareModule():isContextual(ContextualKeyword._type)?flowParseDeclareTypeAlias():isContextual(ContextualKeyword._opaque)?flowParseDeclareOpaqueType():isContextual(ContextualKeyword._interface)?flowParseDeclareInterface():match(TokenType._export)?flowParseDeclareExportDeclaration():unexpected()}function flowParseDeclareVariable(){next(),flowParseTypeAnnotatableIdentifier(),semicolon()}function flowParseDeclareModule(){for(match(TokenType.string)?parseExprAtom():parseIdentifier(),expect(TokenType.braceL);!match(TokenType.braceR)&&!state.error;)match(TokenType._import)?(next(),parseImport()):unexpected();expect(TokenType.braceR)}function flowParseDeclareExportDeclaration(){expect(TokenType._export),eat(TokenType._default)?match(TokenType._function)||match(TokenType._class)?flowParseDeclare():(flowParseType(),semicolon()):match(TokenType._var)||match(TokenType._function)||match(TokenType._class)||isContextual(ContextualKeyword._opaque)?flowParseDeclare():match(TokenType.star)||match(TokenType.braceL)||isContextual(ContextualKeyword._interface)||isContextual(ContextualKeyword._type)||isContextual(ContextualKeyword._opaque)?parseExport():unexpected()}function flowParseDeclareModuleExports(){expectContextual(ContextualKeyword._exports),flowParseTypeAnnotation(),semicolon()}function flowParseDeclareTypeAlias(){next(),flowParseTypeAlias()}function flowParseDeclareOpaqueType(){next(),flowParseOpaqueType(!0)}function flowParseDeclareInterface(){next(),flowParseInterfaceish()}function flowParseInterfaceish(isClass=!1){if(flowParseRestrictedIdentifier(),match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),eat(TokenType._extends))do flowParseInterfaceExtends();while(!isClass&&eat(TokenType.comma));if(isContextual(ContextualKeyword._mixins)){next();do flowParseInterfaceExtends();while(eat(TokenType.comma))}if(isContextual(ContextualKeyword._implements)){next();do flowParseInterfaceExtends();while(eat(TokenType.comma))}flowParseObjectType(isClass,!1,isClass)}function flowParseInterfaceExtends(){flowParseQualifiedTypeIdentifier(!1),match(TokenType.lessThan)&&flowParseTypeParameterInstantiation()}function flowParseInterface(){flowParseInterfaceish()}function flowParseRestrictedIdentifier(){parseIdentifier()}function flowParseTypeAlias(){flowParseRestrictedIdentifier(),match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),flowParseTypeInitialiser(TokenType.eq),semicolon()}function flowParseOpaqueType(declare){expectContextual(ContextualKeyword._type),flowParseRestrictedIdentifier(),match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),match(TokenType.colon)&&flowParseTypeInitialiser(TokenType.colon),declare||flowParseTypeInitialiser(TokenType.eq),semicolon()}function flowParseTypeParameter(){flowParseVariance(),flowParseTypeAnnotatableIdentifier(),eat(TokenType.eq)&&flowParseType()}function flowParseTypeParameterDeclaration(){const oldIsType=pushTypeContext(0);match(TokenType.lessThan)||match(TokenType.typeParameterStart)?next():unexpected();do flowParseTypeParameter(),match(TokenType.greaterThan)||expect(TokenType.comma);while(!match(TokenType.greaterThan)&&!state.error);expect(TokenType.greaterThan),popTypeContext(oldIsType)}function flowParseTypeParameterInstantiation(){const oldIsType=pushTypeContext(0);for(expect(TokenType.lessThan);!match(TokenType.greaterThan)&&!state.error;)flowParseType(),match(TokenType.greaterThan)||expect(TokenType.comma);expect(TokenType.greaterThan),popTypeContext(oldIsType)}function flowParseInterfaceType(){if(expectContextual(ContextualKeyword._interface),eat(TokenType._extends))do flowParseInterfaceExtends();while(eat(TokenType.comma));flowParseObjectType(!1,!1,!1)}function flowParseObjectPropertyKey(){match(TokenType.num)||match(TokenType.string)?parseExprAtom():parseIdentifier()}function flowParseObjectTypeIndexer(){lookaheadType()===TokenType.colon?(flowParseObjectPropertyKey(),flowParseTypeInitialiser()):flowParseType(),expect(TokenType.bracketR),flowParseTypeInitialiser()}function flowParseObjectTypeInternalSlot(){flowParseObjectPropertyKey(),expect(TokenType.bracketR),expect(TokenType.bracketR),match(TokenType.lessThan)||match(TokenType.parenL)?flowParseObjectTypeMethodish():(eat(TokenType.question),flowParseTypeInitialiser())}function flowParseObjectTypeMethodish(){for(match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),expect(TokenType.parenL);!match(TokenType.parenR)&&!match(TokenType.ellipsis)&&!state.error;)flowParseFunctionTypeParam(),match(TokenType.parenR)||expect(TokenType.comma);eat(TokenType.ellipsis)&&flowParseFunctionTypeParam(),expect(TokenType.parenR),flowParseTypeInitialiser()}function flowParseObjectTypeCallProperty(){flowParseObjectTypeMethodish()}function flowParseObjectType(allowStatic,allowExact,allowProto){let endDelim;for(allowExact&&match(TokenType.braceBarL)?(expect(TokenType.braceBarL),endDelim=TokenType.braceBarR):(expect(TokenType.braceL),endDelim=TokenType.braceR);!match(endDelim)&&!state.error;){if(allowProto&&isContextual(ContextualKeyword._proto)){const lookahead=lookaheadType();lookahead!==TokenType.colon&&lookahead!==TokenType.question&&(next(),allowStatic=!1)}if(allowStatic&&isContextual(ContextualKeyword._static)){const lookahead=lookaheadType();lookahead!==TokenType.colon&&lookahead!==TokenType.question&&next()}if(flowParseVariance(),eat(TokenType.bracketL))eat(TokenType.bracketL)?flowParseObjectTypeInternalSlot():flowParseObjectTypeIndexer();else if(match(TokenType.parenL)||match(TokenType.lessThan))flowParseObjectTypeCallProperty();else{if(isContextual(ContextualKeyword._get)||isContextual(ContextualKeyword._set)){const lookahead=lookaheadType();(lookahead===TokenType.name||lookahead===TokenType.string||lookahead===TokenType.num)&&next()}flowParseObjectTypeProperty()}flowObjectTypeSemicolon()}expect(endDelim)}function flowParseObjectTypeProperty(){if(match(TokenType.ellipsis)){if(expect(TokenType.ellipsis),eat(TokenType.comma)||eat(TokenType.semi),match(TokenType.braceR))return;flowParseType()}else flowParseObjectPropertyKey(),match(TokenType.lessThan)||match(TokenType.parenL)?flowParseObjectTypeMethodish():(eat(TokenType.question),flowParseTypeInitialiser())}function flowObjectTypeSemicolon(){!eat(TokenType.semi)&&!eat(TokenType.comma)&&!match(TokenType.braceR)&&!match(TokenType.braceBarR)&&unexpected()}function flowParseQualifiedTypeIdentifier(initialIdAlreadyParsed){for(initialIdAlreadyParsed||parseIdentifier();eat(TokenType.dot);)parseIdentifier()}function flowParseGenericType(){flowParseQualifiedTypeIdentifier(!0),match(TokenType.lessThan)&&flowParseTypeParameterInstantiation()}function flowParseTypeofType(){expect(TokenType._typeof),flowParsePrimaryType()}function flowParseTupleType(){for(expect(TokenType.bracketL);state.pos<input.length&&!match(TokenType.bracketR)&&(flowParseType(),!match(TokenType.bracketR));)expect(TokenType.comma);expect(TokenType.bracketR)}function flowParseFunctionTypeParam(){const lookahead=lookaheadType();lookahead===TokenType.colon||lookahead===TokenType.question?(parseIdentifier(),eat(TokenType.question),flowParseTypeInitialiser()):flowParseType()}function flowParseFunctionTypeParams(){for(;!match(TokenType.parenR)&&!match(TokenType.ellipsis)&&!state.error;)flowParseFunctionTypeParam(),match(TokenType.parenR)||expect(TokenType.comma);eat(TokenType.ellipsis)&&flowParseFunctionTypeParam()}function flowParsePrimaryType(){let isGroupedType=!1;const oldNoAnonFunctionType=state.noAnonFunctionType;switch(state.type){case TokenType.name:{if(isContextual(ContextualKeyword._interface)){flowParseInterfaceType();return}parseIdentifier(),flowParseGenericType();return}case TokenType.braceL:flowParseObjectType(!1,!1,!1);return;case TokenType.braceBarL:flowParseObjectType(!1,!0,!1);return;case TokenType.bracketL:flowParseTupleType();return;case TokenType.lessThan:flowParseTypeParameterDeclaration(),expect(TokenType.parenL),flowParseFunctionTypeParams(),expect(TokenType.parenR),expect(TokenType.arrow),flowParseType();return;case TokenType.parenL:if(next(),!match(TokenType.parenR)&&!match(TokenType.ellipsis))if(match(TokenType.name)){const token=lookaheadType();isGroupedType=token!==TokenType.question&&token!==TokenType.colon}else isGroupedType=!0;if(isGroupedType)if(state.noAnonFunctionType=!1,flowParseType(),state.noAnonFunctionType=oldNoAnonFunctionType,state.noAnonFunctionType||!(match(TokenType.comma)||match(TokenType.parenR)&&lookaheadType()===TokenType.arrow)){expect(TokenType.parenR);return}else eat(TokenType.comma);flowParseFunctionTypeParams(),expect(TokenType.parenR),expect(TokenType.arrow),flowParseType();return;case TokenType.minus:next(),parseLiteral();return;case TokenType.string:case TokenType.num:case TokenType._true:case TokenType._false:case TokenType._null:case TokenType._this:case TokenType._void:case TokenType.star:next();return;default:if(state.type===TokenType._typeof){flowParseTypeofType();return}else if(state.type&TokenType.IS_KEYWORD){next(),state.tokens[state.tokens.length-1].type=TokenType.name;return}}unexpected()}function flowParsePostfixType(){for(flowParsePrimaryType();!canInsertSemicolon()&&(match(TokenType.bracketL)||match(TokenType.questionDot));)eat(TokenType.questionDot),expect(TokenType.bracketL),eat(TokenType.bracketR)||(flowParseType(),expect(TokenType.bracketR))}function flowParsePrefixType(){eat(TokenType.question)?flowParsePrefixType():flowParsePostfixType()}function flowParseAnonFunctionWithoutParens(){flowParsePrefixType(),!state.noAnonFunctionType&&eat(TokenType.arrow)&&flowParseType()}function flowParseIntersectionType(){for(eat(TokenType.bitwiseAND),flowParseAnonFunctionWithoutParens();eat(TokenType.bitwiseAND);)flowParseAnonFunctionWithoutParens()}function flowParseUnionType(){for(eat(TokenType.bitwiseOR),flowParseIntersectionType();eat(TokenType.bitwiseOR);)flowParseIntersectionType()}function flowParseType(){flowParseUnionType()}function flowParseTypeAnnotation(){flowParseTypeInitialiser()}function flowParseTypeAnnotatableIdentifier(){parseIdentifier(),match(TokenType.colon)&&flowParseTypeAnnotation()}function flowParseVariance(){(match(TokenType.plus)||match(TokenType.minus))&&(next(),state.tokens[state.tokens.length-1].isType=!0)}function flowParseFunctionBodyAndFinish(funcContextId){match(TokenType.colon)&&flowParseTypeAndPredicateInitialiser(),parseFunctionBody(!1,funcContextId)}function flowParseSubscript(startTokenIndex,noCalls,stopState){if(match(TokenType.questionDot)&&lookaheadType()===TokenType.lessThan){if(noCalls){stopState.stop=!0;return}next(),flowParseTypeParameterInstantiation(),expect(TokenType.parenL),parseCallExpressionArguments();return}else if(!noCalls&&match(TokenType.lessThan)){const snapshot=state.snapshot();if(flowParseTypeParameterInstantiation(),expect(TokenType.parenL),parseCallExpressionArguments(),state.error)state.restoreFromSnapshot(snapshot);else return}baseParseSubscript(startTokenIndex,noCalls,stopState)}function flowStartParseNewArguments(){if(match(TokenType.lessThan)){const snapshot=state.snapshot();flowParseTypeParameterInstantiation(),state.error&&state.restoreFromSnapshot(snapshot)}}function flowTryParseStatement(){if(match(TokenType.name)&&state.contextualKeyword===ContextualKeyword._interface){const oldIsType=pushTypeContext(0);return next(),flowParseInterface(),popTypeContext(oldIsType),!0}else if(isContextual(ContextualKeyword._enum))return flowParseEnumDeclaration(),!0;return!1}function flowTryParseExportDefaultExpression(){return isContextual(ContextualKeyword._enum)?(flowParseEnumDeclaration(),!0):!1}function flowParseIdentifierStatement(contextualKeyword){if(contextualKeyword===ContextualKeyword._declare){if(match(TokenType._class)||match(TokenType.name)||match(TokenType._function)||match(TokenType._var)||match(TokenType._export)){const oldIsType=pushTypeContext(1);flowParseDeclare(),popTypeContext(oldIsType)}}else if(match(TokenType.name)){if(contextualKeyword===ContextualKeyword._interface){const oldIsType=pushTypeContext(1);flowParseInterface(),popTypeContext(oldIsType)}else if(contextualKeyword===ContextualKeyword._type){const oldIsType=pushTypeContext(1);flowParseTypeAlias(),popTypeContext(oldIsType)}else if(contextualKeyword===ContextualKeyword._opaque){const oldIsType=pushTypeContext(1);flowParseOpaqueType(!1),popTypeContext(oldIsType)}}semicolon()}function flowShouldParseExportDeclaration(){return isContextual(ContextualKeyword._type)||isContextual(ContextualKeyword._interface)||isContextual(ContextualKeyword._opaque)||isContextual(ContextualKeyword._enum)}function flowShouldDisallowExportDefaultSpecifier(){return match(TokenType.name)&&(state.contextualKeyword===ContextualKeyword._type||state.contextualKeyword===ContextualKeyword._interface||state.contextualKeyword===ContextualKeyword._opaque||state.contextualKeyword===ContextualKeyword._enum)}function flowParseExportDeclaration(){if(isContextual(ContextualKeyword._type)){const oldIsType=pushTypeContext(1);next(),match(TokenType.braceL)?(parseExportSpecifiers(),parseExportFrom()):flowParseTypeAlias(),popTypeContext(oldIsType)}else if(isContextual(ContextualKeyword._opaque)){const oldIsType=pushTypeContext(1);next(),flowParseOpaqueType(!1),popTypeContext(oldIsType)}else if(isContextual(ContextualKeyword._interface)){const oldIsType=pushTypeContext(1);next(),flowParseInterface(),popTypeContext(oldIsType)}else parseStatement(!0)}function flowShouldParseExportStar(){return match(TokenType.star)||isContextual(ContextualKeyword._type)&&lookaheadType()===TokenType.star}function flowParseExportStar(){if(eatContextual(ContextualKeyword._type)){const oldIsType=pushTypeContext(2);baseParseExportStar(),popTypeContext(oldIsType)}else baseParseExportStar()}function flowAfterParseClassSuper(hasSuper){if(hasSuper&&match(TokenType.lessThan)&&flowParseTypeParameterInstantiation(),isContextual(ContextualKeyword._implements)){const oldIsType=pushTypeContext(0);next(),state.tokens[state.tokens.length-1].type=TokenType._implements;do flowParseRestrictedIdentifier(),match(TokenType.lessThan)&&flowParseTypeParameterInstantiation();while(eat(TokenType.comma));popTypeContext(oldIsType)}}function flowStartParseObjPropValue(){match(TokenType.lessThan)&&(flowParseTypeParameterDeclaration(),match(TokenType.parenL)||unexpected())}function flowParseAssignableListItemTypes(){const oldIsType=pushTypeContext(0);eat(TokenType.question),match(TokenType.colon)&&flowParseTypeAnnotation(),popTypeContext(oldIsType)}function flowStartParseImportSpecifiers(){if(match(TokenType._typeof)||isContextual(ContextualKeyword._type)){const lh=lookaheadTypeAndKeyword();(isMaybeDefaultImport(lh)||lh.type===TokenType.braceL||lh.type===TokenType.star)&&next()}}function flowParseImportSpecifier(){const isTypeKeyword=state.contextualKeyword===ContextualKeyword._type||state.type===TokenType._typeof;isTypeKeyword?next():parseIdentifier(),isContextual(ContextualKeyword._as)&&!isLookaheadContextual(ContextualKeyword._as)?(parseIdentifier(),isTypeKeyword&&!match(TokenType.name)&&!(state.type&TokenType.IS_KEYWORD)||parseIdentifier()):(isTypeKeyword&&(match(TokenType.name)||!!(state.type&TokenType.IS_KEYWORD))&&parseIdentifier(),eatContextual(ContextualKeyword._as)&&parseIdentifier())}function flowStartParseFunctionParams(){if(match(TokenType.lessThan)){const oldIsType=pushTypeContext(0);flowParseTypeParameterDeclaration(),popTypeContext(oldIsType)}}function flowAfterParseVarHead(){match(TokenType.colon)&&flowParseTypeAnnotation()}function flowStartParseAsyncArrowFromCallExpression(){if(match(TokenType.colon)){const oldNoAnonFunctionType=state.noAnonFunctionType;state.noAnonFunctionType=!0,flowParseTypeAnnotation(),state.noAnonFunctionType=oldNoAnonFunctionType}}function flowParseMaybeAssign(noIn,isWithinParens){if(match(TokenType.lessThan)){const snapshot=state.snapshot();let wasArrow=baseParseMaybeAssign(noIn,isWithinParens);if(state.error)state.restoreFromSnapshot(snapshot),state.type=TokenType.typeParameterStart;else return wasArrow;const oldIsType=pushTypeContext(0);if(flowParseTypeParameterDeclaration(),popTypeContext(oldIsType),wasArrow=baseParseMaybeAssign(noIn,isWithinParens),wasArrow)return!0;unexpected()}return baseParseMaybeAssign(noIn,isWithinParens)}function flowParseArrow(){if(match(TokenType.colon)){const oldIsType=pushTypeContext(0),snapshot=state.snapshot(),oldNoAnonFunctionType=state.noAnonFunctionType;state.noAnonFunctionType=!0,flowParseTypeAndPredicateInitialiser(),state.noAnonFunctionType=oldNoAnonFunctionType,canInsertSemicolon()&&unexpected(),match(TokenType.arrow)||unexpected(),state.error&&state.restoreFromSnapshot(snapshot),popTypeContext(oldIsType)}return eat(TokenType.arrow)}function flowParseSubscripts(startTokenIndex,noCalls=!1){if(state.tokens[state.tokens.length-1].contextualKeyword===ContextualKeyword._async&&match(TokenType.lessThan)){const snapshot=state.snapshot();if(parseAsyncArrowWithTypeParameters()&&!state.error)return;state.restoreFromSnapshot(snapshot)}baseParseSubscripts(startTokenIndex,noCalls)}function parseAsyncArrowWithTypeParameters(){state.scopeDepth++;const startTokenIndex=state.tokens.length;return parseFunctionParams(),parseArrow()?(parseArrowExpression(startTokenIndex),!0):!1}function flowParseEnumDeclaration(){expectContextual(ContextualKeyword._enum),state.tokens[state.tokens.length-1].type=TokenType._enum,parseIdentifier(),flowParseEnumBody()}function flowParseEnumBody(){eatContextual(ContextualKeyword._of)&&next(),expect(TokenType.braceL),flowParseEnumMembers(),expect(TokenType.braceR)}function flowParseEnumMembers(){for(;!match(TokenType.braceR)&&!state.error&&!eat(TokenType.ellipsis);)flowParseEnumMember(),match(TokenType.braceR)||expect(TokenType.comma)}function flowParseEnumMember(){parseIdentifier(),eat(TokenType.eq)&&next()}function parseTopLevel(){if(parseBlockBody(TokenType.eof),state.scopes.push(new Scope(0,state.tokens.length,!0)),state.scopeDepth!==0)throw new Error(`Invalid scope depth at end of file: ${state.scopeDepth}`);return new File2(state.tokens,state.scopes)}function parseStatement(declaration){isFlowEnabled&&flowTryParseStatement()||(match(TokenType.at)&&parseDecorators(),parseStatementContent(declaration))}function parseStatementContent(declaration){if(isTypeScriptEnabled&&tsTryParseStatementContent())return;const starttype=state.type;switch(starttype){case TokenType._break:case TokenType._continue:parseBreakContinueStatement();return;case TokenType._debugger:parseDebuggerStatement();return;case TokenType._do:parseDoStatement();return;case TokenType._for:parseForStatement();return;case TokenType._function:if(lookaheadType()===TokenType.dot)break;declaration||unexpected(),parseFunctionStatement();return;case TokenType._class:declaration||unexpected(),parseClass(!0);return;case TokenType._if:parseIfStatement();return;case TokenType._return:parseReturnStatement();return;case TokenType._switch:parseSwitchStatement();return;case TokenType._throw:parseThrowStatement();return;case TokenType._try:parseTryStatement();return;case TokenType._let:case TokenType._const:declaration||unexpected();case TokenType._var:parseVarStatement(starttype!==TokenType._var);return;case TokenType._while:parseWhileStatement();return;case TokenType.braceL:parseBlock();return;case TokenType.semi:parseEmptyStatement();return;case TokenType._export:case TokenType._import:{const nextType=lookaheadType();if(nextType===TokenType.parenL||nextType===TokenType.dot)break;next(),starttype===TokenType._import?parseImport():parseExport();return}case TokenType.name:if(state.contextualKeyword===ContextualKeyword._async){const functionStart=state.start,snapshot=state.snapshot();if(next(),match(TokenType._function)&&!canInsertSemicolon()){expect(TokenType._function),parseFunction(functionStart,!0);return}else state.restoreFromSnapshot(snapshot)}else if(state.contextualKeyword===ContextualKeyword._using&&!hasFollowingLineBreak()&&lookaheadType()===TokenType.name){parseVarStatement(!0);return}else if(startsAwaitUsing()){expectContextual(ContextualKeyword._await),parseVarStatement(!0);return}default:break}const initialTokensLength=state.tokens.length;parseExpression();let simpleName=null;if(state.tokens.length===initialTokensLength+1){const token=state.tokens[state.tokens.length-1];token.type===TokenType.name&&(simpleName=token.contextualKeyword)}if(simpleName==null){semicolon();return}eat(TokenType.colon)?parseLabeledStatement():parseIdentifierStatement(simpleName)}function startsAwaitUsing(){if(!isContextual(ContextualKeyword._await))return!1;const snapshot=state.snapshot();return next(),!isContextual(ContextualKeyword._using)||hasPrecedingLineBreak()||(next(),!match(TokenType.name)||hasPrecedingLineBreak())?(state.restoreFromSnapshot(snapshot),!1):(state.restoreFromSnapshot(snapshot),!0)}function parseDecorators(){for(;match(TokenType.at);)parseDecorator()}function parseDecorator(){if(next(),eat(TokenType.parenL))parseExpression(),expect(TokenType.parenR);else{for(parseIdentifier();eat(TokenType.dot);)parseIdentifier();parseMaybeDecoratorArguments()}}function parseMaybeDecoratorArguments(){isTypeScriptEnabled?tsParseMaybeDecoratorArguments():baseParseMaybeDecoratorArguments()}function baseParseMaybeDecoratorArguments(){eat(TokenType.parenL)&&parseCallExpressionArguments()}function parseBreakContinueStatement(){next(),isLineTerminator()||(parseIdentifier(),semicolon())}function parseDebuggerStatement(){next(),semicolon()}function parseDoStatement(){next(),parseStatement(!1),expect(TokenType._while),parseParenExpression(),eat(TokenType.semi)}function parseForStatement(){state.scopeDepth++;const startTokenIndex=state.tokens.length;parseAmbiguousForStatement();const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,!1)),state.scopeDepth--}function isUsingInLoop(){return!(!isContextual(ContextualKeyword._using)||isLookaheadContextual(ContextualKeyword._of))}function parseAmbiguousForStatement(){next();let forAwait=!1;if(isContextual(ContextualKeyword._await)&&(forAwait=!0,next()),expect(TokenType.parenL),match(TokenType.semi)){forAwait&&unexpected(),parseFor();return}const isAwaitUsing=startsAwaitUsing();if(isAwaitUsing||match(TokenType._var)||match(TokenType._let)||match(TokenType._const)||isUsingInLoop()){if(isAwaitUsing&&expectContextual(ContextualKeyword._await),next(),parseVar(!0,state.type!==TokenType._var),match(TokenType._in)||isContextual(ContextualKeyword._of)){parseForIn(forAwait);return}parseFor();return}if(parseExpression(!0),match(TokenType._in)||isContextual(ContextualKeyword._of)){parseForIn(forAwait);return}forAwait&&unexpected(),parseFor()}function parseFunctionStatement(){const functionStart=state.start;next(),parseFunction(functionStart,!0)}function parseIfStatement(){next(),parseParenExpression(),parseStatement(!1),eat(TokenType._else)&&parseStatement(!1)}function parseReturnStatement(){next(),isLineTerminator()||(parseExpression(),semicolon())}function parseSwitchStatement(){next(),parseParenExpression(),state.scopeDepth++;const startTokenIndex=state.tokens.length;for(expect(TokenType.braceL);!match(TokenType.braceR)&&!state.error;)if(match(TokenType._case)||match(TokenType._default)){const isCase=match(TokenType._case);next(),isCase&&parseExpression(),expect(TokenType.colon)}else parseStatement(!0);next();const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,!1)),state.scopeDepth--}function parseThrowStatement(){next(),parseExpression(),semicolon()}function parseCatchClauseParam(){parseBindingAtom(!0),isTypeScriptEnabled&&tsTryParseTypeAnnotation()}function parseTryStatement(){if(next(),parseBlock(),match(TokenType._catch)){next();let catchBindingStartTokenIndex=null;if(match(TokenType.parenL)&&(state.scopeDepth++,catchBindingStartTokenIndex=state.tokens.length,expect(TokenType.parenL),parseCatchClauseParam(),expect(TokenType.parenR)),parseBlock(),catchBindingStartTokenIndex!=null){const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(catchBindingStartTokenIndex,endTokenIndex,!1)),state.scopeDepth--}}eat(TokenType._finally)&&parseBlock()}function parseVarStatement(isBlockScope){next(),parseVar(!1,isBlockScope),semicolon()}function parseWhileStatement(){next(),parseParenExpression(),parseStatement(!1)}function parseEmptyStatement(){next()}function parseLabeledStatement(){parseStatement(!0)}function parseIdentifierStatement(contextualKeyword){isTypeScriptEnabled?tsParseIdentifierStatement(contextualKeyword):isFlowEnabled?flowParseIdentifierStatement(contextualKeyword):semicolon()}function parseBlock(isFunctionScope=!1,contextId=0){const startTokenIndex=state.tokens.length;state.scopeDepth++,expect(TokenType.braceL),contextId&&(state.tokens[state.tokens.length-1].contextId=contextId),parseBlockBody(TokenType.braceR),contextId&&(state.tokens[state.tokens.length-1].contextId=contextId);const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,isFunctionScope)),state.scopeDepth--}function parseBlockBody(end){for(;!eat(end)&&!state.error;)parseStatement(!0)}function parseFor(){expect(TokenType.semi),match(TokenType.semi)||parseExpression(),expect(TokenType.semi),match(TokenType.parenR)||parseExpression(),expect(TokenType.parenR),parseStatement(!1)}function parseForIn(forAwait){forAwait?eatContextual(ContextualKeyword._of):next(),parseExpression(),expect(TokenType.parenR),parseStatement(!1)}function parseVar(isFor,isBlockScope){for(;;){if(parseVarHead(isBlockScope),eat(TokenType.eq)){const eqIndex=state.tokens.length-1;parseMaybeAssign(isFor),state.tokens[eqIndex].rhsEndIndex=state.tokens.length}if(!eat(TokenType.comma))break}}function parseVarHead(isBlockScope){parseBindingAtom(isBlockScope),isTypeScriptEnabled?tsAfterParseVarHead():isFlowEnabled&&flowAfterParseVarHead()}function parseFunction(functionStart,isStatement,optionalId=!1){match(TokenType.star)&&next(),isStatement&&!optionalId&&!match(TokenType.name)&&!match(TokenType._yield)&&unexpected();let nameScopeStartTokenIndex=null;match(TokenType.name)&&(isStatement||(nameScopeStartTokenIndex=state.tokens.length,state.scopeDepth++),parseBindingIdentifier(!1));const startTokenIndex=state.tokens.length;state.scopeDepth++,parseFunctionParams(),parseFunctionBodyAndFinish(functionStart);const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,!0)),state.scopeDepth--,nameScopeStartTokenIndex!==null&&(state.scopes.push(new Scope(nameScopeStartTokenIndex,endTokenIndex,!0)),state.scopeDepth--)}function parseFunctionParams(allowModifiers=!1,funcContextId=0){isTypeScriptEnabled?tsStartParseFunctionParams():isFlowEnabled&&flowStartParseFunctionParams(),expect(TokenType.parenL),funcContextId&&(state.tokens[state.tokens.length-1].contextId=funcContextId),parseBindingList(TokenType.parenR,!1,!1,allowModifiers,funcContextId),funcContextId&&(state.tokens[state.tokens.length-1].contextId=funcContextId)}function parseClass(isStatement,optionalId=!1){const contextId=getNextContextId();next(),state.tokens[state.tokens.length-1].contextId=contextId,state.tokens[state.tokens.length-1].isExpression=!isStatement;let nameScopeStartTokenIndex=null;isStatement||(nameScopeStartTokenIndex=state.tokens.length,state.scopeDepth++),parseClassId(isStatement,optionalId),parseClassSuper();const openBraceIndex=state.tokens.length;if(parseClassBody(contextId),!state.error&&(state.tokens[openBraceIndex].contextId=contextId,state.tokens[state.tokens.length-1].contextId=contextId,nameScopeStartTokenIndex!==null)){const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(nameScopeStartTokenIndex,endTokenIndex,!1)),state.scopeDepth--}}function isClassProperty(){return match(TokenType.eq)||match(TokenType.semi)||match(TokenType.braceR)||match(TokenType.bang)||match(TokenType.colon)}function isClassMethod(){return match(TokenType.parenL)||match(TokenType.lessThan)}function parseClassBody(classContextId){for(expect(TokenType.braceL);!eat(TokenType.braceR)&&!state.error;){if(eat(TokenType.semi))continue;if(match(TokenType.at)){parseDecorator();continue}const memberStart=state.start;parseClassMember(memberStart,classContextId)}}function parseClassMember(memberStart,classContextId){isTypeScriptEnabled&&tsParseModifiers([ContextualKeyword._declare,ContextualKeyword._public,ContextualKeyword._protected,ContextualKeyword._private,ContextualKeyword._override]);let isStatic=!1;if(match(TokenType.name)&&state.contextualKeyword===ContextualKeyword._static){if(parseIdentifier(),isClassMethod()){parseClassMethod(memberStart,!1);return}else if(isClassProperty()){parseClassProperty();return}if(state.tokens[state.tokens.length-1].type=TokenType._static,isStatic=!0,match(TokenType.braceL)){state.tokens[state.tokens.length-1].contextId=classContextId,parseBlock();return}}parseClassMemberWithIsStatic(memberStart,isStatic,classContextId)}function parseClassMemberWithIsStatic(memberStart,isStatic,classContextId){if(isTypeScriptEnabled&&tsTryParseClassMemberWithIsStatic(isStatic))return;if(eat(TokenType.star)){parseClassPropertyName(classContextId),parseClassMethod(memberStart,!1);return}parseClassPropertyName(classContextId);let isConstructor=!1;const token=state.tokens[state.tokens.length-1];token.contextualKeyword===ContextualKeyword._constructor&&(isConstructor=!0),parsePostMemberNameModifiers(),isClassMethod()?parseClassMethod(memberStart,isConstructor):isClassProperty()?parseClassProperty():token.contextualKeyword===ContextualKeyword._async&&!isLineTerminator()?(state.tokens[state.tokens.length-1].type=TokenType._async,match(TokenType.star)&&next(),parseClassPropertyName(classContextId),parsePostMemberNameModifiers(),parseClassMethod(memberStart,!1)):(token.contextualKeyword===ContextualKeyword._get||token.contextualKeyword===ContextualKeyword._set)&&!(isLineTerminator()&&match(TokenType.star))?(token.contextualKeyword===ContextualKeyword._get?state.tokens[state.tokens.length-1].type=TokenType._get:state.tokens[state.tokens.length-1].type=TokenType._set,parseClassPropertyName(classContextId),parseClassMethod(memberStart,!1)):token.contextualKeyword===ContextualKeyword._accessor&&!isLineTerminator()?(parseClassPropertyName(classContextId),parseClassProperty()):isLineTerminator()?parseClassProperty():unexpected()}function parseClassMethod(functionStart,isConstructor){isTypeScriptEnabled?tsTryParseTypeParameters():isFlowEnabled&&match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),parseMethod(functionStart,isConstructor)}function parseClassPropertyName(classContextId){parsePropertyName(classContextId)}function parsePostMemberNameModifiers(){if(isTypeScriptEnabled){const oldIsType=pushTypeContext(0);eat(TokenType.question),popTypeContext(oldIsType)}}function parseClassProperty(){if(isTypeScriptEnabled?(eatTypeToken(TokenType.bang),tsTryParseTypeAnnotation()):isFlowEnabled&&match(TokenType.colon)&&flowParseTypeAnnotation(),match(TokenType.eq)){const equalsTokenIndex=state.tokens.length;next(),parseMaybeAssign(),state.tokens[equalsTokenIndex].rhsEndIndex=state.tokens.length}semicolon()}function parseClassId(isStatement,optionalId=!1){isTypeScriptEnabled&&(!isStatement||optionalId)&&isContextual(ContextualKeyword._implements)||(match(TokenType.name)&&parseBindingIdentifier(!0),isTypeScriptEnabled?tsTryParseTypeParameters():isFlowEnabled&&match(TokenType.lessThan)&&flowParseTypeParameterDeclaration())}function parseClassSuper(){let hasSuper=!1;eat(TokenType._extends)?(parseExprSubscripts(),hasSuper=!0):hasSuper=!1,isTypeScriptEnabled?tsAfterParseClassSuper(hasSuper):isFlowEnabled&&flowAfterParseClassSuper(hasSuper)}function parseExport(){const exportIndex=state.tokens.length-1;isTypeScriptEnabled&&tsTryParseExport()||(shouldParseExportStar()?parseExportStar():isExportDefaultSpecifier()?(parseIdentifier(),match(TokenType.comma)&&lookaheadType()===TokenType.star?(expect(TokenType.comma),expect(TokenType.star),expectContextual(ContextualKeyword._as),parseIdentifier()):parseExportSpecifiersMaybe(),parseExportFrom()):eat(TokenType._default)?parseExportDefaultExpression():shouldParseExportDeclaration()?parseExportDeclaration():(parseExportSpecifiers(),parseExportFrom()),state.tokens[exportIndex].rhsEndIndex=state.tokens.length)}function parseExportDefaultExpression(){if(isTypeScriptEnabled&&tsTryParseExportDefaultExpression()||isFlowEnabled&&flowTryParseExportDefaultExpression())return;const functionStart=state.start;eat(TokenType._function)?parseFunction(functionStart,!0,!0):isContextual(ContextualKeyword._async)&&lookaheadType()===TokenType._function?(eatContextual(ContextualKeyword._async),eat(TokenType._function),parseFunction(functionStart,!0,!0)):match(TokenType._class)?parseClass(!0,!0):match(TokenType.at)?(parseDecorators(),parseClass(!0,!0)):(parseMaybeAssign(),semicolon())}function parseExportDeclaration(){isTypeScriptEnabled?tsParseExportDeclaration():isFlowEnabled?flowParseExportDeclaration():parseStatement(!0)}function isExportDefaultSpecifier(){if(isTypeScriptEnabled&&tsIsDeclarationStart())return!1;if(isFlowEnabled&&flowShouldDisallowExportDefaultSpecifier())return!1;if(match(TokenType.name))return state.contextualKeyword!==ContextualKeyword._async;if(!match(TokenType._default))return!1;const _next=nextTokenStart(),lookahead=lookaheadTypeAndKeyword(),hasFrom=lookahead.type===TokenType.name&&lookahead.contextualKeyword===ContextualKeyword._from;if(lookahead.type===TokenType.comma)return!0;if(hasFrom){const nextAfterFrom=input.charCodeAt(nextTokenStartSince(_next+4));return nextAfterFrom===charCodes.quotationMark||nextAfterFrom===charCodes.apostrophe}return!1}function parseExportSpecifiersMaybe(){eat(TokenType.comma)&&parseExportSpecifiers()}function parseExportFrom(){eatContextual(ContextualKeyword._from)&&(parseExprAtom(),maybeParseImportAttributes()),semicolon()}function shouldParseExportStar(){return isFlowEnabled?flowShouldParseExportStar():match(TokenType.star)}function parseExportStar(){isFlowEnabled?flowParseExportStar():baseParseExportStar()}function baseParseExportStar(){expect(TokenType.star),isContextual(ContextualKeyword._as)?parseExportNamespace():parseExportFrom()}function parseExportNamespace(){next(),state.tokens[state.tokens.length-1].type=TokenType._as,parseIdentifier(),parseExportSpecifiersMaybe(),parseExportFrom()}function shouldParseExportDeclaration(){return isTypeScriptEnabled&&tsIsDeclarationStart()||isFlowEnabled&&flowShouldParseExportDeclaration()||state.type===TokenType._var||state.type===TokenType._const||state.type===TokenType._let||state.type===TokenType._function||state.type===TokenType._class||isContextual(ContextualKeyword._async)||match(TokenType.at)}function parseExportSpecifiers(){let first=!0;for(expect(TokenType.braceL);!eat(TokenType.braceR)&&!state.error;){if(first)first=!1;else if(expect(TokenType.comma),eat(TokenType.braceR))break;parseExportSpecifier()}}function parseExportSpecifier(){if(isTypeScriptEnabled){tsParseExportSpecifier();return}parseIdentifier(),state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ExportAccess,eatContextual(ContextualKeyword._as)&&parseIdentifier()}function isImportReflection(){const snapshot=state.snapshot();return expectContextual(ContextualKeyword._module),eatContextual(ContextualKeyword._from)?isContextual(ContextualKeyword._from)?(state.restoreFromSnapshot(snapshot),!0):(state.restoreFromSnapshot(snapshot),!1):match(TokenType.comma)?(state.restoreFromSnapshot(snapshot),!1):(state.restoreFromSnapshot(snapshot),!0)}function parseMaybeImportReflection(){isContextual(ContextualKeyword._module)&&isImportReflection()&&next()}function parseImport(){if(isTypeScriptEnabled&&match(TokenType.name)&&lookaheadType()===TokenType.eq){tsParseImportEqualsDeclaration();return}if(isTypeScriptEnabled&&isContextual(ContextualKeyword._type)){const lookahead=lookaheadTypeAndKeyword();if(lookahead.type===TokenType.name&&lookahead.contextualKeyword!==ContextualKeyword._from){if(expectContextual(ContextualKeyword._type),lookaheadType()===TokenType.eq){tsParseImportEqualsDeclaration();return}}else(lookahead.type===TokenType.star||lookahead.type===TokenType.braceL)&&expectContextual(ContextualKeyword._type)}match(TokenType.string)||(parseMaybeImportReflection(),parseImportSpecifiers(),expectContextual(ContextualKeyword._from)),parseExprAtom(),maybeParseImportAttributes(),semicolon()}function shouldParseDefaultImport(){return match(TokenType.name)}function parseImportSpecifierLocal(){parseImportedIdentifier()}function parseImportSpecifiers(){isFlowEnabled&&flowStartParseImportSpecifiers();let first=!0;if(!(shouldParseDefaultImport()&&(parseImportSpecifierLocal(),!eat(TokenType.comma)))){if(match(TokenType.star)){next(),expectContextual(ContextualKeyword._as),parseImportSpecifierLocal();return}for(expect(TokenType.braceL);!eat(TokenType.braceR)&&!state.error;){if(first)first=!1;else if(eat(TokenType.colon)&&unexpected("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),expect(TokenType.comma),eat(TokenType.braceR))break;parseImportSpecifier()}}}function parseImportSpecifier(){if(isTypeScriptEnabled){tsParseImportSpecifier();return}if(isFlowEnabled){flowParseImportSpecifier();return}parseImportedIdentifier(),isContextual(ContextualKeyword._as)&&(state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportAccess,next(),parseImportedIdentifier())}function maybeParseImportAttributes(){(match(TokenType._with)||isContextual(ContextualKeyword._assert)&&!hasPrecedingLineBreak())&&(next(),parseObj(!1,!1))}function parseFile(){return state.pos===0&&input.charCodeAt(0)===charCodes.numberSign&&input.charCodeAt(1)===charCodes.exclamationMark&&skipLineComment(2),nextToken(),parseTopLevel()}class File2{constructor(tokens,scopes){this.tokens=tokens,this.scopes=scopes}}function parse(input2,isJSXEnabled2,isTypeScriptEnabled2,isFlowEnabled2){if(isFlowEnabled2&&isTypeScriptEnabled2)throw new Error("Cannot combine flow and typescript plugins.");initParser(input2,isJSXEnabled2,isTypeScriptEnabled2,isFlowEnabled2);const result=parseFile();if(state.error)throw augmentError(state.error);return result}function isAsyncOperation(tokens){let index=tokens.currentIndex(),depth=0;const startToken=tokens.currentToken();do{const token=tokens.tokens[index];if(token.isOptionalChainStart&&depth++,token.isOptionalChainEnd&&depth--,depth+=token.numNullishCoalesceStarts,depth-=token.numNullishCoalesceEnds,token.contextualKeyword===ContextualKeyword._await&&token.identifierRole==null&&token.scopeDepth===startToken.scopeDepth)return!0;index+=1}while(depth>0&&index<tokens.tokens.length);return!1}class TokenProcessor{__init(){this.resultCode=""}__init2(){this.resultMappings=new Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(code,tokens,isFlowEnabled2,disableESTransforms,helperManager){this.code=code,this.tokens=tokens,this.isFlowEnabled=isFlowEnabled2,this.disableESTransforms=disableESTransforms,this.helperManager=helperManager,TokenProcessor.prototype.__init.call(this),TokenProcessor.prototype.__init2.call(this),TokenProcessor.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(snapshot){this.resultCode=snapshot.resultCode,this.tokenIndex=snapshot.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(snapshot){const result=this.resultCode.slice(snapshot.resultCode.length);return this.resultCode=snapshot.resultCode,result}reset(){this.resultCode="",this.resultMappings=new Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(index,contextualKeyword){return this.matches1AtIndex(index,TokenType.name)&&this.tokens[index].contextualKeyword===contextualKeyword}identifierNameAtIndex(index){return this.identifierNameForToken(this.tokens[index])}identifierNameAtRelativeIndex(relativeIndex){return this.identifierNameForToken(this.tokenAtRelativeIndex(relativeIndex))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(token){return this.code.slice(token.start,token.end)}rawCodeForToken(token){return this.code.slice(token.start,token.end)}stringValueAtIndex(index){return this.stringValueForToken(this.tokens[index])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(token){return this.code.slice(token.start+1,token.end-1)}matches1AtIndex(index,t1){return this.tokens[index].type===t1}matches2AtIndex(index,t1,t2){return this.tokens[index].type===t1&&this.tokens[index+1].type===t2}matches3AtIndex(index,t1,t2,t3){return this.tokens[index].type===t1&&this.tokens[index+1].type===t2&&this.tokens[index+2].type===t3}matches1(t1){return this.tokens[this.tokenIndex].type===t1}matches2(t1,t2){return this.tokens[this.tokenIndex].type===t1&&this.tokens[this.tokenIndex+1].type===t2}matches3(t1,t2,t3){return this.tokens[this.tokenIndex].type===t1&&this.tokens[this.tokenIndex+1].type===t2&&this.tokens[this.tokenIndex+2].type===t3}matches4(t1,t2,t3,t4){return this.tokens[this.tokenIndex].type===t1&&this.tokens[this.tokenIndex+1].type===t2&&this.tokens[this.tokenIndex+2].type===t3&&this.tokens[this.tokenIndex+3].type===t4}matches5(t1,t2,t3,t4,t5){return this.tokens[this.tokenIndex].type===t1&&this.tokens[this.tokenIndex+1].type===t2&&this.tokens[this.tokenIndex+2].type===t3&&this.tokens[this.tokenIndex+3].type===t4&&this.tokens[this.tokenIndex+4].type===t5}matchesContextual(contextualKeyword){return this.matchesContextualAtIndex(this.tokenIndex,contextualKeyword)}matchesContextIdAndLabel(type,contextId){return this.matches1(type)&&this.currentToken().contextId===contextId}previousWhitespaceAndComments(){let whitespaceAndComments=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(whitespaceAndComments=whitespaceAndComments.replace(/@flow/g,"")),whitespaceAndComments}replaceToken(newCode){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=newCode,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(newCode){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=newCode,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}removeBalancedCode(){let braceDepth=0;for(;!this.isAtEnd();){if(this.matches1(TokenType.braceL))braceDepth++;else if(this.matches1(TokenType.braceR)){if(braceDepth===0)return;braceDepth--}this.removeToken()}}copyExpectedToken(tokenType){if(this.tokens[this.tokenIndex].type!==tokenType)throw new Error(`Expected token ${tokenType}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(prefix){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=prefix,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){const token=this.currentToken();if((token.numNullishCoalesceStarts||token.isOptionalChainStart)&&(token.isAsyncOperation=isAsyncOperation(this)),!this.disableESTransforms){if(token.numNullishCoalesceStarts)for(let i=0;i<token.numNullishCoalesceStarts;i++)token.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";token.isOptionalChainStart&&(token.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===TokenType._delete?token.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):token.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){const token=this.currentToken();if(token.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),token.numNullishCoalesceEnds&&!this.disableESTransforms)for(let i=0;i<token.numNullishCoalesceEnds;i++)this.resultCode+="))"}appendCode(code){this.resultCode+=code}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){const token=this.currentToken();return this.code.slice(token.start,token.end)}tokenAtRelativeIndex(relativeIndex){return this.tokens[this.tokenIndex+relativeIndex]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}}function getClassInfo(rootTransformer,tokens,nameManager,disableESTransforms){const snapshot=tokens.snapshot(),headerInfo=processClassHeader(tokens);let constructorInitializerStatements=[];const instanceInitializerNames=[],staticInitializerNames=[];let constructorInsertPos=null;const fields=[],rangesToRemove=[],classContextId=tokens.currentToken().contextId;if(classContextId==null)throw new Error("Expected non-null class context ID on class open-brace.");for(tokens.nextToken();!tokens.matchesContextIdAndLabel(TokenType.braceR,classContextId);)if(tokens.matchesContextual(ContextualKeyword._constructor)&&!tokens.currentToken().isType)({constructorInitializerStatements,constructorInsertPos}=processConstructor(tokens));else if(tokens.matches1(TokenType.semi))disableESTransforms||rangesToRemove.push({start:tokens.currentIndex(),end:tokens.currentIndex()+1}),tokens.nextToken();else if(tokens.currentToken().isType)tokens.nextToken();else{const statementStartIndex=tokens.currentIndex();let isStatic=!1,isESPrivate=!1,isDeclareOrAbstract=!1;for(;isAccessModifier(tokens.currentToken());)tokens.matches1(TokenType._static)&&(isStatic=!0),tokens.matches1(TokenType.hash)&&(isESPrivate=!0),(tokens.matches1(TokenType._declare)||tokens.matches1(TokenType._abstract))&&(isDeclareOrAbstract=!0),tokens.nextToken();if(isStatic&&tokens.matches1(TokenType.braceL)){skipToNextClassElement(tokens,classContextId);continue}if(isESPrivate){skipToNextClassElement(tokens,classContextId);continue}if(tokens.matchesContextual(ContextualKeyword._constructor)&&!tokens.currentToken().isType){({constructorInitializerStatements,constructorInsertPos}=processConstructor(tokens));continue}const nameStartIndex=tokens.currentIndex();if(skipFieldName(tokens),tokens.matches1(TokenType.lessThan)||tokens.matches1(TokenType.parenL)){skipToNextClassElement(tokens,classContextId);continue}for(;tokens.currentToken().isType;)tokens.nextToken();if(tokens.matches1(TokenType.eq)){const equalsIndex=tokens.currentIndex(),valueEnd=tokens.currentToken().rhsEndIndex;if(valueEnd==null)throw new Error("Expected rhsEndIndex on class field assignment.");for(tokens.nextToken();tokens.currentIndex()<valueEnd;)rootTransformer.processToken();let initializerName;isStatic?(initializerName=nameManager.claimFreeName("__initStatic"),staticInitializerNames.push(initializerName)):(initializerName=nameManager.claimFreeName("__init"),instanceInitializerNames.push(initializerName)),fields.push({initializerName,equalsIndex,start:nameStartIndex,end:tokens.currentIndex()})}else(!disableESTransforms||isDeclareOrAbstract)&&rangesToRemove.push({start:statementStartIndex,end:tokens.currentIndex()})}return tokens.restoreToSnapshot(snapshot),disableESTransforms?{headerInfo,constructorInitializerStatements,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos,fields:[],rangesToRemove}:{headerInfo,constructorInitializerStatements,instanceInitializerNames,staticInitializerNames,constructorInsertPos,fields,rangesToRemove}}function skipToNextClassElement(tokens,classContextId){for(tokens.nextToken();tokens.currentToken().contextId!==classContextId;)tokens.nextToken();for(;isAccessModifier(tokens.tokenAtRelativeIndex(-1));)tokens.previousToken()}function processClassHeader(tokens){const classToken=tokens.currentToken(),contextId=classToken.contextId;if(contextId==null)throw new Error("Expected context ID on class token.");const isExpression=classToken.isExpression;if(isExpression==null)throw new Error("Expected isExpression on class token.");let className=null,hasSuperclass=!1;for(tokens.nextToken(),tokens.matches1(TokenType.name)&&(className=tokens.identifierName());!tokens.matchesContextIdAndLabel(TokenType.braceL,contextId);)tokens.matches1(TokenType._extends)&&!tokens.currentToken().isType&&(hasSuperclass=!0),tokens.nextToken();return{isExpression,className,hasSuperclass}}function processConstructor(tokens){const constructorInitializerStatements=[];tokens.nextToken();const constructorContextId=tokens.currentToken().contextId;if(constructorContextId==null)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!tokens.matchesContextIdAndLabel(TokenType.parenR,constructorContextId);)if(tokens.currentToken().contextId===constructorContextId){if(tokens.nextToken(),isAccessModifier(tokens.currentToken())){for(tokens.nextToken();isAccessModifier(tokens.currentToken());)tokens.nextToken();const token=tokens.currentToken();if(token.type!==TokenType.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const name=tokens.identifierNameForToken(token);constructorInitializerStatements.push(`this.${name} = ${name}`)}}else tokens.nextToken();for(tokens.nextToken();tokens.currentToken().isType;)tokens.nextToken();let constructorInsertPos=tokens.currentIndex(),foundSuperCall=!1;for(;!tokens.matchesContextIdAndLabel(TokenType.braceR,constructorContextId);){if(!foundSuperCall&&tokens.matches2(TokenType._super,TokenType.parenL)){tokens.nextToken();const superCallContextId=tokens.currentToken().contextId;if(superCallContextId==null)throw new Error("Expected a context ID on the super call");for(;!tokens.matchesContextIdAndLabel(TokenType.parenR,superCallContextId);)tokens.nextToken();constructorInsertPos=tokens.currentIndex(),foundSuperCall=!0}tokens.nextToken()}return tokens.nextToken(),{constructorInitializerStatements,constructorInsertPos}}function isAccessModifier(token){return[TokenType._async,TokenType._get,TokenType._set,TokenType.plus,TokenType.minus,TokenType._readonly,TokenType._static,TokenType._public,TokenType._private,TokenType._protected,TokenType._override,TokenType._abstract,TokenType.star,TokenType._declare,TokenType.hash].includes(token.type)}function skipFieldName(tokens){if(tokens.matches1(TokenType.bracketL)){const classContextId=tokens.currentToken().contextId;if(classContextId==null)throw new Error("Expected class context ID on computed name open bracket.");for(;!tokens.matchesContextIdAndLabel(TokenType.bracketR,classContextId);)tokens.nextToken();tokens.nextToken()}else tokens.nextToken()}function elideImportEquals(tokens){if(tokens.removeInitialToken(),tokens.removeToken(),tokens.removeToken(),tokens.removeToken(),tokens.matches1(TokenType.parenL))tokens.removeToken(),tokens.removeToken(),tokens.removeToken();else for(;tokens.matches1(TokenType.dot);)tokens.removeToken(),tokens.removeToken()}const EMPTY_DECLARATION_INFO={typeDeclarations:new Set,valueDeclarations:new Set};function getDeclarationInfo(tokens){const typeDeclarations=new Set,valueDeclarations=new Set;for(let i=0;i<tokens.tokens.length;i++){const token=tokens.tokens[i];token.type===TokenType.name&&isTopLevelDeclaration(token)&&(token.isType?typeDeclarations.add(tokens.identifierNameForToken(token)):valueDeclarations.add(tokens.identifierNameForToken(token)))}return{typeDeclarations,valueDeclarations}}function isExportFrom(tokens){let closeBraceIndex=tokens.currentIndex();for(;!tokens.matches1AtIndex(closeBraceIndex,TokenType.braceR);)closeBraceIndex++;return tokens.matchesContextualAtIndex(closeBraceIndex+1,ContextualKeyword._from)&&tokens.matches1AtIndex(closeBraceIndex+2,TokenType.string)}function removeMaybeImportAttributes(tokens){(tokens.matches2(TokenType._with,TokenType.braceL)||tokens.matches2(TokenType.name,TokenType.braceL)&&tokens.matchesContextual(ContextualKeyword._assert))&&(tokens.removeToken(),tokens.removeToken(),tokens.removeBalancedCode(),tokens.removeToken())}function shouldElideDefaultExport(isTypeScriptTransformEnabled,keepUnusedImports,tokens,declarationInfo){if(!isTypeScriptTransformEnabled||keepUnusedImports)return!1;const exportToken=tokens.currentToken();if(exportToken.rhsEndIndex==null)throw new Error("Expected non-null rhsEndIndex on export token.");const numTokens=exportToken.rhsEndIndex-tokens.currentIndex();if(numTokens!==3&&!(numTokens===4&&tokens.matches1AtIndex(exportToken.rhsEndIndex-1,TokenType.semi)))return!1;const identifierToken=tokens.tokenAtRelativeIndex(2);if(identifierToken.type!==TokenType.name)return!1;const exportedName=tokens.identifierNameForToken(identifierToken);return declarationInfo.typeDeclarations.has(exportedName)&&!declarationInfo.valueDeclarations.has(exportedName)}class CJSImportTransformer extends Transformer{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(rootTransformer,tokens,importProcessor,nameManager,helperManager,reactHotLoaderTransformer,enableLegacyBabel5ModuleInterop,enableLegacyTypeScriptModuleInterop,isTypeScriptTransformEnabled,isFlowTransformEnabled,preserveDynamicImport,keepUnusedImports){super();this.rootTransformer=rootTransformer,this.tokens=tokens,this.importProcessor=importProcessor,this.nameManager=nameManager,this.helperManager=helperManager,this.reactHotLoaderTransformer=reactHotLoaderTransformer,this.enableLegacyBabel5ModuleInterop=enableLegacyBabel5ModuleInterop,this.enableLegacyTypeScriptModuleInterop=enableLegacyTypeScriptModuleInterop,this.isTypeScriptTransformEnabled=isTypeScriptTransformEnabled,this.isFlowTransformEnabled=isFlowTransformEnabled,this.preserveDynamicImport=preserveDynamicImport,this.keepUnusedImports=keepUnusedImports,CJSImportTransformer.prototype.__init.call(this),CJSImportTransformer.prototype.__init2.call(this),CJSImportTransformer.prototype.__init3.call(this),this.declarationInfo=isTypeScriptTransformEnabled?getDeclarationInfo(tokens):EMPTY_DECLARATION_INFO}getPrefixCode(){let prefix="";return this.hadExport&&(prefix+='Object.defineProperty(exports, "__esModule", {value: true});'),prefix}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`
|
|
299
|
+
`};class HelperManager{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(nameManager){this.nameManager=nameManager,HelperManager.prototype.__init.call(this),HelperManager.prototype.__init2.call(this)}getHelperName(baseName){let helperName=this.helperNames[baseName];return helperName||(helperName=this.nameManager.claimFreeName(`_${baseName}`),this.helperNames[baseName]=helperName,helperName)}emitHelpers(){let resultCode="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[baseName,helperCodeTemplate]of Object.entries(HELPERS)){const helperName=this.helperNames[baseName];let helperCode=helperCodeTemplate;baseName==="optionalChainDelete"?helperCode=helperCode.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):baseName==="asyncOptionalChainDelete"?helperCode=helperCode.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):baseName==="require"&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),helperCode=helperCode.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),helperName&&(resultCode+=" ",resultCode+=helperCode.replace(baseName,helperName).replace(/\s+/g," ").trim())}return resultCode}}function identifyShadowedGlobals(tokens,scopes,globalNames){!hasShadowedGlobals(tokens,globalNames)||markShadowedGlobals(tokens,scopes,globalNames)}function hasShadowedGlobals(tokens,globalNames){for(const token of tokens.tokens)if(token.type===TokenType.name&&!token.isType&&isNonTopLevelDeclaration(token)&&globalNames.has(tokens.identifierNameForToken(token)))return!0;return!1}function markShadowedGlobals(tokens,scopes,globalNames){const scopeStack=[];let scopeIndex=scopes.length-1;for(let i=tokens.tokens.length-1;;i--){for(;scopeStack.length>0&&scopeStack[scopeStack.length-1].startTokenIndex===i+1;)scopeStack.pop();for(;scopeIndex>=0&&scopes[scopeIndex].endTokenIndex===i+1;)scopeStack.push(scopes[scopeIndex]),scopeIndex--;if(i<0)break;const token=tokens.tokens[i],name=tokens.identifierNameForToken(token);if(scopeStack.length>1&&!token.isType&&token.type===TokenType.name&&globalNames.has(name)){if(isBlockScopedDeclaration(token))markShadowedForScope(scopeStack[scopeStack.length-1],tokens,name);else if(isFunctionScopedDeclaration(token)){let stackIndex=scopeStack.length-1;for(;stackIndex>0&&!scopeStack[stackIndex].isFunctionScope;)stackIndex--;if(stackIndex<0)throw new Error("Did not find parent function scope.");markShadowedForScope(scopeStack[stackIndex],tokens,name)}}}if(scopeStack.length>0)throw new Error("Expected empty scope stack after processing file.")}function markShadowedForScope(scope,tokens,name){for(let i=scope.startTokenIndex;i<scope.endTokenIndex;i++){const token=tokens.tokens[i];(token.type===TokenType.name||token.type===TokenType.jsxName)&&tokens.identifierNameForToken(token)===name&&(token.shadowsGlobal=!0)}}function getIdentifierNames(code,tokens){const names=[];for(const token of tokens)token.type===TokenType.name&&names.push(code.slice(token.start,token.end));return names}class NameManager{__init(){this.usedNames=new Set}constructor(code,tokens){NameManager.prototype.__init.call(this),this.usedNames=new Set(getIdentifierNames(code,tokens))}claimFreeName(name){const newName=this.findFreeName(name);return this.usedNames.add(newName),newName}findFreeName(name){if(!this.usedNames.has(name))return name;let suffixNum=2;for(;this.usedNames.has(name+String(suffixNum));)suffixNum++;return name+String(suffixNum)}}var ts_interface_checker_dist=__webpack_require__(82795);const Transform=ts_interface_checker_dist.union(ts_interface_checker_dist.lit("jsx"),ts_interface_checker_dist.lit("typescript"),ts_interface_checker_dist.lit("flow"),ts_interface_checker_dist.lit("imports"),ts_interface_checker_dist.lit("react-hot-loader"),ts_interface_checker_dist.lit("jest")),SourceMapOptions=ts_interface_checker_dist.iface([],{compiledFilename:"string"}),Options=ts_interface_checker_dist.iface([],{transforms:ts_interface_checker_dist.array("Transform"),disableESTransforms:ts_interface_checker_dist.opt("boolean"),jsxRuntime:ts_interface_checker_dist.opt(ts_interface_checker_dist.union(ts_interface_checker_dist.lit("classic"),ts_interface_checker_dist.lit("automatic"),ts_interface_checker_dist.lit("preserve"))),production:ts_interface_checker_dist.opt("boolean"),jsxImportSource:ts_interface_checker_dist.opt("string"),jsxPragma:ts_interface_checker_dist.opt("string"),jsxFragmentPragma:ts_interface_checker_dist.opt("string"),keepUnusedImports:ts_interface_checker_dist.opt("boolean"),preserveDynamicImport:ts_interface_checker_dist.opt("boolean"),injectCreateRequireForImportRequire:ts_interface_checker_dist.opt("boolean"),enableLegacyTypeScriptModuleInterop:ts_interface_checker_dist.opt("boolean"),enableLegacyBabel5ModuleInterop:ts_interface_checker_dist.opt("boolean"),sourceMapOptions:ts_interface_checker_dist.opt("SourceMapOptions"),filePath:ts_interface_checker_dist.opt("string")}),Options_gen_types={Transform,SourceMapOptions,Options},{Options:OptionsChecker}=(0,ts_interface_checker_dist.createCheckers)(Options_gen_types);function validateOptions(options){OptionsChecker.strictCheck(options)}function parseSpread(){next(),parseMaybeAssign(!1)}function parseRest(isBlockScope){next(),parseBindingAtom(isBlockScope)}function parseBindingIdentifier(isBlockScope){parseIdentifier(),markPriorBindingIdentifier(isBlockScope)}function parseImportedIdentifier(){parseIdentifier(),state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportDeclaration}function markPriorBindingIdentifier(isBlockScope){let identifierRole;state.scopeDepth===0?identifierRole=IdentifierRole.TopLevelDeclaration:isBlockScope?identifierRole=IdentifierRole.BlockScopedDeclaration:identifierRole=IdentifierRole.FunctionScopedDeclaration,state.tokens[state.tokens.length-1].identifierRole=identifierRole}function parseBindingAtom(isBlockScope){switch(state.type){case TokenType._this:{const oldIsType=pushTypeContext(0);next(),popTypeContext(oldIsType);return}case TokenType._yield:case TokenType.name:{state.type=TokenType.name,parseBindingIdentifier(isBlockScope);return}case TokenType.bracketL:{next(),parseBindingList(TokenType.bracketR,isBlockScope,!0);return}case TokenType.braceL:parseObj(!0,isBlockScope);return;default:unexpected()}}function parseBindingList(close,isBlockScope,allowEmpty=!1,allowModifiers=!1,contextId=0){let first=!0,hasRemovedComma=!1;const firstItemTokenIndex=state.tokens.length;for(;!eat(close)&&!state.error;)if(first?first=!1:(expect(TokenType.comma),state.tokens[state.tokens.length-1].contextId=contextId,!hasRemovedComma&&state.tokens[firstItemTokenIndex].isType&&(state.tokens[state.tokens.length-1].isType=!0,hasRemovedComma=!0)),!(allowEmpty&&match(TokenType.comma))){if(eat(close))break;if(match(TokenType.ellipsis)){parseRest(isBlockScope),parseAssignableListItemTypes(),eat(TokenType.comma),expect(close);break}else parseAssignableListItem(allowModifiers,isBlockScope)}}function parseAssignableListItem(allowModifiers,isBlockScope){allowModifiers&&tsParseModifiers([ContextualKeyword._public,ContextualKeyword._protected,ContextualKeyword._private,ContextualKeyword._readonly,ContextualKeyword._override]),parseMaybeDefault(isBlockScope),parseAssignableListItemTypes(),parseMaybeDefault(isBlockScope,!0)}function parseAssignableListItemTypes(){isFlowEnabled?flowParseAssignableListItemTypes():isTypeScriptEnabled&&tsParseAssignableListItemTypes()}function parseMaybeDefault(isBlockScope,leftAlreadyParsed=!1){if(leftAlreadyParsed||parseBindingAtom(isBlockScope),!eat(TokenType.eq))return;const eqIndex=state.tokens.length-1;parseMaybeAssign(),state.tokens[eqIndex].rhsEndIndex=state.tokens.length}function tsIsIdentifier(){return match(TokenType.name)}function isLiteralPropertyName(){return match(TokenType.name)||Boolean(state.type&TokenType.IS_KEYWORD)||match(TokenType.string)||match(TokenType.num)||match(TokenType.bigint)||match(TokenType.decimal)}function tsNextTokenCanFollowModifier(){const snapshot=state.snapshot();return next(),(match(TokenType.bracketL)||match(TokenType.braceL)||match(TokenType.star)||match(TokenType.ellipsis)||match(TokenType.hash)||isLiteralPropertyName())&&!hasPrecedingLineBreak()?!0:(state.restoreFromSnapshot(snapshot),!1)}function tsParseModifiers(allowedModifiers){for(;tsParseModifier(allowedModifiers)!==null;);}function tsParseModifier(allowedModifiers){if(!match(TokenType.name))return null;const modifier=state.contextualKeyword;if(allowedModifiers.indexOf(modifier)!==-1&&tsNextTokenCanFollowModifier()){switch(modifier){case ContextualKeyword._readonly:state.tokens[state.tokens.length-1].type=TokenType._readonly;break;case ContextualKeyword._abstract:state.tokens[state.tokens.length-1].type=TokenType._abstract;break;case ContextualKeyword._static:state.tokens[state.tokens.length-1].type=TokenType._static;break;case ContextualKeyword._public:state.tokens[state.tokens.length-1].type=TokenType._public;break;case ContextualKeyword._private:state.tokens[state.tokens.length-1].type=TokenType._private;break;case ContextualKeyword._protected:state.tokens[state.tokens.length-1].type=TokenType._protected;break;case ContextualKeyword._override:state.tokens[state.tokens.length-1].type=TokenType._override;break;case ContextualKeyword._declare:state.tokens[state.tokens.length-1].type=TokenType._declare;break;default:break}return modifier}return null}function tsParseEntityName(){for(parseIdentifier();eat(TokenType.dot);)parseIdentifier()}function tsParseTypeReference(){tsParseEntityName(),!hasPrecedingLineBreak()&&match(TokenType.lessThan)&&tsParseTypeArguments()}function tsParseThisTypePredicate(){next(),tsParseTypeAnnotation()}function tsParseThisTypeNode(){next()}function tsParseTypeQuery(){expect(TokenType._typeof),match(TokenType._import)?tsParseImportType():tsParseEntityName(),!hasPrecedingLineBreak()&&match(TokenType.lessThan)&&tsParseTypeArguments()}function tsParseImportType(){expect(TokenType._import),expect(TokenType.parenL),expect(TokenType.string),expect(TokenType.parenR),eat(TokenType.dot)&&tsParseEntityName(),match(TokenType.lessThan)&&tsParseTypeArguments()}function tsParseTypeParameter(){eat(TokenType._const);const hadIn=eat(TokenType._in),hadOut=eatContextual(ContextualKeyword._out);eat(TokenType._const),(hadIn||hadOut)&&!match(TokenType.name)?state.tokens[state.tokens.length-1].type=TokenType.name:parseIdentifier(),eat(TokenType._extends)&&tsParseType(),eat(TokenType.eq)&&tsParseType()}function tsTryParseTypeParameters(){match(TokenType.lessThan)&&tsParseTypeParameters()}function tsParseTypeParameters(){const oldIsType=pushTypeContext(0);for(match(TokenType.lessThan)||match(TokenType.typeParameterStart)?next():unexpected();!eat(TokenType.greaterThan)&&!state.error;)tsParseTypeParameter(),eat(TokenType.comma);popTypeContext(oldIsType)}function tsFillSignature(returnToken){const returnTokenRequired=returnToken===TokenType.arrow;tsTryParseTypeParameters(),expect(TokenType.parenL),state.scopeDepth++,tsParseBindingListForSignature(!1),state.scopeDepth--,(returnTokenRequired||match(returnToken))&&tsParseTypeOrTypePredicateAnnotation(returnToken)}function tsParseBindingListForSignature(isBlockScope){parseBindingList(TokenType.parenR,isBlockScope)}function tsParseTypeMemberSemicolon(){eat(TokenType.comma)||semicolon()}function tsParseSignatureMember(){tsFillSignature(TokenType.colon),tsParseTypeMemberSemicolon()}function tsIsUnambiguouslyIndexSignature(){const snapshot=state.snapshot();next();const isIndexSignature=eat(TokenType.name)&&match(TokenType.colon);return state.restoreFromSnapshot(snapshot),isIndexSignature}function tsTryParseIndexSignature(){if(!(match(TokenType.bracketL)&&tsIsUnambiguouslyIndexSignature()))return!1;const oldIsType=pushTypeContext(0);return expect(TokenType.bracketL),parseIdentifier(),tsParseTypeAnnotation(),expect(TokenType.bracketR),tsTryParseTypeAnnotation(),tsParseTypeMemberSemicolon(),popTypeContext(oldIsType),!0}function tsParsePropertyOrMethodSignature(isReadonly){eat(TokenType.question),!isReadonly&&(match(TokenType.parenL)||match(TokenType.lessThan))?(tsFillSignature(TokenType.colon),tsParseTypeMemberSemicolon()):(tsTryParseTypeAnnotation(),tsParseTypeMemberSemicolon())}function tsParseTypeMember(){if(match(TokenType.parenL)||match(TokenType.lessThan)){tsParseSignatureMember();return}if(match(TokenType._new)){next(),match(TokenType.parenL)||match(TokenType.lessThan)?tsParseSignatureMember():tsParsePropertyOrMethodSignature(!1);return}const readonly=!!tsParseModifier([ContextualKeyword._readonly]);tsTryParseIndexSignature()||((isContextual(ContextualKeyword._get)||isContextual(ContextualKeyword._set))&&tsNextTokenCanFollowModifier(),parsePropertyName(-1),tsParsePropertyOrMethodSignature(readonly))}function tsParseTypeLiteral(){tsParseObjectTypeMembers()}function tsParseObjectTypeMembers(){for(expect(TokenType.braceL);!eat(TokenType.braceR)&&!state.error;)tsParseTypeMember()}function tsLookaheadIsStartOfMappedType(){const snapshot=state.snapshot(),isStartOfMappedType=tsIsStartOfMappedType();return state.restoreFromSnapshot(snapshot),isStartOfMappedType}function tsIsStartOfMappedType(){return next(),eat(TokenType.plus)||eat(TokenType.minus)?isContextual(ContextualKeyword._readonly):(isContextual(ContextualKeyword._readonly)&&next(),!match(TokenType.bracketL)||(next(),!tsIsIdentifier())?!1:(next(),match(TokenType._in)))}function tsParseMappedTypeParameter(){parseIdentifier(),expect(TokenType._in),tsParseType()}function tsParseMappedType(){expect(TokenType.braceL),match(TokenType.plus)||match(TokenType.minus)?(next(),expectContextual(ContextualKeyword._readonly)):eatContextual(ContextualKeyword._readonly),expect(TokenType.bracketL),tsParseMappedTypeParameter(),eatContextual(ContextualKeyword._as)&&tsParseType(),expect(TokenType.bracketR),match(TokenType.plus)||match(TokenType.minus)?(next(),expect(TokenType.question)):eat(TokenType.question),tsTryParseType(),semicolon(),expect(TokenType.braceR)}function tsParseTupleType(){for(expect(TokenType.bracketL);!eat(TokenType.bracketR)&&!state.error;)tsParseTupleElementType(),eat(TokenType.comma)}function tsParseTupleElementType(){eat(TokenType.ellipsis)?tsParseType():(tsParseType(),eat(TokenType.question)),eat(TokenType.colon)&&tsParseType()}function tsParseParenthesizedType(){expect(TokenType.parenL),tsParseType(),expect(TokenType.parenR)}function tsParseTemplateLiteralType(){for(nextTemplateToken(),nextTemplateToken();!match(TokenType.backQuote)&&!state.error;)expect(TokenType.dollarBraceL),tsParseType(),nextTemplateToken(),nextTemplateToken();next()}var FunctionType;(function(FunctionType2){FunctionType2[FunctionType2.TSFunctionType=0]="TSFunctionType";const TSConstructorType=0+1;FunctionType2[FunctionType2.TSConstructorType=TSConstructorType]="TSConstructorType";const TSAbstractConstructorType=TSConstructorType+1;FunctionType2[FunctionType2.TSAbstractConstructorType=TSAbstractConstructorType]="TSAbstractConstructorType"})(FunctionType||(FunctionType={}));function tsParseFunctionOrConstructorType(type){type===FunctionType.TSAbstractConstructorType&&expectContextual(ContextualKeyword._abstract),(type===FunctionType.TSConstructorType||type===FunctionType.TSAbstractConstructorType)&&expect(TokenType._new);const oldInDisallowConditionalTypesContext=state.inDisallowConditionalTypesContext;state.inDisallowConditionalTypesContext=!1,tsFillSignature(TokenType.arrow),state.inDisallowConditionalTypesContext=oldInDisallowConditionalTypesContext}function tsParseNonArrayType(){switch(state.type){case TokenType.name:tsParseTypeReference();return;case TokenType._void:case TokenType._null:next();return;case TokenType.string:case TokenType.num:case TokenType.bigint:case TokenType.decimal:case TokenType._true:case TokenType._false:parseLiteral();return;case TokenType.minus:next(),parseLiteral();return;case TokenType._this:{tsParseThisTypeNode(),isContextual(ContextualKeyword._is)&&!hasPrecedingLineBreak()&&tsParseThisTypePredicate();return}case TokenType._typeof:tsParseTypeQuery();return;case TokenType._import:tsParseImportType();return;case TokenType.braceL:tsLookaheadIsStartOfMappedType()?tsParseMappedType():tsParseTypeLiteral();return;case TokenType.bracketL:tsParseTupleType();return;case TokenType.parenL:tsParseParenthesizedType();return;case TokenType.backQuote:tsParseTemplateLiteralType();return;default:if(state.type&TokenType.IS_KEYWORD){next(),state.tokens[state.tokens.length-1].type=TokenType.name;return}break}unexpected()}function tsParseArrayTypeOrHigher(){for(tsParseNonArrayType();!hasPrecedingLineBreak()&&eat(TokenType.bracketL);)eat(TokenType.bracketR)||(tsParseType(),expect(TokenType.bracketR))}function tsParseInferType(){if(expectContextual(ContextualKeyword._infer),parseIdentifier(),match(TokenType._extends)){const snapshot=state.snapshot();expect(TokenType._extends);const oldInDisallowConditionalTypesContext=state.inDisallowConditionalTypesContext;state.inDisallowConditionalTypesContext=!0,tsParseType(),state.inDisallowConditionalTypesContext=oldInDisallowConditionalTypesContext,(state.error||!state.inDisallowConditionalTypesContext&&match(TokenType.question))&&state.restoreFromSnapshot(snapshot)}}function tsParseTypeOperatorOrHigher(){if(isContextual(ContextualKeyword._keyof)||isContextual(ContextualKeyword._unique)||isContextual(ContextualKeyword._readonly))next(),tsParseTypeOperatorOrHigher();else if(isContextual(ContextualKeyword._infer))tsParseInferType();else{const oldInDisallowConditionalTypesContext=state.inDisallowConditionalTypesContext;state.inDisallowConditionalTypesContext=!1,tsParseArrayTypeOrHigher(),state.inDisallowConditionalTypesContext=oldInDisallowConditionalTypesContext}}function tsParseIntersectionTypeOrHigher(){if(eat(TokenType.bitwiseAND),tsParseTypeOperatorOrHigher(),match(TokenType.bitwiseAND))for(;eat(TokenType.bitwiseAND);)tsParseTypeOperatorOrHigher()}function tsParseUnionTypeOrHigher(){if(eat(TokenType.bitwiseOR),tsParseIntersectionTypeOrHigher(),match(TokenType.bitwiseOR))for(;eat(TokenType.bitwiseOR);)tsParseIntersectionTypeOrHigher()}function tsIsStartOfFunctionType(){return match(TokenType.lessThan)?!0:match(TokenType.parenL)&&tsLookaheadIsUnambiguouslyStartOfFunctionType()}function tsSkipParameterStart(){if(match(TokenType.name)||match(TokenType._this))return next(),!0;if(match(TokenType.braceL)||match(TokenType.bracketL)){let depth=1;for(next();depth>0&&!state.error;)match(TokenType.braceL)||match(TokenType.bracketL)?depth++:(match(TokenType.braceR)||match(TokenType.bracketR))&&depth--,next();return!0}return!1}function tsLookaheadIsUnambiguouslyStartOfFunctionType(){const snapshot=state.snapshot(),isUnambiguouslyStartOfFunctionType=tsIsUnambiguouslyStartOfFunctionType();return state.restoreFromSnapshot(snapshot),isUnambiguouslyStartOfFunctionType}function tsIsUnambiguouslyStartOfFunctionType(){return next(),!!(match(TokenType.parenR)||match(TokenType.ellipsis)||tsSkipParameterStart()&&(match(TokenType.colon)||match(TokenType.comma)||match(TokenType.question)||match(TokenType.eq)||match(TokenType.parenR)&&(next(),match(TokenType.arrow))))}function tsParseTypeOrTypePredicateAnnotation(returnToken){const oldIsType=pushTypeContext(0);expect(returnToken),tsParseTypePredicateOrAssertsPrefix()||tsParseType(),popTypeContext(oldIsType)}function tsTryParseTypeOrTypePredicateAnnotation(){match(TokenType.colon)&&tsParseTypeOrTypePredicateAnnotation(TokenType.colon)}function tsTryParseTypeAnnotation(){match(TokenType.colon)&&tsParseTypeAnnotation()}function tsTryParseType(){eat(TokenType.colon)&&tsParseType()}function tsParseTypePredicateOrAssertsPrefix(){const snapshot=state.snapshot();return isContextual(ContextualKeyword._asserts)?(next(),eatContextual(ContextualKeyword._is)?(tsParseType(),!0):tsIsIdentifier()||match(TokenType._this)?(next(),eatContextual(ContextualKeyword._is)&&tsParseType(),!0):(state.restoreFromSnapshot(snapshot),!1)):tsIsIdentifier()||match(TokenType._this)?(next(),isContextual(ContextualKeyword._is)&&!hasPrecedingLineBreak()?(next(),tsParseType(),!0):(state.restoreFromSnapshot(snapshot),!1)):!1}function tsParseTypeAnnotation(){const oldIsType=pushTypeContext(0);expect(TokenType.colon),tsParseType(),popTypeContext(oldIsType)}function tsParseType(){if(tsParseNonConditionalType(),state.inDisallowConditionalTypesContext||hasPrecedingLineBreak()||!eat(TokenType._extends))return;const oldInDisallowConditionalTypesContext=state.inDisallowConditionalTypesContext;state.inDisallowConditionalTypesContext=!0,tsParseNonConditionalType(),state.inDisallowConditionalTypesContext=oldInDisallowConditionalTypesContext,expect(TokenType.question),tsParseType(),expect(TokenType.colon),tsParseType()}function isAbstractConstructorSignature(){return isContextual(ContextualKeyword._abstract)&&lookaheadType()===TokenType._new}function tsParseNonConditionalType(){if(tsIsStartOfFunctionType()){tsParseFunctionOrConstructorType(FunctionType.TSFunctionType);return}if(match(TokenType._new)){tsParseFunctionOrConstructorType(FunctionType.TSConstructorType);return}else if(isAbstractConstructorSignature()){tsParseFunctionOrConstructorType(FunctionType.TSAbstractConstructorType);return}tsParseUnionTypeOrHigher()}function tsParseTypeAssertion(){const oldIsType=pushTypeContext(1);tsParseType(),expect(TokenType.greaterThan),popTypeContext(oldIsType),parseMaybeUnary()}function tsTryParseJSXTypeArgument(){if(eat(TokenType.jsxTagStart)){state.tokens[state.tokens.length-1].type=TokenType.typeParameterStart;const oldIsType=pushTypeContext(1);for(;!match(TokenType.greaterThan)&&!state.error;)tsParseType(),eat(TokenType.comma);nextJSXTagToken(),popTypeContext(oldIsType)}}function tsParseHeritageClause(){for(;!match(TokenType.braceL)&&!state.error;)tsParseExpressionWithTypeArguments(),eat(TokenType.comma)}function tsParseExpressionWithTypeArguments(){tsParseEntityName(),match(TokenType.lessThan)&&tsParseTypeArguments()}function tsParseInterfaceDeclaration(){parseBindingIdentifier(!1),tsTryParseTypeParameters(),eat(TokenType._extends)&&tsParseHeritageClause(),tsParseObjectTypeMembers()}function tsParseTypeAliasDeclaration(){parseBindingIdentifier(!1),tsTryParseTypeParameters(),expect(TokenType.eq),tsParseType(),semicolon()}function tsParseEnumMember(){if(match(TokenType.string)?parseLiteral():parseIdentifier(),eat(TokenType.eq)){const eqIndex=state.tokens.length-1;parseMaybeAssign(),state.tokens[eqIndex].rhsEndIndex=state.tokens.length}}function tsParseEnumDeclaration(){for(parseBindingIdentifier(!1),expect(TokenType.braceL);!eat(TokenType.braceR)&&!state.error;)tsParseEnumMember(),eat(TokenType.comma)}function tsParseModuleBlock(){expect(TokenType.braceL),parseBlockBody(TokenType.braceR)}function tsParseModuleOrNamespaceDeclaration(){parseBindingIdentifier(!1),eat(TokenType.dot)?tsParseModuleOrNamespaceDeclaration():tsParseModuleBlock()}function tsParseAmbientExternalModuleDeclaration(){isContextual(ContextualKeyword._global)?parseIdentifier():match(TokenType.string)?parseExprAtom():unexpected(),match(TokenType.braceL)?tsParseModuleBlock():semicolon()}function tsParseImportEqualsDeclaration(){parseImportedIdentifier(),expect(TokenType.eq),tsParseModuleReference(),semicolon()}function tsIsExternalModuleReference(){return isContextual(ContextualKeyword._require)&&lookaheadType()===TokenType.parenL}function tsParseModuleReference(){tsIsExternalModuleReference()?tsParseExternalModuleReference():tsParseEntityName()}function tsParseExternalModuleReference(){expectContextual(ContextualKeyword._require),expect(TokenType.parenL),match(TokenType.string)||unexpected(),parseLiteral(),expect(TokenType.parenR)}function tsTryParseDeclare(){if(isLineTerminator())return!1;switch(state.type){case TokenType._function:{const oldIsType=pushTypeContext(1);next();const functionStart=state.start;return parseFunction(functionStart,!0),popTypeContext(oldIsType),!0}case TokenType._class:{const oldIsType=pushTypeContext(1);return parseClass(!0,!1),popTypeContext(oldIsType),!0}case TokenType._const:if(match(TokenType._const)&&isLookaheadContextual(ContextualKeyword._enum)){const oldIsType=pushTypeContext(1);return expect(TokenType._const),expectContextual(ContextualKeyword._enum),state.tokens[state.tokens.length-1].type=TokenType._enum,tsParseEnumDeclaration(),popTypeContext(oldIsType),!0}case TokenType._var:case TokenType._let:{const oldIsType=pushTypeContext(1);return parseVarStatement(state.type!==TokenType._var),popTypeContext(oldIsType),!0}case TokenType.name:{const oldIsType=pushTypeContext(1),contextualKeyword=state.contextualKeyword;let matched=!1;return contextualKeyword===ContextualKeyword._global?(tsParseAmbientExternalModuleDeclaration(),matched=!0):matched=tsParseDeclaration(contextualKeyword,!0),popTypeContext(oldIsType),matched}default:return!1}}function tsTryParseExportDeclaration(){return tsParseDeclaration(state.contextualKeyword,!0)}function tsParseExpressionStatement(contextualKeyword){switch(contextualKeyword){case ContextualKeyword._declare:{const declareTokenIndex=state.tokens.length-1;if(tsTryParseDeclare())return state.tokens[declareTokenIndex].type=TokenType._declare,!0;break}case ContextualKeyword._global:if(match(TokenType.braceL))return tsParseModuleBlock(),!0;break;default:return tsParseDeclaration(contextualKeyword,!1)}return!1}function tsParseDeclaration(contextualKeyword,isBeforeToken){switch(contextualKeyword){case ContextualKeyword._abstract:if(tsCheckLineTerminator(isBeforeToken)&&match(TokenType._class))return state.tokens[state.tokens.length-1].type=TokenType._abstract,parseClass(!0,!1),!0;break;case ContextualKeyword._enum:if(tsCheckLineTerminator(isBeforeToken)&&match(TokenType.name))return state.tokens[state.tokens.length-1].type=TokenType._enum,tsParseEnumDeclaration(),!0;break;case ContextualKeyword._interface:if(tsCheckLineTerminator(isBeforeToken)&&match(TokenType.name)){const oldIsType=pushTypeContext(isBeforeToken?2:1);return tsParseInterfaceDeclaration(),popTypeContext(oldIsType),!0}break;case ContextualKeyword._module:if(tsCheckLineTerminator(isBeforeToken)){if(match(TokenType.string)){const oldIsType=pushTypeContext(isBeforeToken?2:1);return tsParseAmbientExternalModuleDeclaration(),popTypeContext(oldIsType),!0}else if(match(TokenType.name)){const oldIsType=pushTypeContext(isBeforeToken?2:1);return tsParseModuleOrNamespaceDeclaration(),popTypeContext(oldIsType),!0}}break;case ContextualKeyword._namespace:if(tsCheckLineTerminator(isBeforeToken)&&match(TokenType.name)){const oldIsType=pushTypeContext(isBeforeToken?2:1);return tsParseModuleOrNamespaceDeclaration(),popTypeContext(oldIsType),!0}break;case ContextualKeyword._type:if(tsCheckLineTerminator(isBeforeToken)&&match(TokenType.name)){const oldIsType=pushTypeContext(isBeforeToken?2:1);return tsParseTypeAliasDeclaration(),popTypeContext(oldIsType),!0}break;default:break}return!1}function tsCheckLineTerminator(isBeforeToken){return isBeforeToken?(next(),!0):!isLineTerminator()}function tsTryParseGenericAsyncArrowFunction(){const snapshot=state.snapshot();return tsParseTypeParameters(),parseFunctionParams(),tsTryParseTypeOrTypePredicateAnnotation(),expect(TokenType.arrow),state.error?(state.restoreFromSnapshot(snapshot),!1):(parseFunctionBody(!0),!0)}function tsParseTypeArgumentsWithPossibleBitshift(){state.type===TokenType.bitShiftL&&(state.pos-=1,finishToken(TokenType.lessThan)),tsParseTypeArguments()}function tsParseTypeArguments(){const oldIsType=pushTypeContext(0);for(expect(TokenType.lessThan);!match(TokenType.greaterThan)&&!state.error;)tsParseType(),eat(TokenType.comma);oldIsType?(expect(TokenType.greaterThan),popTypeContext(oldIsType)):(popTypeContext(oldIsType),rescan_gt(),expect(TokenType.greaterThan),state.tokens[state.tokens.length-1].isType=!0)}function tsIsDeclarationStart(){if(match(TokenType.name))switch(state.contextualKeyword){case ContextualKeyword._abstract:case ContextualKeyword._declare:case ContextualKeyword._enum:case ContextualKeyword._interface:case ContextualKeyword._module:case ContextualKeyword._namespace:case ContextualKeyword._type:return!0;default:break}return!1}function tsParseFunctionBodyAndFinish(functionStart,funcContextId){if(match(TokenType.colon)&&tsParseTypeOrTypePredicateAnnotation(TokenType.colon),!match(TokenType.braceL)&&isLineTerminator()){let i=state.tokens.length-1;for(;i>=0&&(state.tokens[i].start>=functionStart||state.tokens[i].type===TokenType._default||state.tokens[i].type===TokenType._export);)state.tokens[i].isType=!0,i--;return}parseFunctionBody(!1,funcContextId)}function tsParseSubscript(startTokenIndex,noCalls,stopState){if(!hasPrecedingLineBreak()&&eat(TokenType.bang)){state.tokens[state.tokens.length-1].type=TokenType.nonNullAssertion;return}if(match(TokenType.lessThan)||match(TokenType.bitShiftL)){const snapshot=state.snapshot();if(!noCalls&&atPossibleAsync()&&tsTryParseGenericAsyncArrowFunction())return;if(tsParseTypeArgumentsWithPossibleBitshift(),!noCalls&&eat(TokenType.parenL)?(state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex,parseCallExpressionArguments()):match(TokenType.backQuote)?parseTemplate():(state.type===TokenType.greaterThan||state.type!==TokenType.parenL&&Boolean(state.type&TokenType.IS_EXPRESSION_START)&&!hasPrecedingLineBreak())&&unexpected(),state.error)state.restoreFromSnapshot(snapshot);else return}else!noCalls&&match(TokenType.questionDot)&&lookaheadType()===TokenType.lessThan&&(next(),state.tokens[startTokenIndex].isOptionalChainStart=!0,state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex,tsParseTypeArguments(),expect(TokenType.parenL),parseCallExpressionArguments());baseParseSubscript(startTokenIndex,noCalls,stopState)}function tsTryParseExport(){if(eat(TokenType._import))return isContextual(ContextualKeyword._type)&&lookaheadType()!==TokenType.eq&&expectContextual(ContextualKeyword._type),tsParseImportEqualsDeclaration(),!0;if(eat(TokenType.eq))return parseExpression(),semicolon(),!0;if(eatContextual(ContextualKeyword._as))return expectContextual(ContextualKeyword._namespace),parseIdentifier(),semicolon(),!0;if(isContextual(ContextualKeyword._type)){const nextType=lookaheadType();(nextType===TokenType.braceL||nextType===TokenType.star)&&next()}return!1}function tsParseImportSpecifier(){if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportDeclaration;return}if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportDeclaration,state.tokens[state.tokens.length-2].isType=!0,state.tokens[state.tokens.length-1].isType=!0;return}if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-3].identifierRole=IdentifierRole.ImportAccess,state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportDeclaration;return}parseIdentifier(),state.tokens[state.tokens.length-3].identifierRole=IdentifierRole.ImportAccess,state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportDeclaration,state.tokens[state.tokens.length-4].isType=!0,state.tokens[state.tokens.length-3].isType=!0,state.tokens[state.tokens.length-2].isType=!0,state.tokens[state.tokens.length-1].isType=!0}function tsParseExportSpecifier(){if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ExportAccess;return}if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ExportAccess,state.tokens[state.tokens.length-2].isType=!0,state.tokens[state.tokens.length-1].isType=!0;return}if(parseIdentifier(),match(TokenType.comma)||match(TokenType.braceR)){state.tokens[state.tokens.length-3].identifierRole=IdentifierRole.ExportAccess;return}parseIdentifier(),state.tokens[state.tokens.length-3].identifierRole=IdentifierRole.ExportAccess,state.tokens[state.tokens.length-4].isType=!0,state.tokens[state.tokens.length-3].isType=!0,state.tokens[state.tokens.length-2].isType=!0,state.tokens[state.tokens.length-1].isType=!0}function tsTryParseExportDefaultExpression(){if(isContextual(ContextualKeyword._abstract)&&lookaheadType()===TokenType._class)return state.type=TokenType._abstract,next(),parseClass(!0,!0),!0;if(isContextual(ContextualKeyword._interface)){const oldIsType=pushTypeContext(2);return tsParseDeclaration(ContextualKeyword._interface,!0),popTypeContext(oldIsType),!0}return!1}function tsTryParseStatementContent(){if(state.type===TokenType._const){const ahead=lookaheadTypeAndKeyword();if(ahead.type===TokenType.name&&ahead.contextualKeyword===ContextualKeyword._enum)return expect(TokenType._const),expectContextual(ContextualKeyword._enum),state.tokens[state.tokens.length-1].type=TokenType._enum,tsParseEnumDeclaration(),!0}return!1}function tsTryParseClassMemberWithIsStatic(isStatic){const memberStartIndexAfterStatic=state.tokens.length;tsParseModifiers([ContextualKeyword._abstract,ContextualKeyword._readonly,ContextualKeyword._declare,ContextualKeyword._static,ContextualKeyword._override]);const modifiersEndIndex=state.tokens.length;if(tsTryParseIndexSignature()){const memberStartIndex=isStatic?memberStartIndexAfterStatic-1:memberStartIndexAfterStatic;for(let i=memberStartIndex;i<modifiersEndIndex;i++)state.tokens[i].isType=!0;return!0}return!1}function tsParseIdentifierStatement(contextualKeyword){tsParseExpressionStatement(contextualKeyword)||semicolon()}function tsParseExportDeclaration(){const isDeclare=eatContextual(ContextualKeyword._declare);isDeclare&&(state.tokens[state.tokens.length-1].type=TokenType._declare);let matchedDeclaration=!1;if(match(TokenType.name))if(isDeclare){const oldIsType=pushTypeContext(2);matchedDeclaration=tsTryParseExportDeclaration(),popTypeContext(oldIsType)}else matchedDeclaration=tsTryParseExportDeclaration();if(!matchedDeclaration)if(isDeclare){const oldIsType=pushTypeContext(2);parseStatement(!0),popTypeContext(oldIsType)}else parseStatement(!0)}function tsAfterParseClassSuper(hasSuper){if(hasSuper&&(match(TokenType.lessThan)||match(TokenType.bitShiftL))&&tsParseTypeArgumentsWithPossibleBitshift(),eatContextual(ContextualKeyword._implements)){state.tokens[state.tokens.length-1].type=TokenType._implements;const oldIsType=pushTypeContext(1);tsParseHeritageClause(),popTypeContext(oldIsType)}}function tsStartParseObjPropValue(){tsTryParseTypeParameters()}function tsStartParseFunctionParams(){tsTryParseTypeParameters()}function tsAfterParseVarHead(){const oldIsType=pushTypeContext(0);hasPrecedingLineBreak()||eat(TokenType.bang),tsTryParseTypeAnnotation(),popTypeContext(oldIsType)}function tsStartParseAsyncArrowFromCallExpression(){match(TokenType.colon)&&tsParseTypeAnnotation()}function tsParseMaybeAssign(noIn,isWithinParens){return isJSXEnabled?tsParseMaybeAssignWithJSX(noIn,isWithinParens):tsParseMaybeAssignWithoutJSX(noIn,isWithinParens)}function tsParseMaybeAssignWithJSX(noIn,isWithinParens){if(!match(TokenType.lessThan))return baseParseMaybeAssign(noIn,isWithinParens);const snapshot=state.snapshot();let wasArrow=baseParseMaybeAssign(noIn,isWithinParens);if(state.error)state.restoreFromSnapshot(snapshot);else return wasArrow;return state.type=TokenType.typeParameterStart,tsParseTypeParameters(),wasArrow=baseParseMaybeAssign(noIn,isWithinParens),wasArrow||unexpected(),wasArrow}function tsParseMaybeAssignWithoutJSX(noIn,isWithinParens){if(!match(TokenType.lessThan))return baseParseMaybeAssign(noIn,isWithinParens);const snapshot=state.snapshot();tsParseTypeParameters();const wasArrow=baseParseMaybeAssign(noIn,isWithinParens);if(wasArrow||unexpected(),state.error)state.restoreFromSnapshot(snapshot);else return wasArrow;return baseParseMaybeAssign(noIn,isWithinParens)}function tsParseArrow(){if(match(TokenType.colon)){const snapshot=state.snapshot();tsParseTypeOrTypePredicateAnnotation(TokenType.colon),canInsertSemicolon()&&unexpected(),match(TokenType.arrow)||unexpected(),state.error&&state.restoreFromSnapshot(snapshot)}return eat(TokenType.arrow)}function tsParseAssignableListItemTypes(){const oldIsType=pushTypeContext(0);eat(TokenType.question),tsTryParseTypeAnnotation(),popTypeContext(oldIsType)}function tsParseMaybeDecoratorArguments(){(match(TokenType.lessThan)||match(TokenType.bitShiftL))&&tsParseTypeArgumentsWithPossibleBitshift(),baseParseMaybeDecoratorArguments()}function jsxReadToken(){let sawNewline=!1,sawNonWhitespace=!1;for(;;){if(state.pos>=input.length){unexpected("Unterminated JSX contents");return}const ch=input.charCodeAt(state.pos);if(ch===charCodes.lessThan||ch===charCodes.leftCurlyBrace){if(state.pos===state.start){if(ch===charCodes.lessThan){state.pos++,finishToken(TokenType.jsxTagStart);return}getTokenFromCode(ch);return}finishToken(sawNewline&&!sawNonWhitespace?TokenType.jsxEmptyText:TokenType.jsxText);return}ch===charCodes.lineFeed?sawNewline=!0:ch!==charCodes.space&&ch!==charCodes.carriageReturn&&ch!==charCodes.tab&&(sawNonWhitespace=!0),state.pos++}}function jsxReadString(quote){for(state.pos++;;){if(state.pos>=input.length){unexpected("Unterminated string constant");return}if(input.charCodeAt(state.pos)===quote){state.pos++;break}state.pos++}finishToken(TokenType.string)}function jsxReadWord(){let ch;do{if(state.pos>input.length){unexpected("Unexpectedly reached the end of input.");return}ch=input.charCodeAt(++state.pos)}while(IS_IDENTIFIER_CHAR[ch]||ch===charCodes.dash);finishToken(TokenType.jsxName)}function jsxParseIdentifier(){nextJSXTagToken()}function jsxParseNamespacedName(identifierRole){if(jsxParseIdentifier(),!eat(TokenType.colon)){state.tokens[state.tokens.length-1].identifierRole=identifierRole;return}jsxParseIdentifier()}function jsxParseElementName(){const firstTokenIndex=state.tokens.length;jsxParseNamespacedName(IdentifierRole.Access);let hadDot=!1;for(;match(TokenType.dot);)hadDot=!0,nextJSXTagToken(),jsxParseIdentifier();if(!hadDot){const firstToken=state.tokens[firstTokenIndex],firstChar=input.charCodeAt(firstToken.start);firstChar>=charCodes.lowercaseA&&firstChar<=charCodes.lowercaseZ&&(firstToken.identifierRole=null)}}function jsxParseAttributeValue(){switch(state.type){case TokenType.braceL:next(),parseExpression(),nextJSXTagToken();return;case TokenType.jsxTagStart:jsxParseElement(),nextJSXTagToken();return;case TokenType.string:nextJSXTagToken();return;default:unexpected("JSX value should be either an expression or a quoted JSX text")}}function jsxParseSpreadChild(){expect(TokenType.ellipsis),parseExpression()}function jsxParseOpeningElement(initialTokenIndex){if(match(TokenType.jsxTagEnd))return!1;jsxParseElementName(),isTypeScriptEnabled&&tsTryParseJSXTypeArgument();let hasSeenPropSpread=!1;for(;!match(TokenType.slash)&&!match(TokenType.jsxTagEnd)&&!state.error;){if(eat(TokenType.braceL)){hasSeenPropSpread=!0,expect(TokenType.ellipsis),parseMaybeAssign(),nextJSXTagToken();continue}hasSeenPropSpread&&state.end-state.start===3&&input.charCodeAt(state.start)===charCodes.lowercaseK&&input.charCodeAt(state.start+1)===charCodes.lowercaseE&&input.charCodeAt(state.start+2)===charCodes.lowercaseY&&(state.tokens[initialTokenIndex].jsxRole=JSXRole.KeyAfterPropSpread),jsxParseNamespacedName(IdentifierRole.ObjectKey),match(TokenType.eq)&&(nextJSXTagToken(),jsxParseAttributeValue())}const isSelfClosing=match(TokenType.slash);return isSelfClosing&&nextJSXTagToken(),isSelfClosing}function jsxParseClosingElement(){match(TokenType.jsxTagEnd)||jsxParseElementName()}function jsxParseElementAt(){const initialTokenIndex=state.tokens.length-1;state.tokens[initialTokenIndex].jsxRole=JSXRole.NoChildren;let numExplicitChildren=0;if(!jsxParseOpeningElement(initialTokenIndex))for(nextJSXExprToken();;)switch(state.type){case TokenType.jsxTagStart:if(nextJSXTagToken(),match(TokenType.slash)){nextJSXTagToken(),jsxParseClosingElement(),state.tokens[initialTokenIndex].jsxRole!==JSXRole.KeyAfterPropSpread&&(numExplicitChildren===1?state.tokens[initialTokenIndex].jsxRole=JSXRole.OneChild:numExplicitChildren>1&&(state.tokens[initialTokenIndex].jsxRole=JSXRole.StaticChildren));return}numExplicitChildren++,jsxParseElementAt(),nextJSXExprToken();break;case TokenType.jsxText:numExplicitChildren++,nextJSXExprToken();break;case TokenType.jsxEmptyText:nextJSXExprToken();break;case TokenType.braceL:next(),match(TokenType.ellipsis)?(jsxParseSpreadChild(),nextJSXExprToken(),numExplicitChildren+=2):(match(TokenType.braceR)||(numExplicitChildren++,parseExpression()),nextJSXExprToken());break;default:unexpected();return}}function jsxParseElement(){nextJSXTagToken(),jsxParseElementAt()}function nextJSXTagToken(){state.tokens.push(new Token),skipSpace(),state.start=state.pos;const code=input.charCodeAt(state.pos);if(IS_IDENTIFIER_START[code])jsxReadWord();else if(code===charCodes.quotationMark||code===charCodes.apostrophe)jsxReadString(code);else switch(++state.pos,code){case charCodes.greaterThan:finishToken(TokenType.jsxTagEnd);break;case charCodes.lessThan:finishToken(TokenType.jsxTagStart);break;case charCodes.slash:finishToken(TokenType.slash);break;case charCodes.equalsTo:finishToken(TokenType.eq);break;case charCodes.leftCurlyBrace:finishToken(TokenType.braceL);break;case charCodes.dot:finishToken(TokenType.dot);break;case charCodes.colon:finishToken(TokenType.colon);break;default:unexpected()}}function nextJSXExprToken(){state.tokens.push(new Token),state.start=state.pos,jsxReadToken()}function typedParseConditional(noIn){if(match(TokenType.question)){const nextType=lookaheadType();if(nextType===TokenType.colon||nextType===TokenType.comma||nextType===TokenType.parenR)return}baseParseConditional(noIn)}function typedParseParenItem(){eatTypeToken(TokenType.question),match(TokenType.colon)&&(isTypeScriptEnabled?tsParseTypeAnnotation():isFlowEnabled&&flowParseTypeAnnotation())}class StopState{constructor(stop){this.stop=stop}}function parseExpression(noIn=!1){if(parseMaybeAssign(noIn),match(TokenType.comma))for(;eat(TokenType.comma);)parseMaybeAssign(noIn)}function parseMaybeAssign(noIn=!1,isWithinParens=!1){return isTypeScriptEnabled?tsParseMaybeAssign(noIn,isWithinParens):isFlowEnabled?flowParseMaybeAssign(noIn,isWithinParens):baseParseMaybeAssign(noIn,isWithinParens)}function baseParseMaybeAssign(noIn,isWithinParens){if(match(TokenType._yield))return parseYield(),!1;(match(TokenType.parenL)||match(TokenType.name)||match(TokenType._yield))&&(state.potentialArrowAt=state.start);const wasArrow=parseMaybeConditional(noIn);return isWithinParens&&parseParenItem(),state.type&TokenType.IS_ASSIGN?(next(),parseMaybeAssign(noIn),!1):wasArrow}function parseMaybeConditional(noIn){return parseExprOps(noIn)?!0:(parseConditional(noIn),!1)}function parseConditional(noIn){isTypeScriptEnabled||isFlowEnabled?typedParseConditional(noIn):baseParseConditional(noIn)}function baseParseConditional(noIn){eat(TokenType.question)&&(parseMaybeAssign(),expect(TokenType.colon),parseMaybeAssign(noIn))}function parseExprOps(noIn){const startTokenIndex=state.tokens.length;return parseMaybeUnary()?!0:(parseExprOp(startTokenIndex,-1,noIn),!1)}function parseExprOp(startTokenIndex,minPrec,noIn){if(isTypeScriptEnabled&&(TokenType._in&TokenType.PRECEDENCE_MASK)>minPrec&&!hasPrecedingLineBreak()&&(eatContextual(ContextualKeyword._as)||eatContextual(ContextualKeyword._satisfies))){const oldIsType=pushTypeContext(1);tsParseType(),popTypeContext(oldIsType),rescan_gt(),parseExprOp(startTokenIndex,minPrec,noIn);return}const prec=state.type&TokenType.PRECEDENCE_MASK;if(prec>0&&(!noIn||!match(TokenType._in))&&prec>minPrec){const op=state.type;next(),op===TokenType.nullishCoalescing&&(state.tokens[state.tokens.length-1].nullishStartIndex=startTokenIndex);const rhsStartTokenIndex=state.tokens.length;parseMaybeUnary(),parseExprOp(rhsStartTokenIndex,op&TokenType.IS_RIGHT_ASSOCIATIVE?prec-1:prec,noIn),op===TokenType.nullishCoalescing&&(state.tokens[startTokenIndex].numNullishCoalesceStarts++,state.tokens[state.tokens.length-1].numNullishCoalesceEnds++),parseExprOp(startTokenIndex,minPrec,noIn)}}function parseMaybeUnary(){if(isTypeScriptEnabled&&!isJSXEnabled&&eat(TokenType.lessThan))return tsParseTypeAssertion(),!1;if(isContextual(ContextualKeyword._module)&&lookaheadCharCode()===charCodes.leftCurlyBrace&&!hasFollowingLineBreak())return parseModuleExpression(),!1;if(state.type&TokenType.IS_PREFIX)return next(),parseMaybeUnary(),!1;if(parseExprSubscripts())return!0;for(;state.type&TokenType.IS_POSTFIX&&!canInsertSemicolon();)state.type===TokenType.preIncDec&&(state.type=TokenType.postIncDec),next();return!1}function parseExprSubscripts(){const startTokenIndex=state.tokens.length;return parseExprAtom()?!0:(parseSubscripts(startTokenIndex),state.tokens.length>startTokenIndex&&state.tokens[startTokenIndex].isOptionalChainStart&&(state.tokens[state.tokens.length-1].isOptionalChainEnd=!0),!1)}function parseSubscripts(startTokenIndex,noCalls=!1){isFlowEnabled?flowParseSubscripts(startTokenIndex,noCalls):baseParseSubscripts(startTokenIndex,noCalls)}function baseParseSubscripts(startTokenIndex,noCalls=!1){const stopState=new StopState(!1);do parseSubscript(startTokenIndex,noCalls,stopState);while(!stopState.stop&&!state.error)}function parseSubscript(startTokenIndex,noCalls,stopState){isTypeScriptEnabled?tsParseSubscript(startTokenIndex,noCalls,stopState):isFlowEnabled?flowParseSubscript(startTokenIndex,noCalls,stopState):baseParseSubscript(startTokenIndex,noCalls,stopState)}function baseParseSubscript(startTokenIndex,noCalls,stopState){if(!noCalls&&eat(TokenType.doubleColon))parseNoCallExpr(),stopState.stop=!0,parseSubscripts(startTokenIndex,noCalls);else if(match(TokenType.questionDot)){if(state.tokens[startTokenIndex].isOptionalChainStart=!0,noCalls&&lookaheadType()===TokenType.parenL){stopState.stop=!0;return}next(),state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex,eat(TokenType.bracketL)?(parseExpression(),expect(TokenType.bracketR)):eat(TokenType.parenL)?parseCallExpressionArguments():parseMaybePrivateName()}else if(eat(TokenType.dot))state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex,parseMaybePrivateName();else if(eat(TokenType.bracketL))state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex,parseExpression(),expect(TokenType.bracketR);else if(!noCalls&&match(TokenType.parenL))if(atPossibleAsync()){const snapshot=state.snapshot(),asyncStartTokenIndex=state.tokens.length;next(),state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex;const callContextId=getNextContextId();state.tokens[state.tokens.length-1].contextId=callContextId,parseCallExpressionArguments(),state.tokens[state.tokens.length-1].contextId=callContextId,shouldParseAsyncArrow()&&(state.restoreFromSnapshot(snapshot),stopState.stop=!0,state.scopeDepth++,parseFunctionParams(),parseAsyncArrowFromCallExpression(asyncStartTokenIndex))}else{next(),state.tokens[state.tokens.length-1].subscriptStartIndex=startTokenIndex;const callContextId=getNextContextId();state.tokens[state.tokens.length-1].contextId=callContextId,parseCallExpressionArguments(),state.tokens[state.tokens.length-1].contextId=callContextId}else match(TokenType.backQuote)?parseTemplate():stopState.stop=!0}function atPossibleAsync(){return state.tokens[state.tokens.length-1].contextualKeyword===ContextualKeyword._async&&!canInsertSemicolon()}function parseCallExpressionArguments(){let first=!0;for(;!eat(TokenType.parenR)&&!state.error;){if(first)first=!1;else if(expect(TokenType.comma),eat(TokenType.parenR))break;parseExprListItem(!1)}}function shouldParseAsyncArrow(){return match(TokenType.colon)||match(TokenType.arrow)}function parseAsyncArrowFromCallExpression(startTokenIndex){isTypeScriptEnabled?tsStartParseAsyncArrowFromCallExpression():isFlowEnabled&&flowStartParseAsyncArrowFromCallExpression(),expect(TokenType.arrow),parseArrowExpression(startTokenIndex)}function parseNoCallExpr(){const startTokenIndex=state.tokens.length;parseExprAtom(),parseSubscripts(startTokenIndex,!0)}function parseExprAtom(){if(eat(TokenType.modulo))return parseIdentifier(),!1;if(match(TokenType.jsxText)||match(TokenType.jsxEmptyText))return parseLiteral(),!1;if(match(TokenType.lessThan)&&isJSXEnabled)return state.type=TokenType.jsxTagStart,jsxParseElement(),next(),!1;const canBeArrow=state.potentialArrowAt===state.start;switch(state.type){case TokenType.slash:case TokenType.assign:retokenizeSlashAsRegex();case TokenType._super:case TokenType._this:case TokenType.regexp:case TokenType.num:case TokenType.bigint:case TokenType.decimal:case TokenType.string:case TokenType._null:case TokenType._true:case TokenType._false:return next(),!1;case TokenType._import:return next(),match(TokenType.dot)&&(state.tokens[state.tokens.length-1].type=TokenType.name,next(),parseIdentifier()),!1;case TokenType.name:{const startTokenIndex=state.tokens.length,functionStart=state.start,contextualKeyword=state.contextualKeyword;return parseIdentifier(),contextualKeyword===ContextualKeyword._await?(parseAwait(),!1):contextualKeyword===ContextualKeyword._async&&match(TokenType._function)&&!canInsertSemicolon()?(next(),parseFunction(functionStart,!1),!1):canBeArrow&&contextualKeyword===ContextualKeyword._async&&!canInsertSemicolon()&&match(TokenType.name)?(state.scopeDepth++,parseBindingIdentifier(!1),expect(TokenType.arrow),parseArrowExpression(startTokenIndex),!0):match(TokenType._do)&&!canInsertSemicolon()?(next(),parseBlock(),!1):canBeArrow&&!canInsertSemicolon()&&match(TokenType.arrow)?(state.scopeDepth++,markPriorBindingIdentifier(!1),expect(TokenType.arrow),parseArrowExpression(startTokenIndex),!0):(state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.Access,!1)}case TokenType._do:return next(),parseBlock(),!1;case TokenType.parenL:return parseParenAndDistinguishExpression(canBeArrow);case TokenType.bracketL:return next(),parseExprList(TokenType.bracketR,!0),!1;case TokenType.braceL:return parseObj(!1,!1),!1;case TokenType._function:return parseFunctionExpression(),!1;case TokenType.at:parseDecorators();case TokenType._class:return parseClass(!1),!1;case TokenType._new:return parseNew(),!1;case TokenType.backQuote:return parseTemplate(),!1;case TokenType.doubleColon:return next(),parseNoCallExpr(),!1;case TokenType.hash:{const code=lookaheadCharCode();return IS_IDENTIFIER_START[code]||code===charCodes.backslash?parseMaybePrivateName():next(),!1}default:return unexpected(),!1}}function parseMaybePrivateName(){eat(TokenType.hash),parseIdentifier()}function parseFunctionExpression(){const functionStart=state.start;parseIdentifier(),eat(TokenType.dot)&&parseIdentifier(),parseFunction(functionStart,!1)}function parseLiteral(){next()}function parseParenExpression(){expect(TokenType.parenL),parseExpression(),expect(TokenType.parenR)}function parseParenAndDistinguishExpression(canBeArrow){const snapshot=state.snapshot(),startTokenIndex=state.tokens.length;expect(TokenType.parenL);let first=!0;for(;!match(TokenType.parenR)&&!state.error;){if(first)first=!1;else if(expect(TokenType.comma),match(TokenType.parenR))break;if(match(TokenType.ellipsis)){parseRest(!1),parseParenItem();break}else parseMaybeAssign(!1,!0)}return expect(TokenType.parenR),canBeArrow&&shouldParseArrow()&&parseArrow()?(state.restoreFromSnapshot(snapshot),state.scopeDepth++,parseFunctionParams(),parseArrow(),parseArrowExpression(startTokenIndex),state.error?(state.restoreFromSnapshot(snapshot),parseParenAndDistinguishExpression(!1),!1):!0):!1}function shouldParseArrow(){return match(TokenType.colon)||!canInsertSemicolon()}function parseArrow(){return isTypeScriptEnabled?tsParseArrow():isFlowEnabled?flowParseArrow():eat(TokenType.arrow)}function parseParenItem(){(isTypeScriptEnabled||isFlowEnabled)&&typedParseParenItem()}function parseNew(){if(expect(TokenType._new),eat(TokenType.dot)){parseIdentifier();return}parseNewCallee(),isFlowEnabled&&flowStartParseNewArguments(),eat(TokenType.parenL)&&parseExprList(TokenType.parenR)}function parseNewCallee(){parseNoCallExpr(),eat(TokenType.questionDot)}function parseTemplate(){for(nextTemplateToken(),nextTemplateToken();!match(TokenType.backQuote)&&!state.error;)expect(TokenType.dollarBraceL),parseExpression(),nextTemplateToken(),nextTemplateToken();next()}function parseObj(isPattern,isBlockScope){const contextId=getNextContextId();let first=!0;for(next(),state.tokens[state.tokens.length-1].contextId=contextId;!eat(TokenType.braceR)&&!state.error;){if(first)first=!1;else if(expect(TokenType.comma),eat(TokenType.braceR))break;let isGenerator=!1;if(match(TokenType.ellipsis)){const previousIndex=state.tokens.length;if(parseSpread(),isPattern&&(state.tokens.length===previousIndex+2&&markPriorBindingIdentifier(isBlockScope),eat(TokenType.braceR)))break;continue}isPattern||(isGenerator=eat(TokenType.star)),!isPattern&&isContextual(ContextualKeyword._async)?(isGenerator&&unexpected(),parseIdentifier(),match(TokenType.colon)||match(TokenType.parenL)||match(TokenType.braceR)||match(TokenType.eq)||match(TokenType.comma)||(match(TokenType.star)&&(next(),isGenerator=!0),parsePropertyName(contextId))):parsePropertyName(contextId),parseObjPropValue(isPattern,isBlockScope,contextId)}state.tokens[state.tokens.length-1].contextId=contextId}function isGetterOrSetterMethod(isPattern){return!isPattern&&(match(TokenType.string)||match(TokenType.num)||match(TokenType.bracketL)||match(TokenType.name)||!!(state.type&TokenType.IS_KEYWORD))}function parseObjectMethod(isPattern,objectContextId){const functionStart=state.start;return match(TokenType.parenL)?(isPattern&&unexpected(),parseMethod(functionStart,!1),!0):isGetterOrSetterMethod(isPattern)?(parsePropertyName(objectContextId),parseMethod(functionStart,!1),!0):!1}function parseObjectProperty(isPattern,isBlockScope){if(eat(TokenType.colon)){isPattern?parseMaybeDefault(isBlockScope):parseMaybeAssign(!1);return}let identifierRole;isPattern?state.scopeDepth===0?identifierRole=IdentifierRole.ObjectShorthandTopLevelDeclaration:isBlockScope?identifierRole=IdentifierRole.ObjectShorthandBlockScopedDeclaration:identifierRole=IdentifierRole.ObjectShorthandFunctionScopedDeclaration:identifierRole=IdentifierRole.ObjectShorthand,state.tokens[state.tokens.length-1].identifierRole=identifierRole,parseMaybeDefault(isBlockScope,!0)}function parseObjPropValue(isPattern,isBlockScope,objectContextId){isTypeScriptEnabled?tsStartParseObjPropValue():isFlowEnabled&&flowStartParseObjPropValue(),parseObjectMethod(isPattern,objectContextId)||parseObjectProperty(isPattern,isBlockScope)}function parsePropertyName(objectContextId){isFlowEnabled&&flowParseVariance(),eat(TokenType.bracketL)?(state.tokens[state.tokens.length-1].contextId=objectContextId,parseMaybeAssign(),expect(TokenType.bracketR),state.tokens[state.tokens.length-1].contextId=objectContextId):(match(TokenType.num)||match(TokenType.string)||match(TokenType.bigint)||match(TokenType.decimal)?parseExprAtom():parseMaybePrivateName(),state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ObjectKey,state.tokens[state.tokens.length-1].contextId=objectContextId)}function parseMethod(functionStart,isConstructor){const funcContextId=getNextContextId();state.scopeDepth++;const startTokenIndex=state.tokens.length;parseFunctionParams(isConstructor,funcContextId),parseFunctionBodyAndFinish(functionStart,funcContextId);const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,!0)),state.scopeDepth--}function parseArrowExpression(startTokenIndex){parseFunctionBody(!0);const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,!0)),state.scopeDepth--}function parseFunctionBodyAndFinish(functionStart,funcContextId=0){isTypeScriptEnabled?tsParseFunctionBodyAndFinish(functionStart,funcContextId):isFlowEnabled?flowParseFunctionBodyAndFinish(funcContextId):parseFunctionBody(!1,funcContextId)}function parseFunctionBody(allowExpression,funcContextId=0){allowExpression&&!match(TokenType.braceL)?parseMaybeAssign():parseBlock(!0,funcContextId)}function parseExprList(close,allowEmpty=!1){let first=!0;for(;!eat(close)&&!state.error;){if(first)first=!1;else if(expect(TokenType.comma),eat(close))break;parseExprListItem(allowEmpty)}}function parseExprListItem(allowEmpty){allowEmpty&&match(TokenType.comma)||(match(TokenType.ellipsis)?(parseSpread(),parseParenItem()):match(TokenType.question)?next():parseMaybeAssign(!1,!0))}function parseIdentifier(){next(),state.tokens[state.tokens.length-1].type=TokenType.name}function parseAwait(){parseMaybeUnary()}function parseYield(){next(),!match(TokenType.semi)&&!canInsertSemicolon()&&(eat(TokenType.star),parseMaybeAssign())}function parseModuleExpression(){expectContextual(ContextualKeyword._module),expect(TokenType.braceL),parseBlockBody(TokenType.braceR)}function isMaybeDefaultImport(lookahead){return(lookahead.type===TokenType.name||!!(lookahead.type&TokenType.IS_KEYWORD))&&lookahead.contextualKeyword!==ContextualKeyword._from}function flowParseTypeInitialiser(tok){const oldIsType=pushTypeContext(0);expect(tok||TokenType.colon),flowParseType(),popTypeContext(oldIsType)}function flowParsePredicate(){expect(TokenType.modulo),expectContextual(ContextualKeyword._checks),eat(TokenType.parenL)&&(parseExpression(),expect(TokenType.parenR))}function flowParseTypeAndPredicateInitialiser(){const oldIsType=pushTypeContext(0);expect(TokenType.colon),match(TokenType.modulo)?flowParsePredicate():(flowParseType(),match(TokenType.modulo)&&flowParsePredicate()),popTypeContext(oldIsType)}function flowParseDeclareClass(){next(),flowParseInterfaceish(!0)}function flowParseDeclareFunction(){next(),parseIdentifier(),match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),expect(TokenType.parenL),flowParseFunctionTypeParams(),expect(TokenType.parenR),flowParseTypeAndPredicateInitialiser(),semicolon()}function flowParseDeclare(){match(TokenType._class)?flowParseDeclareClass():match(TokenType._function)?flowParseDeclareFunction():match(TokenType._var)?flowParseDeclareVariable():eatContextual(ContextualKeyword._module)?eat(TokenType.dot)?flowParseDeclareModuleExports():flowParseDeclareModule():isContextual(ContextualKeyword._type)?flowParseDeclareTypeAlias():isContextual(ContextualKeyword._opaque)?flowParseDeclareOpaqueType():isContextual(ContextualKeyword._interface)?flowParseDeclareInterface():match(TokenType._export)?flowParseDeclareExportDeclaration():unexpected()}function flowParseDeclareVariable(){next(),flowParseTypeAnnotatableIdentifier(),semicolon()}function flowParseDeclareModule(){for(match(TokenType.string)?parseExprAtom():parseIdentifier(),expect(TokenType.braceL);!match(TokenType.braceR)&&!state.error;)match(TokenType._import)?(next(),parseImport()):unexpected();expect(TokenType.braceR)}function flowParseDeclareExportDeclaration(){expect(TokenType._export),eat(TokenType._default)?match(TokenType._function)||match(TokenType._class)?flowParseDeclare():(flowParseType(),semicolon()):match(TokenType._var)||match(TokenType._function)||match(TokenType._class)||isContextual(ContextualKeyword._opaque)?flowParseDeclare():match(TokenType.star)||match(TokenType.braceL)||isContextual(ContextualKeyword._interface)||isContextual(ContextualKeyword._type)||isContextual(ContextualKeyword._opaque)?parseExport():unexpected()}function flowParseDeclareModuleExports(){expectContextual(ContextualKeyword._exports),flowParseTypeAnnotation(),semicolon()}function flowParseDeclareTypeAlias(){next(),flowParseTypeAlias()}function flowParseDeclareOpaqueType(){next(),flowParseOpaqueType(!0)}function flowParseDeclareInterface(){next(),flowParseInterfaceish()}function flowParseInterfaceish(isClass=!1){if(flowParseRestrictedIdentifier(),match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),eat(TokenType._extends))do flowParseInterfaceExtends();while(!isClass&&eat(TokenType.comma));if(isContextual(ContextualKeyword._mixins)){next();do flowParseInterfaceExtends();while(eat(TokenType.comma))}if(isContextual(ContextualKeyword._implements)){next();do flowParseInterfaceExtends();while(eat(TokenType.comma))}flowParseObjectType(isClass,!1,isClass)}function flowParseInterfaceExtends(){flowParseQualifiedTypeIdentifier(!1),match(TokenType.lessThan)&&flowParseTypeParameterInstantiation()}function flowParseInterface(){flowParseInterfaceish()}function flowParseRestrictedIdentifier(){parseIdentifier()}function flowParseTypeAlias(){flowParseRestrictedIdentifier(),match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),flowParseTypeInitialiser(TokenType.eq),semicolon()}function flowParseOpaqueType(declare){expectContextual(ContextualKeyword._type),flowParseRestrictedIdentifier(),match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),match(TokenType.colon)&&flowParseTypeInitialiser(TokenType.colon),declare||flowParseTypeInitialiser(TokenType.eq),semicolon()}function flowParseTypeParameter(){flowParseVariance(),flowParseTypeAnnotatableIdentifier(),eat(TokenType.eq)&&flowParseType()}function flowParseTypeParameterDeclaration(){const oldIsType=pushTypeContext(0);match(TokenType.lessThan)||match(TokenType.typeParameterStart)?next():unexpected();do flowParseTypeParameter(),match(TokenType.greaterThan)||expect(TokenType.comma);while(!match(TokenType.greaterThan)&&!state.error);expect(TokenType.greaterThan),popTypeContext(oldIsType)}function flowParseTypeParameterInstantiation(){const oldIsType=pushTypeContext(0);for(expect(TokenType.lessThan);!match(TokenType.greaterThan)&&!state.error;)flowParseType(),match(TokenType.greaterThan)||expect(TokenType.comma);expect(TokenType.greaterThan),popTypeContext(oldIsType)}function flowParseInterfaceType(){if(expectContextual(ContextualKeyword._interface),eat(TokenType._extends))do flowParseInterfaceExtends();while(eat(TokenType.comma));flowParseObjectType(!1,!1,!1)}function flowParseObjectPropertyKey(){match(TokenType.num)||match(TokenType.string)?parseExprAtom():parseIdentifier()}function flowParseObjectTypeIndexer(){lookaheadType()===TokenType.colon?(flowParseObjectPropertyKey(),flowParseTypeInitialiser()):flowParseType(),expect(TokenType.bracketR),flowParseTypeInitialiser()}function flowParseObjectTypeInternalSlot(){flowParseObjectPropertyKey(),expect(TokenType.bracketR),expect(TokenType.bracketR),match(TokenType.lessThan)||match(TokenType.parenL)?flowParseObjectTypeMethodish():(eat(TokenType.question),flowParseTypeInitialiser())}function flowParseObjectTypeMethodish(){for(match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),expect(TokenType.parenL);!match(TokenType.parenR)&&!match(TokenType.ellipsis)&&!state.error;)flowParseFunctionTypeParam(),match(TokenType.parenR)||expect(TokenType.comma);eat(TokenType.ellipsis)&&flowParseFunctionTypeParam(),expect(TokenType.parenR),flowParseTypeInitialiser()}function flowParseObjectTypeCallProperty(){flowParseObjectTypeMethodish()}function flowParseObjectType(allowStatic,allowExact,allowProto){let endDelim;for(allowExact&&match(TokenType.braceBarL)?(expect(TokenType.braceBarL),endDelim=TokenType.braceBarR):(expect(TokenType.braceL),endDelim=TokenType.braceR);!match(endDelim)&&!state.error;){if(allowProto&&isContextual(ContextualKeyword._proto)){const lookahead=lookaheadType();lookahead!==TokenType.colon&&lookahead!==TokenType.question&&(next(),allowStatic=!1)}if(allowStatic&&isContextual(ContextualKeyword._static)){const lookahead=lookaheadType();lookahead!==TokenType.colon&&lookahead!==TokenType.question&&next()}if(flowParseVariance(),eat(TokenType.bracketL))eat(TokenType.bracketL)?flowParseObjectTypeInternalSlot():flowParseObjectTypeIndexer();else if(match(TokenType.parenL)||match(TokenType.lessThan))flowParseObjectTypeCallProperty();else{if(isContextual(ContextualKeyword._get)||isContextual(ContextualKeyword._set)){const lookahead=lookaheadType();(lookahead===TokenType.name||lookahead===TokenType.string||lookahead===TokenType.num)&&next()}flowParseObjectTypeProperty()}flowObjectTypeSemicolon()}expect(endDelim)}function flowParseObjectTypeProperty(){if(match(TokenType.ellipsis)){if(expect(TokenType.ellipsis),eat(TokenType.comma)||eat(TokenType.semi),match(TokenType.braceR))return;flowParseType()}else flowParseObjectPropertyKey(),match(TokenType.lessThan)||match(TokenType.parenL)?flowParseObjectTypeMethodish():(eat(TokenType.question),flowParseTypeInitialiser())}function flowObjectTypeSemicolon(){!eat(TokenType.semi)&&!eat(TokenType.comma)&&!match(TokenType.braceR)&&!match(TokenType.braceBarR)&&unexpected()}function flowParseQualifiedTypeIdentifier(initialIdAlreadyParsed){for(initialIdAlreadyParsed||parseIdentifier();eat(TokenType.dot);)parseIdentifier()}function flowParseGenericType(){flowParseQualifiedTypeIdentifier(!0),match(TokenType.lessThan)&&flowParseTypeParameterInstantiation()}function flowParseTypeofType(){expect(TokenType._typeof),flowParsePrimaryType()}function flowParseTupleType(){for(expect(TokenType.bracketL);state.pos<input.length&&!match(TokenType.bracketR)&&(flowParseType(),!match(TokenType.bracketR));)expect(TokenType.comma);expect(TokenType.bracketR)}function flowParseFunctionTypeParam(){const lookahead=lookaheadType();lookahead===TokenType.colon||lookahead===TokenType.question?(parseIdentifier(),eat(TokenType.question),flowParseTypeInitialiser()):flowParseType()}function flowParseFunctionTypeParams(){for(;!match(TokenType.parenR)&&!match(TokenType.ellipsis)&&!state.error;)flowParseFunctionTypeParam(),match(TokenType.parenR)||expect(TokenType.comma);eat(TokenType.ellipsis)&&flowParseFunctionTypeParam()}function flowParsePrimaryType(){let isGroupedType=!1;const oldNoAnonFunctionType=state.noAnonFunctionType;switch(state.type){case TokenType.name:{if(isContextual(ContextualKeyword._interface)){flowParseInterfaceType();return}parseIdentifier(),flowParseGenericType();return}case TokenType.braceL:flowParseObjectType(!1,!1,!1);return;case TokenType.braceBarL:flowParseObjectType(!1,!0,!1);return;case TokenType.bracketL:flowParseTupleType();return;case TokenType.lessThan:flowParseTypeParameterDeclaration(),expect(TokenType.parenL),flowParseFunctionTypeParams(),expect(TokenType.parenR),expect(TokenType.arrow),flowParseType();return;case TokenType.parenL:if(next(),!match(TokenType.parenR)&&!match(TokenType.ellipsis))if(match(TokenType.name)){const token=lookaheadType();isGroupedType=token!==TokenType.question&&token!==TokenType.colon}else isGroupedType=!0;if(isGroupedType)if(state.noAnonFunctionType=!1,flowParseType(),state.noAnonFunctionType=oldNoAnonFunctionType,state.noAnonFunctionType||!(match(TokenType.comma)||match(TokenType.parenR)&&lookaheadType()===TokenType.arrow)){expect(TokenType.parenR);return}else eat(TokenType.comma);flowParseFunctionTypeParams(),expect(TokenType.parenR),expect(TokenType.arrow),flowParseType();return;case TokenType.minus:next(),parseLiteral();return;case TokenType.string:case TokenType.num:case TokenType._true:case TokenType._false:case TokenType._null:case TokenType._this:case TokenType._void:case TokenType.star:next();return;default:if(state.type===TokenType._typeof){flowParseTypeofType();return}else if(state.type&TokenType.IS_KEYWORD){next(),state.tokens[state.tokens.length-1].type=TokenType.name;return}}unexpected()}function flowParsePostfixType(){for(flowParsePrimaryType();!canInsertSemicolon()&&(match(TokenType.bracketL)||match(TokenType.questionDot));)eat(TokenType.questionDot),expect(TokenType.bracketL),eat(TokenType.bracketR)||(flowParseType(),expect(TokenType.bracketR))}function flowParsePrefixType(){eat(TokenType.question)?flowParsePrefixType():flowParsePostfixType()}function flowParseAnonFunctionWithoutParens(){flowParsePrefixType(),!state.noAnonFunctionType&&eat(TokenType.arrow)&&flowParseType()}function flowParseIntersectionType(){for(eat(TokenType.bitwiseAND),flowParseAnonFunctionWithoutParens();eat(TokenType.bitwiseAND);)flowParseAnonFunctionWithoutParens()}function flowParseUnionType(){for(eat(TokenType.bitwiseOR),flowParseIntersectionType();eat(TokenType.bitwiseOR);)flowParseIntersectionType()}function flowParseType(){flowParseUnionType()}function flowParseTypeAnnotation(){flowParseTypeInitialiser()}function flowParseTypeAnnotatableIdentifier(){parseIdentifier(),match(TokenType.colon)&&flowParseTypeAnnotation()}function flowParseVariance(){(match(TokenType.plus)||match(TokenType.minus))&&(next(),state.tokens[state.tokens.length-1].isType=!0)}function flowParseFunctionBodyAndFinish(funcContextId){match(TokenType.colon)&&flowParseTypeAndPredicateInitialiser(),parseFunctionBody(!1,funcContextId)}function flowParseSubscript(startTokenIndex,noCalls,stopState){if(match(TokenType.questionDot)&&lookaheadType()===TokenType.lessThan){if(noCalls){stopState.stop=!0;return}next(),flowParseTypeParameterInstantiation(),expect(TokenType.parenL),parseCallExpressionArguments();return}else if(!noCalls&&match(TokenType.lessThan)){const snapshot=state.snapshot();if(flowParseTypeParameterInstantiation(),expect(TokenType.parenL),parseCallExpressionArguments(),state.error)state.restoreFromSnapshot(snapshot);else return}baseParseSubscript(startTokenIndex,noCalls,stopState)}function flowStartParseNewArguments(){if(match(TokenType.lessThan)){const snapshot=state.snapshot();flowParseTypeParameterInstantiation(),state.error&&state.restoreFromSnapshot(snapshot)}}function flowTryParseStatement(){if(match(TokenType.name)&&state.contextualKeyword===ContextualKeyword._interface){const oldIsType=pushTypeContext(0);return next(),flowParseInterface(),popTypeContext(oldIsType),!0}else if(isContextual(ContextualKeyword._enum))return flowParseEnumDeclaration(),!0;return!1}function flowTryParseExportDefaultExpression(){return isContextual(ContextualKeyword._enum)?(flowParseEnumDeclaration(),!0):!1}function flowParseIdentifierStatement(contextualKeyword){if(contextualKeyword===ContextualKeyword._declare){if(match(TokenType._class)||match(TokenType.name)||match(TokenType._function)||match(TokenType._var)||match(TokenType._export)){const oldIsType=pushTypeContext(1);flowParseDeclare(),popTypeContext(oldIsType)}}else if(match(TokenType.name)){if(contextualKeyword===ContextualKeyword._interface){const oldIsType=pushTypeContext(1);flowParseInterface(),popTypeContext(oldIsType)}else if(contextualKeyword===ContextualKeyword._type){const oldIsType=pushTypeContext(1);flowParseTypeAlias(),popTypeContext(oldIsType)}else if(contextualKeyword===ContextualKeyword._opaque){const oldIsType=pushTypeContext(1);flowParseOpaqueType(!1),popTypeContext(oldIsType)}}semicolon()}function flowShouldParseExportDeclaration(){return isContextual(ContextualKeyword._type)||isContextual(ContextualKeyword._interface)||isContextual(ContextualKeyword._opaque)||isContextual(ContextualKeyword._enum)}function flowShouldDisallowExportDefaultSpecifier(){return match(TokenType.name)&&(state.contextualKeyword===ContextualKeyword._type||state.contextualKeyword===ContextualKeyword._interface||state.contextualKeyword===ContextualKeyword._opaque||state.contextualKeyword===ContextualKeyword._enum)}function flowParseExportDeclaration(){if(isContextual(ContextualKeyword._type)){const oldIsType=pushTypeContext(1);next(),match(TokenType.braceL)?(parseExportSpecifiers(),parseExportFrom()):flowParseTypeAlias(),popTypeContext(oldIsType)}else if(isContextual(ContextualKeyword._opaque)){const oldIsType=pushTypeContext(1);next(),flowParseOpaqueType(!1),popTypeContext(oldIsType)}else if(isContextual(ContextualKeyword._interface)){const oldIsType=pushTypeContext(1);next(),flowParseInterface(),popTypeContext(oldIsType)}else parseStatement(!0)}function flowShouldParseExportStar(){return match(TokenType.star)||isContextual(ContextualKeyword._type)&&lookaheadType()===TokenType.star}function flowParseExportStar(){if(eatContextual(ContextualKeyword._type)){const oldIsType=pushTypeContext(2);baseParseExportStar(),popTypeContext(oldIsType)}else baseParseExportStar()}function flowAfterParseClassSuper(hasSuper){if(hasSuper&&match(TokenType.lessThan)&&flowParseTypeParameterInstantiation(),isContextual(ContextualKeyword._implements)){const oldIsType=pushTypeContext(0);next(),state.tokens[state.tokens.length-1].type=TokenType._implements;do flowParseRestrictedIdentifier(),match(TokenType.lessThan)&&flowParseTypeParameterInstantiation();while(eat(TokenType.comma));popTypeContext(oldIsType)}}function flowStartParseObjPropValue(){match(TokenType.lessThan)&&(flowParseTypeParameterDeclaration(),match(TokenType.parenL)||unexpected())}function flowParseAssignableListItemTypes(){const oldIsType=pushTypeContext(0);eat(TokenType.question),match(TokenType.colon)&&flowParseTypeAnnotation(),popTypeContext(oldIsType)}function flowStartParseImportSpecifiers(){if(match(TokenType._typeof)||isContextual(ContextualKeyword._type)){const lh=lookaheadTypeAndKeyword();(isMaybeDefaultImport(lh)||lh.type===TokenType.braceL||lh.type===TokenType.star)&&next()}}function flowParseImportSpecifier(){const isTypeKeyword=state.contextualKeyword===ContextualKeyword._type||state.type===TokenType._typeof;isTypeKeyword?next():parseIdentifier(),isContextual(ContextualKeyword._as)&&!isLookaheadContextual(ContextualKeyword._as)?(parseIdentifier(),isTypeKeyword&&!match(TokenType.name)&&!(state.type&TokenType.IS_KEYWORD)||parseIdentifier()):(isTypeKeyword&&(match(TokenType.name)||!!(state.type&TokenType.IS_KEYWORD))&&parseIdentifier(),eatContextual(ContextualKeyword._as)&&parseIdentifier())}function flowStartParseFunctionParams(){if(match(TokenType.lessThan)){const oldIsType=pushTypeContext(0);flowParseTypeParameterDeclaration(),popTypeContext(oldIsType)}}function flowAfterParseVarHead(){match(TokenType.colon)&&flowParseTypeAnnotation()}function flowStartParseAsyncArrowFromCallExpression(){if(match(TokenType.colon)){const oldNoAnonFunctionType=state.noAnonFunctionType;state.noAnonFunctionType=!0,flowParseTypeAnnotation(),state.noAnonFunctionType=oldNoAnonFunctionType}}function flowParseMaybeAssign(noIn,isWithinParens){if(match(TokenType.lessThan)){const snapshot=state.snapshot();let wasArrow=baseParseMaybeAssign(noIn,isWithinParens);if(state.error)state.restoreFromSnapshot(snapshot),state.type=TokenType.typeParameterStart;else return wasArrow;const oldIsType=pushTypeContext(0);if(flowParseTypeParameterDeclaration(),popTypeContext(oldIsType),wasArrow=baseParseMaybeAssign(noIn,isWithinParens),wasArrow)return!0;unexpected()}return baseParseMaybeAssign(noIn,isWithinParens)}function flowParseArrow(){if(match(TokenType.colon)){const oldIsType=pushTypeContext(0),snapshot=state.snapshot(),oldNoAnonFunctionType=state.noAnonFunctionType;state.noAnonFunctionType=!0,flowParseTypeAndPredicateInitialiser(),state.noAnonFunctionType=oldNoAnonFunctionType,canInsertSemicolon()&&unexpected(),match(TokenType.arrow)||unexpected(),state.error&&state.restoreFromSnapshot(snapshot),popTypeContext(oldIsType)}return eat(TokenType.arrow)}function flowParseSubscripts(startTokenIndex,noCalls=!1){if(state.tokens[state.tokens.length-1].contextualKeyword===ContextualKeyword._async&&match(TokenType.lessThan)){const snapshot=state.snapshot();if(parseAsyncArrowWithTypeParameters()&&!state.error)return;state.restoreFromSnapshot(snapshot)}baseParseSubscripts(startTokenIndex,noCalls)}function parseAsyncArrowWithTypeParameters(){state.scopeDepth++;const startTokenIndex=state.tokens.length;return parseFunctionParams(),parseArrow()?(parseArrowExpression(startTokenIndex),!0):!1}function flowParseEnumDeclaration(){expectContextual(ContextualKeyword._enum),state.tokens[state.tokens.length-1].type=TokenType._enum,parseIdentifier(),flowParseEnumBody()}function flowParseEnumBody(){eatContextual(ContextualKeyword._of)&&next(),expect(TokenType.braceL),flowParseEnumMembers(),expect(TokenType.braceR)}function flowParseEnumMembers(){for(;!match(TokenType.braceR)&&!state.error&&!eat(TokenType.ellipsis);)flowParseEnumMember(),match(TokenType.braceR)||expect(TokenType.comma)}function flowParseEnumMember(){parseIdentifier(),eat(TokenType.eq)&&next()}function parseTopLevel(){if(parseBlockBody(TokenType.eof),state.scopes.push(new Scope(0,state.tokens.length,!0)),state.scopeDepth!==0)throw new Error(`Invalid scope depth at end of file: ${state.scopeDepth}`);return new File2(state.tokens,state.scopes)}function parseStatement(declaration){isFlowEnabled&&flowTryParseStatement()||(match(TokenType.at)&&parseDecorators(),parseStatementContent(declaration))}function parseStatementContent(declaration){if(isTypeScriptEnabled&&tsTryParseStatementContent())return;const starttype=state.type;switch(starttype){case TokenType._break:case TokenType._continue:parseBreakContinueStatement();return;case TokenType._debugger:parseDebuggerStatement();return;case TokenType._do:parseDoStatement();return;case TokenType._for:parseForStatement();return;case TokenType._function:if(lookaheadType()===TokenType.dot)break;declaration||unexpected(),parseFunctionStatement();return;case TokenType._class:declaration||unexpected(),parseClass(!0);return;case TokenType._if:parseIfStatement();return;case TokenType._return:parseReturnStatement();return;case TokenType._switch:parseSwitchStatement();return;case TokenType._throw:parseThrowStatement();return;case TokenType._try:parseTryStatement();return;case TokenType._let:case TokenType._const:declaration||unexpected();case TokenType._var:parseVarStatement(starttype!==TokenType._var);return;case TokenType._while:parseWhileStatement();return;case TokenType.braceL:parseBlock();return;case TokenType.semi:parseEmptyStatement();return;case TokenType._export:case TokenType._import:{const nextType=lookaheadType();if(nextType===TokenType.parenL||nextType===TokenType.dot)break;next(),starttype===TokenType._import?parseImport():parseExport();return}case TokenType.name:if(state.contextualKeyword===ContextualKeyword._async){const functionStart=state.start,snapshot=state.snapshot();if(next(),match(TokenType._function)&&!canInsertSemicolon()){expect(TokenType._function),parseFunction(functionStart,!0);return}else state.restoreFromSnapshot(snapshot)}else if(state.contextualKeyword===ContextualKeyword._using&&!hasFollowingLineBreak()&&lookaheadType()===TokenType.name){parseVarStatement(!0);return}else if(startsAwaitUsing()){expectContextual(ContextualKeyword._await),parseVarStatement(!0);return}default:break}const initialTokensLength=state.tokens.length;parseExpression();let simpleName=null;if(state.tokens.length===initialTokensLength+1){const token=state.tokens[state.tokens.length-1];token.type===TokenType.name&&(simpleName=token.contextualKeyword)}if(simpleName==null){semicolon();return}eat(TokenType.colon)?parseLabeledStatement():parseIdentifierStatement(simpleName)}function startsAwaitUsing(){if(!isContextual(ContextualKeyword._await))return!1;const snapshot=state.snapshot();return next(),!isContextual(ContextualKeyword._using)||hasPrecedingLineBreak()||(next(),!match(TokenType.name)||hasPrecedingLineBreak())?(state.restoreFromSnapshot(snapshot),!1):(state.restoreFromSnapshot(snapshot),!0)}function parseDecorators(){for(;match(TokenType.at);)parseDecorator()}function parseDecorator(){if(next(),eat(TokenType.parenL))parseExpression(),expect(TokenType.parenR);else{for(parseIdentifier();eat(TokenType.dot);)parseIdentifier();parseMaybeDecoratorArguments()}}function parseMaybeDecoratorArguments(){isTypeScriptEnabled?tsParseMaybeDecoratorArguments():baseParseMaybeDecoratorArguments()}function baseParseMaybeDecoratorArguments(){eat(TokenType.parenL)&&parseCallExpressionArguments()}function parseBreakContinueStatement(){next(),isLineTerminator()||(parseIdentifier(),semicolon())}function parseDebuggerStatement(){next(),semicolon()}function parseDoStatement(){next(),parseStatement(!1),expect(TokenType._while),parseParenExpression(),eat(TokenType.semi)}function parseForStatement(){state.scopeDepth++;const startTokenIndex=state.tokens.length;parseAmbiguousForStatement();const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,!1)),state.scopeDepth--}function isUsingInLoop(){return!(!isContextual(ContextualKeyword._using)||isLookaheadContextual(ContextualKeyword._of))}function parseAmbiguousForStatement(){next();let forAwait=!1;if(isContextual(ContextualKeyword._await)&&(forAwait=!0,next()),expect(TokenType.parenL),match(TokenType.semi)){forAwait&&unexpected(),parseFor();return}const isAwaitUsing=startsAwaitUsing();if(isAwaitUsing||match(TokenType._var)||match(TokenType._let)||match(TokenType._const)||isUsingInLoop()){if(isAwaitUsing&&expectContextual(ContextualKeyword._await),next(),parseVar(!0,state.type!==TokenType._var),match(TokenType._in)||isContextual(ContextualKeyword._of)){parseForIn(forAwait);return}parseFor();return}if(parseExpression(!0),match(TokenType._in)||isContextual(ContextualKeyword._of)){parseForIn(forAwait);return}forAwait&&unexpected(),parseFor()}function parseFunctionStatement(){const functionStart=state.start;next(),parseFunction(functionStart,!0)}function parseIfStatement(){next(),parseParenExpression(),parseStatement(!1),eat(TokenType._else)&&parseStatement(!1)}function parseReturnStatement(){next(),isLineTerminator()||(parseExpression(),semicolon())}function parseSwitchStatement(){next(),parseParenExpression(),state.scopeDepth++;const startTokenIndex=state.tokens.length;for(expect(TokenType.braceL);!match(TokenType.braceR)&&!state.error;)if(match(TokenType._case)||match(TokenType._default)){const isCase=match(TokenType._case);next(),isCase&&parseExpression(),expect(TokenType.colon)}else parseStatement(!0);next();const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,!1)),state.scopeDepth--}function parseThrowStatement(){next(),parseExpression(),semicolon()}function parseCatchClauseParam(){parseBindingAtom(!0),isTypeScriptEnabled&&tsTryParseTypeAnnotation()}function parseTryStatement(){if(next(),parseBlock(),match(TokenType._catch)){next();let catchBindingStartTokenIndex=null;if(match(TokenType.parenL)&&(state.scopeDepth++,catchBindingStartTokenIndex=state.tokens.length,expect(TokenType.parenL),parseCatchClauseParam(),expect(TokenType.parenR)),parseBlock(),catchBindingStartTokenIndex!=null){const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(catchBindingStartTokenIndex,endTokenIndex,!1)),state.scopeDepth--}}eat(TokenType._finally)&&parseBlock()}function parseVarStatement(isBlockScope){next(),parseVar(!1,isBlockScope),semicolon()}function parseWhileStatement(){next(),parseParenExpression(),parseStatement(!1)}function parseEmptyStatement(){next()}function parseLabeledStatement(){parseStatement(!0)}function parseIdentifierStatement(contextualKeyword){isTypeScriptEnabled?tsParseIdentifierStatement(contextualKeyword):isFlowEnabled?flowParseIdentifierStatement(contextualKeyword):semicolon()}function parseBlock(isFunctionScope=!1,contextId=0){const startTokenIndex=state.tokens.length;state.scopeDepth++,expect(TokenType.braceL),contextId&&(state.tokens[state.tokens.length-1].contextId=contextId),parseBlockBody(TokenType.braceR),contextId&&(state.tokens[state.tokens.length-1].contextId=contextId);const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,isFunctionScope)),state.scopeDepth--}function parseBlockBody(end){for(;!eat(end)&&!state.error;)parseStatement(!0)}function parseFor(){expect(TokenType.semi),match(TokenType.semi)||parseExpression(),expect(TokenType.semi),match(TokenType.parenR)||parseExpression(),expect(TokenType.parenR),parseStatement(!1)}function parseForIn(forAwait){forAwait?eatContextual(ContextualKeyword._of):next(),parseExpression(),expect(TokenType.parenR),parseStatement(!1)}function parseVar(isFor,isBlockScope){for(;;){if(parseVarHead(isBlockScope),eat(TokenType.eq)){const eqIndex=state.tokens.length-1;parseMaybeAssign(isFor),state.tokens[eqIndex].rhsEndIndex=state.tokens.length}if(!eat(TokenType.comma))break}}function parseVarHead(isBlockScope){parseBindingAtom(isBlockScope),isTypeScriptEnabled?tsAfterParseVarHead():isFlowEnabled&&flowAfterParseVarHead()}function parseFunction(functionStart,isStatement,optionalId=!1){match(TokenType.star)&&next(),isStatement&&!optionalId&&!match(TokenType.name)&&!match(TokenType._yield)&&unexpected();let nameScopeStartTokenIndex=null;match(TokenType.name)&&(isStatement||(nameScopeStartTokenIndex=state.tokens.length,state.scopeDepth++),parseBindingIdentifier(!1));const startTokenIndex=state.tokens.length;state.scopeDepth++,parseFunctionParams(),parseFunctionBodyAndFinish(functionStart);const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(startTokenIndex,endTokenIndex,!0)),state.scopeDepth--,nameScopeStartTokenIndex!==null&&(state.scopes.push(new Scope(nameScopeStartTokenIndex,endTokenIndex,!0)),state.scopeDepth--)}function parseFunctionParams(allowModifiers=!1,funcContextId=0){isTypeScriptEnabled?tsStartParseFunctionParams():isFlowEnabled&&flowStartParseFunctionParams(),expect(TokenType.parenL),funcContextId&&(state.tokens[state.tokens.length-1].contextId=funcContextId),parseBindingList(TokenType.parenR,!1,!1,allowModifiers,funcContextId),funcContextId&&(state.tokens[state.tokens.length-1].contextId=funcContextId)}function parseClass(isStatement,optionalId=!1){const contextId=getNextContextId();next(),state.tokens[state.tokens.length-1].contextId=contextId,state.tokens[state.tokens.length-1].isExpression=!isStatement;let nameScopeStartTokenIndex=null;isStatement||(nameScopeStartTokenIndex=state.tokens.length,state.scopeDepth++),parseClassId(isStatement,optionalId),parseClassSuper();const openBraceIndex=state.tokens.length;if(parseClassBody(contextId),!state.error&&(state.tokens[openBraceIndex].contextId=contextId,state.tokens[state.tokens.length-1].contextId=contextId,nameScopeStartTokenIndex!==null)){const endTokenIndex=state.tokens.length;state.scopes.push(new Scope(nameScopeStartTokenIndex,endTokenIndex,!1)),state.scopeDepth--}}function isClassProperty(){return match(TokenType.eq)||match(TokenType.semi)||match(TokenType.braceR)||match(TokenType.bang)||match(TokenType.colon)}function isClassMethod(){return match(TokenType.parenL)||match(TokenType.lessThan)}function parseClassBody(classContextId){for(expect(TokenType.braceL);!eat(TokenType.braceR)&&!state.error;){if(eat(TokenType.semi))continue;if(match(TokenType.at)){parseDecorator();continue}const memberStart=state.start;parseClassMember(memberStart,classContextId)}}function parseClassMember(memberStart,classContextId){isTypeScriptEnabled&&tsParseModifiers([ContextualKeyword._declare,ContextualKeyword._public,ContextualKeyword._protected,ContextualKeyword._private,ContextualKeyword._override]);let isStatic=!1;if(match(TokenType.name)&&state.contextualKeyword===ContextualKeyword._static){if(parseIdentifier(),isClassMethod()){parseClassMethod(memberStart,!1);return}else if(isClassProperty()){parseClassProperty();return}if(state.tokens[state.tokens.length-1].type=TokenType._static,isStatic=!0,match(TokenType.braceL)){state.tokens[state.tokens.length-1].contextId=classContextId,parseBlock();return}}parseClassMemberWithIsStatic(memberStart,isStatic,classContextId)}function parseClassMemberWithIsStatic(memberStart,isStatic,classContextId){if(isTypeScriptEnabled&&tsTryParseClassMemberWithIsStatic(isStatic))return;if(eat(TokenType.star)){parseClassPropertyName(classContextId),parseClassMethod(memberStart,!1);return}parseClassPropertyName(classContextId);let isConstructor=!1;const token=state.tokens[state.tokens.length-1];token.contextualKeyword===ContextualKeyword._constructor&&(isConstructor=!0),parsePostMemberNameModifiers(),isClassMethod()?parseClassMethod(memberStart,isConstructor):isClassProperty()?parseClassProperty():token.contextualKeyword===ContextualKeyword._async&&!isLineTerminator()?(state.tokens[state.tokens.length-1].type=TokenType._async,match(TokenType.star)&&next(),parseClassPropertyName(classContextId),parsePostMemberNameModifiers(),parseClassMethod(memberStart,!1)):(token.contextualKeyword===ContextualKeyword._get||token.contextualKeyword===ContextualKeyword._set)&&!(isLineTerminator()&&match(TokenType.star))?(token.contextualKeyword===ContextualKeyword._get?state.tokens[state.tokens.length-1].type=TokenType._get:state.tokens[state.tokens.length-1].type=TokenType._set,parseClassPropertyName(classContextId),parseClassMethod(memberStart,!1)):token.contextualKeyword===ContextualKeyword._accessor&&!isLineTerminator()?(parseClassPropertyName(classContextId),parseClassProperty()):isLineTerminator()?parseClassProperty():unexpected()}function parseClassMethod(functionStart,isConstructor){isTypeScriptEnabled?tsTryParseTypeParameters():isFlowEnabled&&match(TokenType.lessThan)&&flowParseTypeParameterDeclaration(),parseMethod(functionStart,isConstructor)}function parseClassPropertyName(classContextId){parsePropertyName(classContextId)}function parsePostMemberNameModifiers(){if(isTypeScriptEnabled){const oldIsType=pushTypeContext(0);eat(TokenType.question),popTypeContext(oldIsType)}}function parseClassProperty(){if(isTypeScriptEnabled?(eatTypeToken(TokenType.bang),tsTryParseTypeAnnotation()):isFlowEnabled&&match(TokenType.colon)&&flowParseTypeAnnotation(),match(TokenType.eq)){const equalsTokenIndex=state.tokens.length;next(),parseMaybeAssign(),state.tokens[equalsTokenIndex].rhsEndIndex=state.tokens.length}semicolon()}function parseClassId(isStatement,optionalId=!1){isTypeScriptEnabled&&(!isStatement||optionalId)&&isContextual(ContextualKeyword._implements)||(match(TokenType.name)&&parseBindingIdentifier(!0),isTypeScriptEnabled?tsTryParseTypeParameters():isFlowEnabled&&match(TokenType.lessThan)&&flowParseTypeParameterDeclaration())}function parseClassSuper(){let hasSuper=!1;eat(TokenType._extends)?(parseExprSubscripts(),hasSuper=!0):hasSuper=!1,isTypeScriptEnabled?tsAfterParseClassSuper(hasSuper):isFlowEnabled&&flowAfterParseClassSuper(hasSuper)}function parseExport(){const exportIndex=state.tokens.length-1;isTypeScriptEnabled&&tsTryParseExport()||(shouldParseExportStar()?parseExportStar():isExportDefaultSpecifier()?(parseIdentifier(),match(TokenType.comma)&&lookaheadType()===TokenType.star?(expect(TokenType.comma),expect(TokenType.star),expectContextual(ContextualKeyword._as),parseIdentifier()):parseExportSpecifiersMaybe(),parseExportFrom()):eat(TokenType._default)?parseExportDefaultExpression():shouldParseExportDeclaration()?parseExportDeclaration():(parseExportSpecifiers(),parseExportFrom()),state.tokens[exportIndex].rhsEndIndex=state.tokens.length)}function parseExportDefaultExpression(){if(isTypeScriptEnabled&&tsTryParseExportDefaultExpression()||isFlowEnabled&&flowTryParseExportDefaultExpression())return;const functionStart=state.start;eat(TokenType._function)?parseFunction(functionStart,!0,!0):isContextual(ContextualKeyword._async)&&lookaheadType()===TokenType._function?(eatContextual(ContextualKeyword._async),eat(TokenType._function),parseFunction(functionStart,!0,!0)):match(TokenType._class)?parseClass(!0,!0):match(TokenType.at)?(parseDecorators(),parseClass(!0,!0)):(parseMaybeAssign(),semicolon())}function parseExportDeclaration(){isTypeScriptEnabled?tsParseExportDeclaration():isFlowEnabled?flowParseExportDeclaration():parseStatement(!0)}function isExportDefaultSpecifier(){if(isTypeScriptEnabled&&tsIsDeclarationStart())return!1;if(isFlowEnabled&&flowShouldDisallowExportDefaultSpecifier())return!1;if(match(TokenType.name))return state.contextualKeyword!==ContextualKeyword._async;if(!match(TokenType._default))return!1;const _next=nextTokenStart(),lookahead=lookaheadTypeAndKeyword(),hasFrom=lookahead.type===TokenType.name&&lookahead.contextualKeyword===ContextualKeyword._from;if(lookahead.type===TokenType.comma)return!0;if(hasFrom){const nextAfterFrom=input.charCodeAt(nextTokenStartSince(_next+4));return nextAfterFrom===charCodes.quotationMark||nextAfterFrom===charCodes.apostrophe}return!1}function parseExportSpecifiersMaybe(){eat(TokenType.comma)&&parseExportSpecifiers()}function parseExportFrom(){eatContextual(ContextualKeyword._from)&&(parseExprAtom(),maybeParseImportAttributes()),semicolon()}function shouldParseExportStar(){return isFlowEnabled?flowShouldParseExportStar():match(TokenType.star)}function parseExportStar(){isFlowEnabled?flowParseExportStar():baseParseExportStar()}function baseParseExportStar(){expect(TokenType.star),isContextual(ContextualKeyword._as)?parseExportNamespace():parseExportFrom()}function parseExportNamespace(){next(),state.tokens[state.tokens.length-1].type=TokenType._as,parseIdentifier(),parseExportSpecifiersMaybe(),parseExportFrom()}function shouldParseExportDeclaration(){return isTypeScriptEnabled&&tsIsDeclarationStart()||isFlowEnabled&&flowShouldParseExportDeclaration()||state.type===TokenType._var||state.type===TokenType._const||state.type===TokenType._let||state.type===TokenType._function||state.type===TokenType._class||isContextual(ContextualKeyword._async)||match(TokenType.at)}function parseExportSpecifiers(){let first=!0;for(expect(TokenType.braceL);!eat(TokenType.braceR)&&!state.error;){if(first)first=!1;else if(expect(TokenType.comma),eat(TokenType.braceR))break;parseExportSpecifier()}}function parseExportSpecifier(){if(isTypeScriptEnabled){tsParseExportSpecifier();return}parseIdentifier(),state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ExportAccess,eatContextual(ContextualKeyword._as)&&parseIdentifier()}function isImportReflection(){const snapshot=state.snapshot();return expectContextual(ContextualKeyword._module),eatContextual(ContextualKeyword._from)?isContextual(ContextualKeyword._from)?(state.restoreFromSnapshot(snapshot),!0):(state.restoreFromSnapshot(snapshot),!1):match(TokenType.comma)?(state.restoreFromSnapshot(snapshot),!1):(state.restoreFromSnapshot(snapshot),!0)}function parseMaybeImportReflection(){isContextual(ContextualKeyword._module)&&isImportReflection()&&next()}function parseImport(){if(isTypeScriptEnabled&&match(TokenType.name)&&lookaheadType()===TokenType.eq){tsParseImportEqualsDeclaration();return}if(isTypeScriptEnabled&&isContextual(ContextualKeyword._type)){const lookahead=lookaheadTypeAndKeyword();if(lookahead.type===TokenType.name&&lookahead.contextualKeyword!==ContextualKeyword._from){if(expectContextual(ContextualKeyword._type),lookaheadType()===TokenType.eq){tsParseImportEqualsDeclaration();return}}else(lookahead.type===TokenType.star||lookahead.type===TokenType.braceL)&&expectContextual(ContextualKeyword._type)}match(TokenType.string)||(parseMaybeImportReflection(),parseImportSpecifiers(),expectContextual(ContextualKeyword._from)),parseExprAtom(),maybeParseImportAttributes(),semicolon()}function shouldParseDefaultImport(){return match(TokenType.name)}function parseImportSpecifierLocal(){parseImportedIdentifier()}function parseImportSpecifiers(){isFlowEnabled&&flowStartParseImportSpecifiers();let first=!0;if(!(shouldParseDefaultImport()&&(parseImportSpecifierLocal(),!eat(TokenType.comma)))){if(match(TokenType.star)){next(),expectContextual(ContextualKeyword._as),parseImportSpecifierLocal();return}for(expect(TokenType.braceL);!eat(TokenType.braceR)&&!state.error;){if(first)first=!1;else if(eat(TokenType.colon)&&unexpected("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),expect(TokenType.comma),eat(TokenType.braceR))break;parseImportSpecifier()}}}function parseImportSpecifier(){if(isTypeScriptEnabled){tsParseImportSpecifier();return}if(isFlowEnabled){flowParseImportSpecifier();return}parseImportedIdentifier(),isContextual(ContextualKeyword._as)&&(state.tokens[state.tokens.length-1].identifierRole=IdentifierRole.ImportAccess,next(),parseImportedIdentifier())}function maybeParseImportAttributes(){(match(TokenType._with)||isContextual(ContextualKeyword._assert)&&!hasPrecedingLineBreak())&&(next(),parseObj(!1,!1))}function parseFile(){return state.pos===0&&input.charCodeAt(0)===charCodes.numberSign&&input.charCodeAt(1)===charCodes.exclamationMark&&skipLineComment(2),nextToken(),parseTopLevel()}class File2{constructor(tokens,scopes){this.tokens=tokens,this.scopes=scopes}}function parse(input2,isJSXEnabled2,isTypeScriptEnabled2,isFlowEnabled2){if(isFlowEnabled2&&isTypeScriptEnabled2)throw new Error("Cannot combine flow and typescript plugins.");initParser(input2,isJSXEnabled2,isTypeScriptEnabled2,isFlowEnabled2);const result=parseFile();if(state.error)throw augmentError(state.error);return result}function isAsyncOperation(tokens){let index=tokens.currentIndex(),depth=0;const startToken=tokens.currentToken();do{const token=tokens.tokens[index];if(token.isOptionalChainStart&&depth++,token.isOptionalChainEnd&&depth--,depth+=token.numNullishCoalesceStarts,depth-=token.numNullishCoalesceEnds,token.contextualKeyword===ContextualKeyword._await&&token.identifierRole==null&&token.scopeDepth===startToken.scopeDepth)return!0;index+=1}while(depth>0&&index<tokens.tokens.length);return!1}class TokenProcessor{__init(){this.resultCode=""}__init2(){this.resultMappings=new Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(code,tokens,isFlowEnabled2,disableESTransforms,helperManager){this.code=code,this.tokens=tokens,this.isFlowEnabled=isFlowEnabled2,this.disableESTransforms=disableESTransforms,this.helperManager=helperManager,TokenProcessor.prototype.__init.call(this),TokenProcessor.prototype.__init2.call(this),TokenProcessor.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(snapshot){this.resultCode=snapshot.resultCode,this.tokenIndex=snapshot.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(snapshot){const result=this.resultCode.slice(snapshot.resultCode.length);return this.resultCode=snapshot.resultCode,result}reset(){this.resultCode="",this.resultMappings=new Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(index,contextualKeyword){return this.matches1AtIndex(index,TokenType.name)&&this.tokens[index].contextualKeyword===contextualKeyword}identifierNameAtIndex(index){return this.identifierNameForToken(this.tokens[index])}identifierNameAtRelativeIndex(relativeIndex){return this.identifierNameForToken(this.tokenAtRelativeIndex(relativeIndex))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(token){return this.code.slice(token.start,token.end)}rawCodeForToken(token){return this.code.slice(token.start,token.end)}stringValueAtIndex(index){return this.stringValueForToken(this.tokens[index])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(token){return this.code.slice(token.start+1,token.end-1)}matches1AtIndex(index,t1){return this.tokens[index].type===t1}matches2AtIndex(index,t1,t2){return this.tokens[index].type===t1&&this.tokens[index+1].type===t2}matches3AtIndex(index,t1,t2,t3){return this.tokens[index].type===t1&&this.tokens[index+1].type===t2&&this.tokens[index+2].type===t3}matches1(t1){return this.tokens[this.tokenIndex].type===t1}matches2(t1,t2){return this.tokens[this.tokenIndex].type===t1&&this.tokens[this.tokenIndex+1].type===t2}matches3(t1,t2,t3){return this.tokens[this.tokenIndex].type===t1&&this.tokens[this.tokenIndex+1].type===t2&&this.tokens[this.tokenIndex+2].type===t3}matches4(t1,t2,t3,t4){return this.tokens[this.tokenIndex].type===t1&&this.tokens[this.tokenIndex+1].type===t2&&this.tokens[this.tokenIndex+2].type===t3&&this.tokens[this.tokenIndex+3].type===t4}matches5(t1,t2,t3,t4,t5){return this.tokens[this.tokenIndex].type===t1&&this.tokens[this.tokenIndex+1].type===t2&&this.tokens[this.tokenIndex+2].type===t3&&this.tokens[this.tokenIndex+3].type===t4&&this.tokens[this.tokenIndex+4].type===t5}matchesContextual(contextualKeyword){return this.matchesContextualAtIndex(this.tokenIndex,contextualKeyword)}matchesContextIdAndLabel(type,contextId){return this.matches1(type)&&this.currentToken().contextId===contextId}previousWhitespaceAndComments(){let whitespaceAndComments=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(whitespaceAndComments=whitespaceAndComments.replace(/@flow/g,"")),whitespaceAndComments}replaceToken(newCode){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=newCode,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(newCode){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=newCode,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}removeBalancedCode(){let braceDepth=0;for(;!this.isAtEnd();){if(this.matches1(TokenType.braceL))braceDepth++;else if(this.matches1(TokenType.braceR)){if(braceDepth===0)return;braceDepth--}this.removeToken()}}copyExpectedToken(tokenType){if(this.tokens[this.tokenIndex].type!==tokenType)throw new Error(`Expected token ${tokenType}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(prefix){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=prefix,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){const token=this.currentToken();if((token.numNullishCoalesceStarts||token.isOptionalChainStart)&&(token.isAsyncOperation=isAsyncOperation(this)),!this.disableESTransforms){if(token.numNullishCoalesceStarts)for(let i=0;i<token.numNullishCoalesceStarts;i++)token.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";token.isOptionalChainStart&&(token.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===TokenType._delete?token.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):token.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){const token=this.currentToken();if(token.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),token.numNullishCoalesceEnds&&!this.disableESTransforms)for(let i=0;i<token.numNullishCoalesceEnds;i++)this.resultCode+="))"}appendCode(code){this.resultCode+=code}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){const token=this.currentToken();return this.code.slice(token.start,token.end)}tokenAtRelativeIndex(relativeIndex){return this.tokens[this.tokenIndex+relativeIndex]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}}function getClassInfo(rootTransformer,tokens,nameManager,disableESTransforms){const snapshot=tokens.snapshot(),headerInfo=processClassHeader(tokens);let constructorInitializerStatements=[];const instanceInitializerNames=[],staticInitializerNames=[];let constructorInsertPos=null;const fields=[],rangesToRemove=[],classContextId=tokens.currentToken().contextId;if(classContextId==null)throw new Error("Expected non-null class context ID on class open-brace.");for(tokens.nextToken();!tokens.matchesContextIdAndLabel(TokenType.braceR,classContextId);)if(tokens.matchesContextual(ContextualKeyword._constructor)&&!tokens.currentToken().isType)({constructorInitializerStatements,constructorInsertPos}=processConstructor(tokens));else if(tokens.matches1(TokenType.semi))disableESTransforms||rangesToRemove.push({start:tokens.currentIndex(),end:tokens.currentIndex()+1}),tokens.nextToken();else if(tokens.currentToken().isType)tokens.nextToken();else{const statementStartIndex=tokens.currentIndex();let isStatic=!1,isESPrivate=!1,isDeclareOrAbstract=!1;for(;isAccessModifier(tokens.currentToken());)tokens.matches1(TokenType._static)&&(isStatic=!0),tokens.matches1(TokenType.hash)&&(isESPrivate=!0),(tokens.matches1(TokenType._declare)||tokens.matches1(TokenType._abstract))&&(isDeclareOrAbstract=!0),tokens.nextToken();if(isStatic&&tokens.matches1(TokenType.braceL)){skipToNextClassElement(tokens,classContextId);continue}if(isESPrivate){skipToNextClassElement(tokens,classContextId);continue}if(tokens.matchesContextual(ContextualKeyword._constructor)&&!tokens.currentToken().isType){({constructorInitializerStatements,constructorInsertPos}=processConstructor(tokens));continue}const nameStartIndex=tokens.currentIndex();if(skipFieldName(tokens),tokens.matches1(TokenType.lessThan)||tokens.matches1(TokenType.parenL)){skipToNextClassElement(tokens,classContextId);continue}for(;tokens.currentToken().isType;)tokens.nextToken();if(tokens.matches1(TokenType.eq)){const equalsIndex=tokens.currentIndex(),valueEnd=tokens.currentToken().rhsEndIndex;if(valueEnd==null)throw new Error("Expected rhsEndIndex on class field assignment.");for(tokens.nextToken();tokens.currentIndex()<valueEnd;)rootTransformer.processToken();let initializerName;isStatic?(initializerName=nameManager.claimFreeName("__initStatic"),staticInitializerNames.push(initializerName)):(initializerName=nameManager.claimFreeName("__init"),instanceInitializerNames.push(initializerName)),fields.push({initializerName,equalsIndex,start:nameStartIndex,end:tokens.currentIndex()})}else(!disableESTransforms||isDeclareOrAbstract)&&rangesToRemove.push({start:statementStartIndex,end:tokens.currentIndex()})}return tokens.restoreToSnapshot(snapshot),disableESTransforms?{headerInfo,constructorInitializerStatements,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos,fields:[],rangesToRemove}:{headerInfo,constructorInitializerStatements,instanceInitializerNames,staticInitializerNames,constructorInsertPos,fields,rangesToRemove}}function skipToNextClassElement(tokens,classContextId){for(tokens.nextToken();tokens.currentToken().contextId!==classContextId;)tokens.nextToken();for(;isAccessModifier(tokens.tokenAtRelativeIndex(-1));)tokens.previousToken()}function processClassHeader(tokens){const classToken=tokens.currentToken(),contextId=classToken.contextId;if(contextId==null)throw new Error("Expected context ID on class token.");const isExpression=classToken.isExpression;if(isExpression==null)throw new Error("Expected isExpression on class token.");let className=null,hasSuperclass=!1;for(tokens.nextToken(),tokens.matches1(TokenType.name)&&(className=tokens.identifierName());!tokens.matchesContextIdAndLabel(TokenType.braceL,contextId);)tokens.matches1(TokenType._extends)&&!tokens.currentToken().isType&&(hasSuperclass=!0),tokens.nextToken();return{isExpression,className,hasSuperclass}}function processConstructor(tokens){const constructorInitializerStatements=[];tokens.nextToken();const constructorContextId=tokens.currentToken().contextId;if(constructorContextId==null)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!tokens.matchesContextIdAndLabel(TokenType.parenR,constructorContextId);)if(tokens.currentToken().contextId===constructorContextId){if(tokens.nextToken(),isAccessModifier(tokens.currentToken())){for(tokens.nextToken();isAccessModifier(tokens.currentToken());)tokens.nextToken();const token=tokens.currentToken();if(token.type!==TokenType.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const name=tokens.identifierNameForToken(token);constructorInitializerStatements.push(`this.${name} = ${name}`)}}else tokens.nextToken();for(tokens.nextToken();tokens.currentToken().isType;)tokens.nextToken();let constructorInsertPos=tokens.currentIndex(),foundSuperCall=!1;for(;!tokens.matchesContextIdAndLabel(TokenType.braceR,constructorContextId);){if(!foundSuperCall&&tokens.matches2(TokenType._super,TokenType.parenL)){tokens.nextToken();const superCallContextId=tokens.currentToken().contextId;if(superCallContextId==null)throw new Error("Expected a context ID on the super call");for(;!tokens.matchesContextIdAndLabel(TokenType.parenR,superCallContextId);)tokens.nextToken();constructorInsertPos=tokens.currentIndex(),foundSuperCall=!0}tokens.nextToken()}return tokens.nextToken(),{constructorInitializerStatements,constructorInsertPos}}function isAccessModifier(token){return[TokenType._async,TokenType._get,TokenType._set,TokenType.plus,TokenType.minus,TokenType._readonly,TokenType._static,TokenType._public,TokenType._private,TokenType._protected,TokenType._override,TokenType._abstract,TokenType.star,TokenType._declare,TokenType.hash].includes(token.type)}function skipFieldName(tokens){if(tokens.matches1(TokenType.bracketL)){const classContextId=tokens.currentToken().contextId;if(classContextId==null)throw new Error("Expected class context ID on computed name open bracket.");for(;!tokens.matchesContextIdAndLabel(TokenType.bracketR,classContextId);)tokens.nextToken();tokens.nextToken()}else tokens.nextToken()}function elideImportEquals(tokens){if(tokens.removeInitialToken(),tokens.removeToken(),tokens.removeToken(),tokens.removeToken(),tokens.matches1(TokenType.parenL))tokens.removeToken(),tokens.removeToken(),tokens.removeToken();else for(;tokens.matches1(TokenType.dot);)tokens.removeToken(),tokens.removeToken()}const EMPTY_DECLARATION_INFO={typeDeclarations:new Set,valueDeclarations:new Set};function getDeclarationInfo(tokens){const typeDeclarations=new Set,valueDeclarations=new Set;for(let i=0;i<tokens.tokens.length;i++){const token=tokens.tokens[i];token.type===TokenType.name&&isTopLevelDeclaration(token)&&(token.isType?typeDeclarations.add(tokens.identifierNameForToken(token)):valueDeclarations.add(tokens.identifierNameForToken(token)))}return{typeDeclarations,valueDeclarations}}function isExportFrom(tokens){let closeBraceIndex=tokens.currentIndex();for(;!tokens.matches1AtIndex(closeBraceIndex,TokenType.braceR);)closeBraceIndex++;return tokens.matchesContextualAtIndex(closeBraceIndex+1,ContextualKeyword._from)&&tokens.matches1AtIndex(closeBraceIndex+2,TokenType.string)}function removeMaybeImportAttributes(tokens){(tokens.matches2(TokenType._with,TokenType.braceL)||tokens.matches2(TokenType.name,TokenType.braceL)&&tokens.matchesContextual(ContextualKeyword._assert))&&(tokens.removeToken(),tokens.removeToken(),tokens.removeBalancedCode(),tokens.removeToken())}function shouldElideDefaultExport(isTypeScriptTransformEnabled,keepUnusedImports,tokens,declarationInfo){if(!isTypeScriptTransformEnabled||keepUnusedImports)return!1;const exportToken=tokens.currentToken();if(exportToken.rhsEndIndex==null)throw new Error("Expected non-null rhsEndIndex on export token.");const numTokens=exportToken.rhsEndIndex-tokens.currentIndex();if(numTokens!==3&&!(numTokens===4&&tokens.matches1AtIndex(exportToken.rhsEndIndex-1,TokenType.semi)))return!1;const identifierToken=tokens.tokenAtRelativeIndex(2);if(identifierToken.type!==TokenType.name)return!1;const exportedName=tokens.identifierNameForToken(identifierToken);return declarationInfo.typeDeclarations.has(exportedName)&&!declarationInfo.valueDeclarations.has(exportedName)}class CJSImportTransformer extends Transformer{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(rootTransformer,tokens,importProcessor,nameManager,helperManager,reactHotLoaderTransformer,enableLegacyBabel5ModuleInterop,enableLegacyTypeScriptModuleInterop,isTypeScriptTransformEnabled,isFlowTransformEnabled,preserveDynamicImport,keepUnusedImports){super();this.rootTransformer=rootTransformer,this.tokens=tokens,this.importProcessor=importProcessor,this.nameManager=nameManager,this.helperManager=helperManager,this.reactHotLoaderTransformer=reactHotLoaderTransformer,this.enableLegacyBabel5ModuleInterop=enableLegacyBabel5ModuleInterop,this.enableLegacyTypeScriptModuleInterop=enableLegacyTypeScriptModuleInterop,this.isTypeScriptTransformEnabled=isTypeScriptTransformEnabled,this.isFlowTransformEnabled=isFlowTransformEnabled,this.preserveDynamicImport=preserveDynamicImport,this.keepUnusedImports=keepUnusedImports,CJSImportTransformer.prototype.__init.call(this),CJSImportTransformer.prototype.__init2.call(this),CJSImportTransformer.prototype.__init3.call(this),this.declarationInfo=isTypeScriptTransformEnabled?getDeclarationInfo(tokens):EMPTY_DECLARATION_INFO}getPrefixCode(){let prefix="";return this.hadExport&&(prefix+='Object.defineProperty(exports, "__esModule", {value: true});'),prefix}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`
|
|
300
300
|
module.exports = exports.default;
|
|
301
301
|
`:""}process(){return this.tokens.matches3(TokenType._import,TokenType.name,TokenType.eq)?this.processImportEquals():this.tokens.matches1(TokenType._import)?(this.processImport(),!0):this.tokens.matches2(TokenType._export,TokenType.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(TokenType._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(TokenType.name,TokenType.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(TokenType.name)||this.tokens.matches1(TokenType.jsxName)?this.processIdentifier():this.tokens.matches1(TokenType.eq)?this.processAssignment():this.tokens.matches1(TokenType.assign)?this.processComplexAssignment():this.tokens.matches1(TokenType.preIncDec)?this.processPreIncDec():!1}processImportEquals(){const importName=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(importName)?elideImportEquals(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(TokenType._import,TokenType.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}const requireWrapper=this.enableLegacyTypeScriptModuleInterop?"":`${this.helperManager.getHelperName("interopRequireWildcard")}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${requireWrapper}require`);const contextId=this.tokens.currentToken().contextId;if(contextId==null)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(TokenType.parenR,contextId);)this.rootTransformer.processToken();this.tokens.replaceToken(requireWrapper?")))":"))");return}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{const path=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path)),this.tokens.appendCode(this.importProcessor.claimImportCode(path))}removeMaybeImportAttributes(this.tokens),this.tokens.matches1(TokenType.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(ContextualKeyword._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,TokenType.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,ContextualKeyword._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(TokenType.name)||this.tokens.matches1(TokenType.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(TokenType.string))return!1;let foundNonTypeImport=!1,foundAnyNamedImport=!1;for(;!this.tokens.matches1(TokenType.string);)(!foundNonTypeImport&&this.tokens.matches1(TokenType.braceL)||this.tokens.matches1(TokenType.comma))&&(this.tokens.removeToken(),this.tokens.matches1(TokenType.braceR)||(foundAnyNamedImport=!0),(this.tokens.matches2(TokenType.name,TokenType.comma)||this.tokens.matches2(TokenType.name,TokenType.braceR)||this.tokens.matches4(TokenType.name,TokenType.name,TokenType.name,TokenType.comma)||this.tokens.matches4(TokenType.name,TokenType.name,TokenType.name,TokenType.braceR))&&(foundNonTypeImport=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!foundNonTypeImport:this.isFlowTransformEnabled?foundAnyNamedImport&&!foundNonTypeImport:!1}removeRemainingImport(){for(;!this.tokens.matches1(TokenType.string);)this.tokens.removeToken()}processIdentifier(){const token=this.tokens.currentToken();if(token.shadowsGlobal)return!1;if(token.identifierRole===IdentifierRole.ObjectShorthand)return this.processObjectShorthand();if(token.identifierRole!==IdentifierRole.Access)return!1;const replacement=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(token));if(!replacement)return!1;let possibleOpenParenIndex=this.tokens.currentIndex()+1;for(;possibleOpenParenIndex<this.tokens.tokens.length&&this.tokens.tokens[possibleOpenParenIndex].type===TokenType.parenR;)possibleOpenParenIndex++;return this.tokens.tokens[possibleOpenParenIndex].type===TokenType.parenL?this.tokens.tokenAtRelativeIndex(1).type===TokenType.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==TokenType._new?(this.tokens.replaceToken(`${replacement}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(TokenType.parenR)):this.tokens.replaceToken(`(0, ${replacement})`):this.tokens.replaceToken(replacement),!0}processObjectShorthand(){const identifier=this.tokens.identifierName(),replacement=this.importProcessor.getIdentifierReplacement(identifier);return replacement?(this.tokens.replaceToken(`${identifier}: ${replacement}`),!0):!1}processExport(){if(this.tokens.matches2(TokenType._export,TokenType._enum)||this.tokens.matches3(TokenType._export,TokenType._const,TokenType._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(TokenType._export,TokenType._default))return this.tokens.matches3(TokenType._export,TokenType._default,TokenType._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(TokenType._export,TokenType.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(TokenType._export,TokenType.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,ContextualKeyword._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(TokenType.braceL)){for(;!this.tokens.matches1(TokenType.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(TokenType._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(ContextualKeyword._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,TokenType.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),removeMaybeImportAttributes(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(TokenType._export,TokenType._var)||this.tokens.matches2(TokenType._export,TokenType._let)||this.tokens.matches2(TokenType._export,TokenType._const))return this.processExportVar(),!0;if(this.tokens.matches2(TokenType._export,TokenType._function)||this.tokens.matches3(TokenType._export,TokenType.name,TokenType._function))return this.processExportFunction(),!0;if(this.tokens.matches2(TokenType._export,TokenType._class)||this.tokens.matches3(TokenType._export,TokenType._abstract,TokenType._class)||this.tokens.matches2(TokenType._export,TokenType.at))return this.processExportClass(),!0;if(this.tokens.matches2(TokenType._export,TokenType.star))return this.processExportStar(),!0;throw new Error("Unrecognized export syntax.")}processAssignment(){const index=this.tokens.currentIndex(),identifierToken=this.tokens.tokens[index-1];if(identifierToken.isType||identifierToken.type!==TokenType.name||identifierToken.shadowsGlobal||index>=2&&this.tokens.matches1AtIndex(index-2,TokenType.dot)||index>=2&&[TokenType._var,TokenType._let,TokenType._const].includes(this.tokens.tokens[index-2].type))return!1;const assignmentSnippet=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(identifierToken));return assignmentSnippet?(this.tokens.copyToken(),this.tokens.appendCode(` ${assignmentSnippet} =`),!0):!1}processComplexAssignment(){const index=this.tokens.currentIndex(),identifierToken=this.tokens.tokens[index-1];if(identifierToken.type!==TokenType.name||identifierToken.shadowsGlobal||index>=2&&this.tokens.matches1AtIndex(index-2,TokenType.dot))return!1;const assignmentSnippet=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(identifierToken));return assignmentSnippet?(this.tokens.appendCode(` = ${assignmentSnippet}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){const index=this.tokens.currentIndex(),identifierToken=this.tokens.tokens[index+1];if(identifierToken.type!==TokenType.name||identifierToken.shadowsGlobal||index+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(index+2,TokenType.dot)||this.tokens.matches1AtIndex(index+2,TokenType.bracketL)||this.tokens.matches1AtIndex(index+2,TokenType.parenL)))return!1;const identifierName=this.tokens.identifierNameForToken(identifierToken),assignmentSnippet=this.importProcessor.resolveExportBinding(identifierName);return assignmentSnippet?(this.tokens.appendCode(`${assignmentSnippet} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){const index=this.tokens.currentIndex(),identifierToken=this.tokens.tokens[index],operatorToken=this.tokens.tokens[index+1];if(identifierToken.type!==TokenType.name||identifierToken.shadowsGlobal||index>=1&&this.tokens.matches1AtIndex(index-1,TokenType.dot))return!1;const identifierName=this.tokens.identifierNameForToken(identifierToken),assignmentSnippet=this.importProcessor.resolveExportBinding(identifierName);if(!assignmentSnippet)return!1;const operatorCode=this.tokens.rawCodeForToken(operatorToken),base=this.importProcessor.getIdentifierReplacement(identifierName)||identifierName;if(operatorCode==="++")this.tokens.replaceToken(`(${base} = ${assignmentSnippet} = ${base} + 1, ${base} - 1)`);else if(operatorCode==="--")this.tokens.replaceToken(`(${base} = ${assignmentSnippet} = ${base} - 1, ${base} + 1)`);else throw new Error(`Unexpected operator: ${operatorCode}`);return this.tokens.removeToken(),!0}processExportDefault(){let exportedRuntimeValue=!0;if(this.tokens.matches4(TokenType._export,TokenType._default,TokenType._function,TokenType.name)||this.tokens.matches5(TokenType._export,TokenType._default,TokenType.name,TokenType._function,TokenType.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,ContextualKeyword._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();const name=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${name};`)}else if(this.tokens.matches4(TokenType._export,TokenType._default,TokenType._class,TokenType.name)||this.tokens.matches5(TokenType._export,TokenType._default,TokenType._abstract,TokenType._class,TokenType.name)||this.tokens.matches3(TokenType._export,TokenType._default,TokenType.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(TokenType._abstract)&&this.tokens.removeToken();const name=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${name};`)}else if(shouldElideDefaultExport(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))exportedRuntimeValue=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){const defaultVarName=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${defaultVarName}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${defaultVarName} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =");exportedRuntimeValue&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(TokenType.at);)if(this.tokens.copyToken(),this.tokens.matches1(TokenType.parenL))this.tokens.copyExpectedToken(TokenType.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(TokenType.parenR);else{for(this.tokens.copyExpectedToken(TokenType.name);this.tokens.matches1(TokenType.dot);)this.tokens.copyExpectedToken(TokenType.dot),this.tokens.copyExpectedToken(TokenType.name);this.tokens.matches1(TokenType.parenL)&&(this.tokens.copyExpectedToken(TokenType.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(TokenType.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let tokenIndex=this.tokens.currentIndex();if(tokenIndex++,tokenIndex++,!this.tokens.matches1AtIndex(tokenIndex,TokenType.name))return!1;for(tokenIndex++;tokenIndex<this.tokens.tokens.length&&this.tokens.tokens[tokenIndex].isType;)tokenIndex++;return!!this.tokens.matches1AtIndex(tokenIndex,TokenType.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();const varName=this.tokens.identifierName();for(;!this.tokens.matches1(TokenType.eq);)this.rootTransformer.processToken();const endIndex=this.tokens.currentToken().rhsEndIndex;if(endIndex==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<endIndex;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${varName} = ${varName}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();const needsParens=this.tokens.matches1(TokenType.braceL);needsParens&&this.tokens.appendCode("(");let depth=0;for(;;)if(this.tokens.matches1(TokenType.braceL)||this.tokens.matches1(TokenType.dollarBraceL)||this.tokens.matches1(TokenType.bracketL))depth++,this.tokens.copyToken();else if(this.tokens.matches1(TokenType.braceR)||this.tokens.matches1(TokenType.bracketR))depth--,this.tokens.copyToken();else{if(depth===0&&!this.tokens.matches1(TokenType.name)&&!this.tokens.currentToken().isType)break;if(this.tokens.matches1(TokenType.eq)){const endIndex=this.tokens.currentToken().rhsEndIndex;if(endIndex==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<endIndex;)this.rootTransformer.processToken()}else{const token=this.tokens.currentToken();if(isDeclaration(token)){const name=this.tokens.identifierName();let replacement=this.importProcessor.getIdentifierReplacement(name);if(replacement===null)throw new Error(`Expected a replacement for ${name} in \`export var\` syntax.`);isObjectShorthandDeclaration(token)&&(replacement=`${name}: ${replacement}`),this.tokens.replaceToken(replacement)}else this.rootTransformer.processToken()}}if(needsParens){const endIndex=this.tokens.currentToken().rhsEndIndex;if(endIndex==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<endIndex;)this.rootTransformer.processToken();this.tokens.appendCode(")")}}processExportFunction(){this.tokens.replaceToken("");const name=this.processNamedFunction();this.tokens.appendCode(` exports.${name} = ${name};`)}processNamedFunction(){if(this.tokens.matches1(TokenType._function))this.tokens.copyToken();else if(this.tokens.matches2(TokenType.name,TokenType._function)){if(!this.tokens.matchesContextual(ContextualKeyword._async))throw new Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(TokenType.star)&&this.tokens.copyToken(),!this.tokens.matches1(TokenType.name))throw new Error("Expected identifier for exported function name.");const name=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(TokenType.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(TokenType.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(TokenType.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(TokenType.braceR),name}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(TokenType._abstract)&&this.tokens.removeToken();const name=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${name} = ${name};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();const isReExport=isExportFrom(this.tokens),exportStatements=[];for(;;){if(this.tokens.matches1(TokenType.braceR)){this.tokens.removeToken();break}const specifierInfo=getImportExportSpecifierInfo(this.tokens);for(;this.tokens.currentIndex()<specifierInfo.endIndex;)this.tokens.removeToken();if(!(specifierInfo.isType||!isReExport&&this.shouldElideExportedIdentifier(specifierInfo.leftName))){const exportedName=specifierInfo.rightName;exportedName==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;const localName=specifierInfo.leftName,newLocalName=this.importProcessor.getIdentifierReplacement(localName);exportStatements.push(`exports.${exportedName} = ${newLocalName||localName};`)}if(this.tokens.matches1(TokenType.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(TokenType.comma,TokenType.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(TokenType.comma))this.tokens.removeToken();else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(ContextualKeyword._from)){this.tokens.removeToken();const path=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path)),removeMaybeImportAttributes(this.tokens)}else this.tokens.appendCode(exportStatements.join(" "));this.tokens.matches1(TokenType.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(TokenType.string);)this.tokens.removeToken();const path=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path)),removeMaybeImportAttributes(this.tokens),this.tokens.matches1(TokenType.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(name){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(name)}}class ESMImportTransformer extends Transformer{constructor(tokens,nameManager,helperManager,reactHotLoaderTransformer,isTypeScriptTransformEnabled,isFlowTransformEnabled,keepUnusedImports,options){super();this.tokens=tokens,this.nameManager=nameManager,this.helperManager=helperManager,this.reactHotLoaderTransformer=reactHotLoaderTransformer,this.isTypeScriptTransformEnabled=isTypeScriptTransformEnabled,this.isFlowTransformEnabled=isFlowTransformEnabled,this.keepUnusedImports=keepUnusedImports,this.nonTypeIdentifiers=isTypeScriptTransformEnabled&&!keepUnusedImports?getNonTypeIdentifiers(tokens,options):new Set,this.declarationInfo=isTypeScriptTransformEnabled&&!keepUnusedImports?getDeclarationInfo(tokens):EMPTY_DECLARATION_INFO,this.injectCreateRequireForImportRequire=Boolean(options.injectCreateRequireForImportRequire)}process(){if(this.tokens.matches3(TokenType._import,TokenType.name,TokenType.eq))return this.processImportEquals();if(this.tokens.matches4(TokenType._import,TokenType.name,TokenType.name,TokenType.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,ContextualKeyword._type)){this.tokens.removeInitialToken();for(let i=0;i<7;i++)this.tokens.removeToken();return!0}if(this.tokens.matches2(TokenType._export,TokenType.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(TokenType._export,TokenType._import,TokenType.name,TokenType.name,TokenType.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,ContextualKeyword._type)){this.tokens.removeInitialToken();for(let i=0;i<8;i++)this.tokens.removeToken();return!0}if(this.tokens.matches1(TokenType._import))return this.processImport();if(this.tokens.matches2(TokenType._export,TokenType._default))return this.processExportDefault();if(this.tokens.matches2(TokenType._export,TokenType.braceL))return this.processNamedExports();if(this.tokens.matches2(TokenType._export,TokenType.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,ContextualKeyword._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(TokenType.braceL)){for(;!this.tokens.matches1(TokenType.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(TokenType._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(ContextualKeyword._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,TokenType.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),removeMaybeImportAttributes(this.tokens)),!0}return!1}processImportEquals(){const importName=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(importName)?elideImportEquals(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken("const"),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName("require"))):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(TokenType._import,TokenType.parenL))return!1;const snapshot=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(snapshot);!this.tokens.matches1(TokenType.string);)this.tokens.removeToken();this.tokens.removeToken(),removeMaybeImportAttributes(this.tokens),this.tokens.matches1(TokenType.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(TokenType._import),this.tokens.matchesContextual(ContextualKeyword._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,TokenType.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,ContextualKeyword._from))return!0;if(this.tokens.matches1(TokenType.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(ContextualKeyword._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,ContextualKeyword._from)&&this.tokens.copyToken();let foundNonTypeImport=!1,foundAnyNamedImport=!1,needsComma=!1;if(this.tokens.matches1(TokenType.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(TokenType.comma)&&this.tokens.removeToken()):(foundNonTypeImport=!0,this.tokens.copyToken(),this.tokens.matches1(TokenType.comma)&&(needsComma=!0,this.tokens.removeToken()))),this.tokens.matches1(TokenType.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(needsComma&&this.tokens.appendCode(","),foundNonTypeImport=!0,this.tokens.copyExpectedToken(TokenType.star),this.tokens.copyExpectedToken(TokenType.name),this.tokens.copyExpectedToken(TokenType.name));else if(this.tokens.matches1(TokenType.braceL)){for(needsComma&&this.tokens.appendCode(","),this.tokens.copyToken();!this.tokens.matches1(TokenType.braceR);){foundAnyNamedImport=!0;const specifierInfo=getImportExportSpecifierInfo(this.tokens);if(specifierInfo.isType||this.shouldAutomaticallyElideImportedName(specifierInfo.rightName)){for(;this.tokens.currentIndex()<specifierInfo.endIndex;)this.tokens.removeToken();this.tokens.matches1(TokenType.comma)&&this.tokens.removeToken()}else{for(foundNonTypeImport=!0;this.tokens.currentIndex()<specifierInfo.endIndex;)this.tokens.copyToken();this.tokens.matches1(TokenType.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(TokenType.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!foundNonTypeImport:this.isFlowTransformEnabled?foundAnyNamedImport&&!foundNonTypeImport:!1}shouldAutomaticallyElideImportedName(name){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(name)}processExportDefault(){if(shouldElideDefaultExport(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(TokenType._export,TokenType._default,TokenType._function,TokenType.name)||this.tokens.matches5(TokenType._export,TokenType._default,TokenType.name,TokenType._function,TokenType.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,ContextualKeyword._async)||this.tokens.matches4(TokenType._export,TokenType._default,TokenType._class,TokenType.name)||this.tokens.matches5(TokenType._export,TokenType._default,TokenType._abstract,TokenType._class,TokenType.name))&&this.reactHotLoaderTransformer){const defaultVarName=this.nameManager.claimFreeName("_default");return this.tokens.replaceToken(`let ${defaultVarName}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${defaultVarName} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(TokenType._export),this.tokens.copyExpectedToken(TokenType.braceL);const isReExport=isExportFrom(this.tokens);let foundNonTypeExport=!1;for(;!this.tokens.matches1(TokenType.braceR);){const specifierInfo=getImportExportSpecifierInfo(this.tokens);if(specifierInfo.isType||!isReExport&&this.shouldElideExportedName(specifierInfo.leftName)){for(;this.tokens.currentIndex()<specifierInfo.endIndex;)this.tokens.removeToken();this.tokens.matches1(TokenType.comma)&&this.tokens.removeToken()}else{for(foundNonTypeExport=!0;this.tokens.currentIndex()<specifierInfo.endIndex;)this.tokens.copyToken();this.tokens.matches1(TokenType.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(TokenType.braceR),!this.keepUnusedImports&&isReExport&&!foundNonTypeExport&&(this.tokens.removeToken(),this.tokens.removeToken(),removeMaybeImportAttributes(this.tokens)),!0}shouldElideExportedName(name){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(name)&&!this.declarationInfo.valueDeclarations.has(name)}}class FlowTransformer extends Transformer{constructor(rootTransformer,tokens,isImportsTransformEnabled){super();this.rootTransformer=rootTransformer,this.tokens=tokens,this.isImportsTransformEnabled=isImportsTransformEnabled}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(TokenType._enum)?(this.processEnum(),!0):this.tokens.matches2(TokenType._export,TokenType._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(TokenType._export,TokenType._default,TokenType._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();const enumName=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${enumName} = ${enumName};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();const enumName=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${enumName};`):this.tokens.appendCode(` export default ${enumName};`)}processEnum(){this.tokens.replaceToken("const"),this.tokens.copyExpectedToken(TokenType.name);let isSymbolEnum=!1;this.tokens.matchesContextual(ContextualKeyword._of)&&(this.tokens.removeToken(),isSymbolEnum=this.tokens.matchesContextual(ContextualKeyword._symbol),this.tokens.removeToken());const hasInitializers=this.tokens.matches3(TokenType.braceL,TokenType.name,TokenType.eq);this.tokens.appendCode(' = require("flow-enums-runtime")');const isMirrored=!isSymbolEnum&&!hasInitializers;for(this.tokens.replaceTokenTrimmingLeftWhitespace(isMirrored?".Mirrored([":"({");!this.tokens.matches1(TokenType.braceR);){if(this.tokens.matches1(TokenType.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(isSymbolEnum,hasInitializers),this.tokens.matches1(TokenType.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(isMirrored?"]);":"});")}processEnumElement(isSymbolEnum,hasInitializers){if(isSymbolEnum){const elementName=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${elementName}")`)}else hasInitializers?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(":"),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}}function _optionalChain(ops){let lastAccessLHS,value=ops[0],i=1;for(;i<ops.length;){const op=ops[i],fn=ops[i+1];if(i+=2,(op==="optionalAccess"||op==="optionalCall")&&value==null)return;op==="access"||op==="optionalAccess"?(lastAccessLHS=value,value=fn(value)):(op==="call"||op==="optionalCall")&&(value=fn((...args)=>value.call(lastAccessLHS,...args)),lastAccessLHS=void 0)}return value}const JEST_GLOBAL_NAME="jest",HOISTED_METHODS=["mock","unmock","enableAutomock","disableAutomock"];class JestHoistTransformer extends Transformer{__init(){this.hoistedFunctionNames=[]}constructor(rootTransformer,tokens,nameManager,importProcessor){super();this.rootTransformer=rootTransformer,this.tokens=tokens,this.nameManager=nameManager,this.importProcessor=importProcessor,JestHoistTransformer.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(TokenType.name,TokenType.dot,TokenType.name,TokenType.parenL)&&this.tokens.identifierName()===JEST_GLOBAL_NAME?_optionalChain([this,"access",_=>_.importProcessor,"optionalAccess",_2=>_2.getGlobalNames,"call",_3=>_3(),"optionalAccess",_4=>_4.has,"call",_5=>_5(JEST_GLOBAL_NAME)])?!1:this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(name=>`${name}();`).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let followsNonHoistedJestCall=!1;for(;this.tokens.matches3(TokenType.dot,TokenType.name,TokenType.parenL);){const methodName=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(HOISTED_METHODS.includes(methodName)){const hoistedFunctionName=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(hoistedFunctionName),this.tokens.replaceToken(`function ${hoistedFunctionName}(){${JEST_GLOBAL_NAME}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(TokenType.parenR),this.tokens.appendCode(";}"),followsNonHoistedJestCall=!1}else followsNonHoistedJestCall?this.tokens.copyToken():this.tokens.replaceToken(`${JEST_GLOBAL_NAME}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(TokenType.parenR),followsNonHoistedJestCall=!0}return!0}}class NumericSeparatorTransformer extends Transformer{constructor(tokens){super();this.tokens=tokens}process(){if(this.tokens.matches1(TokenType.num)){const code=this.tokens.currentTokenCode();if(code.includes("_"))return this.tokens.replaceToken(code.replace(/_/g,"")),!0}return!1}}class OptionalCatchBindingTransformer extends Transformer{constructor(tokens,nameManager){super();this.tokens=tokens,this.nameManager=nameManager}process(){return this.tokens.matches2(TokenType._catch,TokenType.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0):!1}}class OptionalChainingNullishTransformer extends Transformer{constructor(tokens,nameManager){super();this.tokens=tokens,this.nameManager=nameManager}process(){if(this.tokens.matches1(TokenType.nullishCoalescing)){const token2=this.tokens.currentToken();return this.tokens.tokens[token2.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(TokenType._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;const chainStart=this.tokens.currentToken().subscriptStartIndex;if(chainStart!=null&&this.tokens.tokens[chainStart].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==TokenType._super){const param=this.nameManager.claimFreeName("_");let arrowStartSnippet;if(chainStart>0&&this.tokens.matches1AtIndex(chainStart-1,TokenType._delete)&&this.isLastSubscriptInChain()?arrowStartSnippet=`${param} => delete ${param}`:arrowStartSnippet=`${param} => ${param}`,this.tokens.tokens[chainStart].isAsyncOperation&&(arrowStartSnippet=`async ${arrowStartSnippet}`),this.tokens.matches2(TokenType.questionDot,TokenType.parenL)||this.tokens.matches2(TokenType.questionDot,TokenType.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${arrowStartSnippet}`);else if(this.tokens.matches2(TokenType.questionDot,TokenType.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${arrowStartSnippet}`);else if(this.tokens.matches1(TokenType.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${arrowStartSnippet}.`);else if(this.tokens.matches1(TokenType.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${arrowStartSnippet}.`);else if(this.tokens.matches1(TokenType.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${arrowStartSnippet}[`);else if(this.tokens.matches1(TokenType.parenL))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${arrowStartSnippet}(`);else throw new Error("Unexpected subscript operator in optional chain.");return!0}return!1}isLastSubscriptInChain(){let depth=0;for(let i=this.tokens.currentIndex()+1;;i++){if(i>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[i].isOptionalChainStart?depth++:this.tokens.tokens[i].isOptionalChainEnd&&depth--,depth<0)return!0;if(depth===0&&this.tokens.tokens[i].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let depth=0,index=this.tokens.currentIndex()-1;for(;;){if(index<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[index].isOptionalChainStart?depth--:this.tokens.tokens[index].isOptionalChainEnd&&depth++,depth<0)return!1;if(depth===0&&this.tokens.tokens[index].subscriptStartIndex!=null)return this.tokens.tokens[index-1].type===TokenType._super;index--}}}class ReactDisplayNameTransformer extends Transformer{constructor(rootTransformer,tokens,importProcessor,options){super();this.rootTransformer=rootTransformer,this.tokens=tokens,this.importProcessor=importProcessor,this.options=options}process(){const startIndex=this.tokens.currentIndex();if(this.tokens.identifierName()==="createReactClass"){const newName=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return newName?this.tokens.replaceToken(`(0, ${newName})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(startIndex),!0}if(this.tokens.matches3(TokenType.name,TokenType.dot,TokenType.name)&&this.tokens.identifierName()==="React"&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)==="createClass"){const newName=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return newName?(this.tokens.replaceToken(newName),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(startIndex),!0}return!1}tryProcessCreateClassCall(startIndex){const displayName=this.findDisplayName(startIndex);!displayName||this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(TokenType.parenL),this.tokens.copyExpectedToken(TokenType.braceL),this.tokens.appendCode(`displayName: '${displayName}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(TokenType.braceR),this.tokens.copyExpectedToken(TokenType.parenR))}findDisplayName(startIndex){return startIndex<2?null:this.tokens.matches2AtIndex(startIndex-2,TokenType.name,TokenType.eq)?this.tokens.identifierNameAtIndex(startIndex-2):startIndex>=2&&this.tokens.tokens[startIndex-2].identifierRole===IdentifierRole.ObjectKey?this.tokens.identifierNameAtIndex(startIndex-2):this.tokens.matches2AtIndex(startIndex-2,TokenType._export,TokenType._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){const pathSegments=(this.options.filePath||"unknown").split("/"),filename=pathSegments[pathSegments.length-1],dotIndex=filename.lastIndexOf("."),baseFilename=dotIndex===-1?filename:filename.slice(0,dotIndex);return baseFilename==="index"&&pathSegments[pathSegments.length-2]?pathSegments[pathSegments.length-2]:baseFilename}classNeedsDisplayName(){let index=this.tokens.currentIndex();if(!this.tokens.matches2(TokenType.parenL,TokenType.braceL))return!1;const objectStartIndex=index+1,objectContextId=this.tokens.tokens[objectStartIndex].contextId;if(objectContextId==null)throw new Error("Expected non-null context ID on object open-brace.");for(;index<this.tokens.tokens.length;index++){const token=this.tokens.tokens[index];if(token.type===TokenType.braceR&&token.contextId===objectContextId){index++;break}if(this.tokens.identifierNameAtIndex(index)==="displayName"&&this.tokens.tokens[index].identifierRole===IdentifierRole.ObjectKey&&token.contextId===objectContextId)return!1}if(index===this.tokens.tokens.length)throw new Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(index,TokenType.parenR)||this.tokens.matches2AtIndex(index,TokenType.comma,TokenType.parenR)}}class ReactHotLoaderTransformer extends Transformer{__init(){this.extractedDefaultExportName=null}constructor(tokens,filePath){super();this.tokens=tokens,this.filePath=filePath,ReactHotLoaderTransformer.prototype.__init.call(this)}setExtractedDefaultExportName(extractedDefaultExportName){this.extractedDefaultExportName=extractedDefaultExportName}getPrefixCode(){return`
|
|
302
302
|
(function () {
|
|
@@ -367,7 +367,7 @@ and limitations under the License.
|
|
|
367
367
|
`)}function getFormattedMessage(message){return[getDevMessage(message),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var visitedMessages;function resetVisitedMessages(){visitedMessages=new Set}function warnWhen(condition,message){if(condition&&!visitedMessages.has(message)){var _console;visitedMessages.add(message),(_console=console).warn.apply(_console,getFormattedMessage(message))}}function errorWhen(condition,message){if(condition&&!visitedMessages.has(message)){var _console2;visitedMessages.add(message),(_console2=console).error.apply(_console2,getFormattedMessage(message))}}function validateTargets(targets){var didPassFalsyValue=!targets,didPassPlainObject=Object.prototype.toString.call(targets)==="[object Object]"&&!targets.addEventListener;errorWhen(didPassFalsyValue,["tippy() was passed","`"+String(targets)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),errorWhen(didPassPlainObject,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var pluginProps={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},renderProps={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},defaultProps=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},pluginProps,{},renderProps),defaultKeys=Object.keys(defaultProps),setDefaultProps=function(partialProps){var keys=Object.keys(partialProps);keys.forEach(function(key){defaultProps[key]=partialProps[key]})};function getExtendedPassedProps(passedProps){var plugins=passedProps.plugins||[],pluginProps2=plugins.reduce(function(acc,plugin){var name=plugin.name,defaultValue=plugin.defaultValue;return name&&(acc[name]=passedProps[name]!==void 0?passedProps[name]:defaultValue),acc},{});return Object.assign({},passedProps,{},pluginProps2)}function getDataAttributeProps(reference2,plugins){var propKeys=plugins?Object.keys(getExtendedPassedProps(Object.assign({},defaultProps,{plugins}))):defaultKeys,props=propKeys.reduce(function(acc,key){var valueAsString=(reference2.getAttribute("data-tippy-"+key)||"").trim();if(!valueAsString)return acc;if(key==="content")acc[key]=valueAsString;else try{acc[key]=JSON.parse(valueAsString)}catch{acc[key]=valueAsString}return acc},{});return props}function evaluateProps(reference2,props){var out=Object.assign({},props,{content:invokeWithArgsOrReturn(props.content,[reference2])},props.ignoreAttributes?{}:getDataAttributeProps(reference2,props.plugins));return out.aria=Object.assign({},defaultProps.aria,{},out.aria),out.aria={expanded:out.aria.expanded==="auto"?props.interactive:out.aria.expanded,content:out.aria.content==="auto"?props.interactive?null:"describedby":out.aria.content},out}function validateProps(partialProps,plugins){partialProps===void 0&&(partialProps={}),plugins===void 0&&(plugins=[]);var keys=Object.keys(partialProps);keys.forEach(function(prop){var nonPluginProps=removeProperties(defaultProps,Object.keys(pluginProps)),didPassUnknownProp=!tippy_esm_hasOwnProperty(nonPluginProps,prop);didPassUnknownProp&&(didPassUnknownProp=plugins.filter(function(plugin){return plugin.name===prop}).length===0),warnWhen(didPassUnknownProp,["`"+prop+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
|
368
368
|
|
|
369
369
|
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
370
|
-
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var innerHTML=function(){return"innerHTML"};function dangerouslySetInnerHTML(element,html){element[innerHTML()]=html}function createArrowElement(value){var arrow2=div();return value===!0?arrow2.className=ARROW_CLASS:(arrow2.className=SVG_ARROW_CLASS,tippy_esm_isElement(value)?arrow2.appendChild(value):dangerouslySetInnerHTML(arrow2,value)),arrow2}function setContent(content,props){tippy_esm_isElement(props.content)?(dangerouslySetInnerHTML(content,""),content.appendChild(props.content)):typeof props.content!="function"&&(props.allowHTML?dangerouslySetInnerHTML(content,props.content):content.textContent=props.content)}function getChildren(popper2){var box=popper2.firstElementChild,boxChildren=arrayFrom(box.children);return{box,content:boxChildren.find(function(node){return node.classList.contains(CONTENT_CLASS)}),arrow:boxChildren.find(function(node){return node.classList.contains(ARROW_CLASS)||node.classList.contains(SVG_ARROW_CLASS)}),backdrop:boxChildren.find(function(node){return node.classList.contains(BACKDROP_CLASS)})}}function render(instance){var popper2=div(),box=div();box.className=BOX_CLASS,box.setAttribute("data-state","hidden"),box.setAttribute("tabindex","-1");var content=div();content.className=CONTENT_CLASS,content.setAttribute("data-state","hidden"),setContent(content,instance.props),popper2.appendChild(box),box.appendChild(content),onUpdate(instance.props,instance.props);function onUpdate(prevProps,nextProps){var _getChildren=getChildren(popper2),box2=_getChildren.box,content2=_getChildren.content,arrow2=_getChildren.arrow;nextProps.theme?box2.setAttribute("data-theme",nextProps.theme):box2.removeAttribute("data-theme"),typeof nextProps.animation=="string"?box2.setAttribute("data-animation",nextProps.animation):box2.removeAttribute("data-animation"),nextProps.inertia?box2.setAttribute("data-inertia",""):box2.removeAttribute("data-inertia"),box2.style.maxWidth=typeof nextProps.maxWidth=="number"?nextProps.maxWidth+"px":nextProps.maxWidth,nextProps.role?box2.setAttribute("role",nextProps.role):box2.removeAttribute("role"),(prevProps.content!==nextProps.content||prevProps.allowHTML!==nextProps.allowHTML)&&setContent(content2,instance.props),nextProps.arrow?arrow2?prevProps.arrow!==nextProps.arrow&&(box2.removeChild(arrow2),box2.appendChild(createArrowElement(nextProps.arrow))):box2.appendChild(createArrowElement(nextProps.arrow)):arrow2&&box2.removeChild(arrow2)}return{popper:popper2,onUpdate}}render.$$tippy=!0;var idCounter=1,mouseMoveListeners=[],mountedInstances=[];function createTippy(reference2,passedProps){var props=evaluateProps(reference2,Object.assign({},defaultProps,{},getExtendedPassedProps(removeUndefinedProps(passedProps)))),showTimeout,hideTimeout,scheduleHideAnimationFrame,isVisibleFromClick=!1,didHideDueToDocumentMouseDown=!1,didTouchMove=!1,ignoreOnFirstUpdate=!1,lastTriggerEvent,currentTransitionEndListener,onFirstUpdate,listeners=[],debouncedOnMouseMove=tippy_esm_debounce(onMouseMove,props.interactiveDebounce),currentTarget,id=idCounter++,popperInstance=null,plugins=unique(props.plugins),state={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},instance={id,reference:reference2,popper:div(),popperInstance,props,state,plugins,clearDelayTimeouts,setProps,setContent:setContent2,show,hide:hide2,hideWithInteractivity,enable,disable,unmount,destroy};if(!props.render)return instance;var _props$render=props.render(instance),popper2=_props$render.popper,onUpdate=_props$render.onUpdate;popper2.setAttribute("data-tippy-root",""),popper2.id="tippy-"+instance.id,instance.popper=popper2,reference2._tippy=instance,popper2._tippy=instance;var pluginsHooks=plugins.map(function(plugin){return plugin.fn(instance)}),hasAriaExpanded=reference2.hasAttribute("aria-expanded");return addListeners(),handleAriaExpandedAttribute(),handleStyles(),invokeHook("onCreate",[instance]),props.showOnCreate&&scheduleShow(),popper2.addEventListener("mouseenter",function(){instance.props.interactive&&instance.state.isVisible&&instance.clearDelayTimeouts()}),popper2.addEventListener("mouseleave",function(event){instance.props.interactive&&instance.props.trigger.indexOf("mouseenter")>=0&&(getDocument().addEventListener("mousemove",debouncedOnMouseMove),debouncedOnMouseMove(event))}),instance;function getNormalizedTouchSettings(){var touch=instance.props.touch;return Array.isArray(touch)?touch:[touch,0]}function getIsCustomTouchBehavior(){return getNormalizedTouchSettings()[0]==="hold"}function getIsDefaultRenderFn(){var _instance$props$rende;return!!((_instance$props$rende=instance.props.render)!=null&&_instance$props$rende.$$tippy)}function getCurrentTarget(){return currentTarget||reference2}function getDocument(){var parent2=getCurrentTarget().parentNode;return parent2?getOwnerDocument(parent2):document}function getDefaultTemplateChildren(){return getChildren(popper2)}function getDelay(isShow){return instance.state.isMounted&&!instance.state.isVisible||currentInput.isTouch||lastTriggerEvent&&lastTriggerEvent.type==="focus"?0:getValueAtIndexOrReturn(instance.props.delay,isShow?0:1,defaultProps.delay)}function handleStyles(){popper2.style.pointerEvents=instance.props.interactive&&instance.state.isVisible?"":"none",popper2.style.zIndex=""+instance.props.zIndex}function invokeHook(hook,args,shouldInvokePropsHook){if(shouldInvokePropsHook===void 0&&(shouldInvokePropsHook=!0),pluginsHooks.forEach(function(pluginHooks){pluginHooks[hook]&&pluginHooks[hook].apply(void 0,args)}),shouldInvokePropsHook){var _instance$props;(_instance$props=instance.props)[hook].apply(_instance$props,args)}}function handleAriaContentAttribute(){var aria=instance.props.aria;if(!!aria.content){var attr="aria-"+aria.content,id2=popper2.id,nodes=normalizeToArray(instance.props.triggerTarget||reference2);nodes.forEach(function(node){var currentValue=node.getAttribute(attr);if(instance.state.isVisible)node.setAttribute(attr,currentValue?currentValue+" "+id2:id2);else{var nextValue=currentValue&¤tValue.replace(id2,"").trim();nextValue?node.setAttribute(attr,nextValue):node.removeAttribute(attr)}})}}function handleAriaExpandedAttribute(){if(!(hasAriaExpanded||!instance.props.aria.expanded)){var nodes=normalizeToArray(instance.props.triggerTarget||reference2);nodes.forEach(function(node){instance.props.interactive?node.setAttribute("aria-expanded",instance.state.isVisible&&node===getCurrentTarget()?"true":"false"):node.removeAttribute("aria-expanded")})}}function cleanupInteractiveMouseListeners(){getDocument().removeEventListener("mousemove",debouncedOnMouseMove),mouseMoveListeners=mouseMoveListeners.filter(function(listener){return listener!==debouncedOnMouseMove})}function onDocumentPress(event){if(!(currentInput.isTouch&&(didTouchMove||event.type==="mousedown"))&&!(instance.props.interactive&&popper2.contains(event.target))){if(getCurrentTarget().contains(event.target)){if(currentInput.isTouch||instance.state.isVisible&&instance.props.trigger.indexOf("click")>=0)return}else invokeHook("onClickOutside",[instance,event]);instance.props.hideOnClick===!0&&(instance.clearDelayTimeouts(),instance.hide(),didHideDueToDocumentMouseDown=!0,setTimeout(function(){didHideDueToDocumentMouseDown=!1}),instance.state.isMounted||removeDocumentPress())}}function onTouchMove(){didTouchMove=!0}function onTouchStart(){didTouchMove=!1}function addDocumentPress(){var doc=getDocument();doc.addEventListener("mousedown",onDocumentPress,!0),doc.addEventListener("touchend",onDocumentPress,TOUCH_OPTIONS),doc.addEventListener("touchstart",onTouchStart,TOUCH_OPTIONS),doc.addEventListener("touchmove",onTouchMove,TOUCH_OPTIONS)}function removeDocumentPress(){var doc=getDocument();doc.removeEventListener("mousedown",onDocumentPress,!0),doc.removeEventListener("touchend",onDocumentPress,TOUCH_OPTIONS),doc.removeEventListener("touchstart",onTouchStart,TOUCH_OPTIONS),doc.removeEventListener("touchmove",onTouchMove,TOUCH_OPTIONS)}function onTransitionedOut(duration,callback){onTransitionEnd(duration,function(){!instance.state.isVisible&&popper2.parentNode&&popper2.parentNode.contains(popper2)&&callback()})}function onTransitionedIn(duration,callback){onTransitionEnd(duration,callback)}function onTransitionEnd(duration,callback){var box=getDefaultTemplateChildren().box;function listener(event){event.target===box&&(updateTransitionEndListener(box,"remove",listener),callback())}if(duration===0)return callback();updateTransitionEndListener(box,"remove",currentTransitionEndListener),updateTransitionEndListener(box,"add",listener),currentTransitionEndListener=listener}function on(eventType,handler,options){options===void 0&&(options=!1);var nodes=normalizeToArray(instance.props.triggerTarget||reference2);nodes.forEach(function(node){node.addEventListener(eventType,handler,options),listeners.push({node,eventType,handler,options})})}function addListeners(){getIsCustomTouchBehavior()&&(on("touchstart",onTrigger,{passive:!0}),on("touchend",onMouseLeave,{passive:!0})),splitBySpaces(instance.props.trigger).forEach(function(eventType){if(eventType!=="manual")switch(on(eventType,onTrigger),eventType){case"mouseenter":on("mouseleave",onMouseLeave);break;case"focus":on(isIE?"focusout":"blur",onBlurOrFocusOut);break;case"focusin":on("focusout",onBlurOrFocusOut);break}})}function removeListeners(){listeners.forEach(function(_ref){var node=_ref.node,eventType=_ref.eventType,handler=_ref.handler,options=_ref.options;node.removeEventListener(eventType,handler,options)}),listeners=[]}function onTrigger(event){var _lastTriggerEvent,shouldScheduleClickHide=!1;if(!(!instance.state.isEnabled||isEventListenerStopped(event)||didHideDueToDocumentMouseDown)){var wasFocused=((_lastTriggerEvent=lastTriggerEvent)==null?void 0:_lastTriggerEvent.type)==="focus";lastTriggerEvent=event,currentTarget=event.currentTarget,handleAriaExpandedAttribute(),!instance.state.isVisible&&isMouseEvent(event)&&mouseMoveListeners.forEach(function(listener){return listener(event)}),event.type==="click"&&(instance.props.trigger.indexOf("mouseenter")<0||isVisibleFromClick)&&instance.props.hideOnClick!==!1&&instance.state.isVisible?shouldScheduleClickHide=!0:scheduleShow(event),event.type==="click"&&(isVisibleFromClick=!shouldScheduleClickHide),shouldScheduleClickHide&&!wasFocused&&scheduleHide(event)}}function onMouseMove(event){var target=event.target,isCursorOverReferenceOrPopper=getCurrentTarget().contains(target)||popper2.contains(target);if(!(event.type==="mousemove"&&isCursorOverReferenceOrPopper)){var popperTreeData=getNestedPopperTree().concat(popper2).map(function(popper3){var _instance$popperInsta,instance2=popper3._tippy,state2=(_instance$popperInsta=instance2.popperInstance)==null?void 0:_instance$popperInsta.state;return state2?{popperRect:popper3.getBoundingClientRect(),popperState:state2,props}:null}).filter(Boolean);isCursorOutsideInteractiveBorder(popperTreeData,event)&&(cleanupInteractiveMouseListeners(),scheduleHide(event))}}function onMouseLeave(event){var shouldBail=isEventListenerStopped(event)||instance.props.trigger.indexOf("click")>=0&&isVisibleFromClick;if(!shouldBail){if(instance.props.interactive){instance.hideWithInteractivity(event);return}scheduleHide(event)}}function onBlurOrFocusOut(event){instance.props.trigger.indexOf("focusin")<0&&event.target!==getCurrentTarget()||instance.props.interactive&&event.relatedTarget&&popper2.contains(event.relatedTarget)||scheduleHide(event)}function isEventListenerStopped(event){return currentInput.isTouch?getIsCustomTouchBehavior()!==event.type.indexOf("touch")>=0:!1}function createPopperInstance(){destroyPopperInstance();var _instance$props2=instance.props,popperOptions=_instance$props2.popperOptions,placement=_instance$props2.placement,offset2=_instance$props2.offset,getReferenceClientRect=_instance$props2.getReferenceClientRect,moveTransition=_instance$props2.moveTransition,arrow2=getIsDefaultRenderFn()?getChildren(popper2).arrow:null,computedReference=getReferenceClientRect?{getBoundingClientRect:getReferenceClientRect,contextElement:getReferenceClientRect.contextElement||getCurrentTarget()}:reference2,tippyModifier={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(_ref2){var state2=_ref2.state;if(getIsDefaultRenderFn()){var _getDefaultTemplateCh=getDefaultTemplateChildren(),box=_getDefaultTemplateCh.box;["placement","reference-hidden","escaped"].forEach(function(attr){attr==="placement"?box.setAttribute("data-placement",state2.placement):state2.attributes.popper["data-popper-"+attr]?box.setAttribute("data-"+attr,""):box.removeAttribute("data-"+attr)}),state2.attributes.popper={}}}},modifiers=[{name:"offset",options:{offset:offset2}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!moveTransition}},tippyModifier];getIsDefaultRenderFn()&&arrow2&&modifiers.push({name:"arrow",options:{element:arrow2,padding:3}}),modifiers.push.apply(modifiers,popperOptions?.modifiers||[]),instance.popperInstance=popper_createPopper(computedReference,popper2,Object.assign({},popperOptions,{placement,onFirstUpdate,modifiers}))}function destroyPopperInstance(){instance.popperInstance&&(instance.popperInstance.destroy(),instance.popperInstance=null)}function mount(){var appendTo=instance.props.appendTo,parentNode,node=getCurrentTarget();instance.props.interactive&&appendTo===defaultProps.appendTo||appendTo==="parent"?parentNode=node.parentNode:parentNode=invokeWithArgsOrReturn(appendTo,[node]),parentNode.contains(popper2)||parentNode.appendChild(popper2),createPopperInstance()}function getNestedPopperTree(){return arrayFrom(popper2.querySelectorAll("[data-tippy-root]"))}function scheduleShow(event){instance.clearDelayTimeouts(),event&&invokeHook("onTrigger",[instance,event]),addDocumentPress();var delay=getDelay(!0),_getNormalizedTouchSe=getNormalizedTouchSettings(),touchValue=_getNormalizedTouchSe[0],touchDelay=_getNormalizedTouchSe[1];currentInput.isTouch&&touchValue==="hold"&&touchDelay&&(delay=touchDelay),delay?showTimeout=setTimeout(function(){instance.show()},delay):instance.show()}function scheduleHide(event){if(instance.clearDelayTimeouts(),invokeHook("onUntrigger",[instance,event]),!instance.state.isVisible){removeDocumentPress();return}if(!(instance.props.trigger.indexOf("mouseenter")>=0&&instance.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(event.type)>=0&&isVisibleFromClick)){var delay=getDelay(!1);delay?hideTimeout=setTimeout(function(){instance.state.isVisible&&instance.hide()},delay):scheduleHideAnimationFrame=requestAnimationFrame(function(){instance.hide()})}}function enable(){instance.state.isEnabled=!0}function disable(){instance.hide(),instance.state.isEnabled=!1}function clearDelayTimeouts(){clearTimeout(showTimeout),clearTimeout(hideTimeout),cancelAnimationFrame(scheduleHideAnimationFrame)}function setProps(partialProps){if(!instance.state.isDestroyed){invokeHook("onBeforeUpdate",[instance,partialProps]),removeListeners();var prevProps=instance.props,nextProps=evaluateProps(reference2,Object.assign({},instance.props,{},partialProps,{ignoreAttributes:!0}));instance.props=nextProps,addListeners(),prevProps.interactiveDebounce!==nextProps.interactiveDebounce&&(cleanupInteractiveMouseListeners(),debouncedOnMouseMove=tippy_esm_debounce(onMouseMove,nextProps.interactiveDebounce)),prevProps.triggerTarget&&!nextProps.triggerTarget?normalizeToArray(prevProps.triggerTarget).forEach(function(node){node.removeAttribute("aria-expanded")}):nextProps.triggerTarget&&reference2.removeAttribute("aria-expanded"),handleAriaExpandedAttribute(),handleStyles(),onUpdate&&onUpdate(prevProps,nextProps),instance.popperInstance&&(createPopperInstance(),getNestedPopperTree().forEach(function(nestedPopper){requestAnimationFrame(nestedPopper._tippy.popperInstance.forceUpdate)})),invokeHook("onAfterUpdate",[instance,partialProps])}}function setContent2(content){instance.setProps({content})}function show(){var isAlreadyVisible=instance.state.isVisible,isDestroyed=instance.state.isDestroyed,isDisabled=!instance.state.isEnabled,isTouchAndTouchDisabled=currentInput.isTouch&&!instance.props.touch,duration=getValueAtIndexOrReturn(instance.props.duration,0,defaultProps.duration);if(!(isAlreadyVisible||isDestroyed||isDisabled||isTouchAndTouchDisabled)&&!getCurrentTarget().hasAttribute("disabled")&&(invokeHook("onShow",[instance],!1),instance.props.onShow(instance)!==!1)){if(instance.state.isVisible=!0,getIsDefaultRenderFn()&&(popper2.style.visibility="visible"),handleStyles(),addDocumentPress(),instance.state.isMounted||(popper2.style.transition="none"),getIsDefaultRenderFn()){var _getDefaultTemplateCh2=getDefaultTemplateChildren(),box=_getDefaultTemplateCh2.box,content=_getDefaultTemplateCh2.content;setTransitionDuration([box,content],0)}onFirstUpdate=function(){if(!(!instance.state.isVisible||ignoreOnFirstUpdate)){if(ignoreOnFirstUpdate=!0,popper2.offsetHeight,popper2.style.transition=instance.props.moveTransition,getIsDefaultRenderFn()&&instance.props.animation){var _getDefaultTemplateCh3=getDefaultTemplateChildren(),_box=_getDefaultTemplateCh3.box,_content=_getDefaultTemplateCh3.content;setTransitionDuration([_box,_content],duration),setVisibilityState([_box,_content],"visible")}handleAriaContentAttribute(),handleAriaExpandedAttribute(),pushIfUnique(mountedInstances,instance),instance.state.isMounted=!0,invokeHook("onMount",[instance]),instance.props.animation&&getIsDefaultRenderFn()&&onTransitionedIn(duration,function(){instance.state.isShown=!0,invokeHook("onShown",[instance])})}},mount()}}function hide2(){var isAlreadyHidden=!instance.state.isVisible,isDestroyed=instance.state.isDestroyed,isDisabled=!instance.state.isEnabled,duration=getValueAtIndexOrReturn(instance.props.duration,1,defaultProps.duration);if(!(isAlreadyHidden||isDestroyed||isDisabled)&&(invokeHook("onHide",[instance],!1),instance.props.onHide(instance)!==!1)){if(instance.state.isVisible=!1,instance.state.isShown=!1,ignoreOnFirstUpdate=!1,isVisibleFromClick=!1,getIsDefaultRenderFn()&&(popper2.style.visibility="hidden"),cleanupInteractiveMouseListeners(),removeDocumentPress(),handleStyles(),getIsDefaultRenderFn()){var _getDefaultTemplateCh4=getDefaultTemplateChildren(),box=_getDefaultTemplateCh4.box,content=_getDefaultTemplateCh4.content;instance.props.animation&&(setTransitionDuration([box,content],duration),setVisibilityState([box,content],"hidden"))}handleAriaContentAttribute(),handleAriaExpandedAttribute(),instance.props.animation?getIsDefaultRenderFn()&&onTransitionedOut(duration,instance.unmount):instance.unmount()}}function hideWithInteractivity(event){getDocument().addEventListener("mousemove",debouncedOnMouseMove),pushIfUnique(mouseMoveListeners,debouncedOnMouseMove),debouncedOnMouseMove(event)}function unmount(){instance.state.isVisible&&instance.hide(),instance.state.isMounted&&(destroyPopperInstance(),getNestedPopperTree().forEach(function(nestedPopper){nestedPopper._tippy.unmount()}),popper2.parentNode&&popper2.parentNode.removeChild(popper2),mountedInstances=mountedInstances.filter(function(i){return i!==instance}),instance.state.isMounted=!1,invokeHook("onHidden",[instance]))}function destroy(){instance.state.isDestroyed||(instance.clearDelayTimeouts(),instance.unmount(),removeListeners(),delete reference2._tippy,instance.state.isDestroyed=!0,invokeHook("onDestroy",[instance]))}}function tippy(targets,optionalProps){optionalProps===void 0&&(optionalProps={});var plugins=defaultProps.plugins.concat(optionalProps.plugins||[]);bindGlobalEventListeners();var passedProps=Object.assign({},optionalProps,{plugins}),elements=getArrayOfElements(targets);if(!1)var isMoreThanOneReferenceElement,isSingleContentElement;var instances=elements.reduce(function(acc,reference2){var instance=reference2&&createTippy(reference2,passedProps);return instance&&acc.push(instance),acc},[]);return tippy_esm_isElement(targets)?instances[0]:instances}tippy.defaultProps=defaultProps,tippy.setDefaultProps=setDefaultProps,tippy.currentInput=currentInput;var hideAll=function(_temp){var _ref=_temp===void 0?{}:_temp,excludedReferenceOrInstance=_ref.exclude,duration=_ref.duration;mountedInstances.forEach(function(instance){var isExcluded=!1;if(excludedReferenceOrInstance&&(isExcluded=isReferenceElement(excludedReferenceOrInstance)?instance.reference===excludedReferenceOrInstance:instance.popper===excludedReferenceOrInstance.popper),!isExcluded){var originalDuration=instance.props.duration;instance.setProps({duration}),instance.hide(),instance.state.isDestroyed||instance.setProps({duration:originalDuration})}})},createSingleton=function(tippyInstances,optionalProps){optionalProps===void 0&&(optionalProps={});var individualInstances=tippyInstances,references=[],currentTarget,overrides=optionalProps.overrides,interceptSetPropsCleanups=[];function setReferences(){references=individualInstances.map(function(instance){return instance.reference})}function enableInstances(isEnabled){individualInstances.forEach(function(instance){isEnabled?instance.enable():instance.disable()})}function interceptSetProps(singleton2){return individualInstances.map(function(instance){var originalSetProps2=instance.setProps;return instance.setProps=function(props){originalSetProps2(props),instance.reference===currentTarget&&singleton2.setProps(props)},function(){instance.setProps=originalSetProps2}})}enableInstances(!1),setReferences();var plugin={fn:function(){return{onDestroy:function(){enableInstances(!0)},onTrigger:function(instance,event){var target=event.currentTarget,index=references.indexOf(target);if(target!==currentTarget){currentTarget=target;var overrideProps=(overrides||[]).concat("content").reduce(function(acc,prop){return acc[prop]=individualInstances[index].props[prop],acc},{});instance.setProps(Object.assign({},overrideProps,{getReferenceClientRect:typeof overrideProps.getReferenceClientRect=="function"?overrideProps.getReferenceClientRect:function(){return target.getBoundingClientRect()}}))}}}}},singleton=tippy(div(),Object.assign({},removeProperties(optionalProps,["overrides"]),{plugins:[plugin].concat(optionalProps.plugins||[]),triggerTarget:references})),originalSetProps=singleton.setProps;return singleton.setProps=function(props){overrides=props.overrides||overrides,originalSetProps(props)},singleton.setInstances=function(nextInstances){enableInstances(!0),interceptSetPropsCleanups.forEach(function(fn){return fn()}),individualInstances=nextInstances,enableInstances(!1),setReferences(),interceptSetProps(singleton),singleton.setProps({triggerTarget:references})},interceptSetPropsCleanups=interceptSetProps(singleton),singleton},BUBBLING_EVENTS_MAP={mouseover:"mouseenter",focusin:"focus",click:"click"};function delegate(targets,props){var listeners=[],childTippyInstances=[],disabled=!1,target=props.target,nativeProps=removeProperties(props,["target"]),parentProps=Object.assign({},nativeProps,{trigger:"manual",touch:!1}),childProps=Object.assign({},nativeProps,{showOnCreate:!0}),returnValue=tippy(targets,parentProps),normalizedReturnValue=normalizeToArray(returnValue);function onTrigger(event){if(!(!event.target||disabled)){var targetNode=event.target.closest(target);if(!!targetNode){var trigger=targetNode.getAttribute("data-tippy-trigger")||props.trigger||defaultProps.trigger;if(!targetNode._tippy&&!(event.type==="touchstart"&&typeof childProps.touch=="boolean")&&!(event.type!=="touchstart"&&trigger.indexOf(BUBBLING_EVENTS_MAP[event.type])<0)){var instance=tippy(targetNode,childProps);instance&&(childTippyInstances=childTippyInstances.concat(instance))}}}}function on(node,eventType,handler,options){options===void 0&&(options=!1),node.addEventListener(eventType,handler,options),listeners.push({node,eventType,handler,options})}function addEventListeners(instance){var reference2=instance.reference;on(reference2,"touchstart",onTrigger),on(reference2,"mouseover",onTrigger),on(reference2,"focusin",onTrigger),on(reference2,"click",onTrigger)}function removeEventListeners(){listeners.forEach(function(_ref){var node=_ref.node,eventType=_ref.eventType,handler=_ref.handler,options=_ref.options;node.removeEventListener(eventType,handler,options)}),listeners=[]}function applyMutations(instance){var originalDestroy=instance.destroy,originalEnable=instance.enable,originalDisable=instance.disable;instance.destroy=function(shouldDestroyChildInstances){shouldDestroyChildInstances===void 0&&(shouldDestroyChildInstances=!0),shouldDestroyChildInstances&&childTippyInstances.forEach(function(instance2){instance2.destroy()}),childTippyInstances=[],removeEventListeners(),originalDestroy()},instance.enable=function(){originalEnable(),childTippyInstances.forEach(function(instance2){return instance2.enable()}),disabled=!1},instance.disable=function(){originalDisable(),childTippyInstances.forEach(function(instance2){return instance2.disable()}),disabled=!0},addEventListeners(instance)}return normalizedReturnValue.forEach(applyMutations),returnValue}var animateFill={name:"animateFill",defaultValue:!1,fn:function(instance){var _instance$props$rende;if(!((_instance$props$rende=instance.props.render)!=null&&_instance$props$rende.$$tippy))return{};var _getChildren=getChildren(instance.popper),box=_getChildren.box,content=_getChildren.content,backdrop=instance.props.animateFill?createBackdropElement():null;return{onCreate:function(){backdrop&&(box.insertBefore(backdrop,box.firstElementChild),box.setAttribute("data-animatefill",""),box.style.overflow="hidden",instance.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(backdrop){var transitionDuration=box.style.transitionDuration,duration=Number(transitionDuration.replace("ms",""));content.style.transitionDelay=Math.round(duration/10)+"ms",backdrop.style.transitionDuration=transitionDuration,setVisibilityState([backdrop],"visible")}},onShow:function(){backdrop&&(backdrop.style.transitionDuration="0ms")},onHide:function(){backdrop&&setVisibilityState([backdrop],"hidden")}}}};function createBackdropElement(){var backdrop=div();return backdrop.className=BACKDROP_CLASS,setVisibilityState([backdrop],"hidden"),backdrop}var mouseCoords={clientX:0,clientY:0},activeInstances=[];function storeMouseCoords(_ref){var clientX=_ref.clientX,clientY=_ref.clientY;mouseCoords={clientX,clientY}}function addMouseCoordsListener(doc){doc.addEventListener("mousemove",storeMouseCoords)}function removeMouseCoordsListener(doc){doc.removeEventListener("mousemove",storeMouseCoords)}var followCursor={name:"followCursor",defaultValue:!1,fn:function(instance){var reference2=instance.reference,doc=getOwnerDocument(instance.props.triggerTarget||reference2),isInternalUpdate=!1,wasFocusEvent=!1,isUnmounted=!0,prevProps=instance.props;function getIsInitialBehavior(){return instance.props.followCursor==="initial"&&instance.state.isVisible}function addListener(){doc.addEventListener("mousemove",onMouseMove)}function removeListener(){doc.removeEventListener("mousemove",onMouseMove)}function unsetGetReferenceClientRect(){isInternalUpdate=!0,instance.setProps({getReferenceClientRect:null}),isInternalUpdate=!1}function onMouseMove(event){var isCursorOverReference=event.target?reference2.contains(event.target):!0,followCursor2=instance.props.followCursor,clientX=event.clientX,clientY=event.clientY,rect=reference2.getBoundingClientRect(),relativeX=clientX-rect.left,relativeY=clientY-rect.top;(isCursorOverReference||!instance.props.interactive)&&instance.setProps({getReferenceClientRect:function(){var rect2=reference2.getBoundingClientRect(),x=clientX,y=clientY;followCursor2==="initial"&&(x=rect2.left+relativeX,y=rect2.top+relativeY);var top=followCursor2==="horizontal"?rect2.top:y,right2=followCursor2==="vertical"?rect2.right:x,bottom2=followCursor2==="horizontal"?rect2.bottom:y,left2=followCursor2==="vertical"?rect2.left:x;return{width:right2-left2,height:bottom2-top,top,right:right2,bottom:bottom2,left:left2}}})}function create(){instance.props.followCursor&&(activeInstances.push({instance,doc}),addMouseCoordsListener(doc))}function destroy(){activeInstances=activeInstances.filter(function(data){return data.instance!==instance}),activeInstances.filter(function(data){return data.doc===doc}).length===0&&removeMouseCoordsListener(doc)}return{onCreate:create,onDestroy:destroy,onBeforeUpdate:function(){prevProps=instance.props},onAfterUpdate:function(_,_ref2){var followCursor2=_ref2.followCursor;isInternalUpdate||followCursor2!==void 0&&prevProps.followCursor!==followCursor2&&(destroy(),followCursor2?(create(),instance.state.isMounted&&!wasFocusEvent&&!getIsInitialBehavior()&&addListener()):(removeListener(),unsetGetReferenceClientRect()))},onMount:function(){instance.props.followCursor&&!wasFocusEvent&&(isUnmounted&&(onMouseMove(mouseCoords),isUnmounted=!1),getIsInitialBehavior()||addListener())},onTrigger:function(_,event){isMouseEvent(event)&&(mouseCoords={clientX:event.clientX,clientY:event.clientY}),wasFocusEvent=event.type==="focus"},onHidden:function(){instance.props.followCursor&&(unsetGetReferenceClientRect(),removeListener(),isUnmounted=!0)}}}};function getProps(props,modifier){var _props$popperOptions;return{popperOptions:Object.assign({},props.popperOptions,{modifiers:[].concat((((_props$popperOptions=props.popperOptions)==null?void 0:_props$popperOptions.modifiers)||[]).filter(function(_ref){var name=_ref.name;return name!==modifier.name}),[modifier])})}}var inlinePositioning={name:"inlinePositioning",defaultValue:!1,fn:function(instance){var reference2=instance.reference;function isEnabled(){return!!instance.props.inlinePositioning}var placement,cursorRectIndex=-1,isInternalUpdate=!1,modifier={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(_ref2){var state=_ref2.state;isEnabled()&&(placement!==state.placement&&instance.setProps({getReferenceClientRect:function(){return _getReferenceClientRect(state.placement)}}),placement=state.placement)}};function _getReferenceClientRect(placement2){return getInlineBoundingClientRect(tippy_esm_getBasePlacement(placement2),reference2.getBoundingClientRect(),arrayFrom(reference2.getClientRects()),cursorRectIndex)}function setInternalProps(partialProps){isInternalUpdate=!0,instance.setProps(partialProps),isInternalUpdate=!1}function addModifier(){isInternalUpdate||setInternalProps(getProps(instance.props,modifier))}return{onCreate:addModifier,onAfterUpdate:addModifier,onTrigger:function(_,event){if(isMouseEvent(event)){var rects=arrayFrom(instance.reference.getClientRects()),cursorRect=rects.find(function(rect){return rect.left-2<=event.clientX&&rect.right+2>=event.clientX&&rect.top-2<=event.clientY&&rect.bottom+2>=event.clientY});cursorRectIndex=rects.indexOf(cursorRect)}},onUntrigger:function(){cursorRectIndex=-1}}}};function getInlineBoundingClientRect(currentBasePlacement,boundingRect,clientRects,cursorRectIndex){if(clientRects.length<2||currentBasePlacement===null)return boundingRect;if(clientRects.length===2&&cursorRectIndex>=0&&clientRects[0].left>clientRects[1].right)return clientRects[cursorRectIndex]||boundingRect;switch(currentBasePlacement){case"top":case"bottom":{var firstRect=clientRects[0],lastRect=clientRects[clientRects.length-1],isTop=currentBasePlacement==="top",top=firstRect.top,bottom2=lastRect.bottom,left2=isTop?firstRect.left:lastRect.left,right2=isTop?firstRect.right:lastRect.right,width=right2-left2,height=bottom2-top;return{top,bottom:bottom2,left:left2,right:right2,width,height}}case"left":case"right":{var minLeft=Math.min.apply(Math,clientRects.map(function(rects){return rects.left})),maxRight=Math.max.apply(Math,clientRects.map(function(rects){return rects.right})),measureRects=clientRects.filter(function(rect){return currentBasePlacement==="left"?rect.left===minLeft:rect.right===maxRight}),_top=measureRects[0].top,_bottom=measureRects[measureRects.length-1].bottom,_left=minLeft,_right=maxRight,_width=_right-_left,_height=_bottom-_top;return{top:_top,bottom:_bottom,left:_left,right:_right,width:_width,height:_height}}default:return boundingRect}}var sticky={name:"sticky",defaultValue:!1,fn:function(instance){var reference2=instance.reference,popper2=instance.popper;function getReference(){return instance.popperInstance?instance.popperInstance.state.elements.reference:reference2}function shouldCheck(value){return instance.props.sticky===!0||instance.props.sticky===value}var prevRefRect=null,prevPopRect=null;function updatePosition(){var currentRefRect=shouldCheck("reference")?getReference().getBoundingClientRect():null,currentPopRect=shouldCheck("popper")?popper2.getBoundingClientRect():null;(currentRefRect&&areRectsDifferent(prevRefRect,currentRefRect)||currentPopRect&&areRectsDifferent(prevPopRect,currentPopRect))&&instance.popperInstance&&instance.popperInstance.update(),prevRefRect=currentRefRect,prevPopRect=currentPopRect,instance.state.isMounted&&requestAnimationFrame(updatePosition)}return{onMount:function(){instance.props.sticky&&updatePosition()}}}};function areRectsDifferent(rectA,rectB){return rectA&&rectB?rectA.top!==rectB.top||rectA.right!==rectB.right||rectA.bottom!==rectB.bottom||rectA.left!==rectB.left:!0}tippy.setDefaultProps({render});const tippy_esm=tippy},16935:module=>{module.exports=function(){var selection=document.getSelection();if(!selection.rangeCount)return function(){};for(var active=document.activeElement,ranges=[],i=0;i<selection.rangeCount;i++)ranges.push(selection.getRangeAt(i));switch(active.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":active.blur();break;default:active=null;break}return selection.removeAllRanges(),function(){selection.type==="Caret"&&selection.removeAllRanges(),selection.rangeCount||ranges.forEach(function(range){selection.addRange(range)}),active&&active.focus()}}},59541:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __spreadArrays=this&&this.__spreadArrays||function(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Checker=exports.createCheckers=void 0;var types_1=__webpack_require__(64502),util_1=__webpack_require__(44725),types_2=__webpack_require__(64502);Object.defineProperty(exports,"TArray",{enumerable:!0,get:function(){return types_2.TArray}}),Object.defineProperty(exports,"TEnumType",{enumerable:!0,get:function(){return types_2.TEnumType}}),Object.defineProperty(exports,"TEnumLiteral",{enumerable:!0,get:function(){return types_2.TEnumLiteral}}),Object.defineProperty(exports,"TFunc",{enumerable:!0,get:function(){return types_2.TFunc}}),Object.defineProperty(exports,"TIface",{enumerable:!0,get:function(){return types_2.TIface}}),Object.defineProperty(exports,"TLiteral",{enumerable:!0,get:function(){return types_2.TLiteral}}),Object.defineProperty(exports,"TName",{enumerable:!0,get:function(){return types_2.TName}}),Object.defineProperty(exports,"TOptional",{enumerable:!0,get:function(){return types_2.TOptional}}),Object.defineProperty(exports,"TParam",{enumerable:!0,get:function(){return types_2.TParam}}),Object.defineProperty(exports,"TParamList",{enumerable:!0,get:function(){return types_2.TParamList}}),Object.defineProperty(exports,"TProp",{enumerable:!0,get:function(){return types_2.TProp}}),Object.defineProperty(exports,"TTuple",{enumerable:!0,get:function(){return types_2.TTuple}}),Object.defineProperty(exports,"TType",{enumerable:!0,get:function(){return types_2.TType}}),Object.defineProperty(exports,"TUnion",{enumerable:!0,get:function(){return types_2.TUnion}}),Object.defineProperty(exports,"TIntersection",{enumerable:!0,get:function(){return types_2.TIntersection}}),Object.defineProperty(exports,"array",{enumerable:!0,get:function(){return types_2.array}}),Object.defineProperty(exports,"enumlit",{enumerable:!0,get:function(){return types_2.enumlit}}),Object.defineProperty(exports,"enumtype",{enumerable:!0,get:function(){return types_2.enumtype}}),Object.defineProperty(exports,"func",{enumerable:!0,get:function(){return types_2.func}}),Object.defineProperty(exports,"iface",{enumerable:!0,get:function(){return types_2.iface}}),Object.defineProperty(exports,"lit",{enumerable:!0,get:function(){return types_2.lit}}),Object.defineProperty(exports,"name",{enumerable:!0,get:function(){return types_2.name}}),Object.defineProperty(exports,"opt",{enumerable:!0,get:function(){return types_2.opt}}),Object.defineProperty(exports,"param",{enumerable:!0,get:function(){return types_2.param}}),Object.defineProperty(exports,"tuple",{enumerable:!0,get:function(){return types_2.tuple}}),Object.defineProperty(exports,"union",{enumerable:!0,get:function(){return types_2.union}}),Object.defineProperty(exports,"intersection",{enumerable:!0,get:function(){return types_2.intersection}}),Object.defineProperty(exports,"BasicType",{enumerable:!0,get:function(){return types_2.BasicType}});var util_2=__webpack_require__(44725);Object.defineProperty(exports,"VError",{enumerable:!0,get:function(){return util_2.VError}});function createCheckers(){for(var typeSuite=[],_i=0;_i<arguments.length;_i++)typeSuite[_i]=arguments[_i];for(var fullSuite=Object.assign.apply(Object,__spreadArrays([{},types_1.basicTypes],typeSuite)),checkers={},_a=0,typeSuite_1=typeSuite;_a<typeSuite_1.length;_a++)for(var suite_1=typeSuite_1[_a],_b=0,_c=Object.keys(suite_1);_b<_c.length;_b++){var name=_c[_b];checkers[name]=new Checker(fullSuite,suite_1[name])}return checkers}exports.createCheckers=createCheckers;var Checker=function(){function Checker2(suite,ttype,_path){if(_path===void 0&&(_path="value"),this.suite=suite,this.ttype=ttype,this._path=_path,this.props=new Map,ttype instanceof types_1.TIface)for(var _i=0,_a=ttype.props;_i<_a.length;_i++){var p=_a[_i];this.props.set(p.name,p.ttype)}this.checkerPlain=this.ttype.getChecker(suite,!1),this.checkerStrict=this.ttype.getChecker(suite,!0)}return Checker2.prototype.setReportedPath=function(path){this._path=path},Checker2.prototype.check=function(value){return this._doCheck(this.checkerPlain,value)},Checker2.prototype.test=function(value){return this.checkerPlain(value,new util_1.NoopContext)},Checker2.prototype.validate=function(value){return this._doValidate(this.checkerPlain,value)},Checker2.prototype.strictCheck=function(value){return this._doCheck(this.checkerStrict,value)},Checker2.prototype.strictTest=function(value){return this.checkerStrict(value,new util_1.NoopContext)},Checker2.prototype.strictValidate=function(value){return this._doValidate(this.checkerStrict,value)},Checker2.prototype.getProp=function(prop){var ttype=this.props.get(prop);if(!ttype)throw new Error("Type has no property "+prop);return new Checker2(this.suite,ttype,this._path+"."+prop)},Checker2.prototype.methodArgs=function(methodName){var tfunc=this._getMethod(methodName);return new Checker2(this.suite,tfunc.paramList)},Checker2.prototype.methodResult=function(methodName){var tfunc=this._getMethod(methodName);return new Checker2(this.suite,tfunc.result)},Checker2.prototype.getArgs=function(){if(!(this.ttype instanceof types_1.TFunc))throw new Error("getArgs() applied to non-function");return new Checker2(this.suite,this.ttype.paramList)},Checker2.prototype.getResult=function(){if(!(this.ttype instanceof types_1.TFunc))throw new Error("getResult() applied to non-function");return new Checker2(this.suite,this.ttype.result)},Checker2.prototype.getType=function(){return this.ttype},Checker2.prototype._doCheck=function(checkerFunc,value){var noopCtx=new util_1.NoopContext;if(!checkerFunc(value,noopCtx)){var detailCtx=new util_1.DetailContext;throw checkerFunc(value,detailCtx),detailCtx.getError(this._path)}},Checker2.prototype._doValidate=function(checkerFunc,value){var noopCtx=new util_1.NoopContext;if(checkerFunc(value,noopCtx))return null;var detailCtx=new util_1.DetailContext;return checkerFunc(value,detailCtx),detailCtx.getErrorDetail(this._path)},Checker2.prototype._getMethod=function(methodName){var ttype=this.props.get(methodName);if(!ttype)throw new Error("Type has no property "+methodName);if(!(ttype instanceof types_1.TFunc))throw new Error("Property "+methodName+" is not a method");return ttype},Checker2}();exports.Checker=Checker},64502:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var Buffer=__webpack_require__(55872).Buffer,__extends=this&&this.__extends||function(){var extendStatics=function(d,b){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d2,b2){d2.__proto__=b2}||function(d2,b2){for(var p in b2)b2.hasOwnProperty(p)&&(d2[p]=b2[p])},extendStatics(d,b)};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.basicTypes=exports.BasicType=exports.TParamList=exports.TParam=exports.param=exports.TFunc=exports.func=exports.TProp=exports.TOptional=exports.opt=exports.TIface=exports.iface=exports.TEnumLiteral=exports.enumlit=exports.TEnumType=exports.enumtype=exports.TIntersection=exports.intersection=exports.TUnion=exports.union=exports.TTuple=exports.tuple=exports.TArray=exports.array=exports.TLiteral=exports.lit=exports.TName=exports.name=exports.TType=void 0;var util_1=__webpack_require__(44725),TType=function(){function TType2(){}return TType2}();exports.TType=TType;function parseSpec(typeSpec){return typeof typeSpec=="string"?name(typeSpec):typeSpec}function getNamedType(suite,name2){var ttype=suite[name2];if(!ttype)throw new Error("Unknown type "+name2);return ttype}function name(value){return new TName(value)}exports.name=name;var TName=function(_super){__extends(TName2,_super);function TName2(name2){var _this=_super.call(this)||this;return _this.name=name2,_this._failMsg="is not a "+name2,_this}return TName2.prototype.getChecker=function(suite,strict,allowedProps){var _this=this,ttype=getNamedType(suite,this.name),checker=ttype.getChecker(suite,strict,allowedProps);return ttype instanceof BasicType||ttype instanceof TName2?checker:function(value,ctx){return checker(value,ctx)?!0:ctx.fail(null,_this._failMsg,0)}},TName2}(TType);exports.TName=TName;function lit(value){return new TLiteral(value)}exports.lit=lit;var TLiteral=function(_super){__extends(TLiteral2,_super);function TLiteral2(value){var _this=_super.call(this)||this;return _this.value=value,_this.name=JSON.stringify(value),_this._failMsg="is not "+_this.name,_this}return TLiteral2.prototype.getChecker=function(suite,strict){var _this=this;return function(value,ctx){return value===_this.value?!0:ctx.fail(null,_this._failMsg,-1)}},TLiteral2}(TType);exports.TLiteral=TLiteral;function array(typeSpec){return new TArray(parseSpec(typeSpec))}exports.array=array;var TArray=function(_super){__extends(TArray2,_super);function TArray2(ttype){var _this=_super.call(this)||this;return _this.ttype=ttype,_this}return TArray2.prototype.getChecker=function(suite,strict){var itemChecker=this.ttype.getChecker(suite,strict);return function(value,ctx){if(!Array.isArray(value))return ctx.fail(null,"is not an array",0);for(var i=0;i<value.length;i++){var ok=itemChecker(value[i],ctx);if(!ok)return ctx.fail(i,null,1)}return!0}},TArray2}(TType);exports.TArray=TArray;function tuple(){for(var typeSpec=[],_i2=0;_i2<arguments.length;_i2++)typeSpec[_i2]=arguments[_i2];return new TTuple(typeSpec.map(function(t){return parseSpec(t)}))}exports.tuple=tuple;var TTuple=function(_super){__extends(TTuple2,_super);function TTuple2(ttypes){var _this=_super.call(this)||this;return _this.ttypes=ttypes,_this}return TTuple2.prototype.getChecker=function(suite,strict){var itemCheckers=this.ttypes.map(function(t){return t.getChecker(suite,strict)}),checker=function(value,ctx){if(!Array.isArray(value))return ctx.fail(null,"is not an array",0);for(var i=0;i<itemCheckers.length;i++){var ok=itemCheckers[i](value[i],ctx);if(!ok)return ctx.fail(i,null,1)}return!0};return strict?function(value,ctx){return checker(value,ctx)?value.length<=itemCheckers.length?!0:ctx.fail(itemCheckers.length,"is extraneous",2):!1}:checker},TTuple2}(TType);exports.TTuple=TTuple;function union(){for(var typeSpec=[],_i2=0;_i2<arguments.length;_i2++)typeSpec[_i2]=arguments[_i2];return new TUnion(typeSpec.map(function(t){return parseSpec(t)}))}exports.union=union;var TUnion=function(_super){__extends(TUnion2,_super);function TUnion2(ttypes){var _this=_super.call(this)||this;_this.ttypes=ttypes;var names=ttypes.map(function(t){return t instanceof TName||t instanceof TLiteral?t.name:null}).filter(function(n){return n}),otherTypes=ttypes.length-names.length;return names.length?(otherTypes>0&&names.push(otherTypes+" more"),_this._failMsg="is none of "+names.join(", ")):_this._failMsg="is none of "+otherTypes+" types",_this}return TUnion2.prototype.getChecker=function(suite,strict){var _this=this,itemCheckers=this.ttypes.map(function(t){return t.getChecker(suite,strict)});return function(value,ctx){for(var ur=ctx.unionResolver(),i=0;i<itemCheckers.length;i++){var ok=itemCheckers[i](value,ur.createContext());if(ok)return!0}return ctx.resolveUnion(ur),ctx.fail(null,_this._failMsg,0)}},TUnion2}(TType);exports.TUnion=TUnion;function intersection(){for(var typeSpec=[],_i2=0;_i2<arguments.length;_i2++)typeSpec[_i2]=arguments[_i2];return new TIntersection(typeSpec.map(function(t){return parseSpec(t)}))}exports.intersection=intersection;var TIntersection=function(_super){__extends(TIntersection2,_super);function TIntersection2(ttypes){var _this=_super.call(this)||this;return _this.ttypes=ttypes,_this}return TIntersection2.prototype.getChecker=function(suite,strict){var allowedProps=new Set,itemCheckers=this.ttypes.map(function(t){return t.getChecker(suite,strict,allowedProps)});return function(value,ctx){var ok=itemCheckers.every(function(checker){return checker(value,ctx)});return ok?!0:ctx.fail(null,null,0)}},TIntersection2}(TType);exports.TIntersection=TIntersection;function enumtype(values){return new TEnumType(values)}exports.enumtype=enumtype;var TEnumType=function(_super){__extends(TEnumType2,_super);function TEnumType2(members){var _this=_super.call(this)||this;return _this.members=members,_this.validValues=new Set,_this._failMsg="is not a valid enum value",_this.validValues=new Set(Object.keys(members).map(function(name2){return members[name2]})),_this}return TEnumType2.prototype.getChecker=function(suite,strict){var _this=this;return function(value,ctx){return _this.validValues.has(value)?!0:ctx.fail(null,_this._failMsg,0)}},TEnumType2}(TType);exports.TEnumType=TEnumType;function enumlit(name2,prop){return new TEnumLiteral(name2,prop)}exports.enumlit=enumlit;var TEnumLiteral=function(_super){__extends(TEnumLiteral2,_super);function TEnumLiteral2(enumName,prop){var _this=_super.call(this)||this;return _this.enumName=enumName,_this.prop=prop,_this._failMsg="is not "+enumName+"."+prop,_this}return TEnumLiteral2.prototype.getChecker=function(suite,strict){var _this=this,ttype=getNamedType(suite,this.enumName);if(!(ttype instanceof TEnumType))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var val=ttype.members[this.prop];if(!ttype.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(value,ctx){return value===val?!0:ctx.fail(null,_this._failMsg,-1)}},TEnumLiteral2}(TType);exports.TEnumLiteral=TEnumLiteral;function makeIfaceProps(props){return Object.keys(props).map(function(name2){return makeIfaceProp(name2,props[name2])})}function makeIfaceProp(name2,prop){return prop instanceof TOptional?new TProp(name2,prop.ttype,!0):new TProp(name2,parseSpec(prop),!1)}function iface(bases,props){return new TIface(bases,makeIfaceProps(props))}exports.iface=iface;var TIface=function(_super){__extends(TIface2,_super);function TIface2(bases,props){var _this=_super.call(this)||this;return _this.bases=bases,_this.props=props,_this.propSet=new Set(props.map(function(p){return p.name})),_this}return TIface2.prototype.getChecker=function(suite,strict,allowedProps){var _this=this,baseCheckers=this.bases.map(function(b){return getNamedType(suite,b).getChecker(suite,strict)}),propCheckers=this.props.map(function(prop){return prop.ttype.getChecker(suite,strict)}),testCtx=new util_1.NoopContext,isPropRequired=this.props.map(function(prop,i){return!prop.isOpt&&!propCheckers[i](void 0,testCtx)}),checker=function(value,ctx){if(typeof value!="object"||value===null)return ctx.fail(null,"is not an object",0);for(var i=0;i<baseCheckers.length;i++)if(!baseCheckers[i](value,ctx))return!1;for(var i=0;i<propCheckers.length;i++){var name_1=_this.props[i].name,v=value[name_1];if(v===void 0){if(isPropRequired[i])return ctx.fail(name_1,"is missing",1)}else{var ok=propCheckers[i](v,ctx);if(!ok)return ctx.fail(name_1,null,1)}}return!0};if(!strict)return checker;var propSet=this.propSet;return allowedProps&&(this.propSet.forEach(function(prop){return allowedProps.add(prop)}),propSet=allowedProps),function(value,ctx){if(!checker(value,ctx))return!1;for(var prop in value)if(!propSet.has(prop))return ctx.fail(prop,"is extraneous",2);return!0}},TIface2}(TType);exports.TIface=TIface;function opt(typeSpec){return new TOptional(parseSpec(typeSpec))}exports.opt=opt;var TOptional=function(_super){__extends(TOptional2,_super);function TOptional2(ttype){var _this=_super.call(this)||this;return _this.ttype=ttype,_this}return TOptional2.prototype.getChecker=function(suite,strict){var itemChecker=this.ttype.getChecker(suite,strict);return function(value,ctx){return value===void 0||itemChecker(value,ctx)}},TOptional2}(TType);exports.TOptional=TOptional;var TProp=function(){function TProp2(name2,ttype,isOpt){this.name=name2,this.ttype=ttype,this.isOpt=isOpt}return TProp2}();exports.TProp=TProp;function func(resultSpec){for(var params=[],_i2=1;_i2<arguments.length;_i2++)params[_i2-1]=arguments[_i2];return new TFunc(new TParamList(params),parseSpec(resultSpec))}exports.func=func;var TFunc=function(_super){__extends(TFunc2,_super);function TFunc2(paramList,result){var _this=_super.call(this)||this;return _this.paramList=paramList,_this.result=result,_this}return TFunc2.prototype.getChecker=function(suite,strict){return function(value,ctx){return typeof value=="function"?!0:ctx.fail(null,"is not a function",0)}},TFunc2}(TType);exports.TFunc=TFunc;function param(name2,typeSpec,isOpt){return new TParam(name2,parseSpec(typeSpec),Boolean(isOpt))}exports.param=param;var TParam=function(){function TParam2(name2,ttype,isOpt){this.name=name2,this.ttype=ttype,this.isOpt=isOpt}return TParam2}();exports.TParam=TParam;var TParamList=function(_super){__extends(TParamList2,_super);function TParamList2(params){var _this=_super.call(this)||this;return _this.params=params,_this}return TParamList2.prototype.getChecker=function(suite,strict){var _this=this,itemCheckers=this.params.map(function(t){return t.ttype.getChecker(suite,strict)}),testCtx=new util_1.NoopContext,isParamRequired=this.params.map(function(param2,i){return!param2.isOpt&&!itemCheckers[i](void 0,testCtx)}),checker=function(value,ctx){if(!Array.isArray(value))return ctx.fail(null,"is not an array",0);for(var i=0;i<itemCheckers.length;i++){var p=_this.params[i];if(value[i]===void 0){if(isParamRequired[i])return ctx.fail(p.name,"is missing",1)}else{var ok=itemCheckers[i](value[i],ctx);if(!ok)return ctx.fail(p.name,null,1)}}return!0};return strict?function(value,ctx){return checker(value,ctx)?value.length<=itemCheckers.length?!0:ctx.fail(itemCheckers.length,"is extraneous",2):!1}:checker},TParamList2}(TType);exports.TParamList=TParamList;var BasicType=function(_super){__extends(BasicType2,_super);function BasicType2(validator,message){var _this=_super.call(this)||this;return _this.validator=validator,_this.message=message,_this}return BasicType2.prototype.getChecker=function(suite,strict){var _this=this;return function(value,ctx){return _this.validator(value)?!0:ctx.fail(null,_this.message,0)}},BasicType2}(TType);exports.BasicType=BasicType,exports.basicTypes={any:new BasicType(function(v){return!0},"is invalid"),number:new BasicType(function(v){return typeof v=="number"},"is not a number"),object:new BasicType(function(v){return typeof v=="object"&&v},"is not an object"),boolean:new BasicType(function(v){return typeof v=="boolean"},"is not a boolean"),string:new BasicType(function(v){return typeof v=="string"},"is not a string"),symbol:new BasicType(function(v){return typeof v=="symbol"},"is not a symbol"),void:new BasicType(function(v){return v==null},"is not void"),undefined:new BasicType(function(v){return v===void 0},"is not undefined"),null:new BasicType(function(v){return v===null},"is not null"),never:new BasicType(function(v){return!1},"is unexpected"),Date:new BasicType(getIsNativeChecker("[object Date]"),"is not a Date"),RegExp:new BasicType(getIsNativeChecker("[object RegExp]"),"is not a RegExp")};var nativeToString=Object.prototype.toString;function getIsNativeChecker(tag){return function(v){return typeof v=="object"&&v&&nativeToString.call(v)===tag}}typeof Buffer<"u"&&(exports.basicTypes.Buffer=new BasicType(function(v){return Buffer.isBuffer(v)},"is not a Buffer"));for(var _loop_1=function(array_12){exports.basicTypes[array_12.name]=new BasicType(function(v){return v instanceof array_12},"is not a "+array_12.name)},_i=0,_a=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];_i<_a.length;_i++){var array_1=_a[_i];_loop_1(array_1)}},44725:function(__unused_webpack_module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(d,b){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d2,b2){d2.__proto__=b2}||function(d2,b2){for(var p in b2)b2.hasOwnProperty(p)&&(d2[p]=b2[p])},extendStatics(d,b)};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.DetailContext=exports.NoopContext=exports.VError=void 0;var VError=function(_super){__extends(VError2,_super);function VError2(path,message){var _this=_super.call(this,message)||this;return _this.path=path,Object.setPrototypeOf(_this,VError2.prototype),_this}return VError2}(Error);exports.VError=VError;var NoopContext=function(){function NoopContext2(){}return NoopContext2.prototype.fail=function(relPath,message,score){return!1},NoopContext2.prototype.unionResolver=function(){return this},NoopContext2.prototype.createContext=function(){return this},NoopContext2.prototype.resolveUnion=function(ur){},NoopContext2}();exports.NoopContext=NoopContext;var DetailContext=function(){function DetailContext2(){this._propNames=[""],this._messages=[null],this._score=0}return DetailContext2.prototype.fail=function(relPath,message,score){return this._propNames.push(relPath),this._messages.push(message),this._score+=score,!1},DetailContext2.prototype.unionResolver=function(){return new DetailUnionResolver},DetailContext2.prototype.resolveUnion=function(unionResolver){for(var _a,_b,u=unionResolver,best=null,_i=0,_c=u.contexts;_i<_c.length;_i++){var ctx=_c[_i];(!best||ctx._score>=best._score)&&(best=ctx)}best&&best._score>0&&((_a=this._propNames).push.apply(_a,best._propNames),(_b=this._messages).push.apply(_b,best._messages))},DetailContext2.prototype.getError=function(path){for(var msgParts=[],i=this._propNames.length-1;i>=0;i--){var p=this._propNames[i];path+=typeof p=="number"?"["+p+"]":p?"."+p:"";var m=this._messages[i];m&&msgParts.push(path+" "+m)}return new VError(path,msgParts.join("; "))},DetailContext2.prototype.getErrorDetail=function(path){for(var details=[],i=this._propNames.length-1;i>=0;i--){var p=this._propNames[i];path+=typeof p=="number"?"["+p+"]":p?"."+p:"";var message=this._messages[i];message&&details.push({path,message})}for(var detail=null,i=details.length-1;i>=0;i--)detail&&(details[i].nested=[detail]),detail=details[i];return detail},DetailContext2}();exports.DetailContext=DetailContext;var DetailUnionResolver=function(){function DetailUnionResolver2(){this.contexts=[]}return DetailUnionResolver2.prototype.createContext=function(){var ctx=new DetailContext;return this.contexts.push(ctx),ctx},DetailUnionResolver2}()},93191:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;(function(window2,undefined2){"use strict";var LIBVERSION="1.0.39",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded",UA_MAX_LENGTH=500,AMAZON="Amazon",APPLE="Apple",ASUS="ASUS",BLACKBERRY="BlackBerry",BROWSER="Browser",CHROME="Chrome",EDGE="Edge",FIREFOX="Firefox",GOOGLE="Google",HUAWEI="Huawei",LG="LG",MICROSOFT="Microsoft",MOTOROLA="Motorola",OPERA="Opera",SAMSUNG="Samsung",SHARP="Sharp",SONY="Sony",XIAOMI="Xiaomi",ZEBRA="Zebra",FACEBOOK="Facebook",CHROMIUM_OS="Chromium OS",MAC_OS="Mac OS",SUFFIX_BROWSER=" Browser",extend=function(regexes2,extensions){var mergedRegexes={};for(var i in regexes2)extensions[i]&&extensions[i].length%2===0?mergedRegexes[i]=extensions[i].concat(regexes2[i]):mergedRegexes[i]=regexes2[i];return mergedRegexes},enumerize=function(arr){for(var enums={},i=0;i<arr.length;i++)enums[arr[i].toUpperCase()]=arr[i];return enums},has=function(str1,str2){return typeof str1===STR_TYPE?lowerize(str2).indexOf(lowerize(str1))!==-1:!1},lowerize=function(str){return str.toLowerCase()},majorize=function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,EMPTY).split(".")[0]:undefined2},trim=function(str,len){if(typeof str===STR_TYPE)return str=str.replace(/^\s\s*/,EMPTY),typeof len===UNDEF_TYPE?str:str.substring(0,UA_MAX_LENGTH)},rgxMapper=function(ua,arrays){for(var i=0,j,k,p,q,matches,match;i<arrays.length&&!matches;){var regex=arrays[i],props=arrays[i+1];for(j=k=0;j<regex.length&&!matches&®ex[j];)if(matches=regex[j++].exec(ua),matches)for(p=0;p<props.length;p++)match=matches[++k],q=props[p],typeof q===OBJ_TYPE&&q.length>0?q.length===2?typeof q[1]==FUNC_TYPE?this[q[0]]=q[1].call(this,match):this[q[0]]=q[1]:q.length===3?typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)?this[q[0]]=match?q[1].call(this,match,q[2]):undefined2:this[q[0]]=match?match.replace(q[1],q[2]):undefined2:q.length===4&&(this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined2):this[q]=match||undefined2;i+=2}},strMapper=function(str,map){for(var i in map)if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j<map[i].length;j++)if(has(map[i][j],str))return i===UNKNOWN?undefined2:i}else if(has(map[i],str))return i===UNKNOWN?undefined2:i;return map.hasOwnProperty("*")?map["*"]:str},oldSafariMap={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},windowsVersionMap={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0","2000":"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0","7":"NT 6.1","8":"NT 6.2","8.1":"NT 6.3","10":["NT 6.4","NT 10.0"],RT:"ARM"},regexes={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[VERSION,[NAME,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[VERSION,[NAME,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[NAME,VERSION],[/opios[\/ ]+([\w\.]+)/i],[VERSION,[NAME,OPERA+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" GX"]],[/\bopr\/([\w\.]+)/i],[VERSION,[NAME,OPERA]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[VERSION,[NAME,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[NAME,VERSION],[/quark(?:pc)?\/([-\w\.]+)/i],[VERSION,[NAME,"Quark"]],[/\bddg\/([\w\.]+)/i],[VERSION,[NAME,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[VERSION,[NAME,"UC"+BROWSER]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[VERSION,[NAME,"WeChat"]],[/konqueror\/([\w\.]+)/i],[VERSION,[NAME,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[VERSION,[NAME,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[VERSION,[NAME,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[VERSION,[NAME,"Smart Lenovo "+BROWSER]],[/(avast|avg)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 Secure "+BROWSER],VERSION],[/\bfocus\/([\w\.]+)/i],[VERSION,[NAME,FIREFOX+" Focus"]],[/\bopt\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[VERSION,[NAME,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[VERSION,[NAME,"Dolphin"]],[/coast\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[VERSION,[NAME,"MIUI "+BROWSER]],[/fxios\/([-\w\.]+)/i],[VERSION,[NAME,FIREFOX]],[/\bqihu|(qi?ho?o?|360)browser/i],[[NAME,"360"+SUFFIX_BROWSER]],[/\b(qq)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1Browser"],VERSION],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[NAME,/(.+)/,"$1"+SUFFIX_BROWSER],VERSION],[/samsungbrowser\/([\w\.]+)/i],[VERSION,[NAME,SAMSUNG+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[NAME,/_/g," "],VERSION],[/metasr[\/ ]?([\d\.]+)/i],[VERSION,[NAME,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[NAME,"Sogou Mobile"],VERSION],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[NAME,VERSION],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[NAME],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[NAME,FACEBOOK],VERSION],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[NAME,VERSION],[/\bgsa\/([\w\.]+) .*safari\//i],[VERSION,[NAME,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[VERSION,[NAME,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[VERSION,[NAME,CHROME+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[NAME,CHROME+" WebView"],VERSION],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[VERSION,[NAME,"Android "+BROWSER]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[NAME,VERSION],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[VERSION,[NAME,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[VERSION,NAME],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[NAME,[VERSION,strMapper,oldSafariMap]],[/(webkit|khtml)\/([\w\.]+)/i],[NAME,VERSION],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[NAME,"Netscape"],VERSION],[/(wolvic)\/([\w\.]+)/i],[NAME,VERSION],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[VERSION,[NAME,FIREFOX+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[NAME,[VERSION,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[NAME,[VERSION,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[ARCHITECTURE,"amd64"]],[/(ia32(?=;))/i],[[ARCHITECTURE,lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[ARCHITECTURE,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[ARCHITECTURE,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[ARCHITECTURE,"armhf"]],[/windows (ce|mobile); ppc;/i],[[ARCHITECTURE,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[ARCHITECTURE,/ower/,EMPTY,lowerize]],[/(sun4\w)[;\)]/i],[[ARCHITECTURE,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[ARCHITECTURE,lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,TABLET]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,MOBILE]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[MODEL,[VENDOR,APPLE],[TYPE,MOBILE]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[MODEL,[VENDOR,APPLE],[TYPE,TABLET]],[/(macintosh);/i],[MODEL,[VENDOR,APPLE]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[MODEL,[VENDOR,SHARP],[TYPE,MOBILE]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,TABLET]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,MOBILE]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,MOBILE]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,TABLET]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[MODEL,[VENDOR,"OPPO"],[TYPE,MOBILE]],[/\b(opd2\d{3}a?) bui/i],[MODEL,[VENDOR,"OPPO"],[TYPE,TABLET]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[MODEL,[VENDOR,"Vivo"],[TYPE,MOBILE]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[MODEL,[VENDOR,"Realme"],[TYPE,MOBILE]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[MODEL,[VENDOR,MOTOROLA],[TYPE,MOBILE]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[MODEL,[VENDOR,MOTOROLA],[TYPE,TABLET]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[MODEL,[VENDOR,LG],[TYPE,TABLET]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[MODEL,[VENDOR,LG],[TYPE,MOBILE]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[MODEL,[VENDOR,"Lenovo"],[TYPE,TABLET]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[MODEL,/_/g," "],[VENDOR,"Nokia"],[TYPE,MOBILE]],[/(pixel c)\b/i],[MODEL,[VENDOR,GOOGLE],[TYPE,TABLET]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[MODEL,[VENDOR,GOOGLE],[TYPE,MOBILE]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[MODEL,[VENDOR,SONY],[TYPE,MOBILE]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[MODEL,"Xperia Tablet"],[VENDOR,SONY],[TYPE,TABLET]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[MODEL,[VENDOR,"OnePlus"],[TYPE,MOBILE]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[MODEL,[VENDOR,AMAZON],[TYPE,TABLET]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[MODEL,/(.+)/g,"Fire Phone $1"],[VENDOR,AMAZON],[TYPE,MOBILE]],[/(playbook);[-\w\),; ]+(rim)/i],[MODEL,VENDOR,[TYPE,TABLET]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[MODEL,[VENDOR,BLACKBERRY],[TYPE,MOBILE]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[MODEL,[VENDOR,ASUS],[TYPE,TABLET]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[MODEL,[VENDOR,ASUS],[TYPE,MOBILE]],[/(nexus 9)/i],[MODEL,[VENDOR,"HTC"],[TYPE,TABLET]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[VENDOR,[MODEL,/_/g," "],[TYPE,MOBILE]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[MODEL,[VENDOR,"TCL"],[TYPE,TABLET]],[/(itel) ((\w+))/i],[[VENDOR,lowerize],MODEL,[TYPE,strMapper,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[MODEL,[VENDOR,"Acer"],[TYPE,TABLET]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[MODEL,[VENDOR,"Meizu"],[TYPE,MOBILE]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[MODEL,[VENDOR,"Ulefone"],[TYPE,MOBILE]],[/droid.+; (a(?:015|06[35]|142p?))/i],[MODEL,[VENDOR,"Nothing"],[TYPE,MOBILE]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(surface duo)/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,TABLET]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[MODEL,[VENDOR,"Fairphone"],[TYPE,MOBILE]],[/(u304aa)/i],[MODEL,[VENDOR,"AT&T"],[TYPE,MOBILE]],[/\bsie-(\w*)/i],[MODEL,[VENDOR,"Siemens"],[TYPE,MOBILE]],[/\b(rct\w+) b/i],[MODEL,[VENDOR,"RCA"],[TYPE,TABLET]],[/\b(venue[\d ]{2,7}) b/i],[MODEL,[VENDOR,"Dell"],[TYPE,TABLET]],[/\b(q(?:mv|ta)\w+) b/i],[MODEL,[VENDOR,"Verizon"],[TYPE,TABLET]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[MODEL,[VENDOR,"Barnes & Noble"],[TYPE,TABLET]],[/\b(tm\d{3}\w+) b/i],[MODEL,[VENDOR,"NuVision"],[TYPE,TABLET]],[/\b(k88) b/i],[MODEL,[VENDOR,"ZTE"],[TYPE,TABLET]],[/\b(nx\d{3}j) b/i],[MODEL,[VENDOR,"ZTE"],[TYPE,MOBILE]],[/\b(gen\d{3}) b.+49h/i],[MODEL,[VENDOR,"Swiss"],[TYPE,MOBILE]],[/\b(zur\d{3}) b/i],[MODEL,[VENDOR,"Swiss"],[TYPE,TABLET]],[/\b((zeki)?tb.*\b) b/i],[MODEL,[VENDOR,"Zeki"],[TYPE,TABLET]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[VENDOR,"Dragon Touch"],MODEL,[TYPE,TABLET]],[/\b(ns-?\w{0,9}) b/i],[MODEL,[VENDOR,"Insignia"],[TYPE,TABLET]],[/\b((nxa|next)-?\w{0,9}) b/i],[MODEL,[VENDOR,"NextBook"],[TYPE,TABLET]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[VENDOR,"Voice"],MODEL,[TYPE,MOBILE]],[/\b(lvtel\-)?(v1[12]) b/i],[[VENDOR,"LvTel"],MODEL,[TYPE,MOBILE]],[/\b(ph-1) /i],[MODEL,[VENDOR,"Essential"],[TYPE,MOBILE]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[MODEL,[VENDOR,"Envizen"],[TYPE,TABLET]],[/\b(trio[-\w\. ]+) b/i],[MODEL,[VENDOR,"MachSpeed"],[TYPE,TABLET]],[/\btu_(1491) b/i],[MODEL,[VENDOR,"Rotor"],[TYPE,TABLET]],[/(shield[\w ]+) b/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,TABLET]],[/(sprint) (\w+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kin\.[onetw]{3})/i],[[MODEL,/\./g," "],[VENDOR,MICROSOFT],[TYPE,MOBILE]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,TABLET]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,MOBILE]],[/smart-tv.+(samsung)/i],[VENDOR,[TYPE,SMARTTV]],[/hbbtv.+maple;(\d+)/i],[[MODEL,/^/,"SmartTV"],[VENDOR,SAMSUNG],[TYPE,SMARTTV]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[VENDOR,LG],[TYPE,SMARTTV]],[/(apple) ?tv/i],[VENDOR,[MODEL,APPLE+" TV"],[TYPE,SMARTTV]],[/crkey/i],[[MODEL,CHROME+"cast"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/droid.+aft(\w+)( bui|\))/i],[MODEL,[VENDOR,AMAZON],[TYPE,SMARTTV]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[MODEL,[VENDOR,SHARP],[TYPE,SMARTTV]],[/(bravia[\w ]+)( bui|\))/i],[MODEL,[VENDOR,SONY],[TYPE,SMARTTV]],[/(mitv-\w{5}) bui/i],[MODEL,[VENDOR,XIAOMI],[TYPE,SMARTTV]],[/Hbbtv.*(technisat) (.*);/i],[VENDOR,MODEL,[TYPE,SMARTTV]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[VENDOR,trim],[MODEL,trim],[TYPE,SMARTTV]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[TYPE,SMARTTV]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[VENDOR,MODEL,[TYPE,CONSOLE]],[/droid.+; (shield) bui/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,CONSOLE]],[/(playstation [345portablevi]+)/i],[MODEL,[VENDOR,SONY],[TYPE,CONSOLE]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,CONSOLE]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,WEARABLE]],[/((pebble))app/i],[VENDOR,MODEL,[TYPE,WEARABLE]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[MODEL,[VENDOR,APPLE],[TYPE,WEARABLE]],[/droid.+; (glass) \d/i],[MODEL,[VENDOR,GOOGLE],[TYPE,WEARABLE]],[/droid.+; (wt63?0{2,3})\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,WEARABLE]],[/(quest( \d| pro)?)/i],[MODEL,[VENDOR,FACEBOOK],[TYPE,WEARABLE]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[VENDOR,[TYPE,EMBEDDED]],[/(aeobc)\b/i],[MODEL,[VENDOR,AMAZON],[TYPE,EMBEDDED]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[MODEL,[TYPE,MOBILE]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[MODEL,[TYPE,TABLET]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[TYPE,TABLET]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[TYPE,MOBILE]],[/(android[-\w\. ]{0,9});.+buil/i],[MODEL,[VENDOR,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[VERSION,[NAME,EDGE+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[VERSION,[NAME,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[NAME,VERSION],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[VERSION,NAME]],os:[[/microsoft (windows) (vista|xp)/i],[NAME,VERSION],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[NAME,[VERSION,strMapper,windowsVersionMap]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[VERSION,strMapper,windowsVersionMap],[NAME,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[VERSION,/_/g,"."],[NAME,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[NAME,MAC_OS],[VERSION,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[VERSION,NAME],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[NAME,VERSION],[/\(bb(10);/i],[VERSION,[NAME,BLACKBERRY]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[VERSION,[NAME,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[VERSION,[NAME,FIREFOX+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[VERSION,[NAME,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[VERSION,[NAME,"watchOS"]],[/crkey\/([\d\.]+)/i],[VERSION,[NAME,CHROME+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[NAME,CHROMIUM_OS],VERSION],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[NAME,VERSION],[/(sunos) ?([\w\.\d]*)/i],[[NAME,"Solaris"],VERSION],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[NAME,VERSION]]},UAParser=function(ua,extensions){if(typeof ua===OBJ_TYPE&&(extensions=ua,ua=undefined2),!(this instanceof UAParser))return new UAParser(ua,extensions).getResult();var _navigator=typeof window2!==UNDEF_TYPE&&window2.navigator?window2.navigator:undefined2,_ua=ua||(_navigator&&_navigator.userAgent?_navigator.userAgent:EMPTY),_uach=_navigator&&_navigator.userAgentData?_navigator.userAgentData:undefined2,_rgxmap=extensions?extend(regexes,extensions):regexes,_isSelfNav=_navigator&&_navigator.userAgent==_ua;return this.getBrowser=function(){var _browser={};return _browser[NAME]=undefined2,_browser[VERSION]=undefined2,rgxMapper.call(_browser,_ua,_rgxmap.browser),_browser[MAJOR]=majorize(_browser[VERSION]),_isSelfNav&&_navigator&&_navigator.brave&&typeof _navigator.brave.isBrave==FUNC_TYPE&&(_browser[NAME]="Brave"),_browser},this.getCPU=function(){var _cpu={};return _cpu[ARCHITECTURE]=undefined2,rgxMapper.call(_cpu,_ua,_rgxmap.cpu),_cpu},this.getDevice=function(){var _device={};return _device[VENDOR]=undefined2,_device[MODEL]=undefined2,_device[TYPE]=undefined2,rgxMapper.call(_device,_ua,_rgxmap.device),_isSelfNav&&!_device[TYPE]&&_uach&&_uach.mobile&&(_device[TYPE]=MOBILE),_isSelfNav&&_device[MODEL]=="Macintosh"&&_navigator&&typeof _navigator.standalone!==UNDEF_TYPE&&_navigator.maxTouchPoints&&_navigator.maxTouchPoints>2&&(_device[MODEL]="iPad",_device[TYPE]=TABLET),_device},this.getEngine=function(){var _engine={};return _engine[NAME]=undefined2,_engine[VERSION]=undefined2,rgxMapper.call(_engine,_ua,_rgxmap.engine),_engine},this.getOS=function(){var _os={};return _os[NAME]=undefined2,_os[VERSION]=undefined2,rgxMapper.call(_os,_ua,_rgxmap.os),_isSelfNav&&!_os[NAME]&&_uach&&_uach.platform&&_uach.platform!="Unknown"&&(_os[NAME]=_uach.platform.replace(/chrome os/i,CHROMIUM_OS).replace(/macos/i,MAC_OS)),_os},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return _ua},this.setUA=function(ua2){return _ua=typeof ua2===STR_TYPE&&ua2.length>UA_MAX_LENGTH?trim(ua2,UA_MAX_LENGTH):ua2,this},this.setUA(_ua),this};UAParser.VERSION=LIBVERSION,UAParser.BROWSER=enumerize([NAME,VERSION,MAJOR]),UAParser.CPU=enumerize([ARCHITECTURE]),UAParser.DEVICE=enumerize([MODEL,VENDOR,TYPE,CONSOLE,MOBILE,SMARTTV,TABLET,WEARABLE,EMBEDDED]),UAParser.ENGINE=UAParser.OS=enumerize([NAME,VERSION]),typeof exports!==UNDEF_TYPE?(UNDEF_TYPE!=="object"&&module.exports&&(exports=module.exports=UAParser),exports.UAParser=UAParser):FUNC_TYPE==="function"&&__webpack_require__.amdO?(__WEBPACK_AMD_DEFINE_RESULT__=function(){return UAParser}.call(exports,__webpack_require__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==undefined2&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)):typeof window2!==UNDEF_TYPE&&(window2.UAParser=UAParser);var $=typeof window2!==UNDEF_TYPE&&(window2.jQuery||window2.Zepto);if($&&!$.ua){var parser=new UAParser;$.ua=parser.getResult(),$.ua.get=function(){return parser.getUA()},$.ua.set=function(ua){parser.setUA(ua);var result=parser.getResult();for(var prop in result)$.ua[prop]=result[prop]}}})(typeof window=="object"?window:this)},52296:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var required=__webpack_require__(41384),qs=__webpack_require__(98878),controlOrWhitespace=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,CRHTLF=/[\n\r\t]/g,slashes=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,port=/:\d+$/,protocolre=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,windowsDriveLetter=/^[a-zA-Z]:/;function trimLeft(str){return(str||"").toString().replace(controlOrWhitespace,"")}var rules=[["#","hash"],["?","query"],function(address,url){return isSpecial(url.protocol)?address.replace(/\\/g,"/"):address},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ignore={hash:1,query:1};function lolcation(loc){var globalVar;typeof window<"u"?globalVar=window:typeof __webpack_require__.g<"u"?globalVar=__webpack_require__.g:typeof self<"u"?globalVar=self:globalVar={};var location=globalVar.location||{};loc=loc||location;var finaldestination={},type=typeof loc,key;if(loc.protocol==="blob:")finaldestination=new Url(unescape(loc.pathname),{});else if(type==="string"){finaldestination=new Url(loc,{});for(key in ignore)delete finaldestination[key]}else if(type==="object"){for(key in loc)key in ignore||(finaldestination[key]=loc[key]);finaldestination.slashes===void 0&&(finaldestination.slashes=slashes.test(loc.href))}return finaldestination}function isSpecial(scheme){return scheme==="file:"||scheme==="ftp:"||scheme==="http:"||scheme==="https:"||scheme==="ws:"||scheme==="wss:"}function extractProtocol(address,location){address=trimLeft(address),address=address.replace(CRHTLF,""),location=location||{};var match=protocolre.exec(address),protocol=match[1]?match[1].toLowerCase():"",forwardSlashes=!!match[2],otherSlashes=!!match[3],slashesCount=0,rest;return forwardSlashes?otherSlashes?(rest=match[2]+match[3]+match[4],slashesCount=match[2].length+match[3].length):(rest=match[2]+match[4],slashesCount=match[2].length):otherSlashes?(rest=match[3]+match[4],slashesCount=match[3].length):rest=match[4],protocol==="file:"?slashesCount>=2&&(rest=rest.slice(2)):isSpecial(protocol)?rest=match[4]:protocol?forwardSlashes&&(rest=rest.slice(2)):slashesCount>=2&&isSpecial(location.protocol)&&(rest=match[4]),{protocol,slashes:forwardSlashes||isSpecial(protocol),slashesCount,rest}}function resolve(relative,base){if(relative==="")return base;for(var path=(base||"/").split("/").slice(0,-1).concat(relative.split("/")),i=path.length,last=path[i-1],unshift=!1,up=0;i--;)path[i]==="."?path.splice(i,1):path[i]===".."?(path.splice(i,1),up++):up&&(i===0&&(unshift=!0),path.splice(i,1),up--);return unshift&&path.unshift(""),(last==="."||last==="..")&&path.push(""),path.join("/")}function Url(address,location,parser){if(address=trimLeft(address),address=address.replace(CRHTLF,""),!(this instanceof Url))return new Url(address,location,parser);var relative,extracted,parse,instruction,index,key,instructions=rules.slice(),type=typeof location,url=this,i=0;for(type!=="object"&&type!=="string"&&(parser=location,location=null),parser&&typeof parser!="function"&&(parser=qs.parse),location=lolcation(location),extracted=extractProtocol(address||"",location),relative=!extracted.protocol&&!extracted.slashes,url.slashes=extracted.slashes||relative&&location.slashes,url.protocol=extracted.protocol||location.protocol||"",address=extracted.rest,(extracted.protocol==="file:"&&(extracted.slashesCount!==2||windowsDriveLetter.test(address))||!extracted.slashes&&(extracted.protocol||extracted.slashesCount<2||!isSpecial(url.protocol)))&&(instructions[3]=[/(.*)/,"pathname"]);i<instructions.length;i++){if(instruction=instructions[i],typeof instruction=="function"){address=instruction(address,url);continue}parse=instruction[0],key=instruction[1],parse!==parse?url[key]=address:typeof parse=="string"?(index=parse==="@"?address.lastIndexOf(parse):address.indexOf(parse),~index&&(typeof instruction[2]=="number"?(url[key]=address.slice(0,index),address=address.slice(index+instruction[2])):(url[key]=address.slice(index),address=address.slice(0,index)))):(index=parse.exec(address))&&(url[key]=index[1],address=address.slice(0,index.index)),url[key]=url[key]||relative&&instruction[3]&&location[key]||"",instruction[4]&&(url[key]=url[key].toLowerCase())}parser&&(url.query=parser(url.query)),relative&&location.slashes&&url.pathname.charAt(0)!=="/"&&(url.pathname!==""||location.pathname!=="")&&(url.pathname=resolve(url.pathname,location.pathname)),url.pathname.charAt(0)!=="/"&&isSpecial(url.protocol)&&(url.pathname="/"+url.pathname),required(url.port,url.protocol)||(url.host=url.hostname,url.port=""),url.username=url.password="",url.auth&&(index=url.auth.indexOf(":"),~index?(url.username=url.auth.slice(0,index),url.username=encodeURIComponent(decodeURIComponent(url.username)),url.password=url.auth.slice(index+1),url.password=encodeURIComponent(decodeURIComponent(url.password))):url.username=encodeURIComponent(decodeURIComponent(url.auth)),url.auth=url.password?url.username+":"+url.password:url.username),url.origin=url.protocol!=="file:"&&isSpecial(url.protocol)&&url.host?url.protocol+"//"+url.host:"null",url.href=url.toString()}function set(part,value,fn){var url=this;switch(part){case"query":typeof value=="string"&&value.length&&(value=(fn||qs.parse)(value)),url[part]=value;break;case"port":url[part]=value,required(value,url.protocol)?value&&(url.host=url.hostname+":"+value):(url.host=url.hostname,url[part]="");break;case"hostname":url[part]=value,url.port&&(value+=":"+url.port),url.host=value;break;case"host":url[part]=value,port.test(value)?(value=value.split(":"),url.port=value.pop(),url.hostname=value.join(":")):(url.hostname=value,url.port="");break;case"protocol":url.protocol=value.toLowerCase(),url.slashes=!fn;break;case"pathname":case"hash":if(value){var char=part==="pathname"?"/":"#";url[part]=value.charAt(0)!==char?char+value:value}else url[part]=value;break;case"username":case"password":url[part]=encodeURIComponent(value);break;case"auth":var index=value.indexOf(":");~index?(url.username=value.slice(0,index),url.username=encodeURIComponent(decodeURIComponent(url.username)),url.password=value.slice(index+1),url.password=encodeURIComponent(decodeURIComponent(url.password))):url.username=encodeURIComponent(decodeURIComponent(value))}for(var i=0;i<rules.length;i++){var ins=rules[i];ins[4]&&(url[ins[1]]=url[ins[1]].toLowerCase())}return url.auth=url.password?url.username+":"+url.password:url.username,url.origin=url.protocol!=="file:"&&isSpecial(url.protocol)&&url.host?url.protocol+"//"+url.host:"null",url.href=url.toString(),url}function toString(stringify){(!stringify||typeof stringify!="function")&&(stringify=qs.stringify);var query,url=this,host=url.host,protocol=url.protocol;protocol&&protocol.charAt(protocol.length-1)!==":"&&(protocol+=":");var result=protocol+(url.protocol&&url.slashes||isSpecial(url.protocol)?"//":"");return url.username?(result+=url.username,url.password&&(result+=":"+url.password),result+="@"):url.password?(result+=":"+url.password,result+="@"):url.protocol!=="file:"&&isSpecial(url.protocol)&&!host&&url.pathname!=="/"&&(result+="@"),(host[host.length-1]===":"||port.test(url.hostname)&&!url.port)&&(host+=":"),result+=host+url.pathname,query=typeof url.query=="object"?stringify(url.query):url.query,query&&(result+=query.charAt(0)!=="?"?"?"+query:query),url.hash&&(result+=url.hash),result}Url.prototype={set,toString},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=qs,module.exports=Url},46393:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var __webpack_unused_export__,punycode=__webpack_require__(87004);function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r",`
|
|
370
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var innerHTML=function(){return"innerHTML"};function dangerouslySetInnerHTML(element,html){element[innerHTML()]=html}function createArrowElement(value){var arrow2=div();return value===!0?arrow2.className=ARROW_CLASS:(arrow2.className=SVG_ARROW_CLASS,tippy_esm_isElement(value)?arrow2.appendChild(value):dangerouslySetInnerHTML(arrow2,value)),arrow2}function setContent(content,props){tippy_esm_isElement(props.content)?(dangerouslySetInnerHTML(content,""),content.appendChild(props.content)):typeof props.content!="function"&&(props.allowHTML?dangerouslySetInnerHTML(content,props.content):content.textContent=props.content)}function getChildren(popper2){var box=popper2.firstElementChild,boxChildren=arrayFrom(box.children);return{box,content:boxChildren.find(function(node){return node.classList.contains(CONTENT_CLASS)}),arrow:boxChildren.find(function(node){return node.classList.contains(ARROW_CLASS)||node.classList.contains(SVG_ARROW_CLASS)}),backdrop:boxChildren.find(function(node){return node.classList.contains(BACKDROP_CLASS)})}}function render(instance){var popper2=div(),box=div();box.className=BOX_CLASS,box.setAttribute("data-state","hidden"),box.setAttribute("tabindex","-1");var content=div();content.className=CONTENT_CLASS,content.setAttribute("data-state","hidden"),setContent(content,instance.props),popper2.appendChild(box),box.appendChild(content),onUpdate(instance.props,instance.props);function onUpdate(prevProps,nextProps){var _getChildren=getChildren(popper2),box2=_getChildren.box,content2=_getChildren.content,arrow2=_getChildren.arrow;nextProps.theme?box2.setAttribute("data-theme",nextProps.theme):box2.removeAttribute("data-theme"),typeof nextProps.animation=="string"?box2.setAttribute("data-animation",nextProps.animation):box2.removeAttribute("data-animation"),nextProps.inertia?box2.setAttribute("data-inertia",""):box2.removeAttribute("data-inertia"),box2.style.maxWidth=typeof nextProps.maxWidth=="number"?nextProps.maxWidth+"px":nextProps.maxWidth,nextProps.role?box2.setAttribute("role",nextProps.role):box2.removeAttribute("role"),(prevProps.content!==nextProps.content||prevProps.allowHTML!==nextProps.allowHTML)&&setContent(content2,instance.props),nextProps.arrow?arrow2?prevProps.arrow!==nextProps.arrow&&(box2.removeChild(arrow2),box2.appendChild(createArrowElement(nextProps.arrow))):box2.appendChild(createArrowElement(nextProps.arrow)):arrow2&&box2.removeChild(arrow2)}return{popper:popper2,onUpdate}}render.$$tippy=!0;var idCounter=1,mouseMoveListeners=[],mountedInstances=[];function createTippy(reference2,passedProps){var props=evaluateProps(reference2,Object.assign({},defaultProps,{},getExtendedPassedProps(removeUndefinedProps(passedProps)))),showTimeout,hideTimeout,scheduleHideAnimationFrame,isVisibleFromClick=!1,didHideDueToDocumentMouseDown=!1,didTouchMove=!1,ignoreOnFirstUpdate=!1,lastTriggerEvent,currentTransitionEndListener,onFirstUpdate,listeners=[],debouncedOnMouseMove=tippy_esm_debounce(onMouseMove,props.interactiveDebounce),currentTarget,id=idCounter++,popperInstance=null,plugins=unique(props.plugins),state={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},instance={id,reference:reference2,popper:div(),popperInstance,props,state,plugins,clearDelayTimeouts,setProps,setContent:setContent2,show,hide:hide2,hideWithInteractivity,enable,disable,unmount,destroy};if(!props.render)return instance;var _props$render=props.render(instance),popper2=_props$render.popper,onUpdate=_props$render.onUpdate;popper2.setAttribute("data-tippy-root",""),popper2.id="tippy-"+instance.id,instance.popper=popper2,reference2._tippy=instance,popper2._tippy=instance;var pluginsHooks=plugins.map(function(plugin){return plugin.fn(instance)}),hasAriaExpanded=reference2.hasAttribute("aria-expanded");return addListeners(),handleAriaExpandedAttribute(),handleStyles(),invokeHook("onCreate",[instance]),props.showOnCreate&&scheduleShow(),popper2.addEventListener("mouseenter",function(){instance.props.interactive&&instance.state.isVisible&&instance.clearDelayTimeouts()}),popper2.addEventListener("mouseleave",function(event){instance.props.interactive&&instance.props.trigger.indexOf("mouseenter")>=0&&(getDocument().addEventListener("mousemove",debouncedOnMouseMove),debouncedOnMouseMove(event))}),instance;function getNormalizedTouchSettings(){var touch=instance.props.touch;return Array.isArray(touch)?touch:[touch,0]}function getIsCustomTouchBehavior(){return getNormalizedTouchSettings()[0]==="hold"}function getIsDefaultRenderFn(){var _instance$props$rende;return!!((_instance$props$rende=instance.props.render)!=null&&_instance$props$rende.$$tippy)}function getCurrentTarget(){return currentTarget||reference2}function getDocument(){var parent2=getCurrentTarget().parentNode;return parent2?getOwnerDocument(parent2):document}function getDefaultTemplateChildren(){return getChildren(popper2)}function getDelay(isShow){return instance.state.isMounted&&!instance.state.isVisible||currentInput.isTouch||lastTriggerEvent&&lastTriggerEvent.type==="focus"?0:getValueAtIndexOrReturn(instance.props.delay,isShow?0:1,defaultProps.delay)}function handleStyles(){popper2.style.pointerEvents=instance.props.interactive&&instance.state.isVisible?"":"none",popper2.style.zIndex=""+instance.props.zIndex}function invokeHook(hook,args,shouldInvokePropsHook){if(shouldInvokePropsHook===void 0&&(shouldInvokePropsHook=!0),pluginsHooks.forEach(function(pluginHooks){pluginHooks[hook]&&pluginHooks[hook].apply(void 0,args)}),shouldInvokePropsHook){var _instance$props;(_instance$props=instance.props)[hook].apply(_instance$props,args)}}function handleAriaContentAttribute(){var aria=instance.props.aria;if(!!aria.content){var attr="aria-"+aria.content,id2=popper2.id,nodes=normalizeToArray(instance.props.triggerTarget||reference2);nodes.forEach(function(node){var currentValue=node.getAttribute(attr);if(instance.state.isVisible)node.setAttribute(attr,currentValue?currentValue+" "+id2:id2);else{var nextValue=currentValue&¤tValue.replace(id2,"").trim();nextValue?node.setAttribute(attr,nextValue):node.removeAttribute(attr)}})}}function handleAriaExpandedAttribute(){if(!(hasAriaExpanded||!instance.props.aria.expanded)){var nodes=normalizeToArray(instance.props.triggerTarget||reference2);nodes.forEach(function(node){instance.props.interactive?node.setAttribute("aria-expanded",instance.state.isVisible&&node===getCurrentTarget()?"true":"false"):node.removeAttribute("aria-expanded")})}}function cleanupInteractiveMouseListeners(){getDocument().removeEventListener("mousemove",debouncedOnMouseMove),mouseMoveListeners=mouseMoveListeners.filter(function(listener){return listener!==debouncedOnMouseMove})}function onDocumentPress(event){if(!(currentInput.isTouch&&(didTouchMove||event.type==="mousedown"))&&!(instance.props.interactive&&popper2.contains(event.target))){if(getCurrentTarget().contains(event.target)){if(currentInput.isTouch||instance.state.isVisible&&instance.props.trigger.indexOf("click")>=0)return}else invokeHook("onClickOutside",[instance,event]);instance.props.hideOnClick===!0&&(instance.clearDelayTimeouts(),instance.hide(),didHideDueToDocumentMouseDown=!0,setTimeout(function(){didHideDueToDocumentMouseDown=!1}),instance.state.isMounted||removeDocumentPress())}}function onTouchMove(){didTouchMove=!0}function onTouchStart(){didTouchMove=!1}function addDocumentPress(){var doc=getDocument();doc.addEventListener("mousedown",onDocumentPress,!0),doc.addEventListener("touchend",onDocumentPress,TOUCH_OPTIONS),doc.addEventListener("touchstart",onTouchStart,TOUCH_OPTIONS),doc.addEventListener("touchmove",onTouchMove,TOUCH_OPTIONS)}function removeDocumentPress(){var doc=getDocument();doc.removeEventListener("mousedown",onDocumentPress,!0),doc.removeEventListener("touchend",onDocumentPress,TOUCH_OPTIONS),doc.removeEventListener("touchstart",onTouchStart,TOUCH_OPTIONS),doc.removeEventListener("touchmove",onTouchMove,TOUCH_OPTIONS)}function onTransitionedOut(duration,callback){onTransitionEnd(duration,function(){!instance.state.isVisible&&popper2.parentNode&&popper2.parentNode.contains(popper2)&&callback()})}function onTransitionedIn(duration,callback){onTransitionEnd(duration,callback)}function onTransitionEnd(duration,callback){var box=getDefaultTemplateChildren().box;function listener(event){event.target===box&&(updateTransitionEndListener(box,"remove",listener),callback())}if(duration===0)return callback();updateTransitionEndListener(box,"remove",currentTransitionEndListener),updateTransitionEndListener(box,"add",listener),currentTransitionEndListener=listener}function on(eventType,handler,options){options===void 0&&(options=!1);var nodes=normalizeToArray(instance.props.triggerTarget||reference2);nodes.forEach(function(node){node.addEventListener(eventType,handler,options),listeners.push({node,eventType,handler,options})})}function addListeners(){getIsCustomTouchBehavior()&&(on("touchstart",onTrigger,{passive:!0}),on("touchend",onMouseLeave,{passive:!0})),splitBySpaces(instance.props.trigger).forEach(function(eventType){if(eventType!=="manual")switch(on(eventType,onTrigger),eventType){case"mouseenter":on("mouseleave",onMouseLeave);break;case"focus":on(isIE?"focusout":"blur",onBlurOrFocusOut);break;case"focusin":on("focusout",onBlurOrFocusOut);break}})}function removeListeners(){listeners.forEach(function(_ref){var node=_ref.node,eventType=_ref.eventType,handler=_ref.handler,options=_ref.options;node.removeEventListener(eventType,handler,options)}),listeners=[]}function onTrigger(event){var _lastTriggerEvent,shouldScheduleClickHide=!1;if(!(!instance.state.isEnabled||isEventListenerStopped(event)||didHideDueToDocumentMouseDown)){var wasFocused=((_lastTriggerEvent=lastTriggerEvent)==null?void 0:_lastTriggerEvent.type)==="focus";lastTriggerEvent=event,currentTarget=event.currentTarget,handleAriaExpandedAttribute(),!instance.state.isVisible&&isMouseEvent(event)&&mouseMoveListeners.forEach(function(listener){return listener(event)}),event.type==="click"&&(instance.props.trigger.indexOf("mouseenter")<0||isVisibleFromClick)&&instance.props.hideOnClick!==!1&&instance.state.isVisible?shouldScheduleClickHide=!0:scheduleShow(event),event.type==="click"&&(isVisibleFromClick=!shouldScheduleClickHide),shouldScheduleClickHide&&!wasFocused&&scheduleHide(event)}}function onMouseMove(event){var target=event.target,isCursorOverReferenceOrPopper=getCurrentTarget().contains(target)||popper2.contains(target);if(!(event.type==="mousemove"&&isCursorOverReferenceOrPopper)){var popperTreeData=getNestedPopperTree().concat(popper2).map(function(popper3){var _instance$popperInsta,instance2=popper3._tippy,state2=(_instance$popperInsta=instance2.popperInstance)==null?void 0:_instance$popperInsta.state;return state2?{popperRect:popper3.getBoundingClientRect(),popperState:state2,props}:null}).filter(Boolean);isCursorOutsideInteractiveBorder(popperTreeData,event)&&(cleanupInteractiveMouseListeners(),scheduleHide(event))}}function onMouseLeave(event){var shouldBail=isEventListenerStopped(event)||instance.props.trigger.indexOf("click")>=0&&isVisibleFromClick;if(!shouldBail){if(instance.props.interactive){instance.hideWithInteractivity(event);return}scheduleHide(event)}}function onBlurOrFocusOut(event){instance.props.trigger.indexOf("focusin")<0&&event.target!==getCurrentTarget()||instance.props.interactive&&event.relatedTarget&&popper2.contains(event.relatedTarget)||scheduleHide(event)}function isEventListenerStopped(event){return currentInput.isTouch?getIsCustomTouchBehavior()!==event.type.indexOf("touch")>=0:!1}function createPopperInstance(){destroyPopperInstance();var _instance$props2=instance.props,popperOptions=_instance$props2.popperOptions,placement=_instance$props2.placement,offset2=_instance$props2.offset,getReferenceClientRect=_instance$props2.getReferenceClientRect,moveTransition=_instance$props2.moveTransition,arrow2=getIsDefaultRenderFn()?getChildren(popper2).arrow:null,computedReference=getReferenceClientRect?{getBoundingClientRect:getReferenceClientRect,contextElement:getReferenceClientRect.contextElement||getCurrentTarget()}:reference2,tippyModifier={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(_ref2){var state2=_ref2.state;if(getIsDefaultRenderFn()){var _getDefaultTemplateCh=getDefaultTemplateChildren(),box=_getDefaultTemplateCh.box;["placement","reference-hidden","escaped"].forEach(function(attr){attr==="placement"?box.setAttribute("data-placement",state2.placement):state2.attributes.popper["data-popper-"+attr]?box.setAttribute("data-"+attr,""):box.removeAttribute("data-"+attr)}),state2.attributes.popper={}}}},modifiers=[{name:"offset",options:{offset:offset2}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!moveTransition}},tippyModifier];getIsDefaultRenderFn()&&arrow2&&modifiers.push({name:"arrow",options:{element:arrow2,padding:3}}),modifiers.push.apply(modifiers,popperOptions?.modifiers||[]),instance.popperInstance=popper_createPopper(computedReference,popper2,Object.assign({},popperOptions,{placement,onFirstUpdate,modifiers}))}function destroyPopperInstance(){instance.popperInstance&&(instance.popperInstance.destroy(),instance.popperInstance=null)}function mount(){var appendTo=instance.props.appendTo,parentNode,node=getCurrentTarget();instance.props.interactive&&appendTo===defaultProps.appendTo||appendTo==="parent"?parentNode=node.parentNode:parentNode=invokeWithArgsOrReturn(appendTo,[node]),parentNode.contains(popper2)||parentNode.appendChild(popper2),createPopperInstance()}function getNestedPopperTree(){return arrayFrom(popper2.querySelectorAll("[data-tippy-root]"))}function scheduleShow(event){instance.clearDelayTimeouts(),event&&invokeHook("onTrigger",[instance,event]),addDocumentPress();var delay=getDelay(!0),_getNormalizedTouchSe=getNormalizedTouchSettings(),touchValue=_getNormalizedTouchSe[0],touchDelay=_getNormalizedTouchSe[1];currentInput.isTouch&&touchValue==="hold"&&touchDelay&&(delay=touchDelay),delay?showTimeout=setTimeout(function(){instance.show()},delay):instance.show()}function scheduleHide(event){if(instance.clearDelayTimeouts(),invokeHook("onUntrigger",[instance,event]),!instance.state.isVisible){removeDocumentPress();return}if(!(instance.props.trigger.indexOf("mouseenter")>=0&&instance.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(event.type)>=0&&isVisibleFromClick)){var delay=getDelay(!1);delay?hideTimeout=setTimeout(function(){instance.state.isVisible&&instance.hide()},delay):scheduleHideAnimationFrame=requestAnimationFrame(function(){instance.hide()})}}function enable(){instance.state.isEnabled=!0}function disable(){instance.hide(),instance.state.isEnabled=!1}function clearDelayTimeouts(){clearTimeout(showTimeout),clearTimeout(hideTimeout),cancelAnimationFrame(scheduleHideAnimationFrame)}function setProps(partialProps){if(!instance.state.isDestroyed){invokeHook("onBeforeUpdate",[instance,partialProps]),removeListeners();var prevProps=instance.props,nextProps=evaluateProps(reference2,Object.assign({},instance.props,{},partialProps,{ignoreAttributes:!0}));instance.props=nextProps,addListeners(),prevProps.interactiveDebounce!==nextProps.interactiveDebounce&&(cleanupInteractiveMouseListeners(),debouncedOnMouseMove=tippy_esm_debounce(onMouseMove,nextProps.interactiveDebounce)),prevProps.triggerTarget&&!nextProps.triggerTarget?normalizeToArray(prevProps.triggerTarget).forEach(function(node){node.removeAttribute("aria-expanded")}):nextProps.triggerTarget&&reference2.removeAttribute("aria-expanded"),handleAriaExpandedAttribute(),handleStyles(),onUpdate&&onUpdate(prevProps,nextProps),instance.popperInstance&&(createPopperInstance(),getNestedPopperTree().forEach(function(nestedPopper){requestAnimationFrame(nestedPopper._tippy.popperInstance.forceUpdate)})),invokeHook("onAfterUpdate",[instance,partialProps])}}function setContent2(content){instance.setProps({content})}function show(){var isAlreadyVisible=instance.state.isVisible,isDestroyed=instance.state.isDestroyed,isDisabled=!instance.state.isEnabled,isTouchAndTouchDisabled=currentInput.isTouch&&!instance.props.touch,duration=getValueAtIndexOrReturn(instance.props.duration,0,defaultProps.duration);if(!(isAlreadyVisible||isDestroyed||isDisabled||isTouchAndTouchDisabled)&&!getCurrentTarget().hasAttribute("disabled")&&(invokeHook("onShow",[instance],!1),instance.props.onShow(instance)!==!1)){if(instance.state.isVisible=!0,getIsDefaultRenderFn()&&(popper2.style.visibility="visible"),handleStyles(),addDocumentPress(),instance.state.isMounted||(popper2.style.transition="none"),getIsDefaultRenderFn()){var _getDefaultTemplateCh2=getDefaultTemplateChildren(),box=_getDefaultTemplateCh2.box,content=_getDefaultTemplateCh2.content;setTransitionDuration([box,content],0)}onFirstUpdate=function(){if(!(!instance.state.isVisible||ignoreOnFirstUpdate)){if(ignoreOnFirstUpdate=!0,popper2.offsetHeight,popper2.style.transition=instance.props.moveTransition,getIsDefaultRenderFn()&&instance.props.animation){var _getDefaultTemplateCh3=getDefaultTemplateChildren(),_box=_getDefaultTemplateCh3.box,_content=_getDefaultTemplateCh3.content;setTransitionDuration([_box,_content],duration),setVisibilityState([_box,_content],"visible")}handleAriaContentAttribute(),handleAriaExpandedAttribute(),pushIfUnique(mountedInstances,instance),instance.state.isMounted=!0,invokeHook("onMount",[instance]),instance.props.animation&&getIsDefaultRenderFn()&&onTransitionedIn(duration,function(){instance.state.isShown=!0,invokeHook("onShown",[instance])})}},mount()}}function hide2(){var isAlreadyHidden=!instance.state.isVisible,isDestroyed=instance.state.isDestroyed,isDisabled=!instance.state.isEnabled,duration=getValueAtIndexOrReturn(instance.props.duration,1,defaultProps.duration);if(!(isAlreadyHidden||isDestroyed||isDisabled)&&(invokeHook("onHide",[instance],!1),instance.props.onHide(instance)!==!1)){if(instance.state.isVisible=!1,instance.state.isShown=!1,ignoreOnFirstUpdate=!1,isVisibleFromClick=!1,getIsDefaultRenderFn()&&(popper2.style.visibility="hidden"),cleanupInteractiveMouseListeners(),removeDocumentPress(),handleStyles(),getIsDefaultRenderFn()){var _getDefaultTemplateCh4=getDefaultTemplateChildren(),box=_getDefaultTemplateCh4.box,content=_getDefaultTemplateCh4.content;instance.props.animation&&(setTransitionDuration([box,content],duration),setVisibilityState([box,content],"hidden"))}handleAriaContentAttribute(),handleAriaExpandedAttribute(),instance.props.animation?getIsDefaultRenderFn()&&onTransitionedOut(duration,instance.unmount):instance.unmount()}}function hideWithInteractivity(event){getDocument().addEventListener("mousemove",debouncedOnMouseMove),pushIfUnique(mouseMoveListeners,debouncedOnMouseMove),debouncedOnMouseMove(event)}function unmount(){instance.state.isVisible&&instance.hide(),instance.state.isMounted&&(destroyPopperInstance(),getNestedPopperTree().forEach(function(nestedPopper){nestedPopper._tippy.unmount()}),popper2.parentNode&&popper2.parentNode.removeChild(popper2),mountedInstances=mountedInstances.filter(function(i){return i!==instance}),instance.state.isMounted=!1,invokeHook("onHidden",[instance]))}function destroy(){instance.state.isDestroyed||(instance.clearDelayTimeouts(),instance.unmount(),removeListeners(),delete reference2._tippy,instance.state.isDestroyed=!0,invokeHook("onDestroy",[instance]))}}function tippy(targets,optionalProps){optionalProps===void 0&&(optionalProps={});var plugins=defaultProps.plugins.concat(optionalProps.plugins||[]);bindGlobalEventListeners();var passedProps=Object.assign({},optionalProps,{plugins}),elements=getArrayOfElements(targets);if(!1)var isMoreThanOneReferenceElement,isSingleContentElement;var instances=elements.reduce(function(acc,reference2){var instance=reference2&&createTippy(reference2,passedProps);return instance&&acc.push(instance),acc},[]);return tippy_esm_isElement(targets)?instances[0]:instances}tippy.defaultProps=defaultProps,tippy.setDefaultProps=setDefaultProps,tippy.currentInput=currentInput;var hideAll=function(_temp){var _ref=_temp===void 0?{}:_temp,excludedReferenceOrInstance=_ref.exclude,duration=_ref.duration;mountedInstances.forEach(function(instance){var isExcluded=!1;if(excludedReferenceOrInstance&&(isExcluded=isReferenceElement(excludedReferenceOrInstance)?instance.reference===excludedReferenceOrInstance:instance.popper===excludedReferenceOrInstance.popper),!isExcluded){var originalDuration=instance.props.duration;instance.setProps({duration}),instance.hide(),instance.state.isDestroyed||instance.setProps({duration:originalDuration})}})},createSingleton=function(tippyInstances,optionalProps){optionalProps===void 0&&(optionalProps={});var individualInstances=tippyInstances,references=[],currentTarget,overrides=optionalProps.overrides,interceptSetPropsCleanups=[];function setReferences(){references=individualInstances.map(function(instance){return instance.reference})}function enableInstances(isEnabled){individualInstances.forEach(function(instance){isEnabled?instance.enable():instance.disable()})}function interceptSetProps(singleton2){return individualInstances.map(function(instance){var originalSetProps2=instance.setProps;return instance.setProps=function(props){originalSetProps2(props),instance.reference===currentTarget&&singleton2.setProps(props)},function(){instance.setProps=originalSetProps2}})}enableInstances(!1),setReferences();var plugin={fn:function(){return{onDestroy:function(){enableInstances(!0)},onTrigger:function(instance,event){var target=event.currentTarget,index=references.indexOf(target);if(target!==currentTarget){currentTarget=target;var overrideProps=(overrides||[]).concat("content").reduce(function(acc,prop){return acc[prop]=individualInstances[index].props[prop],acc},{});instance.setProps(Object.assign({},overrideProps,{getReferenceClientRect:typeof overrideProps.getReferenceClientRect=="function"?overrideProps.getReferenceClientRect:function(){return target.getBoundingClientRect()}}))}}}}},singleton=tippy(div(),Object.assign({},removeProperties(optionalProps,["overrides"]),{plugins:[plugin].concat(optionalProps.plugins||[]),triggerTarget:references})),originalSetProps=singleton.setProps;return singleton.setProps=function(props){overrides=props.overrides||overrides,originalSetProps(props)},singleton.setInstances=function(nextInstances){enableInstances(!0),interceptSetPropsCleanups.forEach(function(fn){return fn()}),individualInstances=nextInstances,enableInstances(!1),setReferences(),interceptSetProps(singleton),singleton.setProps({triggerTarget:references})},interceptSetPropsCleanups=interceptSetProps(singleton),singleton},BUBBLING_EVENTS_MAP={mouseover:"mouseenter",focusin:"focus",click:"click"};function delegate(targets,props){var listeners=[],childTippyInstances=[],disabled=!1,target=props.target,nativeProps=removeProperties(props,["target"]),parentProps=Object.assign({},nativeProps,{trigger:"manual",touch:!1}),childProps=Object.assign({},nativeProps,{showOnCreate:!0}),returnValue=tippy(targets,parentProps),normalizedReturnValue=normalizeToArray(returnValue);function onTrigger(event){if(!(!event.target||disabled)){var targetNode=event.target.closest(target);if(!!targetNode){var trigger=targetNode.getAttribute("data-tippy-trigger")||props.trigger||defaultProps.trigger;if(!targetNode._tippy&&!(event.type==="touchstart"&&typeof childProps.touch=="boolean")&&!(event.type!=="touchstart"&&trigger.indexOf(BUBBLING_EVENTS_MAP[event.type])<0)){var instance=tippy(targetNode,childProps);instance&&(childTippyInstances=childTippyInstances.concat(instance))}}}}function on(node,eventType,handler,options){options===void 0&&(options=!1),node.addEventListener(eventType,handler,options),listeners.push({node,eventType,handler,options})}function addEventListeners(instance){var reference2=instance.reference;on(reference2,"touchstart",onTrigger),on(reference2,"mouseover",onTrigger),on(reference2,"focusin",onTrigger),on(reference2,"click",onTrigger)}function removeEventListeners(){listeners.forEach(function(_ref){var node=_ref.node,eventType=_ref.eventType,handler=_ref.handler,options=_ref.options;node.removeEventListener(eventType,handler,options)}),listeners=[]}function applyMutations(instance){var originalDestroy=instance.destroy,originalEnable=instance.enable,originalDisable=instance.disable;instance.destroy=function(shouldDestroyChildInstances){shouldDestroyChildInstances===void 0&&(shouldDestroyChildInstances=!0),shouldDestroyChildInstances&&childTippyInstances.forEach(function(instance2){instance2.destroy()}),childTippyInstances=[],removeEventListeners(),originalDestroy()},instance.enable=function(){originalEnable(),childTippyInstances.forEach(function(instance2){return instance2.enable()}),disabled=!1},instance.disable=function(){originalDisable(),childTippyInstances.forEach(function(instance2){return instance2.disable()}),disabled=!0},addEventListeners(instance)}return normalizedReturnValue.forEach(applyMutations),returnValue}var animateFill={name:"animateFill",defaultValue:!1,fn:function(instance){var _instance$props$rende;if(!((_instance$props$rende=instance.props.render)!=null&&_instance$props$rende.$$tippy))return{};var _getChildren=getChildren(instance.popper),box=_getChildren.box,content=_getChildren.content,backdrop=instance.props.animateFill?createBackdropElement():null;return{onCreate:function(){backdrop&&(box.insertBefore(backdrop,box.firstElementChild),box.setAttribute("data-animatefill",""),box.style.overflow="hidden",instance.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(backdrop){var transitionDuration=box.style.transitionDuration,duration=Number(transitionDuration.replace("ms",""));content.style.transitionDelay=Math.round(duration/10)+"ms",backdrop.style.transitionDuration=transitionDuration,setVisibilityState([backdrop],"visible")}},onShow:function(){backdrop&&(backdrop.style.transitionDuration="0ms")},onHide:function(){backdrop&&setVisibilityState([backdrop],"hidden")}}}};function createBackdropElement(){var backdrop=div();return backdrop.className=BACKDROP_CLASS,setVisibilityState([backdrop],"hidden"),backdrop}var mouseCoords={clientX:0,clientY:0},activeInstances=[];function storeMouseCoords(_ref){var clientX=_ref.clientX,clientY=_ref.clientY;mouseCoords={clientX,clientY}}function addMouseCoordsListener(doc){doc.addEventListener("mousemove",storeMouseCoords)}function removeMouseCoordsListener(doc){doc.removeEventListener("mousemove",storeMouseCoords)}var followCursor={name:"followCursor",defaultValue:!1,fn:function(instance){var reference2=instance.reference,doc=getOwnerDocument(instance.props.triggerTarget||reference2),isInternalUpdate=!1,wasFocusEvent=!1,isUnmounted=!0,prevProps=instance.props;function getIsInitialBehavior(){return instance.props.followCursor==="initial"&&instance.state.isVisible}function addListener(){doc.addEventListener("mousemove",onMouseMove)}function removeListener(){doc.removeEventListener("mousemove",onMouseMove)}function unsetGetReferenceClientRect(){isInternalUpdate=!0,instance.setProps({getReferenceClientRect:null}),isInternalUpdate=!1}function onMouseMove(event){var isCursorOverReference=event.target?reference2.contains(event.target):!0,followCursor2=instance.props.followCursor,clientX=event.clientX,clientY=event.clientY,rect=reference2.getBoundingClientRect(),relativeX=clientX-rect.left,relativeY=clientY-rect.top;(isCursorOverReference||!instance.props.interactive)&&instance.setProps({getReferenceClientRect:function(){var rect2=reference2.getBoundingClientRect(),x=clientX,y=clientY;followCursor2==="initial"&&(x=rect2.left+relativeX,y=rect2.top+relativeY);var top=followCursor2==="horizontal"?rect2.top:y,right2=followCursor2==="vertical"?rect2.right:x,bottom2=followCursor2==="horizontal"?rect2.bottom:y,left2=followCursor2==="vertical"?rect2.left:x;return{width:right2-left2,height:bottom2-top,top,right:right2,bottom:bottom2,left:left2}}})}function create(){instance.props.followCursor&&(activeInstances.push({instance,doc}),addMouseCoordsListener(doc))}function destroy(){activeInstances=activeInstances.filter(function(data){return data.instance!==instance}),activeInstances.filter(function(data){return data.doc===doc}).length===0&&removeMouseCoordsListener(doc)}return{onCreate:create,onDestroy:destroy,onBeforeUpdate:function(){prevProps=instance.props},onAfterUpdate:function(_,_ref2){var followCursor2=_ref2.followCursor;isInternalUpdate||followCursor2!==void 0&&prevProps.followCursor!==followCursor2&&(destroy(),followCursor2?(create(),instance.state.isMounted&&!wasFocusEvent&&!getIsInitialBehavior()&&addListener()):(removeListener(),unsetGetReferenceClientRect()))},onMount:function(){instance.props.followCursor&&!wasFocusEvent&&(isUnmounted&&(onMouseMove(mouseCoords),isUnmounted=!1),getIsInitialBehavior()||addListener())},onTrigger:function(_,event){isMouseEvent(event)&&(mouseCoords={clientX:event.clientX,clientY:event.clientY}),wasFocusEvent=event.type==="focus"},onHidden:function(){instance.props.followCursor&&(unsetGetReferenceClientRect(),removeListener(),isUnmounted=!0)}}}};function getProps(props,modifier){var _props$popperOptions;return{popperOptions:Object.assign({},props.popperOptions,{modifiers:[].concat((((_props$popperOptions=props.popperOptions)==null?void 0:_props$popperOptions.modifiers)||[]).filter(function(_ref){var name=_ref.name;return name!==modifier.name}),[modifier])})}}var inlinePositioning={name:"inlinePositioning",defaultValue:!1,fn:function(instance){var reference2=instance.reference;function isEnabled(){return!!instance.props.inlinePositioning}var placement,cursorRectIndex=-1,isInternalUpdate=!1,modifier={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(_ref2){var state=_ref2.state;isEnabled()&&(placement!==state.placement&&instance.setProps({getReferenceClientRect:function(){return _getReferenceClientRect(state.placement)}}),placement=state.placement)}};function _getReferenceClientRect(placement2){return getInlineBoundingClientRect(tippy_esm_getBasePlacement(placement2),reference2.getBoundingClientRect(),arrayFrom(reference2.getClientRects()),cursorRectIndex)}function setInternalProps(partialProps){isInternalUpdate=!0,instance.setProps(partialProps),isInternalUpdate=!1}function addModifier(){isInternalUpdate||setInternalProps(getProps(instance.props,modifier))}return{onCreate:addModifier,onAfterUpdate:addModifier,onTrigger:function(_,event){if(isMouseEvent(event)){var rects=arrayFrom(instance.reference.getClientRects()),cursorRect=rects.find(function(rect){return rect.left-2<=event.clientX&&rect.right+2>=event.clientX&&rect.top-2<=event.clientY&&rect.bottom+2>=event.clientY});cursorRectIndex=rects.indexOf(cursorRect)}},onUntrigger:function(){cursorRectIndex=-1}}}};function getInlineBoundingClientRect(currentBasePlacement,boundingRect,clientRects,cursorRectIndex){if(clientRects.length<2||currentBasePlacement===null)return boundingRect;if(clientRects.length===2&&cursorRectIndex>=0&&clientRects[0].left>clientRects[1].right)return clientRects[cursorRectIndex]||boundingRect;switch(currentBasePlacement){case"top":case"bottom":{var firstRect=clientRects[0],lastRect=clientRects[clientRects.length-1],isTop=currentBasePlacement==="top",top=firstRect.top,bottom2=lastRect.bottom,left2=isTop?firstRect.left:lastRect.left,right2=isTop?firstRect.right:lastRect.right,width=right2-left2,height=bottom2-top;return{top,bottom:bottom2,left:left2,right:right2,width,height}}case"left":case"right":{var minLeft=Math.min.apply(Math,clientRects.map(function(rects){return rects.left})),maxRight=Math.max.apply(Math,clientRects.map(function(rects){return rects.right})),measureRects=clientRects.filter(function(rect){return currentBasePlacement==="left"?rect.left===minLeft:rect.right===maxRight}),_top=measureRects[0].top,_bottom=measureRects[measureRects.length-1].bottom,_left=minLeft,_right=maxRight,_width=_right-_left,_height=_bottom-_top;return{top:_top,bottom:_bottom,left:_left,right:_right,width:_width,height:_height}}default:return boundingRect}}var sticky={name:"sticky",defaultValue:!1,fn:function(instance){var reference2=instance.reference,popper2=instance.popper;function getReference(){return instance.popperInstance?instance.popperInstance.state.elements.reference:reference2}function shouldCheck(value){return instance.props.sticky===!0||instance.props.sticky===value}var prevRefRect=null,prevPopRect=null;function updatePosition(){var currentRefRect=shouldCheck("reference")?getReference().getBoundingClientRect():null,currentPopRect=shouldCheck("popper")?popper2.getBoundingClientRect():null;(currentRefRect&&areRectsDifferent(prevRefRect,currentRefRect)||currentPopRect&&areRectsDifferent(prevPopRect,currentPopRect))&&instance.popperInstance&&instance.popperInstance.update(),prevRefRect=currentRefRect,prevPopRect=currentPopRect,instance.state.isMounted&&requestAnimationFrame(updatePosition)}return{onMount:function(){instance.props.sticky&&updatePosition()}}}};function areRectsDifferent(rectA,rectB){return rectA&&rectB?rectA.top!==rectB.top||rectA.right!==rectB.right||rectA.bottom!==rectB.bottom||rectA.left!==rectB.left:!0}tippy.setDefaultProps({render});const tippy_esm=tippy},16935:module=>{module.exports=function(){var selection=document.getSelection();if(!selection.rangeCount)return function(){};for(var active=document.activeElement,ranges=[],i=0;i<selection.rangeCount;i++)ranges.push(selection.getRangeAt(i));switch(active.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":active.blur();break;default:active=null;break}return selection.removeAllRanges(),function(){selection.type==="Caret"&&selection.removeAllRanges(),selection.rangeCount||ranges.forEach(function(range){selection.addRange(range)}),active&&active.focus()}}},82795:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __spreadArrays=this&&this.__spreadArrays||function(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Checker=exports.createCheckers=void 0;var types_1=__webpack_require__(64502),util_1=__webpack_require__(44725),types_2=__webpack_require__(64502);Object.defineProperty(exports,"TArray",{enumerable:!0,get:function(){return types_2.TArray}}),Object.defineProperty(exports,"TEnumType",{enumerable:!0,get:function(){return types_2.TEnumType}}),Object.defineProperty(exports,"TEnumLiteral",{enumerable:!0,get:function(){return types_2.TEnumLiteral}}),Object.defineProperty(exports,"TFunc",{enumerable:!0,get:function(){return types_2.TFunc}}),Object.defineProperty(exports,"TIface",{enumerable:!0,get:function(){return types_2.TIface}}),Object.defineProperty(exports,"TLiteral",{enumerable:!0,get:function(){return types_2.TLiteral}}),Object.defineProperty(exports,"TName",{enumerable:!0,get:function(){return types_2.TName}}),Object.defineProperty(exports,"TOptional",{enumerable:!0,get:function(){return types_2.TOptional}}),Object.defineProperty(exports,"TParam",{enumerable:!0,get:function(){return types_2.TParam}}),Object.defineProperty(exports,"TParamList",{enumerable:!0,get:function(){return types_2.TParamList}}),Object.defineProperty(exports,"TProp",{enumerable:!0,get:function(){return types_2.TProp}}),Object.defineProperty(exports,"TTuple",{enumerable:!0,get:function(){return types_2.TTuple}}),Object.defineProperty(exports,"TType",{enumerable:!0,get:function(){return types_2.TType}}),Object.defineProperty(exports,"TUnion",{enumerable:!0,get:function(){return types_2.TUnion}}),Object.defineProperty(exports,"TIntersection",{enumerable:!0,get:function(){return types_2.TIntersection}}),Object.defineProperty(exports,"array",{enumerable:!0,get:function(){return types_2.array}}),Object.defineProperty(exports,"enumlit",{enumerable:!0,get:function(){return types_2.enumlit}}),Object.defineProperty(exports,"enumtype",{enumerable:!0,get:function(){return types_2.enumtype}}),Object.defineProperty(exports,"func",{enumerable:!0,get:function(){return types_2.func}}),Object.defineProperty(exports,"iface",{enumerable:!0,get:function(){return types_2.iface}}),Object.defineProperty(exports,"lit",{enumerable:!0,get:function(){return types_2.lit}}),Object.defineProperty(exports,"name",{enumerable:!0,get:function(){return types_2.name}}),Object.defineProperty(exports,"opt",{enumerable:!0,get:function(){return types_2.opt}}),Object.defineProperty(exports,"param",{enumerable:!0,get:function(){return types_2.param}}),Object.defineProperty(exports,"tuple",{enumerable:!0,get:function(){return types_2.tuple}}),Object.defineProperty(exports,"union",{enumerable:!0,get:function(){return types_2.union}}),Object.defineProperty(exports,"intersection",{enumerable:!0,get:function(){return types_2.intersection}}),Object.defineProperty(exports,"BasicType",{enumerable:!0,get:function(){return types_2.BasicType}});var util_2=__webpack_require__(44725);Object.defineProperty(exports,"VError",{enumerable:!0,get:function(){return util_2.VError}});function createCheckers(){for(var typeSuite=[],_i=0;_i<arguments.length;_i++)typeSuite[_i]=arguments[_i];for(var fullSuite=Object.assign.apply(Object,__spreadArrays([{},types_1.basicTypes],typeSuite)),checkers={},_a=0,typeSuite_1=typeSuite;_a<typeSuite_1.length;_a++)for(var suite_1=typeSuite_1[_a],_b=0,_c=Object.keys(suite_1);_b<_c.length;_b++){var name=_c[_b];checkers[name]=new Checker(fullSuite,suite_1[name])}return checkers}exports.createCheckers=createCheckers;var Checker=function(){function Checker2(suite,ttype,_path){if(_path===void 0&&(_path="value"),this.suite=suite,this.ttype=ttype,this._path=_path,this.props=new Map,ttype instanceof types_1.TIface)for(var _i=0,_a=ttype.props;_i<_a.length;_i++){var p=_a[_i];this.props.set(p.name,p.ttype)}this.checkerPlain=this.ttype.getChecker(suite,!1),this.checkerStrict=this.ttype.getChecker(suite,!0)}return Checker2.prototype.setReportedPath=function(path){this._path=path},Checker2.prototype.check=function(value){return this._doCheck(this.checkerPlain,value)},Checker2.prototype.test=function(value){return this.checkerPlain(value,new util_1.NoopContext)},Checker2.prototype.validate=function(value){return this._doValidate(this.checkerPlain,value)},Checker2.prototype.strictCheck=function(value){return this._doCheck(this.checkerStrict,value)},Checker2.prototype.strictTest=function(value){return this.checkerStrict(value,new util_1.NoopContext)},Checker2.prototype.strictValidate=function(value){return this._doValidate(this.checkerStrict,value)},Checker2.prototype.getProp=function(prop){var ttype=this.props.get(prop);if(!ttype)throw new Error("Type has no property "+prop);return new Checker2(this.suite,ttype,this._path+"."+prop)},Checker2.prototype.methodArgs=function(methodName){var tfunc=this._getMethod(methodName);return new Checker2(this.suite,tfunc.paramList)},Checker2.prototype.methodResult=function(methodName){var tfunc=this._getMethod(methodName);return new Checker2(this.suite,tfunc.result)},Checker2.prototype.getArgs=function(){if(!(this.ttype instanceof types_1.TFunc))throw new Error("getArgs() applied to non-function");return new Checker2(this.suite,this.ttype.paramList)},Checker2.prototype.getResult=function(){if(!(this.ttype instanceof types_1.TFunc))throw new Error("getResult() applied to non-function");return new Checker2(this.suite,this.ttype.result)},Checker2.prototype.getType=function(){return this.ttype},Checker2.prototype._doCheck=function(checkerFunc,value){var noopCtx=new util_1.NoopContext;if(!checkerFunc(value,noopCtx)){var detailCtx=new util_1.DetailContext;throw checkerFunc(value,detailCtx),detailCtx.getError(this._path)}},Checker2.prototype._doValidate=function(checkerFunc,value){var noopCtx=new util_1.NoopContext;if(checkerFunc(value,noopCtx))return null;var detailCtx=new util_1.DetailContext;return checkerFunc(value,detailCtx),detailCtx.getErrorDetail(this._path)},Checker2.prototype._getMethod=function(methodName){var ttype=this.props.get(methodName);if(!ttype)throw new Error("Type has no property "+methodName);if(!(ttype instanceof types_1.TFunc))throw new Error("Property "+methodName+" is not a method");return ttype},Checker2}();exports.Checker=Checker},64502:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var Buffer=__webpack_require__(55872).Buffer,__extends=this&&this.__extends||function(){var extendStatics=function(d,b){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d2,b2){d2.__proto__=b2}||function(d2,b2){for(var p in b2)b2.hasOwnProperty(p)&&(d2[p]=b2[p])},extendStatics(d,b)};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.basicTypes=exports.BasicType=exports.TParamList=exports.TParam=exports.param=exports.TFunc=exports.func=exports.TProp=exports.TOptional=exports.opt=exports.TIface=exports.iface=exports.TEnumLiteral=exports.enumlit=exports.TEnumType=exports.enumtype=exports.TIntersection=exports.intersection=exports.TUnion=exports.union=exports.TTuple=exports.tuple=exports.TArray=exports.array=exports.TLiteral=exports.lit=exports.TName=exports.name=exports.TType=void 0;var util_1=__webpack_require__(44725),TType=function(){function TType2(){}return TType2}();exports.TType=TType;function parseSpec(typeSpec){return typeof typeSpec=="string"?name(typeSpec):typeSpec}function getNamedType(suite,name2){var ttype=suite[name2];if(!ttype)throw new Error("Unknown type "+name2);return ttype}function name(value){return new TName(value)}exports.name=name;var TName=function(_super){__extends(TName2,_super);function TName2(name2){var _this=_super.call(this)||this;return _this.name=name2,_this._failMsg="is not a "+name2,_this}return TName2.prototype.getChecker=function(suite,strict,allowedProps){var _this=this,ttype=getNamedType(suite,this.name),checker=ttype.getChecker(suite,strict,allowedProps);return ttype instanceof BasicType||ttype instanceof TName2?checker:function(value,ctx){return checker(value,ctx)?!0:ctx.fail(null,_this._failMsg,0)}},TName2}(TType);exports.TName=TName;function lit(value){return new TLiteral(value)}exports.lit=lit;var TLiteral=function(_super){__extends(TLiteral2,_super);function TLiteral2(value){var _this=_super.call(this)||this;return _this.value=value,_this.name=JSON.stringify(value),_this._failMsg="is not "+_this.name,_this}return TLiteral2.prototype.getChecker=function(suite,strict){var _this=this;return function(value,ctx){return value===_this.value?!0:ctx.fail(null,_this._failMsg,-1)}},TLiteral2}(TType);exports.TLiteral=TLiteral;function array(typeSpec){return new TArray(parseSpec(typeSpec))}exports.array=array;var TArray=function(_super){__extends(TArray2,_super);function TArray2(ttype){var _this=_super.call(this)||this;return _this.ttype=ttype,_this}return TArray2.prototype.getChecker=function(suite,strict){var itemChecker=this.ttype.getChecker(suite,strict);return function(value,ctx){if(!Array.isArray(value))return ctx.fail(null,"is not an array",0);for(var i=0;i<value.length;i++){var ok=itemChecker(value[i],ctx);if(!ok)return ctx.fail(i,null,1)}return!0}},TArray2}(TType);exports.TArray=TArray;function tuple(){for(var typeSpec=[],_i2=0;_i2<arguments.length;_i2++)typeSpec[_i2]=arguments[_i2];return new TTuple(typeSpec.map(function(t){return parseSpec(t)}))}exports.tuple=tuple;var TTuple=function(_super){__extends(TTuple2,_super);function TTuple2(ttypes){var _this=_super.call(this)||this;return _this.ttypes=ttypes,_this}return TTuple2.prototype.getChecker=function(suite,strict){var itemCheckers=this.ttypes.map(function(t){return t.getChecker(suite,strict)}),checker=function(value,ctx){if(!Array.isArray(value))return ctx.fail(null,"is not an array",0);for(var i=0;i<itemCheckers.length;i++){var ok=itemCheckers[i](value[i],ctx);if(!ok)return ctx.fail(i,null,1)}return!0};return strict?function(value,ctx){return checker(value,ctx)?value.length<=itemCheckers.length?!0:ctx.fail(itemCheckers.length,"is extraneous",2):!1}:checker},TTuple2}(TType);exports.TTuple=TTuple;function union(){for(var typeSpec=[],_i2=0;_i2<arguments.length;_i2++)typeSpec[_i2]=arguments[_i2];return new TUnion(typeSpec.map(function(t){return parseSpec(t)}))}exports.union=union;var TUnion=function(_super){__extends(TUnion2,_super);function TUnion2(ttypes){var _this=_super.call(this)||this;_this.ttypes=ttypes;var names=ttypes.map(function(t){return t instanceof TName||t instanceof TLiteral?t.name:null}).filter(function(n){return n}),otherTypes=ttypes.length-names.length;return names.length?(otherTypes>0&&names.push(otherTypes+" more"),_this._failMsg="is none of "+names.join(", ")):_this._failMsg="is none of "+otherTypes+" types",_this}return TUnion2.prototype.getChecker=function(suite,strict){var _this=this,itemCheckers=this.ttypes.map(function(t){return t.getChecker(suite,strict)});return function(value,ctx){for(var ur=ctx.unionResolver(),i=0;i<itemCheckers.length;i++){var ok=itemCheckers[i](value,ur.createContext());if(ok)return!0}return ctx.resolveUnion(ur),ctx.fail(null,_this._failMsg,0)}},TUnion2}(TType);exports.TUnion=TUnion;function intersection(){for(var typeSpec=[],_i2=0;_i2<arguments.length;_i2++)typeSpec[_i2]=arguments[_i2];return new TIntersection(typeSpec.map(function(t){return parseSpec(t)}))}exports.intersection=intersection;var TIntersection=function(_super){__extends(TIntersection2,_super);function TIntersection2(ttypes){var _this=_super.call(this)||this;return _this.ttypes=ttypes,_this}return TIntersection2.prototype.getChecker=function(suite,strict){var allowedProps=new Set,itemCheckers=this.ttypes.map(function(t){return t.getChecker(suite,strict,allowedProps)});return function(value,ctx){var ok=itemCheckers.every(function(checker){return checker(value,ctx)});return ok?!0:ctx.fail(null,null,0)}},TIntersection2}(TType);exports.TIntersection=TIntersection;function enumtype(values){return new TEnumType(values)}exports.enumtype=enumtype;var TEnumType=function(_super){__extends(TEnumType2,_super);function TEnumType2(members){var _this=_super.call(this)||this;return _this.members=members,_this.validValues=new Set,_this._failMsg="is not a valid enum value",_this.validValues=new Set(Object.keys(members).map(function(name2){return members[name2]})),_this}return TEnumType2.prototype.getChecker=function(suite,strict){var _this=this;return function(value,ctx){return _this.validValues.has(value)?!0:ctx.fail(null,_this._failMsg,0)}},TEnumType2}(TType);exports.TEnumType=TEnumType;function enumlit(name2,prop){return new TEnumLiteral(name2,prop)}exports.enumlit=enumlit;var TEnumLiteral=function(_super){__extends(TEnumLiteral2,_super);function TEnumLiteral2(enumName,prop){var _this=_super.call(this)||this;return _this.enumName=enumName,_this.prop=prop,_this._failMsg="is not "+enumName+"."+prop,_this}return TEnumLiteral2.prototype.getChecker=function(suite,strict){var _this=this,ttype=getNamedType(suite,this.enumName);if(!(ttype instanceof TEnumType))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var val=ttype.members[this.prop];if(!ttype.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(value,ctx){return value===val?!0:ctx.fail(null,_this._failMsg,-1)}},TEnumLiteral2}(TType);exports.TEnumLiteral=TEnumLiteral;function makeIfaceProps(props){return Object.keys(props).map(function(name2){return makeIfaceProp(name2,props[name2])})}function makeIfaceProp(name2,prop){return prop instanceof TOptional?new TProp(name2,prop.ttype,!0):new TProp(name2,parseSpec(prop),!1)}function iface(bases,props){return new TIface(bases,makeIfaceProps(props))}exports.iface=iface;var TIface=function(_super){__extends(TIface2,_super);function TIface2(bases,props){var _this=_super.call(this)||this;return _this.bases=bases,_this.props=props,_this.propSet=new Set(props.map(function(p){return p.name})),_this}return TIface2.prototype.getChecker=function(suite,strict,allowedProps){var _this=this,baseCheckers=this.bases.map(function(b){return getNamedType(suite,b).getChecker(suite,strict)}),propCheckers=this.props.map(function(prop){return prop.ttype.getChecker(suite,strict)}),testCtx=new util_1.NoopContext,isPropRequired=this.props.map(function(prop,i){return!prop.isOpt&&!propCheckers[i](void 0,testCtx)}),checker=function(value,ctx){if(typeof value!="object"||value===null)return ctx.fail(null,"is not an object",0);for(var i=0;i<baseCheckers.length;i++)if(!baseCheckers[i](value,ctx))return!1;for(var i=0;i<propCheckers.length;i++){var name_1=_this.props[i].name,v=value[name_1];if(v===void 0){if(isPropRequired[i])return ctx.fail(name_1,"is missing",1)}else{var ok=propCheckers[i](v,ctx);if(!ok)return ctx.fail(name_1,null,1)}}return!0};if(!strict)return checker;var propSet=this.propSet;return allowedProps&&(this.propSet.forEach(function(prop){return allowedProps.add(prop)}),propSet=allowedProps),function(value,ctx){if(!checker(value,ctx))return!1;for(var prop in value)if(!propSet.has(prop))return ctx.fail(prop,"is extraneous",2);return!0}},TIface2}(TType);exports.TIface=TIface;function opt(typeSpec){return new TOptional(parseSpec(typeSpec))}exports.opt=opt;var TOptional=function(_super){__extends(TOptional2,_super);function TOptional2(ttype){var _this=_super.call(this)||this;return _this.ttype=ttype,_this}return TOptional2.prototype.getChecker=function(suite,strict){var itemChecker=this.ttype.getChecker(suite,strict);return function(value,ctx){return value===void 0||itemChecker(value,ctx)}},TOptional2}(TType);exports.TOptional=TOptional;var TProp=function(){function TProp2(name2,ttype,isOpt){this.name=name2,this.ttype=ttype,this.isOpt=isOpt}return TProp2}();exports.TProp=TProp;function func(resultSpec){for(var params=[],_i2=1;_i2<arguments.length;_i2++)params[_i2-1]=arguments[_i2];return new TFunc(new TParamList(params),parseSpec(resultSpec))}exports.func=func;var TFunc=function(_super){__extends(TFunc2,_super);function TFunc2(paramList,result){var _this=_super.call(this)||this;return _this.paramList=paramList,_this.result=result,_this}return TFunc2.prototype.getChecker=function(suite,strict){return function(value,ctx){return typeof value=="function"?!0:ctx.fail(null,"is not a function",0)}},TFunc2}(TType);exports.TFunc=TFunc;function param(name2,typeSpec,isOpt){return new TParam(name2,parseSpec(typeSpec),Boolean(isOpt))}exports.param=param;var TParam=function(){function TParam2(name2,ttype,isOpt){this.name=name2,this.ttype=ttype,this.isOpt=isOpt}return TParam2}();exports.TParam=TParam;var TParamList=function(_super){__extends(TParamList2,_super);function TParamList2(params){var _this=_super.call(this)||this;return _this.params=params,_this}return TParamList2.prototype.getChecker=function(suite,strict){var _this=this,itemCheckers=this.params.map(function(t){return t.ttype.getChecker(suite,strict)}),testCtx=new util_1.NoopContext,isParamRequired=this.params.map(function(param2,i){return!param2.isOpt&&!itemCheckers[i](void 0,testCtx)}),checker=function(value,ctx){if(!Array.isArray(value))return ctx.fail(null,"is not an array",0);for(var i=0;i<itemCheckers.length;i++){var p=_this.params[i];if(value[i]===void 0){if(isParamRequired[i])return ctx.fail(p.name,"is missing",1)}else{var ok=itemCheckers[i](value[i],ctx);if(!ok)return ctx.fail(p.name,null,1)}}return!0};return strict?function(value,ctx){return checker(value,ctx)?value.length<=itemCheckers.length?!0:ctx.fail(itemCheckers.length,"is extraneous",2):!1}:checker},TParamList2}(TType);exports.TParamList=TParamList;var BasicType=function(_super){__extends(BasicType2,_super);function BasicType2(validator,message){var _this=_super.call(this)||this;return _this.validator=validator,_this.message=message,_this}return BasicType2.prototype.getChecker=function(suite,strict){var _this=this;return function(value,ctx){return _this.validator(value)?!0:ctx.fail(null,_this.message,0)}},BasicType2}(TType);exports.BasicType=BasicType,exports.basicTypes={any:new BasicType(function(v){return!0},"is invalid"),number:new BasicType(function(v){return typeof v=="number"},"is not a number"),object:new BasicType(function(v){return typeof v=="object"&&v},"is not an object"),boolean:new BasicType(function(v){return typeof v=="boolean"},"is not a boolean"),string:new BasicType(function(v){return typeof v=="string"},"is not a string"),symbol:new BasicType(function(v){return typeof v=="symbol"},"is not a symbol"),void:new BasicType(function(v){return v==null},"is not void"),undefined:new BasicType(function(v){return v===void 0},"is not undefined"),null:new BasicType(function(v){return v===null},"is not null"),never:new BasicType(function(v){return!1},"is unexpected"),Date:new BasicType(getIsNativeChecker("[object Date]"),"is not a Date"),RegExp:new BasicType(getIsNativeChecker("[object RegExp]"),"is not a RegExp")};var nativeToString=Object.prototype.toString;function getIsNativeChecker(tag){return function(v){return typeof v=="object"&&v&&nativeToString.call(v)===tag}}typeof Buffer<"u"&&(exports.basicTypes.Buffer=new BasicType(function(v){return Buffer.isBuffer(v)},"is not a Buffer"));for(var _loop_1=function(array_12){exports.basicTypes[array_12.name]=new BasicType(function(v){return v instanceof array_12},"is not a "+array_12.name)},_i=0,_a=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];_i<_a.length;_i++){var array_1=_a[_i];_loop_1(array_1)}},44725:function(__unused_webpack_module,exports){"use strict";var __extends=this&&this.__extends||function(){var extendStatics=function(d,b){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d2,b2){d2.__proto__=b2}||function(d2,b2){for(var p in b2)b2.hasOwnProperty(p)&&(d2[p]=b2[p])},extendStatics(d,b)};return function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.DetailContext=exports.NoopContext=exports.VError=void 0;var VError=function(_super){__extends(VError2,_super);function VError2(path,message){var _this=_super.call(this,message)||this;return _this.path=path,Object.setPrototypeOf(_this,VError2.prototype),_this}return VError2}(Error);exports.VError=VError;var NoopContext=function(){function NoopContext2(){}return NoopContext2.prototype.fail=function(relPath,message,score){return!1},NoopContext2.prototype.unionResolver=function(){return this},NoopContext2.prototype.createContext=function(){return this},NoopContext2.prototype.resolveUnion=function(ur){},NoopContext2}();exports.NoopContext=NoopContext;var DetailContext=function(){function DetailContext2(){this._propNames=[""],this._messages=[null],this._score=0}return DetailContext2.prototype.fail=function(relPath,message,score){return this._propNames.push(relPath),this._messages.push(message),this._score+=score,!1},DetailContext2.prototype.unionResolver=function(){return new DetailUnionResolver},DetailContext2.prototype.resolveUnion=function(unionResolver){for(var _a,_b,u=unionResolver,best=null,_i=0,_c=u.contexts;_i<_c.length;_i++){var ctx=_c[_i];(!best||ctx._score>=best._score)&&(best=ctx)}best&&best._score>0&&((_a=this._propNames).push.apply(_a,best._propNames),(_b=this._messages).push.apply(_b,best._messages))},DetailContext2.prototype.getError=function(path){for(var msgParts=[],i=this._propNames.length-1;i>=0;i--){var p=this._propNames[i];path+=typeof p=="number"?"["+p+"]":p?"."+p:"";var m=this._messages[i];m&&msgParts.push(path+" "+m)}return new VError(path,msgParts.join("; "))},DetailContext2.prototype.getErrorDetail=function(path){for(var details=[],i=this._propNames.length-1;i>=0;i--){var p=this._propNames[i];path+=typeof p=="number"?"["+p+"]":p?"."+p:"";var message=this._messages[i];message&&details.push({path,message})}for(var detail=null,i=details.length-1;i>=0;i--)detail&&(details[i].nested=[detail]),detail=details[i];return detail},DetailContext2}();exports.DetailContext=DetailContext;var DetailUnionResolver=function(){function DetailUnionResolver2(){this.contexts=[]}return DetailUnionResolver2.prototype.createContext=function(){var ctx=new DetailContext;return this.contexts.push(ctx),ctx},DetailUnionResolver2}()},93191:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;(function(window2,undefined2){"use strict";var LIBVERSION="1.0.39",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded",UA_MAX_LENGTH=500,AMAZON="Amazon",APPLE="Apple",ASUS="ASUS",BLACKBERRY="BlackBerry",BROWSER="Browser",CHROME="Chrome",EDGE="Edge",FIREFOX="Firefox",GOOGLE="Google",HUAWEI="Huawei",LG="LG",MICROSOFT="Microsoft",MOTOROLA="Motorola",OPERA="Opera",SAMSUNG="Samsung",SHARP="Sharp",SONY="Sony",XIAOMI="Xiaomi",ZEBRA="Zebra",FACEBOOK="Facebook",CHROMIUM_OS="Chromium OS",MAC_OS="Mac OS",SUFFIX_BROWSER=" Browser",extend=function(regexes2,extensions){var mergedRegexes={};for(var i in regexes2)extensions[i]&&extensions[i].length%2===0?mergedRegexes[i]=extensions[i].concat(regexes2[i]):mergedRegexes[i]=regexes2[i];return mergedRegexes},enumerize=function(arr){for(var enums={},i=0;i<arr.length;i++)enums[arr[i].toUpperCase()]=arr[i];return enums},has=function(str1,str2){return typeof str1===STR_TYPE?lowerize(str2).indexOf(lowerize(str1))!==-1:!1},lowerize=function(str){return str.toLowerCase()},majorize=function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,EMPTY).split(".")[0]:undefined2},trim=function(str,len){if(typeof str===STR_TYPE)return str=str.replace(/^\s\s*/,EMPTY),typeof len===UNDEF_TYPE?str:str.substring(0,UA_MAX_LENGTH)},rgxMapper=function(ua,arrays){for(var i=0,j,k,p,q,matches,match;i<arrays.length&&!matches;){var regex=arrays[i],props=arrays[i+1];for(j=k=0;j<regex.length&&!matches&®ex[j];)if(matches=regex[j++].exec(ua),matches)for(p=0;p<props.length;p++)match=matches[++k],q=props[p],typeof q===OBJ_TYPE&&q.length>0?q.length===2?typeof q[1]==FUNC_TYPE?this[q[0]]=q[1].call(this,match):this[q[0]]=q[1]:q.length===3?typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)?this[q[0]]=match?q[1].call(this,match,q[2]):undefined2:this[q[0]]=match?match.replace(q[1],q[2]):undefined2:q.length===4&&(this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined2):this[q]=match||undefined2;i+=2}},strMapper=function(str,map){for(var i in map)if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j<map[i].length;j++)if(has(map[i][j],str))return i===UNKNOWN?undefined2:i}else if(has(map[i],str))return i===UNKNOWN?undefined2:i;return map.hasOwnProperty("*")?map["*"]:str},oldSafariMap={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},windowsVersionMap={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0","2000":"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0","7":"NT 6.1","8":"NT 6.2","8.1":"NT 6.3","10":["NT 6.4","NT 10.0"],RT:"ARM"},regexes={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[VERSION,[NAME,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[VERSION,[NAME,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[NAME,VERSION],[/opios[\/ ]+([\w\.]+)/i],[VERSION,[NAME,OPERA+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" GX"]],[/\bopr\/([\w\.]+)/i],[VERSION,[NAME,OPERA]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[VERSION,[NAME,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[NAME,VERSION],[/quark(?:pc)?\/([-\w\.]+)/i],[VERSION,[NAME,"Quark"]],[/\bddg\/([\w\.]+)/i],[VERSION,[NAME,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[VERSION,[NAME,"UC"+BROWSER]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[VERSION,[NAME,"WeChat"]],[/konqueror\/([\w\.]+)/i],[VERSION,[NAME,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[VERSION,[NAME,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[VERSION,[NAME,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[VERSION,[NAME,"Smart Lenovo "+BROWSER]],[/(avast|avg)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 Secure "+BROWSER],VERSION],[/\bfocus\/([\w\.]+)/i],[VERSION,[NAME,FIREFOX+" Focus"]],[/\bopt\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[VERSION,[NAME,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[VERSION,[NAME,"Dolphin"]],[/coast\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[VERSION,[NAME,"MIUI "+BROWSER]],[/fxios\/([-\w\.]+)/i],[VERSION,[NAME,FIREFOX]],[/\bqihu|(qi?ho?o?|360)browser/i],[[NAME,"360"+SUFFIX_BROWSER]],[/\b(qq)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1Browser"],VERSION],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[NAME,/(.+)/,"$1"+SUFFIX_BROWSER],VERSION],[/samsungbrowser\/([\w\.]+)/i],[VERSION,[NAME,SAMSUNG+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[NAME,/_/g," "],VERSION],[/metasr[\/ ]?([\d\.]+)/i],[VERSION,[NAME,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[NAME,"Sogou Mobile"],VERSION],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[NAME,VERSION],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[NAME],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[NAME,FACEBOOK],VERSION],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[NAME,VERSION],[/\bgsa\/([\w\.]+) .*safari\//i],[VERSION,[NAME,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[VERSION,[NAME,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[VERSION,[NAME,CHROME+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[NAME,CHROME+" WebView"],VERSION],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[VERSION,[NAME,"Android "+BROWSER]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[NAME,VERSION],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[VERSION,[NAME,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[VERSION,NAME],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[NAME,[VERSION,strMapper,oldSafariMap]],[/(webkit|khtml)\/([\w\.]+)/i],[NAME,VERSION],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[NAME,"Netscape"],VERSION],[/(wolvic)\/([\w\.]+)/i],[NAME,VERSION],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[VERSION,[NAME,FIREFOX+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[NAME,[VERSION,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[NAME,[VERSION,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[ARCHITECTURE,"amd64"]],[/(ia32(?=;))/i],[[ARCHITECTURE,lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[ARCHITECTURE,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[ARCHITECTURE,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[ARCHITECTURE,"armhf"]],[/windows (ce|mobile); ppc;/i],[[ARCHITECTURE,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[ARCHITECTURE,/ower/,EMPTY,lowerize]],[/(sun4\w)[;\)]/i],[[ARCHITECTURE,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[ARCHITECTURE,lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,TABLET]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,MOBILE]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[MODEL,[VENDOR,APPLE],[TYPE,MOBILE]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[MODEL,[VENDOR,APPLE],[TYPE,TABLET]],[/(macintosh);/i],[MODEL,[VENDOR,APPLE]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[MODEL,[VENDOR,SHARP],[TYPE,MOBILE]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,TABLET]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,MOBILE]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,MOBILE]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,TABLET]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[MODEL,[VENDOR,"OPPO"],[TYPE,MOBILE]],[/\b(opd2\d{3}a?) bui/i],[MODEL,[VENDOR,"OPPO"],[TYPE,TABLET]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[MODEL,[VENDOR,"Vivo"],[TYPE,MOBILE]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[MODEL,[VENDOR,"Realme"],[TYPE,MOBILE]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[MODEL,[VENDOR,MOTOROLA],[TYPE,MOBILE]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[MODEL,[VENDOR,MOTOROLA],[TYPE,TABLET]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[MODEL,[VENDOR,LG],[TYPE,TABLET]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[MODEL,[VENDOR,LG],[TYPE,MOBILE]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[MODEL,[VENDOR,"Lenovo"],[TYPE,TABLET]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[MODEL,/_/g," "],[VENDOR,"Nokia"],[TYPE,MOBILE]],[/(pixel c)\b/i],[MODEL,[VENDOR,GOOGLE],[TYPE,TABLET]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[MODEL,[VENDOR,GOOGLE],[TYPE,MOBILE]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[MODEL,[VENDOR,SONY],[TYPE,MOBILE]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[MODEL,"Xperia Tablet"],[VENDOR,SONY],[TYPE,TABLET]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[MODEL,[VENDOR,"OnePlus"],[TYPE,MOBILE]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[MODEL,[VENDOR,AMAZON],[TYPE,TABLET]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[MODEL,/(.+)/g,"Fire Phone $1"],[VENDOR,AMAZON],[TYPE,MOBILE]],[/(playbook);[-\w\),; ]+(rim)/i],[MODEL,VENDOR,[TYPE,TABLET]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[MODEL,[VENDOR,BLACKBERRY],[TYPE,MOBILE]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[MODEL,[VENDOR,ASUS],[TYPE,TABLET]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[MODEL,[VENDOR,ASUS],[TYPE,MOBILE]],[/(nexus 9)/i],[MODEL,[VENDOR,"HTC"],[TYPE,TABLET]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[VENDOR,[MODEL,/_/g," "],[TYPE,MOBILE]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[MODEL,[VENDOR,"TCL"],[TYPE,TABLET]],[/(itel) ((\w+))/i],[[VENDOR,lowerize],MODEL,[TYPE,strMapper,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[MODEL,[VENDOR,"Acer"],[TYPE,TABLET]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[MODEL,[VENDOR,"Meizu"],[TYPE,MOBILE]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[MODEL,[VENDOR,"Ulefone"],[TYPE,MOBILE]],[/droid.+; (a(?:015|06[35]|142p?))/i],[MODEL,[VENDOR,"Nothing"],[TYPE,MOBILE]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(surface duo)/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,TABLET]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[MODEL,[VENDOR,"Fairphone"],[TYPE,MOBILE]],[/(u304aa)/i],[MODEL,[VENDOR,"AT&T"],[TYPE,MOBILE]],[/\bsie-(\w*)/i],[MODEL,[VENDOR,"Siemens"],[TYPE,MOBILE]],[/\b(rct\w+) b/i],[MODEL,[VENDOR,"RCA"],[TYPE,TABLET]],[/\b(venue[\d ]{2,7}) b/i],[MODEL,[VENDOR,"Dell"],[TYPE,TABLET]],[/\b(q(?:mv|ta)\w+) b/i],[MODEL,[VENDOR,"Verizon"],[TYPE,TABLET]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[MODEL,[VENDOR,"Barnes & Noble"],[TYPE,TABLET]],[/\b(tm\d{3}\w+) b/i],[MODEL,[VENDOR,"NuVision"],[TYPE,TABLET]],[/\b(k88) b/i],[MODEL,[VENDOR,"ZTE"],[TYPE,TABLET]],[/\b(nx\d{3}j) b/i],[MODEL,[VENDOR,"ZTE"],[TYPE,MOBILE]],[/\b(gen\d{3}) b.+49h/i],[MODEL,[VENDOR,"Swiss"],[TYPE,MOBILE]],[/\b(zur\d{3}) b/i],[MODEL,[VENDOR,"Swiss"],[TYPE,TABLET]],[/\b((zeki)?tb.*\b) b/i],[MODEL,[VENDOR,"Zeki"],[TYPE,TABLET]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[VENDOR,"Dragon Touch"],MODEL,[TYPE,TABLET]],[/\b(ns-?\w{0,9}) b/i],[MODEL,[VENDOR,"Insignia"],[TYPE,TABLET]],[/\b((nxa|next)-?\w{0,9}) b/i],[MODEL,[VENDOR,"NextBook"],[TYPE,TABLET]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[VENDOR,"Voice"],MODEL,[TYPE,MOBILE]],[/\b(lvtel\-)?(v1[12]) b/i],[[VENDOR,"LvTel"],MODEL,[TYPE,MOBILE]],[/\b(ph-1) /i],[MODEL,[VENDOR,"Essential"],[TYPE,MOBILE]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[MODEL,[VENDOR,"Envizen"],[TYPE,TABLET]],[/\b(trio[-\w\. ]+) b/i],[MODEL,[VENDOR,"MachSpeed"],[TYPE,TABLET]],[/\btu_(1491) b/i],[MODEL,[VENDOR,"Rotor"],[TYPE,TABLET]],[/(shield[\w ]+) b/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,TABLET]],[/(sprint) (\w+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kin\.[onetw]{3})/i],[[MODEL,/\./g," "],[VENDOR,MICROSOFT],[TYPE,MOBILE]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,TABLET]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,MOBILE]],[/smart-tv.+(samsung)/i],[VENDOR,[TYPE,SMARTTV]],[/hbbtv.+maple;(\d+)/i],[[MODEL,/^/,"SmartTV"],[VENDOR,SAMSUNG],[TYPE,SMARTTV]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[VENDOR,LG],[TYPE,SMARTTV]],[/(apple) ?tv/i],[VENDOR,[MODEL,APPLE+" TV"],[TYPE,SMARTTV]],[/crkey/i],[[MODEL,CHROME+"cast"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/droid.+aft(\w+)( bui|\))/i],[MODEL,[VENDOR,AMAZON],[TYPE,SMARTTV]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[MODEL,[VENDOR,SHARP],[TYPE,SMARTTV]],[/(bravia[\w ]+)( bui|\))/i],[MODEL,[VENDOR,SONY],[TYPE,SMARTTV]],[/(mitv-\w{5}) bui/i],[MODEL,[VENDOR,XIAOMI],[TYPE,SMARTTV]],[/Hbbtv.*(technisat) (.*);/i],[VENDOR,MODEL,[TYPE,SMARTTV]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[VENDOR,trim],[MODEL,trim],[TYPE,SMARTTV]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[TYPE,SMARTTV]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[VENDOR,MODEL,[TYPE,CONSOLE]],[/droid.+; (shield) bui/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,CONSOLE]],[/(playstation [345portablevi]+)/i],[MODEL,[VENDOR,SONY],[TYPE,CONSOLE]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,CONSOLE]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,WEARABLE]],[/((pebble))app/i],[VENDOR,MODEL,[TYPE,WEARABLE]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[MODEL,[VENDOR,APPLE],[TYPE,WEARABLE]],[/droid.+; (glass) \d/i],[MODEL,[VENDOR,GOOGLE],[TYPE,WEARABLE]],[/droid.+; (wt63?0{2,3})\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,WEARABLE]],[/(quest( \d| pro)?)/i],[MODEL,[VENDOR,FACEBOOK],[TYPE,WEARABLE]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[VENDOR,[TYPE,EMBEDDED]],[/(aeobc)\b/i],[MODEL,[VENDOR,AMAZON],[TYPE,EMBEDDED]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[MODEL,[TYPE,MOBILE]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[MODEL,[TYPE,TABLET]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[TYPE,TABLET]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[TYPE,MOBILE]],[/(android[-\w\. ]{0,9});.+buil/i],[MODEL,[VENDOR,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[VERSION,[NAME,EDGE+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[VERSION,[NAME,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[NAME,VERSION],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[VERSION,NAME]],os:[[/microsoft (windows) (vista|xp)/i],[NAME,VERSION],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[NAME,[VERSION,strMapper,windowsVersionMap]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[VERSION,strMapper,windowsVersionMap],[NAME,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[VERSION,/_/g,"."],[NAME,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[NAME,MAC_OS],[VERSION,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[VERSION,NAME],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[NAME,VERSION],[/\(bb(10);/i],[VERSION,[NAME,BLACKBERRY]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[VERSION,[NAME,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[VERSION,[NAME,FIREFOX+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[VERSION,[NAME,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[VERSION,[NAME,"watchOS"]],[/crkey\/([\d\.]+)/i],[VERSION,[NAME,CHROME+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[NAME,CHROMIUM_OS],VERSION],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[NAME,VERSION],[/(sunos) ?([\w\.\d]*)/i],[[NAME,"Solaris"],VERSION],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[NAME,VERSION]]},UAParser=function(ua,extensions){if(typeof ua===OBJ_TYPE&&(extensions=ua,ua=undefined2),!(this instanceof UAParser))return new UAParser(ua,extensions).getResult();var _navigator=typeof window2!==UNDEF_TYPE&&window2.navigator?window2.navigator:undefined2,_ua=ua||(_navigator&&_navigator.userAgent?_navigator.userAgent:EMPTY),_uach=_navigator&&_navigator.userAgentData?_navigator.userAgentData:undefined2,_rgxmap=extensions?extend(regexes,extensions):regexes,_isSelfNav=_navigator&&_navigator.userAgent==_ua;return this.getBrowser=function(){var _browser={};return _browser[NAME]=undefined2,_browser[VERSION]=undefined2,rgxMapper.call(_browser,_ua,_rgxmap.browser),_browser[MAJOR]=majorize(_browser[VERSION]),_isSelfNav&&_navigator&&_navigator.brave&&typeof _navigator.brave.isBrave==FUNC_TYPE&&(_browser[NAME]="Brave"),_browser},this.getCPU=function(){var _cpu={};return _cpu[ARCHITECTURE]=undefined2,rgxMapper.call(_cpu,_ua,_rgxmap.cpu),_cpu},this.getDevice=function(){var _device={};return _device[VENDOR]=undefined2,_device[MODEL]=undefined2,_device[TYPE]=undefined2,rgxMapper.call(_device,_ua,_rgxmap.device),_isSelfNav&&!_device[TYPE]&&_uach&&_uach.mobile&&(_device[TYPE]=MOBILE),_isSelfNav&&_device[MODEL]=="Macintosh"&&_navigator&&typeof _navigator.standalone!==UNDEF_TYPE&&_navigator.maxTouchPoints&&_navigator.maxTouchPoints>2&&(_device[MODEL]="iPad",_device[TYPE]=TABLET),_device},this.getEngine=function(){var _engine={};return _engine[NAME]=undefined2,_engine[VERSION]=undefined2,rgxMapper.call(_engine,_ua,_rgxmap.engine),_engine},this.getOS=function(){var _os={};return _os[NAME]=undefined2,_os[VERSION]=undefined2,rgxMapper.call(_os,_ua,_rgxmap.os),_isSelfNav&&!_os[NAME]&&_uach&&_uach.platform&&_uach.platform!="Unknown"&&(_os[NAME]=_uach.platform.replace(/chrome os/i,CHROMIUM_OS).replace(/macos/i,MAC_OS)),_os},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return _ua},this.setUA=function(ua2){return _ua=typeof ua2===STR_TYPE&&ua2.length>UA_MAX_LENGTH?trim(ua2,UA_MAX_LENGTH):ua2,this},this.setUA(_ua),this};UAParser.VERSION=LIBVERSION,UAParser.BROWSER=enumerize([NAME,VERSION,MAJOR]),UAParser.CPU=enumerize([ARCHITECTURE]),UAParser.DEVICE=enumerize([MODEL,VENDOR,TYPE,CONSOLE,MOBILE,SMARTTV,TABLET,WEARABLE,EMBEDDED]),UAParser.ENGINE=UAParser.OS=enumerize([NAME,VERSION]),typeof exports!==UNDEF_TYPE?(UNDEF_TYPE!=="object"&&module.exports&&(exports=module.exports=UAParser),exports.UAParser=UAParser):FUNC_TYPE==="function"&&__webpack_require__.amdO?(__WEBPACK_AMD_DEFINE_RESULT__=function(){return UAParser}.call(exports,__webpack_require__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==undefined2&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)):typeof window2!==UNDEF_TYPE&&(window2.UAParser=UAParser);var $=typeof window2!==UNDEF_TYPE&&(window2.jQuery||window2.Zepto);if($&&!$.ua){var parser=new UAParser;$.ua=parser.getResult(),$.ua.get=function(){return parser.getUA()},$.ua.set=function(ua){parser.setUA(ua);var result=parser.getResult();for(var prop in result)$.ua[prop]=result[prop]}}})(typeof window=="object"?window:this)},52296:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var required=__webpack_require__(41384),qs=__webpack_require__(98878),controlOrWhitespace=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,CRHTLF=/[\n\r\t]/g,slashes=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,port=/:\d+$/,protocolre=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,windowsDriveLetter=/^[a-zA-Z]:/;function trimLeft(str){return(str||"").toString().replace(controlOrWhitespace,"")}var rules=[["#","hash"],["?","query"],function(address,url){return isSpecial(url.protocol)?address.replace(/\\/g,"/"):address},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ignore={hash:1,query:1};function lolcation(loc){var globalVar;typeof window<"u"?globalVar=window:typeof __webpack_require__.g<"u"?globalVar=__webpack_require__.g:typeof self<"u"?globalVar=self:globalVar={};var location=globalVar.location||{};loc=loc||location;var finaldestination={},type=typeof loc,key;if(loc.protocol==="blob:")finaldestination=new Url(unescape(loc.pathname),{});else if(type==="string"){finaldestination=new Url(loc,{});for(key in ignore)delete finaldestination[key]}else if(type==="object"){for(key in loc)key in ignore||(finaldestination[key]=loc[key]);finaldestination.slashes===void 0&&(finaldestination.slashes=slashes.test(loc.href))}return finaldestination}function isSpecial(scheme){return scheme==="file:"||scheme==="ftp:"||scheme==="http:"||scheme==="https:"||scheme==="ws:"||scheme==="wss:"}function extractProtocol(address,location){address=trimLeft(address),address=address.replace(CRHTLF,""),location=location||{};var match=protocolre.exec(address),protocol=match[1]?match[1].toLowerCase():"",forwardSlashes=!!match[2],otherSlashes=!!match[3],slashesCount=0,rest;return forwardSlashes?otherSlashes?(rest=match[2]+match[3]+match[4],slashesCount=match[2].length+match[3].length):(rest=match[2]+match[4],slashesCount=match[2].length):otherSlashes?(rest=match[3]+match[4],slashesCount=match[3].length):rest=match[4],protocol==="file:"?slashesCount>=2&&(rest=rest.slice(2)):isSpecial(protocol)?rest=match[4]:protocol?forwardSlashes&&(rest=rest.slice(2)):slashesCount>=2&&isSpecial(location.protocol)&&(rest=match[4]),{protocol,slashes:forwardSlashes||isSpecial(protocol),slashesCount,rest}}function resolve(relative,base){if(relative==="")return base;for(var path=(base||"/").split("/").slice(0,-1).concat(relative.split("/")),i=path.length,last=path[i-1],unshift=!1,up=0;i--;)path[i]==="."?path.splice(i,1):path[i]===".."?(path.splice(i,1),up++):up&&(i===0&&(unshift=!0),path.splice(i,1),up--);return unshift&&path.unshift(""),(last==="."||last==="..")&&path.push(""),path.join("/")}function Url(address,location,parser){if(address=trimLeft(address),address=address.replace(CRHTLF,""),!(this instanceof Url))return new Url(address,location,parser);var relative,extracted,parse,instruction,index,key,instructions=rules.slice(),type=typeof location,url=this,i=0;for(type!=="object"&&type!=="string"&&(parser=location,location=null),parser&&typeof parser!="function"&&(parser=qs.parse),location=lolcation(location),extracted=extractProtocol(address||"",location),relative=!extracted.protocol&&!extracted.slashes,url.slashes=extracted.slashes||relative&&location.slashes,url.protocol=extracted.protocol||location.protocol||"",address=extracted.rest,(extracted.protocol==="file:"&&(extracted.slashesCount!==2||windowsDriveLetter.test(address))||!extracted.slashes&&(extracted.protocol||extracted.slashesCount<2||!isSpecial(url.protocol)))&&(instructions[3]=[/(.*)/,"pathname"]);i<instructions.length;i++){if(instruction=instructions[i],typeof instruction=="function"){address=instruction(address,url);continue}parse=instruction[0],key=instruction[1],parse!==parse?url[key]=address:typeof parse=="string"?(index=parse==="@"?address.lastIndexOf(parse):address.indexOf(parse),~index&&(typeof instruction[2]=="number"?(url[key]=address.slice(0,index),address=address.slice(index+instruction[2])):(url[key]=address.slice(index),address=address.slice(0,index)))):(index=parse.exec(address))&&(url[key]=index[1],address=address.slice(0,index.index)),url[key]=url[key]||relative&&instruction[3]&&location[key]||"",instruction[4]&&(url[key]=url[key].toLowerCase())}parser&&(url.query=parser(url.query)),relative&&location.slashes&&url.pathname.charAt(0)!=="/"&&(url.pathname!==""||location.pathname!=="")&&(url.pathname=resolve(url.pathname,location.pathname)),url.pathname.charAt(0)!=="/"&&isSpecial(url.protocol)&&(url.pathname="/"+url.pathname),required(url.port,url.protocol)||(url.host=url.hostname,url.port=""),url.username=url.password="",url.auth&&(index=url.auth.indexOf(":"),~index?(url.username=url.auth.slice(0,index),url.username=encodeURIComponent(decodeURIComponent(url.username)),url.password=url.auth.slice(index+1),url.password=encodeURIComponent(decodeURIComponent(url.password))):url.username=encodeURIComponent(decodeURIComponent(url.auth)),url.auth=url.password?url.username+":"+url.password:url.username),url.origin=url.protocol!=="file:"&&isSpecial(url.protocol)&&url.host?url.protocol+"//"+url.host:"null",url.href=url.toString()}function set(part,value,fn){var url=this;switch(part){case"query":typeof value=="string"&&value.length&&(value=(fn||qs.parse)(value)),url[part]=value;break;case"port":url[part]=value,required(value,url.protocol)?value&&(url.host=url.hostname+":"+value):(url.host=url.hostname,url[part]="");break;case"hostname":url[part]=value,url.port&&(value+=":"+url.port),url.host=value;break;case"host":url[part]=value,port.test(value)?(value=value.split(":"),url.port=value.pop(),url.hostname=value.join(":")):(url.hostname=value,url.port="");break;case"protocol":url.protocol=value.toLowerCase(),url.slashes=!fn;break;case"pathname":case"hash":if(value){var char=part==="pathname"?"/":"#";url[part]=value.charAt(0)!==char?char+value:value}else url[part]=value;break;case"username":case"password":url[part]=encodeURIComponent(value);break;case"auth":var index=value.indexOf(":");~index?(url.username=value.slice(0,index),url.username=encodeURIComponent(decodeURIComponent(url.username)),url.password=value.slice(index+1),url.password=encodeURIComponent(decodeURIComponent(url.password))):url.username=encodeURIComponent(decodeURIComponent(value))}for(var i=0;i<rules.length;i++){var ins=rules[i];ins[4]&&(url[ins[1]]=url[ins[1]].toLowerCase())}return url.auth=url.password?url.username+":"+url.password:url.username,url.origin=url.protocol!=="file:"&&isSpecial(url.protocol)&&url.host?url.protocol+"//"+url.host:"null",url.href=url.toString(),url}function toString(stringify){(!stringify||typeof stringify!="function")&&(stringify=qs.stringify);var query,url=this,host=url.host,protocol=url.protocol;protocol&&protocol.charAt(protocol.length-1)!==":"&&(protocol+=":");var result=protocol+(url.protocol&&url.slashes||isSpecial(url.protocol)?"//":"");return url.username?(result+=url.username,url.password&&(result+=":"+url.password),result+="@"):url.password?(result+=":"+url.password,result+="@"):url.protocol!=="file:"&&isSpecial(url.protocol)&&!host&&url.pathname!=="/"&&(result+="@"),(host[host.length-1]===":"||port.test(url.hostname)&&!url.port)&&(host+=":"),result+=host+url.pathname,query=typeof url.query=="object"?stringify(url.query):url.query,query&&(result+=query.charAt(0)!=="?"?"?"+query:query),url.hash&&(result+=url.hash),result}Url.prototype={set,toString},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=qs,module.exports=Url},46393:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var __webpack_unused_export__,punycode=__webpack_require__(87004);function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r",`
|
|
371
371
|
`," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=__webpack_require__(6662);function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&typeof url=="object"&&url instanceof Url)return url;var u=new Url;return u.parse(url,parseQueryString,slashesDenoteHost),u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(typeof url!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex<url.indexOf("#")?"?":"#",uSplit=url.split(splitter),slashRegex=/\\/g;uSplit[0]=uSplit[0].replace(slashRegex,"/"),url=uSplit.join(splitter);var rest=url;if(rest=rest.trim(),!slashesDenoteHost&&url.split("#").length===1){var simplePath=simplePathPattern.exec(rest);if(simplePath)return this.path=rest,this.href=rest,this.pathname=simplePath[1],simplePath[2]?(this.search=simplePath[2],parseQueryString?this.query=querystring.parse(this.search.substr(1)):this.query=this.search.substr(1)):parseQueryString&&(this.search="",this.query={}),this}var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto,rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@/]+@[^@/]+/)){var slashes=rest.substr(0,2)==="//";slashes&&!(proto&&hostlessProtocol[proto])&&(rest=rest.substr(2),this.slashes=!0)}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){for(var hostEnd=-1,i=0;i<hostEndingChars.length;i++){var hec=rest.indexOf(hostEndingChars[i]);hec!==-1&&(hostEnd===-1||hec<hostEnd)&&(hostEnd=hec)}var auth,atSign;hostEnd===-1?atSign=rest.lastIndexOf("@"):atSign=rest.lastIndexOf("@",hostEnd),atSign!==-1&&(auth=rest.slice(0,atSign),rest=rest.slice(atSign+1),this.auth=decodeURIComponent(auth)),hostEnd=-1;for(var i=0;i<nonHostChars.length;i++){var hec=rest.indexOf(nonHostChars[i]);hec!==-1&&(hostEnd===-1||hec<hostEnd)&&(hostEnd=hec)}hostEnd===-1&&(hostEnd=rest.length),this.host=rest.slice(0,hostEnd),rest=rest.slice(hostEnd),this.parseHost(),this.hostname=this.hostname||"";var ipv6Hostname=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ipv6Hostname)for(var hostparts=this.hostname.split(/\./),i=0,l=hostparts.length;i<l;i++){var part=hostparts[i];if(!!part&&!part.match(hostnamePartPattern)){for(var newpart="",j=0,k=part.length;j<k;j++)part.charCodeAt(j)>127?newpart+="x":newpart+=part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),ipv6Hostname||(this.hostname=punycode.toASCII(this.hostname));var p=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+p,this.href+=this.host,ipv6Hostname&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),rest[0]!=="/"&&(rest="/"+rest))}if(!unsafeProtocol[lowerProto])for(var i=0,l=autoEscape.length;i<l;i++){var ae=autoEscape[i];if(rest.indexOf(ae)!==-1){var esc=encodeURIComponent(ae);esc===ae&&(esc=escape(ae)),rest=rest.split(ae).join(esc)}}var hash=rest.indexOf("#");hash!==-1&&(this.hash=rest.substr(hash),rest=rest.slice(0,hash));var qm=rest.indexOf("?");if(qm!==-1?(this.search=rest.substr(qm),this.query=rest.substr(qm+1),parseQueryString&&(this.query=querystring.parse(this.query)),rest=rest.slice(0,qm)):parseQueryString&&(this.search="",this.query={}),rest&&(this.pathname=rest),slashedProtocol[lowerProto]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var p=this.pathname||"",s=this.search||"";this.path=p+s}return this.href=this.format(),this};function urlFormat(obj){return typeof obj=="string"&&(obj=urlParse(obj)),obj instanceof Url?obj.format():Url.prototype.format.call(obj)}Url.prototype.format=function(){var auth=this.auth||"";auth&&(auth=encodeURIComponent(auth),auth=auth.replace(/%3A/i,":"),auth+="@");var protocol=this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=!1,query="";this.host?host=auth+this.host:this.hostname&&(host=auth+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(host+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(query=querystring.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var search=this.search||query&&"?"+query||"";return protocol&&protocol.substr(-1)!==":"&&(protocol+=":"),this.slashes||(!protocol||slashedProtocol[protocol])&&host!==!1?(host="//"+(host||""),pathname&&pathname.charAt(0)!=="/"&&(pathname="/"+pathname)):host||(host=""),hash&&hash.charAt(0)!=="#"&&(hash="#"+hash),search&&search.charAt(0)!=="?"&&(search="?"+search),pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)}),search=search.replace("#","%23"),protocol+host+pathname+search+hash};function urlResolve(source,relative){return urlParse(source,!1,!0).resolve(relative)}Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,!1,!0)).format()};function urlResolveObject(source,relative){return source?urlParse(source,!1,!0).resolveObject(relative):relative}Url.prototype.resolveObject=function(relative){if(typeof relative=="string"){var rel=new Url;rel.parse(relative,!1,!0),relative=rel}for(var result=new Url,tkeys=Object.keys(this),tk=0;tk<tkeys.length;tk++){var tkey=tkeys[tk];result[tkey]=this[tkey]}if(result.hash=relative.hash,relative.href==="")return result.href=result.format(),result;if(relative.slashes&&!relative.protocol){for(var rkeys=Object.keys(relative),rk=0;rk<rkeys.length;rk++){var rkey=rkeys[rk];rkey!=="protocol"&&(result[rkey]=relative[rkey])}return slashedProtocol[result.protocol]&&result.hostname&&!result.pathname&&(result.pathname="/",result.path=result.pathname),result.href=result.format(),result}if(relative.protocol&&relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol]){for(var keys=Object.keys(relative),v=0;v<keys.length;v++){var k=keys[v];result[k]=relative[k]}return result.href=result.format(),result}if(result.protocol=relative.protocol,!relative.host&&!hostlessProtocol[relative.protocol]){for(var relPath=(relative.pathname||"").split("/");relPath.length&&!(relative.host=relPath.shift()););relative.host||(relative.host=""),relative.hostname||(relative.hostname=""),relPath[0]!==""&&relPath.unshift(""),relPath.length<2&&relPath.unshift(""),result.pathname=relPath.join("/")}else result.pathname=relative.pathname;if(result.search=relative.search,result.query=relative.query,result.host=relative.host||"",result.auth=relative.auth,result.hostname=relative.hostname||relative.host,result.port=relative.port,result.pathname||result.search){var p=result.pathname||"",s=result.search||"";result.path=p+s}return result.slashes=result.slashes||relative.slashes,result.href=result.format(),result}var isSourceAbs=result.pathname&&result.pathname.charAt(0)==="/",isRelAbs=relative.host||relative.pathname&&relative.pathname.charAt(0)==="/",mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic&&(result.hostname="",result.port=null,result.host&&(srcPath[0]===""?srcPath[0]=result.host:srcPath.unshift(result.host)),result.host="",relative.protocol&&(relative.hostname=null,relative.port=null,relative.host&&(relPath[0]===""?relPath[0]=relative.host:relPath.unshift(relative.host)),relative.host=null),mustEndAbs=mustEndAbs&&(relPath[0]===""||srcPath[0]==="")),isRelAbs)result.host=relative.host||relative.host===""?relative.host:result.host,result.hostname=relative.hostname||relative.hostname===""?relative.hostname:result.hostname,result.search=relative.search,result.query=relative.query,srcPath=relPath;else if(relPath.length)srcPath||(srcPath=[]),srcPath.pop(),srcPath=srcPath.concat(relPath),result.search=relative.search,result.query=relative.query;else if(relative.search!=null){if(psychotic){result.host=srcPath.shift(),result.hostname=result.host;var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):!1;authInHost&&(result.auth=authInHost.shift(),result.hostname=authInHost.shift(),result.host=result.hostname)}return result.search=relative.search,result.query=relative.query,(result.pathname!==null||result.search!==null)&&(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.search?result.path="/"+result.search:result.path=null,result.href=result.format(),result;for(var last=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&(last==="."||last==="..")||last==="",up=0,i=srcPath.length;i>=0;i--)last=srcPath[i],last==="."?srcPath.splice(i,1):last===".."?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/")&&srcPath.unshift(""),hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/"&&srcPath.push("");var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=isAbsolute?"":srcPath.length?srcPath.shift():"",result.host=result.hostname;var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):!1;authInHost&&(result.auth=authInHost.shift(),result.hostname=authInHost.shift(),result.host=result.hostname)}return mustEndAbs=mustEndAbs||result.host&&srcPath.length,mustEndAbs&&!isAbsolute&&srcPath.unshift(""),srcPath.length>0?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),(result.pathname!==null||result.search!==null)&&(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.auth=relative.auth||result.auth,result.slashes=result.slashes||relative.slashes,result.href=result.format(),result},Url.prototype.parseHost=function(){var host=this.host,port=portPattern.exec(host);port&&(port=port[0],port!==":"&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)},__webpack_unused_export__=urlParse,__webpack_unused_export__=urlResolve,__webpack_unused_export__=urlResolveObject,__webpack_unused_export__=urlFormat,__webpack_unused_export__=Url},85830:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{useDebounce:()=>o,useDebouncedCallback:()=>c,useThrottledCallback:()=>f});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(59496);function c(u,e,c2){var i2=this,a2=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),o2=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0),f2=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),l=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)([]),m=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),v=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),d=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(u),p=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(!0);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){d.current=u},[u]);var g=!e&&e!==0&&typeof window<"u";if(typeof u!="function")throw new TypeError("Expected a function");e=+e||0;var w=!!(c2=c2||{}).leading,s=!("trailing"in c2)||!!c2.trailing,x="maxWait"in c2,y=x?Math.max(+c2.maxWait||0,e):null;(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){return p.current=!0,function(){p.current=!1}},[]);var h=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function(){var r=function(r2){var n2=l.current,t2=m.current;return l.current=m.current=null,o2.current=r2,v.current=d.current.apply(t2,n2)},n=function(r2,n2){g&&cancelAnimationFrame(f2.current),f2.current=g?requestAnimationFrame(r2):setTimeout(r2,n2)},t=function(r2){if(!p.current)return!1;var n2=r2-a2.current;return!a2.current||n2>=e||n2<0||x&&r2-o2.current>=y},u2=function(n2){return f2.current=null,s&&l.current?r(n2):(l.current=m.current=null,v.current)},c3=function r2(){var c4=Date.now();if(t(c4))return u2(c4);if(p.current){var i3=e-(c4-a2.current),f3=x?Math.min(i3,y-(c4-o2.current)):i3;n(r2,f3)}},h2=function(){var u3=Date.now(),d2=t(u3);if(l.current=[].slice.call(arguments),m.current=i2,a2.current=u3,d2){if(!f2.current&&p.current)return o2.current=a2.current,n(c3,e),w?r(a2.current):v.current;if(x)return n(c3,e),r(a2.current)}return f2.current||n(c3,e),v.current};return h2.cancel=function(){f2.current&&(g?cancelAnimationFrame(f2.current):clearTimeout(f2.current)),o2.current=0,l.current=a2.current=m.current=f2.current=null},h2.isPending=function(){return!!f2.current},h2.flush=function(){return f2.current?u2(Date.now()):v.current},h2},[w,x,e,y,s,g]);return h}function i(r,n){return r===n}function a(r){return typeof r=="function"?function(){return r}:r}function o(n,t,o2){var f2,l,m=o2&&o2.equalityFn||i,v=(f2=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(a(n)),l=f2[1],[f2[0],(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function(r){return l(a(r))},[])]),d=v[0],p=v[1],g=c((0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function(r){return p(r)},[p]),t,o2),w=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(n);return m(w.current,n)||(g(n),w.current=n),[d,g]}function f(r,n,t){var u=t===void 0?{}:t,e=u.leading,i2=u.trailing;return c(r,n,{maxWait:n,leading:e===void 0||e,trailing:i2===void 0||i2})}},85587:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{useDeepCompareCallback:()=>useDeepCompareCallback,useDeepCompareEffect:()=>useDeepCompareEffect,useDeepCompareImperativeHandle:()=>useDeepCompareImperativeHandle,useDeepCompareLayoutEffect:()=>useDeepCompareLayoutEffect,useDeepCompareMemo:()=>useDeepCompareMemo});var react=__webpack_require__(59496),has=Object.prototype.hasOwnProperty;function find(iter,tar,key){for(key of iter.keys())if(dequal(key,tar))return key}function dequal(foo,bar){var ctor,len,tmp;if(foo===bar)return!0;if(foo&&bar&&(ctor=foo.constructor)===bar.constructor){if(ctor===Date)return foo.getTime()===bar.getTime();if(ctor===RegExp)return foo.toString()===bar.toString();if(ctor===Array){if((len=foo.length)===bar.length)for(;len--&&dequal(foo[len],bar[len]););return len===-1}if(ctor===Set){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len,tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!bar.has(tmp))return!1;return!0}if(ctor===Map){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len[0],tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!dequal(len[1],bar.get(tmp)))return!1;return!0}if(ctor===ArrayBuffer)foo=new Uint8Array(foo),bar=new Uint8Array(bar);else if(ctor===DataView){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo.getInt8(len)===bar.getInt8(len););return len===-1}if(ArrayBuffer.isView(foo)){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo[len]===bar[len];);return len===-1}if(!ctor||typeof foo=="object"){len=0;for(ctor in foo)if(has.call(foo,ctor)&&++len&&!has.call(bar,ctor)||!(ctor in bar)||!dequal(foo[ctor],bar[ctor]))return!1;return Object.keys(bar).length===len}}return foo!==foo&&bar!==bar}function useDeepCompareMemoize(dependencies){const dependenciesRef=react.useRef(dependencies),signalRef=react.useRef(0);return dequal(dependencies,dependenciesRef.current)||(dependenciesRef.current=dependencies,signalRef.current+=1),react.useMemo(()=>dependenciesRef.current,[signalRef.current])}function useDeepCompareCallback(callback,dependencies){return react.useCallback(callback,useDeepCompareMemoize(dependencies))}function useDeepCompareEffect(effect,dependencies){react.useEffect(effect,useDeepCompareMemoize(dependencies))}function useDeepCompareImperativeHandle(ref,init,dependencies){react.useImperativeHandle(ref,init,useDeepCompareMemoize(dependencies))}function useDeepCompareLayoutEffect(effect,dependencies){react.useLayoutEffect(effect,useDeepCompareMemoize(dependencies))}function useDeepCompareMemo(factory,dependencies){return react.useMemo(factory,useDeepCompareMemoize(dependencies))}},48863:(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation"))return fn;var warned=!1;function deprecated(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);config("traceDeprecation")?console.trace(msg):console.warn(msg),warned=!0}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!__webpack_require__.g.localStorage)return!1}catch{return!1}var val=__webpack_require__.g.localStorage[name];return val==null?!1:String(val).toLowerCase()==="true"}},97952:module=>{module.exports=function(arg){return arg&&typeof arg=="object"&&typeof arg.copy=="function"&&typeof arg.fill=="function"&&typeof arg.readUInt8=="function"}},14911:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var isArgumentsObject=__webpack_require__(42571),isGeneratorFunction=__webpack_require__(89141),whichTypedArray=__webpack_require__(83963),isTypedArray=__webpack_require__(37261);function uncurryThis(f){return f.call.bind(f)}var BigIntSupported=typeof BigInt<"u",SymbolSupported=typeof Symbol<"u",ObjectToString=uncurryThis(Object.prototype.toString),numberValue=uncurryThis(Number.prototype.valueOf),stringValue=uncurryThis(String.prototype.valueOf),booleanValue=uncurryThis(Boolean.prototype.valueOf);if(BigIntSupported)var bigIntValue=uncurryThis(BigInt.prototype.valueOf);if(SymbolSupported)var symbolValue=uncurryThis(Symbol.prototype.valueOf);function checkBoxedPrimitive(value,prototypeValueOf){if(typeof value!="object")return!1;try{return prototypeValueOf(value),!0}catch{return!1}}exports.isArgumentsObject=isArgumentsObject,exports.isGeneratorFunction=isGeneratorFunction,exports.isTypedArray=isTypedArray;function isPromise(input){return typeof Promise<"u"&&input instanceof Promise||input!==null&&typeof input=="object"&&typeof input.then=="function"&&typeof input.catch=="function"}exports.isPromise=isPromise;function isArrayBufferView(value){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(value):isTypedArray(value)||isDataView(value)}exports.isArrayBufferView=isArrayBufferView;function isUint8Array(value){return whichTypedArray(value)==="Uint8Array"}exports.isUint8Array=isUint8Array;function isUint8ClampedArray(value){return whichTypedArray(value)==="Uint8ClampedArray"}exports.isUint8ClampedArray=isUint8ClampedArray;function isUint16Array(value){return whichTypedArray(value)==="Uint16Array"}exports.isUint16Array=isUint16Array;function isUint32Array(value){return whichTypedArray(value)==="Uint32Array"}exports.isUint32Array=isUint32Array;function isInt8Array(value){return whichTypedArray(value)==="Int8Array"}exports.isInt8Array=isInt8Array;function isInt16Array(value){return whichTypedArray(value)==="Int16Array"}exports.isInt16Array=isInt16Array;function isInt32Array(value){return whichTypedArray(value)==="Int32Array"}exports.isInt32Array=isInt32Array;function isFloat32Array(value){return whichTypedArray(value)==="Float32Array"}exports.isFloat32Array=isFloat32Array;function isFloat64Array(value){return whichTypedArray(value)==="Float64Array"}exports.isFloat64Array=isFloat64Array;function isBigInt64Array(value){return whichTypedArray(value)==="BigInt64Array"}exports.isBigInt64Array=isBigInt64Array;function isBigUint64Array(value){return whichTypedArray(value)==="BigUint64Array"}exports.isBigUint64Array=isBigUint64Array;function isMapToString(value){return ObjectToString(value)==="[object Map]"}isMapToString.working=typeof Map<"u"&&isMapToString(new Map);function isMap(value){return typeof Map>"u"?!1:isMapToString.working?isMapToString(value):value instanceof Map}exports.isMap=isMap;function isSetToString(value){return ObjectToString(value)==="[object Set]"}isSetToString.working=typeof Set<"u"&&isSetToString(new Set);function isSet(value){return typeof Set>"u"?!1:isSetToString.working?isSetToString(value):value instanceof Set}exports.isSet=isSet;function isWeakMapToString(value){return ObjectToString(value)==="[object WeakMap]"}isWeakMapToString.working=typeof WeakMap<"u"&&isWeakMapToString(new WeakMap);function isWeakMap(value){return typeof WeakMap>"u"?!1:isWeakMapToString.working?isWeakMapToString(value):value instanceof WeakMap}exports.isWeakMap=isWeakMap;function isWeakSetToString(value){return ObjectToString(value)==="[object WeakSet]"}isWeakSetToString.working=typeof WeakSet<"u"&&isWeakSetToString(new WeakSet);function isWeakSet(value){return isWeakSetToString(value)}exports.isWeakSet=isWeakSet;function isArrayBufferToString(value){return ObjectToString(value)==="[object ArrayBuffer]"}isArrayBufferToString.working=typeof ArrayBuffer<"u"&&isArrayBufferToString(new ArrayBuffer);function isArrayBuffer(value){return typeof ArrayBuffer>"u"?!1:isArrayBufferToString.working?isArrayBufferToString(value):value instanceof ArrayBuffer}exports.isArrayBuffer=isArrayBuffer;function isDataViewToString(value){return ObjectToString(value)==="[object DataView]"}isDataViewToString.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&isDataViewToString(new DataView(new ArrayBuffer(1),0,1));function isDataView(value){return typeof DataView>"u"?!1:isDataViewToString.working?isDataViewToString(value):value instanceof DataView}exports.isDataView=isDataView;var SharedArrayBufferCopy=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function isSharedArrayBufferToString(value){return ObjectToString(value)==="[object SharedArrayBuffer]"}function isSharedArrayBuffer(value){return typeof SharedArrayBufferCopy>"u"?!1:(typeof isSharedArrayBufferToString.working>"u"&&(isSharedArrayBufferToString.working=isSharedArrayBufferToString(new SharedArrayBufferCopy)),isSharedArrayBufferToString.working?isSharedArrayBufferToString(value):value instanceof SharedArrayBufferCopy)}exports.isSharedArrayBuffer=isSharedArrayBuffer;function isAsyncFunction(value){return ObjectToString(value)==="[object AsyncFunction]"}exports.isAsyncFunction=isAsyncFunction;function isMapIterator(value){return ObjectToString(value)==="[object Map Iterator]"}exports.isMapIterator=isMapIterator;function isSetIterator(value){return ObjectToString(value)==="[object Set Iterator]"}exports.isSetIterator=isSetIterator;function isGeneratorObject(value){return ObjectToString(value)==="[object Generator]"}exports.isGeneratorObject=isGeneratorObject;function isWebAssemblyCompiledModule(value){return ObjectToString(value)==="[object WebAssembly.Module]"}exports.isWebAssemblyCompiledModule=isWebAssemblyCompiledModule;function isNumberObject(value){return checkBoxedPrimitive(value,numberValue)}exports.isNumberObject=isNumberObject;function isStringObject(value){return checkBoxedPrimitive(value,stringValue)}exports.isStringObject=isStringObject;function isBooleanObject(value){return checkBoxedPrimitive(value,booleanValue)}exports.isBooleanObject=isBooleanObject;function isBigIntObject(value){return BigIntSupported&&checkBoxedPrimitive(value,bigIntValue)}exports.isBigIntObject=isBigIntObject;function isSymbolObject(value){return SymbolSupported&&checkBoxedPrimitive(value,symbolValue)}exports.isSymbolObject=isSymbolObject;function isBoxedPrimitive(value){return isNumberObject(value)||isStringObject(value)||isBooleanObject(value)||isBigIntObject(value)||isSymbolObject(value)}exports.isBoxedPrimitive=isBoxedPrimitive;function isAnyArrayBuffer(value){return typeof Uint8Array<"u"&&(isArrayBuffer(value)||isSharedArrayBuffer(value))}exports.isAnyArrayBuffer=isAnyArrayBuffer,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(method){Object.defineProperty(exports,method,{enumerable:!1,value:function(){throw new Error(method+" is not supported in userland")}})})},93585:(__unused_webpack_module,exports,__webpack_require__)=>{var process=__webpack_require__(14224),getOwnPropertyDescriptors=Object.getOwnPropertyDescriptors||function(obj){for(var keys=Object.keys(obj),descriptors={},i=0;i<keys.length;i++)descriptors[keys[i]]=Object.getOwnPropertyDescriptor(obj,keys[i]);return descriptors},formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i<arguments.length;i++)objects.push(inspect(arguments[i]));return objects.join(" ")}for(var i=1,args=arguments,len=args.length,str=String(f).replace(formatRegExp,function(x2){if(x2==="%%")return"%";if(i>=len)return x2;switch(x2){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch{return"[Circular]"}default:return x2}}),x=args[i];i<len;x=args[++i])isNull(x)||!isObject(x)?str+=" "+x:str+=" "+inspect(x);return str},exports.deprecate=function(fn,msg){if(typeof process<"u"&&process.noDeprecation===!0)return fn;if(typeof process>"u")return function(){return exports.deprecate(fn,msg).apply(this,arguments)};var warned=!1;function deprecated(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)}return deprecated};var debugs={},debugEnvRegex=/^$/;if(process.env.NODE_DEBUG){var debugEnv=process.env.NODE_DEBUG;debugEnv=debugEnv.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),debugEnvRegex=new RegExp("^"+debugEnv+"$","i")}exports.debuglog=function(set){if(set=set.toUpperCase(),!debugs[set])if(debugEnvRegex.test(set)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]};function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect,inspect.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]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"\x1B["+inspect.colors[style][0]+"m"+str+"\x1B["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=arrayToHash(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=!1,braces=["{","}"];if(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),keys.length===0&&(!array||value.length==0))return braces[0]+base+braces[1];if(recurseTimes<0)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output;return array?output=formatArray(ctx,value,recurseTimes,visibleKeys,keys):output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i<l;++i)hasOwnProperty(value,String(i))?output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output.push("");return keys.forEach(function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if(desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]},desc.get?desc.set?str=ctx.stylize("[Getter/Setter]","special"):str=ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(isNull(recurseTimes)?str=formatValue(ctx,desc.value,null):str=formatValue(ctx,desc.value,recurseTimes-1),str.indexOf(`
|
|
372
372
|
`)>-1&&(array?str=str.split(`
|
|
373
373
|
`).map(function(line){return" "+line}).join(`
|