diff --git a/dist/index.umd.js b/dist/index.umd.js index 137d52f..f417107 100644 --- a/dist/index.umd.js +++ b/dist/index.umd.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self)["babel-plugin-inferno"]=t()}(this,function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t){return e(t={exports:{}},t.exports),t.exports}var n=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.declare=function(s){return function(e,t,r){for(var n,a=0,i=Object.keys(l);ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(o)throw a}}}}var pe=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r=Object.keys(t),n=0,a=r;na.length)return!1;for(var o=0,s=i.length-1;o","<",">=","<="];t.BOOLEAN_NUMBER_BINARY_OPERATORS=n;var a=["==","===","!=","!=="];t.EQUALITY_BINARY_OPERATORS=a;a=[].concat(a,["in","instanceof"]);t.COMPARISON_BINARY_OPERATORS=a;a=[].concat(B(a),n);t.BOOLEAN_BINARY_OPERATORS=a;n=["-","/","%","*","**","&","|",">>",">>>","<<","^"];t.NUMBER_BINARY_OPERATORS=n;a=["+"].concat(n,B(a));t.BINARY_OPERATORS=a;a=["=","+="].concat(B(n.map(function(e){return e+"="})),B(r.map(function(e){return e+"="})));t.ASSIGNMENT_OPERATORS=a;n=["delete","!"];t.BOOLEAN_UNARY_OPERATORS=n;r=["+","-","~"];t.NUMBER_UNARY_OPERATORS=r;a=["typeof"];t.STRING_UNARY_OPERATORS=a;a=["void","throw"].concat(n,r,a);t.UNARY_OPERATORS=a;t.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};a=Symbol.for("var used to be block scoped");t.BLOCK_SCOPED_SYMBOL=a;a=Symbol.for("should not be considered a local binding");t.NOT_LOCAL_BINDING=a});t(be),be.NOT_LOCAL_BINDING,be.BLOCK_SCOPED_SYMBOL,be.INHERIT_KEYS,be.UNARY_OPERATORS,be.STRING_UNARY_OPERATORS,be.NUMBER_UNARY_OPERATORS,be.BOOLEAN_UNARY_OPERATORS,be.ASSIGNMENT_OPERATORS,be.BINARY_OPERATORS,be.NUMBER_BINARY_OPERATORS,be.BOOLEAN_BINARY_OPERATORS,be.COMPARISON_BINARY_OPERATORS,be.EQUALITY_BINARY_OPERATORS,be.BOOLEAN_NUMBER_BINARY_OPERATORS,be.UPDATE_OPERATORS,be.LOGICAL_OPERATORS,be.COMMENT_KEYS,be.FOR_INIT_KEYS,be.FLATTENABLE_KEYS,be.STATEMENT_OR_BLOCK_KEYS;var Pe=r(function(e,t){function a(e,t,r,n){null!=n&&n.validate&&(n.optional&&null==r||n.validate(e,t,r))}function i(e,t,r){var n;null==r||(n=Ae.NODE_PARENT_VALIDATIONS[r.type])&&n(e,t,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var n;!e||(n=Ae.NODE_FIELDS[e.type])&&(n=n[t],a(e,t,r,n),i(e,t,r))},t.validateField=a,t.validateChild=i});t(Pe),Pe.validateField,Pe.validateChild;var M=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validate=n,t.typeIs=a,t.validateType=function(e){return n(a(e))},t.validateOptional=function(e){return{validate:e,optional:!0}},t.validateOptionalType=function(e){return{validate:a(e),optional:!0}},t.arrayOf=i,t.arrayOfType=o,t.validateArrayOfType=function(e){return n(o(e))},t.assertEach=l,t.assertOneOf=function(){for(var e=arguments.length,n=new Array(e),t=0;tt+1)throw new TypeError("RestElement must be last element of ".concat(r))}}}),(0,r.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,r.assertNodeType)("Expression"),optional:!0}}}),(0,r.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,r.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,r.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Statement")))}}}),(0,r.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,r.assertNodeType)("Expression")},cases:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("SwitchCase")))}}}),(0,r.default)("ThisExpression",{aliases:["Expression"]}),(0,r.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:(0,r.chain)((0,r.assertNodeType)("BlockStatement"),Object.assign(function(e){if(process.env.BABEL_TYPES_8_BREAKING&&!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:!0,validate:(0,r.assertNodeType)("CatchClause")},finalizer:{optional:!0,validate:(0,r.assertNodeType)("BlockStatement")}}}),(0,r.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,r.assertNodeType)("Expression")},operator:{validate:r.assertOneOf.apply(void 0,B(be.UNARY_OPERATORS))}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,r.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,r.assertNodeType)("Identifier","MemberExpression"):(0,r.assertNodeType)("Expression")},operator:{validate:r.assertOneOf.apply(void 0,B(be.UPDATE_OPERATORS))}},visitor:["argument"],aliases:["Expression"]}),(0,r.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,r.assertValueType)("boolean"),optional:!0},kind:{validate:(0,r.assertOneOf)("var","let","const")},declarations:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("VariableDeclarator")))}},validate:function(e,t,r){if(process.env.BABEL_TYPES_8_BREAKING&&(0,i.default)("ForXStatement",e,{left:r})&&1!==r.declarations.length)throw new TypeError("Exactly one VariableDeclarator is required in the VariableDeclaration of a ".concat(e.type))}}),(0,r.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,r.assertNodeType)("LVal");var n=(0,r.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),a=(0,r.assertNodeType)("Identifier");return function(e,t,r){(e.init?n:a)(e,t,r)}}()},definite:{optional:!0,validate:(0,r.assertValueType)("boolean")},init:{optional:!0,validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,r.assertNodeType)("Expression")},body:{validate:(0,r.assertNodeType)("Statement")}}}),(0,r.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,r.assertNodeType)("Expression")},body:{validate:(0,r.assertNodeType)("Statement")}}}),(0,r.default)("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},O,{left:{validate:(0,r.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression")},right:{validate:(0,r.assertNodeType)("Expression")},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0}})}),(0,r.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},O,{elements:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeOrValueType)("null","PatternLike")))},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0}})}),(0,r.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},p,c,{expression:{validate:(0,r.assertValueType)("boolean")},body:{validate:(0,r.assertNodeType)("BlockStatement","Expression")}})}),(0,r.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","TSDeclareMethod","TSIndexSignature")))}}}),(0,r.default)("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,r.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,r.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,r.assertNodeType)("Expression")},superTypeParameters:{validate:(0,r.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0},mixins:{validate:(0,r.assertNodeType)("InterfaceExtends"),optional:!0}}}),(0,r.default)("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,r.assertNodeType)("Identifier")},typeParameters:{validate:(0,r.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,r.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,r.assertNodeType)("Expression")},superTypeParameters:{validate:(0,r.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0},mixins:{validate:(0,r.assertNodeType)("InterfaceExtends"),optional:!0},declare:{validate:(0,r.assertValueType)("boolean"),optional:!0},abstract:{validate:(0,r.assertValueType)("boolean"),optional:!0}},validate:(P=(0,r.assertNodeType)("Identifier"),function(e,t,r){process.env.BABEL_TYPES_8_BREAKING&&((0,i.default)("ExportDefaultDeclaration",e)||P(r,"id",r.id))})}),(0,r.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,r.assertNodeType)("StringLiteral")},exportKind:(0,r.validateOptional)((0,r.assertOneOf)("type","value")),assertions:{optional:!0,validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("ImportAttribute")))}}}),(0,r.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,r.assertNodeType)("FunctionDeclaration","TSDeclareFunction","ClassDeclaration","Expression")}}}),(0,r.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{optional:!0,validate:(0,r.chain)((0,r.assertNodeType)("Declaration"),Object.assign(function(e,t,r){if(process.env.BABEL_TYPES_8_BREAKING&&r&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration")},{oneOfNodeTypes:["Declaration"]}),function(e,t,r){if(process.env.BABEL_TYPES_8_BREAKING&&r&&e.source)throw new TypeError("Cannot export a declaration from a source")})},assertions:{optional:!0,validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("ImportAttribute")))},specifiers:{default:[],validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((A=(0,r.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),g=(0,r.assertNodeType)("ExportSpecifier"),process.env.BABEL_TYPES_8_BREAKING?function(e,t,r){(e.source?A:g)(e,t,r)}:A)))},source:{validate:(0,r.assertNodeType)("StringLiteral"),optional:!0},exportKind:(0,r.validateOptional)((0,r.assertOneOf)("type","value"))}}),(0,r.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,r.assertNodeType)("Identifier")},exported:{validate:(0,r.assertNodeType)("Identifier","StringLiteral")}}}),(0,r.default)("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,r.assertNodeType)("VariableDeclaration","LVal");var n=(0,r.assertNodeType)("VariableDeclaration"),a=(0,r.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern");return function(e,t,r){((0,i.default)("VariableDeclaration",r)?n:a)(e,t,r)}}()},right:{validate:(0,r.assertNodeType)("Expression")},body:{validate:(0,r.assertNodeType)("Statement")},await:{default:!1}}}),(0,r.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{assertions:{optional:!0,validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("ImportAttribute")))},specifiers:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,r.assertNodeType)("StringLiteral")},importKind:{validate:(0,r.assertOneOf)("type","typeof","value"),optional:!0}}}),(0,r.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,r.assertNodeType)("Identifier")},imported:{validate:(0,r.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,r.assertOneOf)("type","typeof"),optional:!0}}}),(0,r.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,r.chain)((0,r.assertNodeType)("Identifier"),Object.assign(function(e,t,r){if(process.env.BABEL_TYPES_8_BREAKING){var n;switch(r.name){case"function":n="sent";break;case"new":n="target";break;case"import":n="meta"}if(!(0,i.default)("Identifier",e.property,{name:n}))throw new TypeError("Unrecognised MetaProperty")}},{oneOfNodeTypes:["Identifier"]}))},property:{validate:(0,r.assertNodeType)("Identifier")}}});var N,D,d={abstract:{validate:(0,r.assertValueType)("boolean"),optional:!0},accessibility:{validate:(0,r.assertOneOf)("public","private","protected"),optional:!0},static:{default:!1},computed:{default:!1},optional:{validate:(0,r.assertValueType)("boolean"),optional:!0},key:{validate:(0,r.chain)((N=(0,r.assertNodeType)("Identifier","StringLiteral","NumericLiteral"),D=(0,r.assertNodeType)("Expression"),function(e,t,r){(e.computed?D:N)(e,t,r)}),(0,r.assertNodeType)("Identifier","StringLiteral","NumericLiteral","Expression"))}};t.classMethodOrPropertyCommon=d;var j,_,d=Object.assign({},p,d,{kind:{validate:(0,r.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,r.chain)((0,r.assertValueType)("string"),(0,r.assertOneOf)("public","private","protected")),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0}});function L(e,t,r){(e.computed?_:j)(e,t,r)}t.classMethodOrDeclareMethodCommon=d,(0,r.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:Object.assign({},d,c,{body:{validate:(0,r.assertNodeType)("BlockStatement")}})}),(0,r.default)("ObjectPattern",{visitor:["properties","typeAnnotation","decorators"],builder:["properties"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},O,{properties:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("RestElement","ObjectProperty")))}})}),(0,r.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("Super",{aliases:["Expression"]}),(0,r.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,r.assertNodeType)("Expression")},quasi:{validate:(0,r.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,r.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),(0,r.default)("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,r.assertShape)({raw:{validate:(0,r.assertValueType)("string")},cooked:{validate:(0,r.assertValueType)("string"),optional:!0}})},tail:{default:!1}}}),(0,r.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TemplateElement")))},expressions:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Expression","TSType")),function(e,t,r){if(e.quasis.length!==r.length+1)throw new TypeError("Number of ".concat(e.type," quasis should be exactly one more than the number of expressions.\nExpected ").concat(r.length+1," quasis but got ").concat(e.quasis.length))})}}}),(0,r.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,r.chain)((0,r.assertValueType)("boolean"),Object.assign(function(e,t,r){if(process.env.BABEL_TYPES_8_BREAKING&&r&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})),default:!1},argument:{optional:!0,validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("Import",{aliases:["Expression"]}),(0,r.default)("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,r.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,r.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,r.assertNodeType)("Expression")},property:{validate:(j=(0,r.assertNodeType)("Identifier"),_=(0,r.assertNodeType)("Expression"),L.oneOfNodeTypes=["Expression","Identifier"],L)},computed:{default:!1},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,r.chain)((0,r.assertValueType)("boolean"),(0,r.assertOptionalChainStart)()):(0,r.assertValueType)("boolean")}}}),(0,r.default)("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:(0,r.assertNodeType)("Expression")},arguments:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,r.chain)((0,r.assertValueType)("boolean"),(0,r.assertOptionalChainStart)()):(0,r.assertValueType)("boolean")},typeArguments:{validate:(0,r.assertNodeType)("TypeParameterInstantiation"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}}})});t(p),p.classMethodOrDeclareMethodCommon,p.classMethodOrPropertyCommon,p.patternLikeCommon,p.functionDeclarationCommon,p.functionTypeAnnotationCommon,p.functionCommon,t(r(function(e){var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==ue(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var r,n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var i;Object.prototype.hasOwnProperty.call(e,r)&&((i=a?Object.getOwnPropertyDescriptor(e,r):null)&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r])}n.default=e,t&&t.set(e,n);return n}(M);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function t(e){var t=1r.length)throw new Error("".concat(n,": Too many arguments passed. Received ").concat(i," but can receive no more than ").concat(r.length));var o={type:n},s=0;r.forEach(function(e){var t,r=Ae.NODE_FIELDS[n][e];void 0===(t=s=Number.MAX_SAFE_INTEGER?i.uid=0:i.uid++}});t(kr);var Yr=r(function(e,t){function u(e,t,r){for(var n=[].concat(e),a=Object.create(null);n.length;){var i=n.shift();if(i){var o=u.keys[i.type];if((0,ce.isIdentifier)(i))t?(a[i.name]=a[i.name]||[]).push(i):a[i.name]=i;else if(!(0,ce.isExportDeclaration)(i)||(0,ce.isExportAllDeclaration)(i)){if(r){if((0,ce.isFunctionDeclaration)(i)){n.push(i.id);continue}if((0,ce.isFunctionExpression)(i))continue}if(o)for(var s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(o)throw a}}}}var ue=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r=Object.keys(t),n=0,a=r;na.length)return!1;for(var o=0,s=i.length-1;o","<",">=","<="];t.BOOLEAN_NUMBER_BINARY_OPERATORS=n;var a=["==","===","!=","!=="];t.EQUALITY_BINARY_OPERATORS=a;a=[].concat(a,["in","instanceof"]);t.COMPARISON_BINARY_OPERATORS=a;a=[].concat(F(a),n);t.BOOLEAN_BINARY_OPERATORS=a;n=["-","/","%","*","**","&","|",">>",">>>","<<","^"];t.NUMBER_BINARY_OPERATORS=n;a=["+"].concat(n,F(a));t.BINARY_OPERATORS=a;a=["=","+="].concat(F(n.map(function(e){return e+"="})),F(r.map(function(e){return e+"="})));t.ASSIGNMENT_OPERATORS=a;n=["delete","!"];t.BOOLEAN_UNARY_OPERATORS=n;r=["+","-","~"];t.NUMBER_UNARY_OPERATORS=r;a=["typeof"];t.STRING_UNARY_OPERATORS=a;a=["void","throw"].concat(n,r,a);t.UNARY_OPERATORS=a;t.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};a=Symbol.for("var used to be block scoped");t.BLOCK_SCOPED_SYMBOL=a;a=Symbol.for("should not be considered a local binding");t.NOT_LOCAL_BINDING=a});t(be),be.NOT_LOCAL_BINDING,be.BLOCK_SCOPED_SYMBOL,be.INHERIT_KEYS,be.UNARY_OPERATORS,be.STRING_UNARY_OPERATORS,be.NUMBER_UNARY_OPERATORS,be.BOOLEAN_UNARY_OPERATORS,be.ASSIGNMENT_OPERATORS,be.BINARY_OPERATORS,be.NUMBER_BINARY_OPERATORS,be.BOOLEAN_BINARY_OPERATORS,be.COMPARISON_BINARY_OPERATORS,be.EQUALITY_BINARY_OPERATORS,be.BOOLEAN_NUMBER_BINARY_OPERATORS,be.UPDATE_OPERATORS,be.LOGICAL_OPERATORS,be.COMMENT_KEYS,be.FOR_INIT_KEYS,be.FLATTENABLE_KEYS,be.STATEMENT_OR_BLOCK_KEYS;var Pe=r(function(e,t){function a(e,t,r,n){null!=n&&n.validate&&(n.optional&&null==r||n.validate(e,t,r))}function i(e,t,r){var n;null==r||(n=Ae.NODE_PARENT_VALIDATIONS[r.type])&&n(e,t,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var n;!e||(n=Ae.NODE_FIELDS[e.type])&&(n=n[t],a(e,t,r,n),i(e,t,r))},t.validateField=a,t.validateChild=i});t(Pe),Pe.validateField,Pe.validateChild;var w=r(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validate=n,t.typeIs=a,t.validateType=function(e){return n(a(e))},t.validateOptional=function(e){return{validate:e,optional:!0}},t.validateOptionalType=function(e){return{validate:a(e),optional:!0}},t.arrayOf=i,t.arrayOfType=o,t.validateArrayOfType=function(e){return n(o(e))},t.assertEach=l,t.assertOneOf=function(){for(var e=arguments.length,n=new Array(e),t=0;tt+1)throw new TypeError("RestElement must be last element of ".concat(r))}}}),(0,r.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,r.assertNodeType)("Expression"),optional:!0}}}),(0,r.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,r.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,r.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Statement")))}}}),(0,r.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,r.assertNodeType)("Expression")},cases:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("SwitchCase")))}}}),(0,r.default)("ThisExpression",{aliases:["Expression"]}),(0,r.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:(0,r.chain)((0,r.assertNodeType)("BlockStatement"),Object.assign(function(e){if(process.env.BABEL_TYPES_8_BREAKING&&!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:!0,validate:(0,r.assertNodeType)("CatchClause")},finalizer:{optional:!0,validate:(0,r.assertNodeType)("BlockStatement")}}}),(0,r.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,r.assertNodeType)("Expression")},operator:{validate:r.assertOneOf.apply(void 0,F(be.UNARY_OPERATORS))}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,r.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,r.assertNodeType)("Identifier","MemberExpression"):(0,r.assertNodeType)("Expression")},operator:{validate:r.assertOneOf.apply(void 0,F(be.UPDATE_OPERATORS))}},visitor:["argument"],aliases:["Expression"]}),(0,r.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,r.assertValueType)("boolean"),optional:!0},kind:{validate:(0,r.assertOneOf)("var","let","const")},declarations:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("VariableDeclarator")))}},validate:function(e,t,r){if(process.env.BABEL_TYPES_8_BREAKING&&(0,i.default)("ForXStatement",e,{left:r})&&1!==r.declarations.length)throw new TypeError("Exactly one VariableDeclarator is required in the VariableDeclaration of a ".concat(e.type))}}),(0,r.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,r.assertNodeType)("LVal");var n=(0,r.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),a=(0,r.assertNodeType)("Identifier");return function(e,t,r){(e.init?n:a)(e,t,r)}}()},definite:{optional:!0,validate:(0,r.assertValueType)("boolean")},init:{optional:!0,validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,r.assertNodeType)("Expression")},body:{validate:(0,r.assertNodeType)("Statement")}}}),(0,r.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,r.assertNodeType)("Expression")},body:{validate:(0,r.assertNodeType)("Statement")}}}),(0,r.default)("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},O,{left:{validate:(0,r.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression")},right:{validate:(0,r.assertNodeType)("Expression")},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0}})}),(0,r.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},O,{elements:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeOrValueType)("null","PatternLike")))},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0}})}),(0,r.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},u,c,{expression:{validate:(0,r.assertValueType)("boolean")},body:{validate:(0,r.assertNodeType)("BlockStatement","Expression")}})}),(0,r.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","TSDeclareMethod","TSIndexSignature")))}}}),(0,r.default)("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,r.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,r.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,r.assertNodeType)("Expression")},superTypeParameters:{validate:(0,r.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0},mixins:{validate:(0,r.assertNodeType)("InterfaceExtends"),optional:!0}}}),(0,r.default)("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,r.assertNodeType)("Identifier")},typeParameters:{validate:(0,r.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,r.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,r.assertNodeType)("Expression")},superTypeParameters:{validate:(0,r.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0},mixins:{validate:(0,r.assertNodeType)("InterfaceExtends"),optional:!0},declare:{validate:(0,r.assertValueType)("boolean"),optional:!0},abstract:{validate:(0,r.assertValueType)("boolean"),optional:!0}},validate:(P=(0,r.assertNodeType)("Identifier"),function(e,t,r){process.env.BABEL_TYPES_8_BREAKING&&((0,i.default)("ExportDefaultDeclaration",e)||P(r,"id",r.id))})}),(0,r.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,r.assertNodeType)("StringLiteral")},exportKind:(0,r.validateOptional)((0,r.assertOneOf)("type","value")),assertions:{optional:!0,validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("ImportAttribute")))}}}),(0,r.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,r.assertNodeType)("FunctionDeclaration","TSDeclareFunction","ClassDeclaration","Expression")}}}),(0,r.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{optional:!0,validate:(0,r.chain)((0,r.assertNodeType)("Declaration"),Object.assign(function(e,t,r){if(process.env.BABEL_TYPES_8_BREAKING&&r&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration")},{oneOfNodeTypes:["Declaration"]}),function(e,t,r){if(process.env.BABEL_TYPES_8_BREAKING&&r&&e.source)throw new TypeError("Cannot export a declaration from a source")})},assertions:{optional:!0,validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("ImportAttribute")))},specifiers:{default:[],validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((A=(0,r.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),g=(0,r.assertNodeType)("ExportSpecifier"),process.env.BABEL_TYPES_8_BREAKING?function(e,t,r){(e.source?A:g)(e,t,r)}:A)))},source:{validate:(0,r.assertNodeType)("StringLiteral"),optional:!0},exportKind:(0,r.validateOptional)((0,r.assertOneOf)("type","value"))}}),(0,r.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,r.assertNodeType)("Identifier")},exported:{validate:(0,r.assertNodeType)("Identifier","StringLiteral")}}}),(0,r.default)("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,r.assertNodeType)("VariableDeclaration","LVal");var n=(0,r.assertNodeType)("VariableDeclaration"),a=(0,r.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern");return function(e,t,r){((0,i.default)("VariableDeclaration",r)?n:a)(e,t,r)}}()},right:{validate:(0,r.assertNodeType)("Expression")},body:{validate:(0,r.assertNodeType)("Statement")},await:{default:!1}}}),(0,r.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{assertions:{optional:!0,validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("ImportAttribute")))},specifiers:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,r.assertNodeType)("StringLiteral")},importKind:{validate:(0,r.assertOneOf)("type","typeof","value"),optional:!0}}}),(0,r.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,r.assertNodeType)("Identifier")},imported:{validate:(0,r.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,r.assertOneOf)("type","typeof"),optional:!0}}}),(0,r.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,r.chain)((0,r.assertNodeType)("Identifier"),Object.assign(function(e,t,r){if(process.env.BABEL_TYPES_8_BREAKING){var n;switch(r.name){case"function":n="sent";break;case"new":n="target";break;case"import":n="meta"}if(!(0,i.default)("Identifier",e.property,{name:n}))throw new TypeError("Unrecognised MetaProperty")}},{oneOfNodeTypes:["Identifier"]}))},property:{validate:(0,r.assertNodeType)("Identifier")}}});var N,D,d={abstract:{validate:(0,r.assertValueType)("boolean"),optional:!0},accessibility:{validate:(0,r.assertOneOf)("public","private","protected"),optional:!0},static:{default:!1},computed:{default:!1},optional:{validate:(0,r.assertValueType)("boolean"),optional:!0},key:{validate:(0,r.chain)((N=(0,r.assertNodeType)("Identifier","StringLiteral","NumericLiteral"),D=(0,r.assertNodeType)("Expression"),function(e,t,r){(e.computed?D:N)(e,t,r)}),(0,r.assertNodeType)("Identifier","StringLiteral","NumericLiteral","Expression"))}};t.classMethodOrPropertyCommon=d;var j,_,d=Object.assign({},u,d,{kind:{validate:(0,r.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,r.chain)((0,r.assertValueType)("string"),(0,r.assertOneOf)("public","private","protected")),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0}});function L(e,t,r){(e.computed?_:j)(e,t,r)}t.classMethodOrDeclareMethodCommon=d,(0,r.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:Object.assign({},d,c,{body:{validate:(0,r.assertNodeType)("BlockStatement")}})}),(0,r.default)("ObjectPattern",{visitor:["properties","typeAnnotation","decorators"],builder:["properties"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},O,{properties:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("RestElement","ObjectProperty")))}})}),(0,r.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("Super",{aliases:["Expression"]}),(0,r.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,r.assertNodeType)("Expression")},quasi:{validate:(0,r.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,r.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),(0,r.default)("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,r.assertShape)({raw:{validate:(0,r.assertValueType)("string")},cooked:{validate:(0,r.assertValueType)("string"),optional:!0}})},tail:{default:!1}}}),(0,r.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TemplateElement")))},expressions:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Expression","TSType")),function(e,t,r){if(e.quasis.length!==r.length+1)throw new TypeError("Number of ".concat(e.type," quasis should be exactly one more than the number of expressions.\nExpected ").concat(r.length+1," quasis but got ").concat(e.quasis.length))})}}}),(0,r.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,r.chain)((0,r.assertValueType)("boolean"),Object.assign(function(e,t,r){if(process.env.BABEL_TYPES_8_BREAKING&&r&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})),default:!1},argument:{optional:!0,validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("Import",{aliases:["Expression"]}),(0,r.default)("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,r.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,r.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,r.assertNodeType)("Expression")},property:{validate:(j=(0,r.assertNodeType)("Identifier"),_=(0,r.assertNodeType)("Expression"),L.oneOfNodeTypes=["Expression","Identifier"],L)},computed:{default:!1},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,r.chain)((0,r.assertValueType)("boolean"),(0,r.assertOptionalChainStart)()):(0,r.assertValueType)("boolean")}}}),(0,r.default)("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:(0,r.assertNodeType)("Expression")},arguments:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,r.chain)((0,r.assertValueType)("boolean"),(0,r.assertOptionalChainStart)()):(0,r.assertValueType)("boolean")},typeArguments:{validate:(0,r.assertNodeType)("TypeParameterInstantiation"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}}})});t(u),u.classMethodOrDeclareMethodCommon,u.classMethodOrPropertyCommon,u.patternLikeCommon,u.functionDeclarationCommon,u.functionTypeAnnotationCommon,u.functionCommon,t(r(function(e){var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==pe(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var r,n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var i;Object.prototype.hasOwnProperty.call(e,r)&&((i=a?Object.getOwnPropertyDescriptor(e,r):null)&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r])}n.default=e,t&&t.set(e,n);return n}(w);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function t(e){var t=1r.length)throw new Error("".concat(n,": Too many arguments passed. Received ").concat(i," but can receive no more than ").concat(r.length));var o={type:n},s=0;r.forEach(function(e){var t,r=Ae.NODE_FIELDS[n][e];void 0===(t=s=Number.MAX_SAFE_INTEGER?i.uid=0:i.uid++}});t(tt);var rt=r(function(e,t){function p(e,t,r){for(var n=[].concat(e),a=Object.create(null);n.length;){var i=n.shift();if(i){var o=p.keys[i.type];if((0,ce.isIdentifier)(i))t?(a[i.name]=a[i.name]||[]).push(i):a[i.name]=i;else if(!(0,ce.isExportDeclaration)(i)||(0,ce.isExportAllDeclaration)(i)){if(r){if((0,ce.isFunctionDeclaration)(i)){n.push(i.id);continue}if((0,ce.isFunctionExpression)(i))continue}if(o)for(var s=0;s