diff --git a/dist/editor.js b/dist/editor.js index 51f6f1e4f..c00ba0a1e 100644 --- a/dist/editor.js +++ b/dist/editor.js @@ -1,11 +1,11 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.EasylogicStudio=t():e.EasylogicStudio=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=438)}([function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n{u[t]=u[t]||[],u[t].push(e)}),k[e]=t},t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.FLIPPED_ALIAS_KEYS=t.ALIAS_KEYS=t.VISITOR_KEYS=void 0;var r,i=(r=n(73))&&r.__esModule?r:{default:r},a=n(75);const o={};t.VISITOR_KEYS=o;const s={};t.ALIAS_KEYS=s;const u={};t.FLIPPED_ALIAS_KEYS=u;const c={};t.NODE_FIELDS=c;const l={};t.BUILDER_KEYS=l;const p={};function h(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":typeof e}function f(e){return{validate:e}}function d(e){return"string"==typeof e?g(e):g(...e)}function y(e){return x(b("array"),m(e))}function v(e){return y(d(e))}function m(e){function t(t,n,r){if(Array.isArray(r))for(let i=0;i1)for(var n=1;n","<",">=","<="];t.BOOLEAN_NUMBER_BINARY_OPERATORS=r;const i=["==","===","!=","!=="];t.EQUALITY_BINARY_OPERATORS=i;const a=[...i,"in","instanceof"];t.COMPARISON_BINARY_OPERATORS=a;const o=[...a,...r];t.BOOLEAN_BINARY_OPERATORS=o;const s=["-","/","%","*","**","&","|",">>",">>>","<<","^"];t.NUMBER_BINARY_OPERATORS=s;const u=["+",...s,...o];t.BINARY_OPERATORS=u;const c=["delete","!"];t.BOOLEAN_UNARY_OPERATORS=c;const l=["+","-","~"];t.NUMBER_UNARY_OPERATORS=l;const p=["typeof"];t.STRING_UNARY_OPERATORS=p;const h=["void","throw",...c,...l,...p];t.UNARY_OPERATORS=h;t.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};const f=Symbol.for("var used to be block scoped");t.BLOCK_SCOPED_SYMBOL=f;const d=Symbol.for("should not be considered a local binding");t.NOT_LOCAL_BINDING=d},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,i="/"===o.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var a=t.isAbsolute(e),o="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&o&&(e+="/"),(a?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,u=0;u=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(20))},function(e,t,n){var r=n(16).Symbol;e.exports=r},function(e,t,n){var r=n(109),i=n(223),a=n(29);e.exports=function(e){return a(e)?r(e):i(e)}},function(e,t,n){var r=n(103),i=n(65);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e&&!i.default.keyword.isReservedWordES6(e,!0)&&("await"!==e&&i.default.keyword.isIdentifierNameES6(e))};var r,i=(r=n(118))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=n(13);const i=Function.call.bind(Object.prototype.hasOwnProperty);function a(e,t){return e&&"string"==typeof e.type&&"CommentLine"!==e.type&&"CommentBlock"!==e.type?s(e,t):e}function o(e,t){return Array.isArray(e)?e.map(e=>a(e,t)):a(e,t)}function s(e,t=!0){if(!e)return e;const{type:n}=e,a={type:n};if("Identifier"===n)a.name=e.name,i(e,"optional")&&"boolean"==typeof e.optional&&(a.optional=e.optional),i(e,"typeAnnotation")&&(a.typeAnnotation=t?o(e.typeAnnotation,!0):e.typeAnnotation);else{if(!i(r.NODE_FIELDS,n))throw new Error(`Unknown node type: "${n}"`);for(const s of Object.keys(r.NODE_FIELDS[n]))i(e,s)&&(a[s]=t?o(e[s],!0):e[s])}return i(e,"loc")&&(a.loc=e.loc),i(e,"leadingComments")&&(a.leadingComments=e.leadingComments),i(e,"innerComments")&&(a.innerComments=e.innerComments),i(e,"trailingComments")&&(a.trailingComments=e.trailingComments),i(e,"extra")&&(a.extra=Object.assign({},e.extra)),a}},function(e,t,n){var r=n(22),i=n(17);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var n=e,r=i(e);if(r){if(!r.path)return e;n=r.path}for(var o,s=t.isAbsolute(n),u=n.split(/\/+/),c=0,l=u.length-1;l>=0;l--)"."===(o=u[l])?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(n=u.join("/"))&&(n=s?"/":"."),r?(r.path=n,a(r)):n}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),s=i(e);if(s&&(e=s.path||"/"),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var u="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=u,a(s)):u},t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(n)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function u(e){return e}function c(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function l(e,t){return e===t?0:e>t?1:-1}t.toSetString=s?u:function(e){return c(e)?"$"+e:e},t.fromSetString=s?u:function(e){return c(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=e.source-t.source;return 0!==r?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)||n?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=e.generatedLine-t.generatedLine)?r:e.name-t.name},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)||n?r:0!==(r=e.source-t.source)?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)?r:e.name-t.name},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=l(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)?n:l(e.name,t.name)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadOptions=function(e){const t=(0,i.default)(e);return t?t.options:null},Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"loadPartialConfig",{enumerable:!0,get:function(){return a.loadPartialConfig}});var r,i=(r=n(385))&&r.__esModule?r:{default:r},a=n(160)},function(e,t,n){var r=n(189),i=n(190),a=n(191),o=n(192),s=n(193);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++ti?e(t):t,c=e.split(a),{start:l,end:p,markerLines:h}=function(e,t,n){const r=Object.assign({column:0,line:-1},e.start),i=Object.assign({},r,e.end),{linesAbove:a=2,linesBelow:o=3}=n||{},s=r.line,u=r.column,c=i.line,l=i.column;let p=Math.max(s-(a+1),0),h=Math.min(t.length,c+o);-1===s&&(p=0),-1===c&&(h=t.length);const f=c-s,d={};if(f)for(let e=0;e<=f;e++){const n=e+s;if(u)if(0===e){const e=t[n-1].length;d[n]=[u,e-u+1]}else if(e===f)d[n]=[0,l];else{const r=t[n-e].length;d[n]=[0,r]}else d[n]=!0}else d[s]=u===l?!u||[u,0]:[u,l-u];return{start:p,end:h,markerLines:d}}(t,c,n),f=t.start&&"number"==typeof t.start.column,d=String(p).length;let y=(i?(0,r().default)(e,n):e).split(a).slice(l,p).map((e,t)=>{const r=l+1+t,i=` ${` ${r}`.slice(-d)} | `,a=h[r],o=!h[r+1];if(a){let t="";if(Array.isArray(a)){const r=e.slice(0,Math.max(a[0]-1,0)).replace(/[^\t]/g," "),c=a[1]||1;t=["\n ",u(s.gutter,i.replace(/\d/g," ")),r,u(s.marker,"^").repeat(c)].join(""),o&&n.message&&(t+=" "+u(s.message,n.message))}return[u(s.marker,">"),u(s.gutter,i),e,t].join("")}return` ${u(s.gutter,i)}${e}`}).join("\n");return n.message&&!f&&(y=`${" ".repeat(d+1)}${n.message}\n${y}`),i?o.reset(y):y}}).call(this,n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t={}){this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}}const i=new Map;function a(e,t={}){t.keyword=e;const n=new r(e,t);return i.set(e,n),n}function o(e,t){return new r(e,{beforeExpr:!0,binop:t})}const s={num:new r("num",{startsExpr:!0}),bigint:new r("bigint",{startsExpr:!0}),regexp:new r("regexp",{startsExpr:!0}),string:new r("string",{startsExpr:!0}),name:new r("name",{startsExpr:!0}),eof:new r("eof"),bracketL:new r("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new r("]"),braceL:new r("{",{beforeExpr:!0,startsExpr:!0}),braceBarL:new r("{|",{beforeExpr:!0,startsExpr:!0}),braceR:new r("}"),braceBarR:new r("|}"),parenL:new r("(",{beforeExpr:!0,startsExpr:!0}),parenR:new r(")"),comma:new r(",",{beforeExpr:!0}),semi:new r(";",{beforeExpr:!0}),colon:new r(":",{beforeExpr:!0}),doubleColon:new r("::",{beforeExpr:!0}),dot:new r("."),question:new r("?",{beforeExpr:!0}),questionDot:new r("?."),arrow:new r("=>",{beforeExpr:!0}),template:new r("template"),ellipsis:new r("...",{beforeExpr:!0}),backQuote:new r("`",{startsExpr:!0}),dollarBraceL:new r("${",{beforeExpr:!0,startsExpr:!0}),at:new r("@"),hash:new r("#",{startsExpr:!0}),interpreterDirective:new r("#!..."),eq:new r("=",{beforeExpr:!0,isAssign:!0}),assign:new r("_=",{beforeExpr:!0,isAssign:!0}),incDec:new r("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),bang:new r("!",{beforeExpr:!0,prefix:!0,startsExpr:!0}),tilde:new r("~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),pipeline:o("|>",0),nullishCoalescing:o("??",1),logicalOR:o("||",2),logicalAND:o("&&",3),bitwiseOR:o("|",4),bitwiseXOR:o("^",5),bitwiseAND:o("&",6),equality:o("==/!=/===/!==",7),relational:o("/<=/>=",8),bitShift:o("<>/>>>",9),plusMin:new r("+/-",{beforeExpr:!0,binop:10,prefix:!0,startsExpr:!0}),modulo:new r("%",{beforeExpr:!0,binop:11,startsExpr:!0}),star:o("*",11),slash:o("/",11),exponent:new r("**",{beforeExpr:!0,binop:12,rightAssociative:!0}),_break:a("break"),_case:a("case",{beforeExpr:!0}),_catch:a("catch"),_continue:a("continue"),_debugger:a("debugger"),_default:a("default",{beforeExpr:!0}),_do:a("do",{isLoop:!0,beforeExpr:!0}),_else:a("else",{beforeExpr:!0}),_finally:a("finally"),_for:a("for",{isLoop:!0}),_function:a("function",{startsExpr:!0}),_if:a("if"),_return:a("return",{beforeExpr:!0}),_switch:a("switch"),_throw:a("throw",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_try:a("try"),_var:a("var"),_const:a("const"),_while:a("while",{isLoop:!0}),_with:a("with"),_new:a("new",{beforeExpr:!0,startsExpr:!0}),_this:a("this",{startsExpr:!0}),_super:a("super",{startsExpr:!0}),_class:a("class",{startsExpr:!0}),_extends:a("extends",{beforeExpr:!0}),_export:a("export"),_import:a("import",{startsExpr:!0}),_null:a("null",{startsExpr:!0}),_true:a("true",{startsExpr:!0}),_false:a("false",{startsExpr:!0}),_in:a("in",{beforeExpr:!0,binop:8}),_instanceof:a("instanceof",{beforeExpr:!0,binop:8}),_typeof:a("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:a("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:a("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})};function u(e,t){return 2|(e?4:0)|(t?8:0)}function c(e){return null!=e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}const l=/\r\n?|[\n\u2028\u2029]/,p=new RegExp(l.source,"g");function h(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}const f=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function d(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}class y{constructor(e,t,n,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r}}const v={braceStatement:new y("{",!1),braceExpression:new y("{",!0),templateQuasi:new y("${",!1),parenStatement:new y("(",!1),parenExpression:new y("(",!0),template:new y("`",!0,!0,e=>e.readTmplToken()),functionExpression:new y("function",!0),functionStatement:new y("function",!1)};s.parenR.updateContext=s.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);let e=this.state.context.pop();e===v.braceStatement&&"function"===this.curContext().token&&(e=this.state.context.pop()),this.state.exprAllowed=!e.isExpr},s.name.updateContext=function(e){let t=!1;e!==s.dot&&("of"===this.state.value&&!this.state.exprAllowed||"yield"===this.state.value&&this.scope.inGenerator)&&(t=!0),this.state.exprAllowed=t,this.state.isIterator&&(this.state.isIterator=!1)},s.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?v.braceStatement:v.braceExpression),this.state.exprAllowed=!0},s.dollarBraceL.updateContext=function(){this.state.context.push(v.templateQuasi),this.state.exprAllowed=!0},s.parenL.updateContext=function(e){const t=e===s._if||e===s._for||e===s._with||e===s._while;this.state.context.push(t?v.parenStatement:v.parenExpression),this.state.exprAllowed=!0},s.incDec.updateContext=function(){},s._function.updateContext=s._class.updateContext=function(e){!e.beforeExpr||e===s.semi||e===s._else||e===s._return&&l.test(this.input.slice(this.state.lastTokEnd,this.state.start))||(e===s.colon||e===s.braceL)&&this.curContext()===v.b_stat?this.state.context.push(v.functionStatement):this.state.context.push(v.functionExpression),this.state.exprAllowed=!1},s.backQuote.updateContext=function(){this.curContext()===v.template?this.state.context.pop():this.state.context.push(v.template),this.state.exprAllowed=!1};const m=["eval","arguments"],g=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),b=new Set(m),x=(e,t)=>t&&"await"===e||"enum"===e;function k(e,t){return x(e,t)||g.has(e)}function w(e){return b.has(e)}function S(e,t){return k(e,t)||w(e)}const P=/^in(stanceof)?$/;let E="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",T="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const O=new RegExp("["+E+"]"),C=new RegExp("["+E+T+"]");E=T=null;const D=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],A=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239];function j(e,t){let n=65536;for(let r=0,i=t.length;re)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function $(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&O.test(String.fromCharCode(e)):j(e,D)))}function M(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&C.test(String.fromCharCode(e)):j(e,D)||j(e,A))))}const I=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]);function F(e){return"type"===e.importKind||"typeof"===e.importKind}function L(e){return(e.type===s.name||!!e.type.keyword)&&"from"!==e.value}const _={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const B=/\*?\s*@((?:no)?flow)\b/;const R={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},N=/^[\da-fA-F]+$/,V=/^\d+$/;function z(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function G(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return G(e.object)+"."+G(e.property);throw new Error("Node had unexpected type: "+e.type)}v.j_oTag=new y("...",!0,!0),s.jsxName=new r("jsxName"),s.jsxText=new r("jsxText",{beforeExpr:!0}),s.jsxTagStart=new r("jsxTagStart",{startsExpr:!0}),s.jsxTagEnd=new r("jsxTagEnd"),s.jsxTagStart.updateContext=function(){this.state.context.push(v.j_expr),this.state.context.push(v.j_oTag),this.state.exprAllowed=!1},s.jsxTagEnd.updateContext=function(e){const t=this.state.context.pop();t===v.j_oTag&&e===s.slash||t===v.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===v.j_expr):this.state.exprAllowed=!0};class H{constructor(e){this.var=[],this.lexical=[],this.functions=[],this.flags=e}}class U{constructor(e,t){this.scopeStack=[],this.undefinedExports=new Map,this.raise=e,this.inModule=t}get inFunction(){return(2&this.currentVarScope().flags)>0}get inGenerator(){return(8&this.currentVarScope().flags)>0}get inAsync(){return(4&this.currentVarScope().flags)>0}get allowSuper(){return(64&this.currentThisScope().flags)>0}get allowDirectSuper(){return(128&this.currentThisScope().flags)>0}get inClass(){return(256&this.currentThisScope().flags)>0}get inNonArrowFunction(){return(2&this.currentThisScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new H(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(e){return!!(2&e.flags||!this.inModule&&1&e.flags)}declareName(e,t,n){let r=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(r,e,t,n),16&t?r.functions.push(e):r.lexical.push(e),8&t&&this.maybeExportDefined(r,e);else if(4&t)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,e,t,n),r.var.push(e),this.maybeExportDefined(r,e),!(515&r.flags));--i);this.inModule&&1&r.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,n,r){this.isRedeclaredInScope(e,t,n)&&this.raise(r,`Identifier '${t}' has already been declared`)}isRedeclaredInScope(e,t,n){return!!(1&n)&&(8&n?e.lexical.indexOf(t)>-1||e.functions.indexOf(t)>-1||e.var.indexOf(t)>-1:16&n?e.lexical.indexOf(t)>-1||!this.treatFunctionsAsVarInScope(e)&&e.var.indexOf(t)>-1:e.lexical.indexOf(t)>-1&&!(32&e.flags&&e.lexical[0]===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.indexOf(t)>-1)}checkLocalExport(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&-1===this.scopeStack[0].functions.indexOf(e.name)&&this.undefinedExports.set(e.name,e.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScope(){for(let e=this.scopeStack.length-1;;e--){const t=this.scopeStack[e];if(515&t.flags)return t}}currentThisScope(){for(let e=this.scopeStack.length-1;;e--){const t=this.scopeStack[e];if((515&t.flags||256&t.flags)&&!(16&t.flags))return t}}}class Y extends H{constructor(...e){super(...e),this.types=[],this.enums=[],this.constEnums=[],this.classes=[],this.exportOnlyBindings=[]}}class W extends U{createScope(e){return new Y(e)}declareName(e,t,n){const r=this.currentScope();if(1024&t)return this.maybeExportDefined(r,e),void r.exportOnlyBindings.push(e);super.declareName(...arguments),2&t&&(1&t||(this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e)),r.types.push(e)),256&t&&r.enums.push(e),512&t&&r.constEnums.push(e),128&t&&r.classes.push(e)}isRedeclaredInScope(e,t,n){if(e.enums.indexOf(t)>-1){if(256&n){return!!(512&n)!==e.constEnums.indexOf(t)>-1}return!0}return 128&n&&e.classes.indexOf(t)>-1?e.lexical.indexOf(t)>-1&&!!(1&n):!!(2&n&&e.types.indexOf(t)>-1)||super.isRedeclaredInScope(...arguments)}checkLocalExport(e){-1===this.scopeStack[0].types.indexOf(e.name)&&-1===this.scopeStack[0].exportOnlyBindings.indexOf(e.name)&&super.checkLocalExport(e)}}function X(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}function K(e){if(!e)throw new Error("Assert fail")}s.placeholder=new r("%%",{startsExpr:!0});function q(e,t){return e.some(e=>Array.isArray(e)?e[0]===t:e===t)}function J(e,t,n){const r=e.find(e=>Array.isArray(e)?e[0]===t:e===t);return r&&Array.isArray(r)?r[1][n]:null}const Z=["minimal","smart","fsharp"];const Q={estree:e=>class extends e{estreeParseRegExpLiteral({pattern:e,flags:t}){let n=null;try{n=new RegExp(e,t)}catch(e){}const r=this.estreeParseLiteral(n);return r.regex={pattern:e,flags:t},r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}directiveToStmt(e){const t=e.value,n=this.startNodeAt(e.start,e.loc.start),r=this.startNodeAt(t.start,t.loc.start);return r.value=t.value,r.raw=t.extra.raw,n.expression=this.finishNodeAt(r,"Literal",t.end,t.loc.end),n.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(n,"ExpressionStatement",e.end,e.loc.end)}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){c(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}checkGetterSetterParams(e){const t=e,n="get"===t.kind?0:1,r=t.start;t.value.params.length!==n?"get"===t.kind?this.raise(r,"getter must not have any formal parameters"):this.raise(r,"setter must have exactly one formal parameter"):"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raise(r,"setter function argument must not be a rest parameter")}checkLVal(e,t=64,n,r,i){switch(e.type){case"ObjectPattern":e.properties.forEach(e=>{this.checkLVal("Property"===e.type?e.value:e,t,n,"object destructuring pattern",i)});break;default:super.checkLVal(e,t,n,r,i)}}checkDuplicatedProto(e,t){if("SpreadElement"===e.type||e.computed||e.method||e.shorthand)return;const n=e.key;"__proto__"===("Identifier"===n.type?n.name:String(n.value))&&"init"===e.kind&&(t.used&&!t.start&&(t.start=n.start),t.used=!0)}isStrictBody(e){if("BlockStatement"===e.body.type&&e.body.body.length>0)for(let t=0,n=e.body.body;tthis.directiveToStmt(e));e.body=i.concat(e.body),delete e.directives}pushClassMethod(e,t,n,r,i,a){this.parseMethod(t,n,r,i,a,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parseExprAtom(e){switch(this.state.type){case s.regexp:return this.estreeParseRegExpLiteral(this.state.value);case s.num:case s.string:return this.estreeParseLiteral(this.state.value);case s._null:return this.estreeParseLiteral(null);case s._true:return this.estreeParseLiteral(!0);case s._false:return this.estreeParseLiteral(!1);default:return super.parseExprAtom(e)}}parseLiteral(e,t,n,r){const i=super.parseLiteral(e,t,n,r);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(e,t,n=!1){super.parseFunctionBody(e,t,n),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,n,r,i,a,o=!1){let s=this.startNode();return s.kind=e.kind,s=super.parseMethod(s,t,n,r,i,a,o),s.type="FunctionExpression",delete s.kind,e.value=s,a="ClassMethod"===a?"MethodDefinition":a,this.finishNode(e,a)}parseObjectMethod(e,t,n,r,i){const a=super.parseObjectMethod(e,t,n,r,i);return a&&(a.type="Property","method"===a.kind&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(e,t,n,r,i){const a=super.parseObjectProperty(e,t,n,r,i);return a&&(a.kind="init",a.type="Property"),a}toAssignable(e,t,n){return c(e)?(this.toAssignable(e.value,t,n),e):super.toAssignable(e,t,n)}toAssignableObjectExpressionProp(e,t,n){if("get"===e.kind||"set"===e.kind)throw this.raise(e.key.start,"Object pattern can't contain getter or setter");if(e.method)throw this.raise(e.key.start,"Object pattern can't contain methods");super.toAssignableObjectExpressionProp(e,t,n)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated JSX contents");const n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:return this.state.pos===this.state.start?60===n&&this.state.exprAllowed?(++this.state.pos,this.finishToken(s.jsxTagStart)):super.getTokenFromCode(n):(e+=this.input.slice(t,this.state.pos),this.finishToken(s.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:h(n)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let n;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,n=e?"\n":"\r\n"):n=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,n}jsxReadString(e){let t="",n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated string constant");const r=this.input.charCodeAt(this.state.pos);if(r===e)break;38===r?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadEntity(),n=this.state.pos):h(r)?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}return t+=this.input.slice(n,this.state.pos++),this.finishToken(s.string,t)}jsxReadEntity(){let e,t="",n=0,r=this.input[this.state.pos];const i=++this.state.pos;for(;this.state.pos"):!z(i)&&z(a)?this.raise(a.start,"Expected corresponding JSX closing tag for <"+G(i.name)+">"):z(i)||z(a)||G(a.name)!==G(i.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+G(i.name)+">")}if(z(i)?(n.openingFragment=i,n.closingFragment=a):(n.openingElement=i,n.closingElement=a),n.children=r,this.isRelational("<"))throw this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?");return z(i)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")}jsxParseElement(){const e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)}parseExprAtom(e){return this.match(s.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(s.jsxTagStart)?this.jsxParseElement():this.isRelational("<")&&33!==this.input.charCodeAt(this.state.pos)?(this.finishToken(s.jsxTagStart),this.jsxParseElement()):super.parseExprAtom(e)}getTokenFromCode(e){if(this.state.inPropertyName)return super.getTokenFromCode(e);const t=this.curContext();if(t===v.j_expr)return this.jsxReadToken();if(t===v.j_oTag||t===v.j_cTag){if($(e))return this.jsxReadWord();if(62===e)return++this.state.pos,this.finishToken(s.jsxTagEnd);if((34===e||39===e)&&t===v.j_oTag)return this.jsxReadString(e)}return 60===e&&this.state.exprAllowed&&33!==this.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(s.jsxTagStart)):super.getTokenFromCode(e)}updateContext(e){if(this.match(s.braceL)){const t=this.curContext();t===v.j_oTag?this.state.context.push(v.braceExpression):t===v.j_expr?this.state.context.push(v.templateQuasi):super.updateContext(e),this.state.exprAllowed=!0}else{if(!this.match(s.slash)||e!==s.jsxTagStart)return super.updateContext(e);this.state.context.length-=2,this.state.context.push(v.j_cTag),this.state.exprAllowed=!1}}},flow:e=>class extends e{constructor(e,t){super(e,t),this.flowPragma=void 0}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,t){return e!==s.string&&e!==s.semi&&e!==s.interpreterDirective&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){const t=B.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}return super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(e||s.colon);const n=this.flowParseType();return this.state.inType=t,n}flowParsePredicate(){const e=this.startNode(),t=this.state.startLoc,n=this.state.start;this.expect(s.modulo);const r=this.state.startLoc;return this.expectContextual("checks"),t.line===r.line&&t.column===r.column-1||this.raise(n,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(s.parenL)?(e.value=this.parseExpression(),this.expect(s.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(s.colon);let t=null,n=null;return this.match(s.modulo)?(this.state.inType=e,n=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(s.modulo)&&(n=this.flowParsePredicate())),[t,n]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier(),n=this.startNode(),r=this.startNode();this.isRelational("<")?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(s.parenL);const i=this.flowParseFunctionTypeParams();return n.params=i.params,n.rest=i.rest,this.expect(s.parenR),[n.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(n,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(s._class))return this.flowParseDeclareClass(e);if(this.match(s._function))return this.flowParseDeclareFunction(e);if(this.match(s._var))return this.flowParseDeclareVariable(e);if(this.eatContextual("module"))return this.match(s.dot)?this.flowParseDeclareModuleExports(e):(t&&this.raise(this.state.lastTokStart,"`declare module` cannot be used inside another `declare module`"),this.flowParseDeclareModule(e));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(e);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(e);if(this.isContextual("interface"))return this.flowParseDeclareInterface(e);if(this.match(s._export))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(s.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();const t=e.body=this.startNode(),n=t.body=[];for(this.expect(s.braceL);!this.match(s.braceR);){let e=this.startNode();this.match(s._import)?(this.next(),this.isContextual("type")||this.match(s._typeof)||this.raise(this.state.lastTokStart,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(e)):(this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),e=this.flowParseDeclare(e,!0)),n.push(e)}this.scope.exit(),this.expect(s.braceR),this.finishNode(t,"BlockStatement");let r=null,i=!1;const a="Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module";return n.forEach(e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(i&&this.raise(e.start,"Duplicate `declare module.exports` statement"),"ES"===r&&this.raise(e.start,a),r="CommonJS",i=!0):("CommonJS"===r&&this.raise(e.start,a),r="ES")}),e.kind=r||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(s._export),this.eat(s._default))return this.match(s._function)||this.match(s._class)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(s._const)||this.isLet()||(this.isContextual("type")||this.isContextual("interface"))&&!t){const e=this.state.value,t=_[e];this.unexpected(this.state.start,`\`declare export ${e}\` is not supported. Use \`${t}\` instead`)}if(this.match(s._var)||this.match(s._function)||this.match(s._class)||this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(s.star)||this.match(s.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(e=this.parseExport(e)).type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){return this.next(),this.flowParseTypeAlias(e),e.type="DeclareTypeAlias",e}flowParseDeclareOpaqueType(e){return this.next(),this.flowParseOpaqueType(e,!0),e.type="DeclareOpaqueType",e}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t=!1){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.implements=[],e.mixins=[],this.eat(s._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(s.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(s.comma))}if(this.isContextual("implements")){this.next();do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(s.comma))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){"_"===e&&this.raise(this.state.start,"`_` is only allowed as a type argument to call or new")}checkReservedType(e,t,n){I.has(e)&&(n?this.raise(t,`Cannot overwrite reserved type ${e}`):this.raise(t,`Unexpected reserved type ${e}`))}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.start,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(s.eq),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(s.colon)&&(e.supertype=this.flowParseTypeInitialiser(s.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(s.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const t=this.state.start,n=this.startNode(),r=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return n.name=i.name,n.variance=r,n.bound=i.typeAnnotation,this.match(s.eq)?(this.eat(s.eq),n.default=this.flowParseType()):e&&this.raise(t,"Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),this.finishNode(n,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(s.jsxTagStart)?this.next():this.unexpected();let n=!1;do{const e=this.flowParseTypeParameter(n);t.params.push(e),e.default&&(n=!0),this.isRelational(">")||this.expect(s.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expectRelational("<");const n=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(s.comma);return this.state.noAnonFunctionType=n,this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(s.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual("interface"),e.extends=[],this.eat(s._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(s.comma));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(s.num)||this.match(s.string)?this.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,n){return e.static=t,this.lookahead().type===s.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(s.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=n,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(s.bracketR),this.expect(s.bracketR),this.isRelational("<")||this.match(s.parenL)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start))):(e.method=!1,this.eat(s.question)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(s.parenL);!this.match(s.parenR)&&!this.match(s.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(s.parenR)||this.expect(s.comma);return this.eat(s.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(s.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){const n=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(n),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:n,allowProto:r,allowInexact:i}){const a=this.state.inType;this.state.inType=!0;const o=this.startNode();let u,c;o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let l=!1;for(t&&this.match(s.braceBarL)?(this.expect(s.braceBarL),u=s.braceBarR,c=!0):(this.expect(s.braceL),u=s.braceR,c=!1),o.exact=c;!this.match(u);){let t=!1,a=null,u=null;const h=this.startNode();if(r&&this.isContextual("proto")){const t=this.lookahead();t.type!==s.colon&&t.type!==s.question&&(this.next(),a=this.state.start,e=!1)}if(e&&this.isContextual("static")){const e=this.lookahead();e.type!==s.colon&&e.type!==s.question&&(this.next(),t=!0)}const f=this.flowParseVariance();if(this.eat(s.bracketL))null!=a&&this.unexpected(a),this.eat(s.bracketL)?(f&&this.unexpected(f.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(h,t))):o.indexers.push(this.flowParseObjectTypeIndexer(h,t,f));else if(this.match(s.parenL)||this.isRelational("<"))null!=a&&this.unexpected(a),f&&this.unexpected(f.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(h,t));else{var p;let e="init";if(this.isContextual("get")||this.isContextual("set")){const t=this.lookahead();t.type!==s.name&&t.type!==s.string&&t.type!==s.num||(e=this.state.value,this.next())}const r=this.flowParseObjectTypeProperty(h,t,a,f,e,n,null!=(p=i)?p:!c);null===r?(l=!0,u=this.state.lastTokStart):o.properties.push(r)}this.flowObjectTypeSemicolon(),!u||this.match(s.braceR)||this.match(s.braceBarR)||this.raise(u,"Explicit inexact syntax must appear at the end of an inexact object")}this.expect(u),n&&(o.inexact=l);const h=this.finishNode(o,"ObjectTypeAnnotation");return this.state.inType=a,h}flowParseObjectTypeProperty(e,t,n,r,i,a,o){if(this.eat(s.ellipsis)){return this.match(s.comma)||this.match(s.semi)||this.match(s.braceR)||this.match(s.braceBarR)?(a?o||this.raise(this.state.lastTokStart,"Explicit inexact syntax cannot appear inside an explicit exact object type"):this.raise(this.state.lastTokStart,"Explicit inexact syntax cannot appear in class or interface definitions"),r&&this.raise(r.start,"Explicit inexact syntax cannot have variance"),null):(a||this.raise(this.state.lastTokStart,"Spread operator cannot appear in class or interface definitions"),null!=n&&this.unexpected(n),r&&this.raise(r.start,"Spread properties cannot have variance"),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"))}{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=n,e.kind=i;let a=!1;return this.isRelational("<")||this.match(s.parenL)?(e.method=!0,null!=n&&this.unexpected(n),r&&this.unexpected(r.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParams(e)):("init"!==i&&this.unexpected(),e.method=!1,this.eat(s.question)&&(a=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=a,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const t="get"===e.kind?0:1,n=e.start;e.value.params.length+(e.value.rest?1:0)!==t&&("get"===e.kind?this.raise(n,"getter must not have any formal parameters"):this.raise(n,"setter must have exactly one formal parameter")),"set"===e.kind&&e.value.rest&&this.raise(n,"setter function argument must not be a rest parameter")}flowObjectTypeSemicolon(){this.eat(s.semi)||this.eat(s.comma)||this.match(s.braceR)||this.match(s.braceBarR)||this.unexpected()}flowParseQualifiedTypeIdentifier(e,t,n){e=e||this.state.start,t=t||this.state.startLoc;let r=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(s.dot);){const n=this.startNodeAt(e,t);n.qualification=r,n.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(n,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,t,n){const r=this.startNodeAt(e,t);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t,n),this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(s._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(s.bracketL);this.state.possuper.parseFunctionBody(e,!0,n)):super.parseFunctionBody(e,!1,n)}parseFunctionBodyAndFinish(e,t,n=!1){if(this.match(s.colon)){const t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}super.parseFunctionBodyAndFinish(e,t,n)}parseStatement(e,t){if(this.state.strict&&this.match(s.name)&&"interface"===this.state.value){const e=this.startNode();return this.next(),this.flowParseInterface(e)}if(this.shouldParseEnums()&&this.isContextual("enum")){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}{const n=super.parseStatement(e,t);return void 0!==this.flowPragma||this.isValidDirective(n)||(this.flowPragma=null),n}}parseExpressionStatement(e,t){if("Identifier"===t.type)if("declare"===t.name){if(this.match(s._class)||this.match(s.name)||this.match(s._function)||this.match(s._var)||this.match(s._export))return this.flowParseDeclare(e)}else if(this.match(s.name)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||this.shouldParseEnums()&&this.isContextual("enum")||super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){return(!this.match(s.name)||!("type"===this.state.value||"interface"===this.state.value||"opaque"===this.state.value||this.shouldParseEnums()&&"enum"===this.state.value))&&super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual("enum")){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,n,r,i){if(!this.match(s.question))return e;if(i){const a=this.tryParse(()=>super.parseConditional(e,t,n,r));return a.node?(a.error&&(this.state=a.failState),a.node):(i.start=a.error.pos||this.state.start,e)}this.expect(s.question);const a=this.state.clone(),o=this.state.noArrowAt,u=this.startNodeAt(n,r);let{consequent:c,failed:l}=this.tryParseConditionalConsequent(),[p,h]=this.getArrowLikeExpressions(c);if(l||h.length>0){const e=[...o];if(h.length>0){this.state=a,this.state.noArrowAt=e;for(let t=0;t1&&this.raise(a.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),l&&1===p.length&&(this.state=a,this.state.noArrowAt=e.concat(p[0].start),({consequent:c,failed:l}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(c,!0),this.state.noArrowAt=o,this.expect(s.colon),u.test=e,u.consequent=c,u.alternate=this.forwardNoArrowParamsConversionAt(u,()=>this.parseMaybeAssign(t,void 0,void 0,void 0)),this.finishNode(u,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssign(),t=!this.match(s.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const n=[e],r=[];for(;0!==n.length;){const e=n.pop();"ArrowFunctionExpression"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):r.push(e),n.push(e.body)):"ConditionalExpression"===e.type&&(n.push(e.consequent),n.push(e.alternate))}return t?(r.forEach(e=>this.finishArrowValidation(e)),[r,[]]):function(e,t){const n=[],r=[];for(let i=0;ie.params.every(e=>this.isAssignable(e,!0)))}finishArrowValidation(e){var t;this.toAssignableList(e.params,!0,"arrow function parameters",null==(t=e.extra)?void 0:t.trailingComma),this.scope.enter(16|u(!1,!1)),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let n;return-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),n=t(),this.state.noArrowParamsConversionAt.pop()):n=t(),n}parseParenItem(e,t,n){if(e=super.parseParenItem(e,t,n),this.eat(s.question)&&(e.optional=!0,this.resetEndLocation(e)),this.match(s.colon)){const r=this.startNodeAt(t,n);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExport(e){const t=super.parseExport(e);return"ExportNamedDeclaration"!==t.type&&"ExportAllDeclaration"!==t.type||(t.exportKind=t.exportKind||"value"),t}parseExportDeclaration(e){if(this.isContextual("type")){e.exportKind="type";const t=this.startNode();return this.next(),this.match(s.braceL)?(e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual("opaque")){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual("interface")){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual("enum")){e.exportKind="value";const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(...arguments)||!(!this.isContextual("type")||this.lookahead().type!==s.star)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){const t=this.state.start,n=super.maybeParseExportNamespaceSpecifier(e);return n&&"type"===e.exportKind&&this.unexpected(t),n}parseClassId(e,t,n){super.parseClassId(e,t,n),this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);return 123===e&&124===t?this.finishOp(s.braceBarL,2):!this.state.inType||62!==e&&60!==e?function(e,t){return 64===e&&64===t}(e,t)?(this.state.isIterator=!0,super.readWord()):super.getTokenFromCode(e):this.finishOp(s.relational,1)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":return!0;case"ObjectExpression":{const t=e.properties.length-1;return e.properties.every((e,n)=>"ObjectMethod"!==e.type&&(n===t||"SpreadElement"===e.type)&&this.isAssignable(e))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(e=>this.isAssignable(e));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":case"TypeCastExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toAssignable(e,t,n){return"TypeCastExpression"===e.type?super.toAssignable(this.typeCastToParameter(e),t,n):super.toAssignable(e,t,n)}toAssignableList(e,t,n,r){for(let t=0;t1)&&t||this.raise(r.typeAnnotation.start,"The type cast expression is expected to be wrapped with parenthesis")}return e}checkLVal(e,t=64,n,r){if("TypeCastExpression"!==e.type)return super.checkLVal(e,t,n,r)}parseClassProperty(e){return this.match(s.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(s.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(s.colon)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(s.colon)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,n,r,i,a){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,n,r,i,a)}pushClassPrivateMethod(e,t,n,r){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,n,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();const t=e.implements=[];do{const e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(s.comma))}}parsePropertyName(e){const t=this.flowParseVariance(),n=super.parsePropertyName(e);return e.variance=t,n}parseObjPropValue(e,t,n,r,i,a,o,u){let c;e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(c=this.flowParseTypeParameterDeclaration(),this.match(s.parenL)||this.unexpected()),super.parseObjPropValue(e,t,n,r,i,a,o,u),c&&((e.value||e).typeParameters=c)}parseAssignableListItemTypes(e){return this.eat(s.question)&&("Identifier"!==e.type&&this.raise(e.start,"A binding pattern parameter cannot be optional in an implementation signature."),e.optional=!0),this.match(s.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.resetEndLocation(e),e}parseMaybeDefault(e,t,n){const r=super.parseMaybeDefault(e,t,n);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.startsuper.parseMaybeAssign(e,t,n,r),a),!i.error)return i.node;const{context:o}=this.state;o[o.length-1]===v.j_oTag?o.length-=2:o[o.length-1]===v.j_expr&&(o.length-=1)}if(i&&i.error||this.isRelational("<")){let o;a=a||this.state.clone();const s=this.tryParse(()=>{o=this.flowParseTypeParameterDeclaration();const i=this.forwardNoArrowParamsConversionAt(o,()=>super.parseMaybeAssign(e,t,n,r));return i.typeParameters=o,this.resetStartLocationFromNode(i,o),i},a),u=s.node&&"ArrowFunctionExpression"===s.node.type?s.node:null;if(!s.error&&u)return u;if(i&&i.node)return this.state=i.failState,i.node;if(u)return this.state=s.failState,u;if(i&&i.thrown)throw i.error;if(s.thrown)throw s.error;throw this.raise(o.start,"Expected an arrow function after this type parameter declaration")}return super.parseMaybeAssign(e,t,n,r)}parseArrow(e){if(this.match(s.colon)){const t=this.tryParse(()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(s.arrow)||this.unexpected(),n});if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(){return this.match(s.colon)||super.shouldParseArrow()}setArrowFunctionParameters(e,t){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,n){if(!n||-1===this.state.noArrowParamsConversionAt.indexOf(e.start))return super.checkParams(...arguments)}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(e,t,n,r){if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(t)){this.next();const r=this.startNodeAt(t,n);r.callee=e,r.arguments=this.parseCallExpressionArguments(s.parenR,!1),e=this.finishNode(r,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.isRelational("<")){const i=this.state.clone(),a=this.tryParse(e=>this.parseAsyncArrowWithTypeParameters(t,n)||e(),i);if(!a.error&&!a.aborted)return a.node;const o=this.tryParse(()=>super.parseSubscripts(e,t,n,r),i);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,t,n,r)}parseSubscript(e,t,n,r,i){if(this.match(s.questionDot)&&this.isLookaheadRelational("<")){if(this.expectPlugin("optionalChaining"),i.optionalChainMember=!0,r)return i.stop=!0,e;this.next();const a=this.startNodeAt(t,n);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(s.parenL),a.arguments=this.parseCallExpressionArguments(s.parenR,!1),a.optional=!0,this.finishCallExpression(a,!0)}if(!r&&this.shouldParseTypes()&&this.isRelational("<")){const r=this.startNodeAt(t,n);r.callee=e;const a=this.tryParse(()=>(r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(s.parenL),r.arguments=this.parseCallExpressionArguments(s.parenR,!1),i.optionalChainMember&&(r.optional=!1),this.finishCallExpression(r,i.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(e,t,n,r,i)}parseNewArguments(e){let t=null;this.shouldParseTypes()&&this.isRelational("<")&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t,super.parseNewArguments(e)}parseAsyncArrowWithTypeParameters(e,t){const n=this.startNodeAt(e,t);if(this.parseFunctionParams(n),this.parseArrow(n))return this.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(s.braceBarR,2)}parseTopLevel(e,t){const n=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(this.state.pos,"Unterminated flow-comment"),n}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment())return this.state.hasFlowComment&&this.unexpected(null,"Cannot have a flow comment inside another flow comment"),this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0);if(this.state.hasFlowComment){const e=this.input.indexOf("*-/",this.state.pos+=2);if(-1===e)throw this.raise(this.state.pos-2,"Unterminated comment");this.state.pos=e+3}else super.skipBlockComment()}skipFlowComment(){const{pos:e}=this.state;let t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;const n=this.input.charCodeAt(t+e),r=this.input.charCodeAt(t+e+1);return 58===n&&58===r?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===n&&58!==r&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(this.state.pos,"Unterminated comment")}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:n}){this.raise(e,`Boolean enum members need to be initialized. Use either \`${n} = true,\` `+`or \`${n} = false,\` in enum \`${t}\`.`)}flowEnumErrorInvalidMemberName(e,{enumName:t,memberName:n}){const r=n[0].toUpperCase()+n.slice(1);this.raise(e,"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using "+`\`${n}\`, consider using \`${r}\`, in enum \`${t}\`.`)}flowEnumErrorDuplicateMemberName(e,{enumName:t,memberName:n}){this.raise(e,`Enum member names need to be unique, but the name \`${n}\` has already been used `+`before in enum \`${t}\`.`)}flowEnumErrorInconsistentMemberValues(e,{enumName:t}){this.raise(e,`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or `+"consistently use literals (either booleans, numbers, or strings) for all member initializers.")}flowEnumErrorInvalidExplicitType(e,{enumName:t,suppliedType:n}){const r="Use one of `boolean`, `number`, `string`, or `symbol` in "+`enum \`${t}\`.`,i=null===n?`Supplied enum type is not valid. ${r}`:`Enum type \`${n}\` is not valid. ${r}`;return this.raise(e,i)}flowEnumErrorInvalidMemberInitializer(e,{enumName:t,explicitType:n,memberName:r}){let i=null;switch(n){case"boolean":case"number":case"string":i=`Enum \`${t}\` has type \`${n}\`, so the initializer of `+`\`${r}\` needs to be a ${n} literal.`;break;case"symbol":i=`Symbol enum members cannot be initialized. Use \`${r},\` in `+`enum \`${t}\`.`;break;default:i=`The enum member initializer for \`${r}\` needs to be a literal (either `+`a boolean, number, or string) in enum \`${t}\`.`}return this.raise(e,i)}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:n}){this.raise(e,`Number enum members need to be initialized, e.g. \`${n} = 1\` in enum \`${t}\`.`)}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(e,"String enum members need to consistently either all use initializers, or use no initializers, "+`in enum \`${t}\`.`)}flowEnumMemberInit(){const e=this.state.start,t=()=>this.match(s.comma)||this.match(s.braceR);switch(this.state.type){case s.num:{const n=this.parseLiteral(this.state.value,"NumericLiteral");return t()?{type:"number",pos:n.start,value:n}:{type:"invalid",pos:e}}case s.string:{const n=this.parseLiteral(this.state.value,"StringLiteral");return t()?{type:"string",pos:n.start,value:n}:{type:"invalid",pos:e}}case s._true:case s._false:{const n=this.parseBooleanLiteral();return t()?{type:"boolean",pos:n.start,value:n}:{type:"invalid",pos:e}}default:return{type:"invalid",pos:e}}}flowEnumMemberRaw(){const e=this.state.start;return{id:this.parseIdentifier(!0),init:this.eat(s.eq)?this.flowEnumMemberInit():{type:"none",pos:e}}}flowEnumCheckExplicitTypeMismatch(e,t,n){const{explicitType:r}=t;null!==r&&r!==n&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){const n=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};for(;!this.match(s.braceR);){const i=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),u=a.name;if(""===u)continue;/^[a-z]/.test(u)&&this.flowEnumErrorInvalidMemberName(a.start,{enumName:e,memberName:u}),n.has(u)&&this.flowEnumErrorDuplicateMemberName(a.start,{enumName:e,memberName:u}),n.add(u);const c={enumName:e,explicitType:t,memberName:u};switch(i.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.pos,c,"boolean"),i.init=o.value,r.booleanMembers.push(this.finishNode(i,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.pos,c,"number"),i.init=o.value,r.numberMembers.push(this.finishNode(i,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.pos,c,"string"),i.init=o.value,r.stringMembers.push(this.finishNode(i,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.pos,c);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.pos,c);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.pos,c);break;default:r.defaultedMembers.push(this.finishNode(i,"EnumDefaultedMember"))}}this.match(s.braceR)||this.expect(s.comma)}return r}flowEnumStringMembers(e,t,{enumName:n}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(let t=0;t(e.members=[],this.expect(s.braceR),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const a=i.booleanMembers.length,o=i.numberMembers.length,u=i.stringMembers.length,c=i.defaultedMembers.length;if(a||o||u||c){if(a||o){if(!o&&!u&&a>=c){for(let e=0,n=i.defaultedMembers;e=c){for(let e=0,n=i.defaultedMembers;eclass extends e{getScopeHandler(){return W}tsIsIdentifier(){return this.match(s.name)}tsNextTokenCanFollowModifier(){return this.next(),!(this.hasPrecedingLineBreak()||this.match(s.parenL)||this.match(s.parenR)||this.match(s.colon)||this.match(s.eq)||this.match(s.question)||this.match(s.bang))}tsParseModifier(e){if(!this.match(s.name))return;const t=this.state.value;return-1!==e.indexOf(t)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?t:void 0}tsParseModifiers(e){const t=Object.create(null);for(;;){const n=this.state.start,r=this.tsParseModifier(e);if(!r)break;Object.hasOwnProperty.call(t,r)&&this.raise(n,`Duplicate modifier: '${r}'`),t[r]=!0}return t}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(s.braceR);case"HeritageClauseElement":return this.match(s.braceL);case"TupleElementTypes":return this.match(s.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")}tsParseList(e,t){const n=[];for(;!this.tsIsListTerminator(e);)n.push(t());return n}tsParseDelimitedList(e,t){return X(this.tsParseDelimitedListWorker(e,t,!0))}tsParseDelimitedListWorker(e,t,n){const r=[];for(;!this.tsIsListTerminator(e);){const i=t();if(null==i)return;if(r.push(i),!this.eat(s.comma)){if(this.tsIsListTerminator(e))break;return void(n&&this.expect(s.comma))}}return r}tsParseBracketedList(e,t,n,r){r||(n?this.expect(s.bracketL):this.expectRelational("<"));const i=this.tsParseDelimitedList(e,t);return n?this.expect(s.bracketR):this.expectRelational(">"),i}tsParseImportType(){const e=this.startNode();return this.expect(s._import),this.expect(s.parenL),this.match(s.string)||this.raise(this.state.start,"Argument in a type import must be a string literal"),e.argument=this.parseExprAtom(),this.expect(s.parenR),this.eat(s.dot)&&(e.qualifier=this.tsParseEntityName(!0)),this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e){let t=this.parseIdentifier();for(;this.eat(s.dot);){const n=this.startNodeAtNode(t);n.left=t,n.right=this.parseIdentifier(e),t=this.finishNode(n,"TSQualifiedName")}return t}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(s._typeof),this.match(s._import)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(!0),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(){const e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsEatThenParseType(s._extends),e.default=this.tsEatThenParseType(s.eq),this.finishNode(e,"TSTypeParameter")}tsTryParseTypeParameters(){if(this.isRelational("<"))return this.tsParseTypeParameters()}tsParseTypeParameters(){const e=this.startNode();return this.isRelational("<")||this.match(s.jsxTagStart)?this.next():this.unexpected(),e.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(e,"TSTypeParameterDeclaration")}tsTryNextParseConstantContext(){return this.lookahead().type===s._const?(this.next(),this.tsParseTypeReference()):null}tsFillSignature(e,t){const n=e===s.arrow;t.typeParameters=this.tsTryParseTypeParameters(),this.expect(s.parenL),t.parameters=this.tsParseBindingListForSignature(),n?t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){return this.parseBindingList(s.parenR,41).map(e=>("Identifier"!==e.type&&"RestElement"!==e.type&&"ObjectPattern"!==e.type&&"ArrayPattern"!==e.type&&this.raise(e.start,"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern,"+`instead got ${e.type}`),e))}tsParseTypeMemberSemicolon(){this.eat(s.comma)||this.semicolon()}tsParseSignatureMember(e,t){return this.tsFillSignature(s.colon,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),this.eat(s.name)&&this.match(s.colon)}tsTryParseIndexSignature(e){if(!this.match(s.bracketL)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(s.bracketL);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(s.bracketR),e.parameters=[t];const n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(s.question)&&(e.optional=!0);const n=e;if(t||!this.match(s.parenL)&&!this.isRelational("<")){const e=n;t&&(e.readonly=!0);const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSPropertySignature")}{const e=n;return this.tsFillSignature(s.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSMethodSignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(s.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(s._new)){const t=this.startNode();return this.next(),this.match(s.parenL)||this.isRelational("<")?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}const t=!!this.tsParseModifier(["readonly"]),n=this.tsTryParseIndexSignature(e);return n?(t&&(e.readonly=!0),n):(this.parsePropertyName(e),this.tsParsePropertyOrMethodSignature(e,t))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(s.braceL);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(s.braceR),e}tsIsStartOfMappedType(){return this.next(),this.eat(s.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(s.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(s._in))))}tsParseMappedTypeParameter(){const e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsExpectThenParseType(s._in),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){const e=this.startNode();return this.expect(s.braceL),this.match(s.plusMin)?(e.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(e.readonly=!0),this.expect(s.bracketL),e.typeParameter=this.tsParseMappedTypeParameter(),this.expect(s.bracketR),this.match(s.plusMin)?(e.optional=this.state.value,this.next(),this.expect(s.question)):this.eat(s.question)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(s.braceR),this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(e=>{"TSOptionalType"===e.type?t=!0:t&&"TSRestType"!==e.type&&this.raise(e.start,"A required element cannot follow an optional element.")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){if(this.match(s.ellipsis)){const e=this.startNode();return this.next(),e.typeAnnotation=this.tsParseType(),this.match(s.comma)&&93!==this.lookaheadCharCode()&&this.raiseRestNotLast(this.state.start),this.finishNode(e,"TSRestType")}const e=this.tsParseType();if(this.eat(s.question)){const t=this.startNodeAtNode(e);return t.typeAnnotation=e,this.finishNode(t,"TSOptionalType")}return e}tsParseParenthesizedType(){const e=this.startNode();return this.expect(s.parenL),e.typeAnnotation=this.tsParseType(),this.expect(s.parenR),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e){const t=this.startNode();return"TSConstructorType"===e&&this.expect(s._new),this.tsFillSignature(s.arrow,t),this.finishNode(t,e)}tsParseLiteralTypeNode(){const e=this.startNode();return e.literal=(()=>{switch(this.state.type){case s.num:case s.string:case s._true:case s._false:return this.parseExprAtom();default:throw this.unexpected()}})(),this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){const e=this.startNode(),t=this.parseTemplate(!1);return t.expressions.length>0&&this.raise(t.expressions[0].start,"Template literal types cannot have any substitution"),e.literal=t,this.finishNode(e,"TSLiteralType")}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case s.name:case s._void:case s._null:{const e=this.match(s._void)?"TSVoidKeyword":this.match(s._null)?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==e&&46!==this.lookaheadCharCode()){const t=this.startNode();return this.next(),this.finishNode(t,e)}return this.tsParseTypeReference()}case s.string:case s.num:case s._true:case s._false:return this.tsParseLiteralTypeNode();case s.plusMin:if("-"===this.state.value){const e=this.startNode();if(this.lookahead().type!==s.num)throw this.unexpected();return e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case s._this:return this.tsParseThisTypeOrThisTypePredicate();case s._typeof:return this.tsParseTypeQuery();case s._import:return this.tsParseImportType();case s.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case s.bracketL:return this.tsParseTupleType();case s.parenL:return this.tsParseParenthesizedType();case s.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(s.bracketL);)if(this.match(s.bracketR)){const t=this.startNodeAtNode(e);t.elementType=e,this.expect(s.bracketR),e=this.finishNode(t,"TSArrayType")}else{const t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(s.bracketR),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(e){const t=this.startNode();return this.expectContextual(e),t.operator=e,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===e&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(e.start,"'readonly' type modifier is only permitted on array and tuple literal types.")}}tsParseInferType(){const e=this.startNode();this.expectContextual("infer");const t=this.startNode();return t.name=this.parseIdentifierName(t.start),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseTypeOperatorOrHigher(){const e=["keyof","unique","readonly"].find(e=>this.isContextual(e));return e?this.tsParseTypeOperator(e):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}tsParseUnionOrIntersectionType(e,t,n){this.eat(n);let r=t();if(this.match(n)){const i=[r];for(;this.eat(n);)i.push(t());const a=this.startNodeAtNode(r);a.types=i,r=this.finishNode(a,e)}return r}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),s.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),s.bitwiseOR)}tsIsStartOfFunctionType(){return!!this.isRelational("<")||this.match(s.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(this.match(s.name)||this.match(s._this))return this.next(),!0;if(this.match(s.braceL)){let e=1;for(this.next();e>0;)this.match(s.braceL)?++e:this.match(s.braceR)&&--e,this.next();return!0}if(this.match(s.bracketL)){let e=1;for(this.next();e>0;)this.match(s.bracketL)?++e:this.match(s.bracketR)&&--e,this.next();return!0}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(s.parenR)||this.match(s.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(s.colon)||this.match(s.comma)||this.match(s.question)||this.match(s.eq))return!0;if(this.match(s.parenR)&&(this.next(),this.match(s.arrow)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{const t=this.startNode();this.expect(e);const n=this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(s._this)){let e=this.tsParseThisTypeOrThisTypePredicate();if("TSThisType"===e.type){const n=this.startNodeAtNode(t);n.parameterName=e,n.asserts=!0,e=this.finishNode(n,"TSTypePredicate")}else e.asserts=!0;return t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}const r=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!r){if(!n)return this.tsParseTypeAnnotation(!1,t);const e=this.startNodeAtNode(t);return e.parameterName=this.parseIdentifier(),e.asserts=n,t.typeAnnotation=this.finishNode(e,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}const i=this.tsParseTypeAnnotation(!1),a=this.startNodeAtNode(t);return a.parameterName=r,a.typeAnnotation=i,a.asserts=n,t.typeAnnotation=this.finishNode(a,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(s.colon)?this.tsParseTypeOrTypePredicateAnnotation(s.colon):void 0}tsTryParseTypeAnnotation(){return this.match(s.colon)?this.tsParseTypeAnnotation():void 0}tsTryParseType(){return this.tsEatThenParseType(s.colon)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(!this.match(s.name)||"asserts"!==this.state.value||this.hasPrecedingLineBreak())return!1;const e=this.state.containsEsc;return this.next(),!(!this.match(s.name)&&!this.match(s._this))&&(e&&this.raise(this.state.lastTokStart,"Escape sequence in keyword asserts"),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType(()=>{e&&this.expect(s.colon),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){K(this.state.inType);const e=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(s._extends))return e;const t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsParseNonConditionalType(),this.expect(s.question),t.trueType=this.tsParseType(),this.expect(s.colon),t.falseType=this.tsParseType(),this.finishNode(t,"TSConditionalType")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(s._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){const e=this.startNode(),t=this.tsTryNextParseConstantContext();return e.typeAnnotation=t||this.tsNextThenParseType(),this.expectRelational(">"),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const t=this.state.start,n=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return n.length||this.raise(t,`'${e}' list cannot be empty.`),n}tsParseExpressionWithTypeArguments(){const e=this.startNode();return e.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}tsParseInterfaceDeclaration(e){e.id=this.parseIdentifier(),this.checkLVal(e.id,130,void 0,"typescript interface declaration"),e.typeParameters=this.tsTryParseTypeParameters(),this.eat(s._extends)&&(e.extends=this.tsParseHeritageClause("extends"));const t=this.startNode();return t.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(t,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkLVal(e.id,2,void 0,"typescript type alias"),e.typeParameters=this.tsTryParseTypeParameters(),e.typeAnnotation=this.tsExpectThenParseType(s.eq),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){const t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsEatThenParseType(e){return this.match(e)?this.tsNextThenParseType():void 0}tsExpectThenParseType(e){return this.tsDoThenParseType(()=>this.expect(e))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(e){return this.tsInType(()=>(e(),this.tsParseType()))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(s.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(s.eq)&&(e.initializer=this.parseMaybeAssign()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t){return t&&(e.const=!0),e.id=this.parseIdentifier(),this.checkLVal(e.id,t?779:267,void 0,"typescript enum declaration"),this.expect(s.braceL),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(s.braceR),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(s.braceL),this.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,s.braceR),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkLVal(e.id,1024,null,"module or namespace declaration"),this.eat(s.dot)){const t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(512),e.body=this.tsParseModuleBlock(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual("global")?(e.global=!0,e.id=this.parseIdentifier()):this.match(s.string)?e.id=this.parseExprAtom():this.unexpected(),this.match(s.braceL)?(this.scope.enter(512),e.body=this.tsParseModuleBlock(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t){return e.isExport=t||!1,e.id=this.parseIdentifier(),this.checkLVal(e.id,9,void 0,"import equals declaration"),this.expect(s.eq),e.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual("require")&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const e=this.startNode();if(this.expectContextual("require"),this.expect(s.parenL),!this.match(s.string))throw this.unexpected();return e.expression=this.parseExprAtom(),this.expect(s.parenR),this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const t=this.state.clone(),n=e();return this.state=t,n}tsTryParseAndCatch(e){const t=this.tryParse(t=>e()||t());if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){const t=this.state.clone(),n=e();return void 0!==n&&!1!==n?n:void(this.state=t)}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t,n=this.state.type;switch(this.isContextual("let")&&(n=s._var,t="let"),n){case s._function:return this.parseFunctionStatement(e,!1,!0);case s._class:return e.declare=!0,this.parseClass(e,!0,!1);case s._const:if(this.match(s._const)&&this.isLookaheadContextual("enum"))return this.expect(s._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(e,!0);case s._var:return t=t||this.state.value,this.parseVarStatement(e,t);case s.name:{const t=this.state.value;return"global"===t?this.tsParseAmbientExternalModuleDeclaration(e):this.tsParseDeclaration(e,t,!0)}}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}tsParseExpressionStatement(e,t){switch(t.name){case"declare":{const t=this.tsTryParseDeclare(e);if(t)return t.declare=!0,t;break}case"global":if(this.match(s.braceL)){this.scope.enter(512);const n=e;return n.global=!0,n.id=t,n.body=this.tsParseModuleBlock(),this.scope.exit(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1)}}tsParseDeclaration(e,t,n){switch(t){case"abstract":if(this.tsCheckLineTerminatorAndMatch(s._class,n)){const t=e;return t.abstract=!0,n&&(this.next(),this.match(s._class)||this.unexpected(null,s._class)),this.parseClass(t,!0,!1)}break;case"enum":if(n||this.match(s.name))return n&&this.next(),this.tsParseEnumDeclaration(e,!1);break;case"interface":if(this.tsCheckLineTerminatorAndMatch(s.name,n))return n&&this.next(),this.tsParseInterfaceDeclaration(e);break;case"module":if(n&&this.next(),this.match(s.string))return this.tsParseAmbientExternalModuleDeclaration(e);if(this.tsCheckLineTerminatorAndMatch(s.name,n))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"namespace":if(this.tsCheckLineTerminatorAndMatch(s.name,n))return n&&this.next(),this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminatorAndMatch(s.name,n))return n&&this.next(),this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminatorAndMatch(e,t){return(t||this.match(e))&&!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e,t){if(!this.isRelational("<"))return;const n=this.tsTryParseAndCatch(()=>{const n=this.startNodeAt(e,t);return n.typeParameters=this.tsParseTypeParameters(),super.parseFunctionParams(n),n.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(s.arrow),n});return n?this.parseArrowExpression(n,null,!0):void 0}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expectRelational("<"),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){if(this.match(s.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){const n=this.state.start,r=this.state.startLoc;let i,a=!1;e&&(i=this.parseAccessModifier(),a=!!this.tsParseModifier(["readonly"]));const o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o);const s=this.parseMaybeDefault(o.start,o.loc.start,o);if(i||a){const e=this.startNodeAt(n,r);return t.length&&(e.decorators=t),i&&(e.accessibility=i),a&&(e.readonly=a),"Identifier"!==s.type&&"AssignmentPattern"!==s.type&&this.raise(e.start,"A parameter property may not be declared using a binding pattern."),e.parameter=s,this.finishNode(e,"TSParameterProperty")}return t.length&&(o.decorators=t),s}parseFunctionBodyAndFinish(e,t,n=!1){this.match(s.colon)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(s.colon));const r="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t?"TSDeclareMethod":void 0;r&&!this.match(s.braceL)&&this.isLineTerminator()?this.finishNode(e,r):super.parseFunctionBodyAndFinish(e,t,n)}registerFunctionStatementId(e){!e.body&&e.id?this.checkLVal(e.id,1024,null,"function name"):super.registerFunctionStatementId(...arguments)}parseSubscript(e,t,n,r,i){if(!this.hasPrecedingLineBreak()&&this.match(s.bang)){this.state.exprAllowed=!1,this.next();const r=this.startNodeAt(t,n);return r.expression=e,this.finishNode(r,"TSNonNullExpression")}if(this.isRelational("<")){const a=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsync(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t,n);if(e)return e}const a=this.startNodeAt(t,n);a.callee=e;const o=this.tsParseTypeArguments();if(o){if(!r&&this.eat(s.parenL))return a.arguments=this.parseCallExpressionArguments(s.parenR,!1),a.typeParameters=o,this.finishCallExpression(a,i.optionalChainMember);if(this.match(s.backQuote))return this.parseTaggedTemplateExpression(t,n,e,i,o)}this.unexpected()});if(a)return a}return super.parseSubscript(e,t,n,r,i)}parseNewArguments(e){if(this.isRelational("<")){const t=this.tsTryParseAndCatch(()=>{const e=this.tsParseTypeArguments();return this.match(s.parenL)||this.unexpected(),e});t&&(e.typeParameters=t)}super.parseNewArguments(e)}parseExprOp(e,t,n,r,i){if(X(s._in.binop)>r&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){const a=this.startNodeAt(t,n);a.expression=e;const o=this.tsTryNextParseConstantContext();return a.typeAnnotation=o||this.tsNextThenParseType(),this.finishNode(a,"TSAsExpression"),this.parseExprOp(a,t,n,r,i)}return super.parseExprOp(e,t,n,r,i)}checkReservedWord(e,t,n,r){}checkDuplicateExports(){}parseImport(e){return this.match(s.name)&&this.lookahead().type===s.eq?this.tsParseImportEqualsDeclaration(e):super.parseImport(e)}parseExport(e){if(this.match(s._import))return this.expect(s._import),this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(s.eq)){const t=e;return t.expression=this.parseExpression(),this.semicolon(),this.finishNode(t,"TSExportAssignment")}if(this.eatContextual("as")){const t=e;return this.expectContextual("namespace"),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}return super.parseExport(e)}isAbstractClass(){return this.isContextual("abstract")&&this.lookahead().type===s._class}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),this.parseClass(e,!0,!0),e.abstract=!0,e}if("interface"===this.state.value){const e=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(e)return e}return super.parseExportDefaultExpression()}parseStatementContent(e,t){if(this.state.type===s._const){const e=this.lookahead();if(e.type===s.name&&"enum"===e.value){const e=this.startNode();return this.expect(s._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(e,!0)}}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parseClassMember(e,t,n,r){const i=this.parseAccessModifier();i&&(t.accessibility=i),super.parseClassMember(e,t,n,r)}parseClassMemberWithIsStatic(e,t,n,r,i){const a=this.tsParseModifiers(["abstract","readonly","declare"]);Object.assign(t,a);const o=this.tsTryParseIndexSignature(t);if(o)return e.body.push(o),a.abstract&&this.raise(t.start,"Index signatures cannot have the 'abstract' modifier"),r&&this.raise(t.start,"Index signatures cannot have the 'static' modifier"),void(t.accessibility&&this.raise(t.start,`Index signatures cannot have an accessibility modifier ('${t.accessibility}')`));super.parseClassMemberWithIsStatic(e,t,n,r,i)}parsePostMemberNameModifiers(e){this.eat(s.question)&&(e.optional=!0),e.readonly&&this.match(s.parenL)&&this.raise(e.start,"Class methods cannot have the 'readonly' modifier"),e.declare&&this.match(s.parenL)&&this.raise(e.start,"Class methods cannot have the 'declare' modifier")}parseExpressionStatement(e,t){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t):void 0)||super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,n,r,i){if(!i||!this.match(s.question))return super.parseConditional(e,t,n,r,i);const a=this.tryParse(()=>super.parseConditional(e,t,n,r));return a.node?(a.error&&(this.state=a.failState),a.node):(i.start=a.error.pos||this.state.start,e)}parseParenItem(e,t,n){if(e=super.parseParenItem(e,t,n),this.eat(s.question)&&(e.optional=!0,this.resetEndLocation(e)),this.match(s.colon)){const r=this.startNodeAt(t,n);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){const t=this.state.start,n=this.state.startLoc,r=this.eatContextual("declare");let i;return this.match(s.name)&&(i=this.tsTryParseExportDeclaration()),i||(i=super.parseExportDeclaration(e)),i&&r&&(this.resetStartLocation(i,t,n),i.declare=!0),i}parseClassId(e,t,n){if((!t||n)&&this.isContextual("implements"))return;super.parseClassId(e,t,n,e.declare?1024:139);const r=this.tsTryParseTypeParameters();r&&(e.typeParameters=r)}parseClassPropertyAnnotation(e){!e.optional&&this.eat(s.bang)&&(e.definite=!0);const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){return this.parseClassPropertyAnnotation(e),e.declare&&this.match(s.equal)&&this.raise(this.state.start,"'declare' class fields cannot have an initializer"),super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(e.start,"Private elements cannot have the 'abstract' modifier."),e.accessibility&&this.raise(e.start,`Private elements cannot have an accessibility modifier ('${e.accessibility}')`),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}pushClassMethod(e,t,n,r,i,a){const o=this.tsTryParseTypeParameters();o&&(t.typeParameters=o),super.pushClassMethod(e,t,n,r,i,a)}pushClassPrivateMethod(e,t,n,r){const i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i),super.pushClassPrivateMethod(e,t,n,r)}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,...t){const n=this.tsTryParseTypeParameters();n&&(e.typeParameters=n),super.parseObjPropValue(e,...t)}parseFunctionParams(e,t){const n=this.tsTryParseTypeParameters();n&&(e.typeParameters=n),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&this.eat(s.bang)&&(e.definite=!0);const n=this.tsTryParseTypeAnnotation();n&&(e.id.typeAnnotation=n,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(s.colon)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(...e){let t,n,r,i;if(this.match(s.jsxTagStart)){if(t=this.state.clone(),n=this.tryParse(()=>super.parseMaybeAssign(...e),t),!n.error)return n.node;const{context:r}=this.state;r[r.length-1]===v.j_oTag?r.length-=2:r[r.length-1]===v.j_expr&&(r.length-=1)}if(!(n&&n.error||this.isRelational("<")))return super.parseMaybeAssign(...e);t=t||this.state.clone();const a=this.tryParse(t=>{i=this.tsParseTypeParameters();const n=super.parseMaybeAssign(...e);return("ArrowFunctionExpression"!==n.type||n.extra&&n.extra.parenthesized)&&t(),i&&0!==i.params.length&&this.resetStartLocationFromNode(n,i),n.typeParameters=i,n},t);if(!a.error&&!a.aborted)return a.node;if(!n&&(K(!this.hasPlugin("jsx")),r=this.tryParse(()=>super.parseMaybeAssign(...e),t),!r.error))return r.node;if(n&&n.node)return this.state=n.failState,n.node;if(a.node)return this.state=a.failState,a.node;if(r&&r.node)return this.state=r.failState,r.node;if(n&&n.thrown)throw n.error;if(a.thrown)throw a.error;if(r&&r.thrown)throw r.error;throw n&&n.error||a.error||r&&r.error}parseMaybeUnary(e){return!this.hasPlugin("jsx")&&this.isRelational("<")?this.tsParseTypeAssertion():super.parseMaybeUnary(e)}parseArrow(e){if(this.match(s.colon)){const t=this.tryParse(e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(s.colon);return!this.canInsertSemicolon()&&this.match(s.arrow)||e(),t});if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e){this.eat(s.question)&&("Identifier"!==e.type&&this.raise(e.start,"A binding pattern parameter cannot be optional in an implementation signature."),e.optional=!0);const t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}toAssignable(e,t,n){switch(e.type){case"TSTypeCastExpression":return super.toAssignable(this.typeCastToParameter(e),t,n);case"TSParameterProperty":return super.toAssignable(e,t,n);case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return e.expression=this.toAssignable(e.expression,t,n),e;default:return super.toAssignable(e,t,n)}}checkLVal(e,t=64,n,r){switch(e.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(e.parameter,t,n,"parameter property");case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return void this.checkLVal(e.expression,t,n,r);default:return void super.checkLVal(e,t,n,r)}}parseBindingAtom(){switch(this.state.type){case s._this:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseMaybeDecoratorArguments(e){if(this.isRelational("<")){const t=this.tsParseTypeArguments();if(this.match(s.parenL)){const n=super.parseMaybeDecoratorArguments(e);return n.typeParameters=t,n}this.unexpected(this.state.start,s.parenL)}return super.parseMaybeDecoratorArguments(e)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(s.bang)||this.match(s.colon)||super.isClassProperty()}parseMaybeDefault(...e){const t=super.parseMaybeDefault(...e);return"AssignmentPattern"===t.type&&t.typeAnnotation&&t.right.startthis.tsParseTypeArguments());t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e),n=e.params[0];return n&&"Identifier"===n.type&&"this"===n.name?t+1:t}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(s.modulo)){const e=this.state.start,t=this.startNode();if(this.eat(s.modulo),this.match(s.name)){const e=this.parseIdentifierName(this.state.start),n=this.createIdentifier(t,e);if(n.type="V8IntrinsicIdentifier",this.match(s.parenL))return n}this.unexpected(e)}}parseExprAtom(){return this.parseV8Intrinsic()||super.parseExprAtom(...arguments)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(s.placeholder)){const t=this.startNode();return this.next(),this.assertNoSpace("Unexpected space in placeholder."),t.name=super.parseIdentifier(!0),this.assertNoSpace("Unexpected space in placeholder."),this.expect(s.placeholder),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){const n=!(!e.expectedNode||"Placeholder"!==e.type);return e.expectedNode=t,n?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){return 37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(s.placeholder,2):super.getTokenFromCode(...arguments)}parseExprAtom(){return this.parsePlaceholder("Expression")||super.parseExprAtom(...arguments)}parseIdentifier(){return this.parsePlaceholder("Identifier")||super.parseIdentifier(...arguments)}checkReservedWord(e){void 0!==e&&super.checkReservedWord(...arguments)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom(...arguments)}checkLVal(e){"Placeholder"!==e.type&&super.checkLVal(...arguments)}toAssignable(e){return e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?(e.expectedNode="Pattern",e):super.toAssignable(...arguments)}verifyBreakContinue(e){e.label&&"Placeholder"===e.label.type||super.verifyBreakContinue(...arguments)}parseExpressionStatement(e,t){if("Placeholder"!==t.type||t.extra&&t.extra.parenthesized)return super.parseExpressionStatement(...arguments);if(this.match(s.colon)){const n=e;return n.label=this.finishPlaceholder(t,"Identifier"),this.next(),n.body=this.parseStatement("label"),this.finishNode(n,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}parseBlock(){return this.parsePlaceholder("BlockStatement")||super.parseBlock(...arguments)}parseFunctionId(){return this.parsePlaceholder("Identifier")||super.parseFunctionId(...arguments)}parseClass(e,t,n){const r=t?"ClassDeclaration":"ClassExpression";this.next(),this.takeDecorators(e);const i=this.parsePlaceholder("Identifier");if(i)if(this.match(s._extends)||this.match(s.placeholder)||this.match(s.braceL))e.id=i;else{if(n||!t)return e.id=null,e.body=this.finishPlaceholder(i,"ClassBody"),this.finishNode(e,r);this.unexpected(null,"A class name is required")}else this.parseClassId(e,t,n);return this.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||this.parseClassBody(!!e.superClass),this.finishNode(e,r)}parseExport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseExport(...arguments);if(!this.isContextual("from")&&!this.match(s.comma))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(t,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const n=this.startNode();return n.exported=t,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(e)}maybeParseExportDefaultSpecifier(e){return!!(e.specifiers&&e.specifiers.length>0)||super.maybeParseExportDefaultSpecifier(...arguments)}checkExport(e){const{specifiers:t}=e;t&&t.length&&(e.specifiers=t.filter(e=>"Placeholder"===e.exported.type)),super.checkExport(e),e.specifiers=t}parseImport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(...arguments);if(e.specifiers=[],!this.isContextual("from")&&!this.match(s.comma))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const n=this.startNodeAtNode(t);if(n.local=t,this.finishNode(n,"ImportDefaultSpecifier"),e.specifiers.push(n),this.eat(s.comma)){this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)}return this.expectContextual("from"),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource(...arguments)}}},ee=Object.keys(Q),te={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1};class ne{constructor(e,t){this.line=e,this.column=t}}class re{constructor(e,t){this.start=e,this.end=t}}function ie(e){return e[e.length-1]}class ae{constructor(){this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.inParameters=!1,this.maybeInArrowParameters=!1,this.inPipeline=!1,this.inType=!1,this.noAnonFunctionType=!1,this.inPropertyName=!1,this.inClassProperty=!1,this.hasFlowComment=!1,this.isIterator=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.yieldPos=-1,this.awaitPos=-1,this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=0,this.lineStart=0,this.type=s.eof,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[v.braceStatement],this.exprAllowed=!0,this.containsEsc=!1,this.containsOctal=!1,this.octalPosition=null,this.exportedIdentifiers=[],this.invalidTemplateEscapePosition=null}init(e){this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.curLine=e.startLine,this.startLoc=this.endLoc=this.curPosition()}curPosition(){return new ne(this.curLine,this.pos-this.lineStart)}clone(e){const t=new ae,n=Object.keys(this);for(let r=0,i=n.length;r=48&&e<=57};const se=new Set(["g","m","s","i","y","u"]),ue={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},ce={bin:[48,49]};ce.oct=[...ce.bin,50,51,52,53,54,55],ce.dec=[...ce.oct,56,57],ce.hex=[...ce.dec,65,66,67,68,69,70,97,98,99,100,101,102];class le{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new re(e.startLoc,e.endLoc)}}const pe=/^('|")((?:\\?.)*?)\1/;class he{constructor(e,t,n){this.type="",this.start=t,this.end=0,this.loc=new re(n),e&&e.options.ranges&&(this.range=[t,0]),e&&e.filename&&(this.loc.filename=e.filename)}__clone(){const e=new he,t=Object.keys(this);for(let n=0,r=t.length;n"ParenthesizedExpression"===e.type?fe(e.expression):e;const de={kind:"loop"},ye={kind:"switch"};class ve extends class extends class extends class extends class extends class extends class extends class extends class extends class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){return this.plugins.has(e)}getPluginOption(e,t){if(this.hasPlugin(e))return this.plugins.get(e)[t]}}{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)}adjustCommentsAfterTrailingComma(e,t,n){if(0===this.state.leadingComments.length)return;let r=null,i=t.length;for(;null===r&&i>0;)r=t[--i];if(null===r)return;for(let e=0;e0?r.trailingComments=a:void 0!==r.trailingComments&&(r.trailingComments=[])}processComment(e){if("Program"===e.type&&e.body.length>0)return;const t=this.state.commentStack;let n,r,i,a,o;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(t.length>0){const n=ie(t);n.trailingComments&&n.trailingComments[0].start>=e.end&&(i=n.trailingComments,delete n.trailingComments)}for(t.length>0&&ie(t).start>=e.start&&(n=t.pop());t.length>0&&ie(t).start>=e.start;)r=t.pop();if(!r&&n&&(r=n),n)switch(e.type){case"ObjectExpression":this.adjustCommentsAfterTrailingComma(e,e.properties);break;case"ObjectPattern":this.adjustCommentsAfterTrailingComma(e,e.properties,!0);break;case"CallExpression":this.adjustCommentsAfterTrailingComma(e,e.arguments);break;case"ArrayExpression":this.adjustCommentsAfterTrailingComma(e,e.elements);break;case"ArrayPattern":this.adjustCommentsAfterTrailingComma(e,e.elements,!0)}else this.state.commentPreviousNode&&("ImportSpecifier"===this.state.commentPreviousNode.type&&"ImportSpecifier"!==e.type||"ExportSpecifier"===this.state.commentPreviousNode.type&&"ExportSpecifier"!==e.type)&&this.adjustCommentsAfterTrailingComma(e,[this.state.commentPreviousNode],!0);if(r){if(r.leadingComments)if(r!==e&&r.leadingComments.length>0&&ie(r.leadingComments).end<=e.start)e.leadingComments=r.leadingComments,delete r.leadingComments;else for(a=r.leadingComments.length-2;a>=0;--a)if(r.leadingComments[a].end<=e.start){e.leadingComments=r.leadingComments.splice(0,a+1);break}}else if(this.state.leadingComments.length>0)if(ie(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(o=0;o0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(a=0;ae.start);a++);const t=this.state.leadingComments.slice(0,a);t.length&&(e.leadingComments=t),i=this.state.leadingComments.slice(a),0===i.length&&(i=null)}this.state.commentPreviousNode=e,i&&(i.length&&i[0].start>=e.start&&ie(i).end<=e.end?e.innerComments=i:e.trailingComments=i),t.push(e)}}{getLocationForPosition(e){let t;return t=e===this.state.start?this.state.startLoc:e===this.state.lastTokStart?this.state.lastTokStartLoc:e===this.state.end?this.state.endLoc:e===this.state.lastTokEnd?this.state.lastTokEndLoc:function(e,t){let n,r=1,i=0;for(p.lastIndex=0;(n=p.exec(e))&&n.index=this.length?this.finishToken(s.eof):e.override?e.override(this):this.getTokenFromCode(this.input.codePointAt(this.state.pos))}pushComment(e,t,n,r,i,a){const o={type:e?"CommentBlock":"CommentLine",value:t,start:n,end:r,loc:new re(i,a)};this.options.tokens&&this.state.tokens.push(o),this.state.comments.push(o),this.addComment(o)}skipBlockComment(){const e=this.state.curPosition(),t=this.state.pos,n=this.input.indexOf("*/",this.state.pos+2);if(-1===n)throw this.raise(t,"Unterminated comment");let r;for(this.state.pos=n+2,p.lastIndex=t;(r=p.exec(this.input))&&r.index=48&&t<=57)throw this.raise(this.state.pos,"Unexpected digit after hash token");if((this.hasPlugin("classPrivateProperties")||this.hasPlugin("classPrivateMethods"))&&this.state.classLevel>0)return++this.state.pos,void this.finishToken(s.hash);if("smart"!==this.getPluginOption("pipelineOperator","proposal"))throw this.raise(this.state.pos,"Unexpected character '#'");this.finishOp(s.hash,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(s.ellipsis)):(++this.state.pos,this.finishToken(s.dot))}readToken_slash(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(s.assign,2):this.finishOp(s.slash,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;const e=this.state.pos;this.state.pos+=1;let t=this.input.charCodeAt(this.state.pos);if(33!==t)return!1;for(;!h(t)&&++this.state.pos=48&&t<=57?(++this.state.pos,this.finishToken(s.question)):(this.state.pos+=2,this.finishToken(s.questionDot)):61===t?this.finishOp(s.assign,3):this.finishOp(s.nullishCoalescing,2)}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(s.parenL);case 41:return++this.state.pos,void this.finishToken(s.parenR);case 59:return++this.state.pos,void this.finishToken(s.semi);case 44:return++this.state.pos,void this.finishToken(s.comma);case 91:return++this.state.pos,void this.finishToken(s.bracketL);case 93:return++this.state.pos,void this.finishToken(s.bracketR);case 123:return++this.state.pos,void this.finishToken(s.braceL);case 125:return++this.state.pos,void this.finishToken(s.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(s.doubleColon,2):(++this.state.pos,this.finishToken(s.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(s.backQuote);case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:case 62:return void this.readToken_lt_gt(e);case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(s.tilde,1);case 64:return++this.state.pos,void this.finishToken(s.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if($(e))return void this.readWord()}throw this.raise(this.state.pos,`Unexpected character '${String.fromCodePoint(e)}'`)}finishOp(e,t){const n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,n)}readRegexp(){const e=this.state.pos;let t,n;for(;;){if(this.state.pos>=this.length)throw this.raise(e,"Unterminated regular expression");const r=this.input.charAt(this.state.pos);if(l.test(r))throw this.raise(e,"Unterminated regular expression");if(t)t=!1;else{if("["===r)n=!0;else if("]"===r&&n)n=!1;else if("/"===r&&!n)break;t="\\"===r}++this.state.pos}const r=this.input.slice(e,this.state.pos);++this.state.pos;let i="";for(;this.state.pos-1&&this.raise(this.state.pos+1,"Duplicate regular expression flag");else{if(!M(t)&&92!==t)break;this.raise(this.state.pos+1,"Invalid regular expression flag")}++this.state.pos,i+=e}this.finishToken(s.regexp,{pattern:r,flags:i})}readInt(e,t,n,r=!0){const i=this.state.pos,a=16===e?ue.hex:ue.decBinOct,o=16===e?ce.hex:10===e?ce.dec:8===e?ce.oct:ce.bin;let s=!1,u=0;for(let i=0,c=null==t?1/0:t;i-1||a.indexOf(t)>-1||Number.isNaN(t))&&this.raise(this.state.pos,"A numeric separator is only allowed between two digits"),r||this.raise(this.state.pos,"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences"),++this.state.pos}else{if(c=t>=97?t-97+10:t>=65?t-65+10:oe(t)?t-48:1/0,c>=e)if(this.options.errorRecovery&&c<=9)c=0,this.raise(this.state.start+i+2,"Expected number in radix "+e);else{if(!n)break;c=0,s=!0}++this.state.pos,u=u*e+c}}return this.state.pos===i||null!=t&&this.state.pos-i!==t||s?null:u}readRadixNumber(e){const t=this.state.pos;let n=!1;this.state.pos+=2;const r=this.readInt(e);if(null==r&&this.raise(this.state.start+2,"Expected number in radix "+e),this.hasPlugin("bigInt")&&110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,n=!0),$(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,"Identifier directly after number");if(n){const e=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(s.bigint,e)}else this.finishToken(s.num,r)}readNumber(e){const t=this.state.pos;let n=!1,r=!1,i=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number");let a=this.state.pos-t>=2&&48===this.input.charCodeAt(t);a&&(this.state.strict&&this.raise(t,"Legacy octal literals are not allowed in strict mode"),/[89]/.test(this.input.slice(t,this.state.pos))&&(a=!1,i=!0));let o=this.input.charCodeAt(this.state.pos);if(46!==o||a||(++this.state.pos,this.readInt(10),n=!0,o=this.input.charCodeAt(this.state.pos)),69!==o&&101!==o||a||(o=this.input.charCodeAt(++this.state.pos),43!==o&&45!==o||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0,o=this.input.charCodeAt(this.state.pos)),this.hasPlugin("numericSeparator")&&(a||i)){const e=this.input.slice(t,this.state.pos).indexOf("_");e>0&&this.raise(e+t,"Numeric separator can not be used after leading 0")}if(this.hasPlugin("bigInt")&&110===o&&((n||a||i)&&this.raise(t,"Invalid BigIntLiteral"),++this.state.pos,r=!0),$(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,"Identifier directly after number");const u=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");if(r)return void this.finishToken(s.bigint,u);const c=a?parseInt(u,8):parseFloat(u);this.finishToken(s.num,c)}readCodePoint(e){let t;if(123===this.input.charCodeAt(this.state.pos)){const n=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,!0,e),++this.state.pos,null===t)--this.state.invalidTemplateEscapePosition;else if(t>1114111){if(!e)return this.state.invalidTemplateEscapePosition=n-2,null;this.raise(n,"Code point out of bounds")}}else t=this.readHexChar(4,!1,e);return t}readString(e){let t="",n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated string constant");const r=this.input.charCodeAt(this.state.pos);if(r===e)break;if(92===r)t+=this.input.slice(n,this.state.pos),t+=this.readEscapedChar(!1),n=this.state.pos;else if(8232===r||8233===r)++this.state.pos,++this.state.curLine;else{if(h(r))throw this.raise(this.state.start,"Unterminated string constant");++this.state.pos}}t+=this.input.slice(n,this.state.pos++),this.finishToken(s.string,t)}readTmplToken(){let e="",t=this.state.pos,n=!1;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated template");const r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(s.template)?36===r?(this.state.pos+=2,void this.finishToken(s.dollarBraceL)):(++this.state.pos,void this.finishToken(s.backQuote)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(s.template,n?null:e));if(92===r){e+=this.input.slice(t,this.state.pos);const r=this.readEscapedChar(!0);null===r?n=!0:e+=r,t=this.state.pos}else if(h(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}}readEscapedChar(e){const t=!e,n=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,n){case 110:return"\n";case 114:return"\r";case 120:{const e=this.readHexChar(2,!1,t);return null===e?null:String.fromCharCode(e)}case 117:{const e=this.readCodePoint(t);return null===e?null:String.fromCodePoint(e)}case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(e){const e=this.state.pos-1;return this.state.invalidTemplateEscapePosition=e,null}default:if(n>=48&&n<=55){const t=this.state.pos-1;let n=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),this.state.pos+=n.length-1;const i=this.input.charCodeAt(this.state.pos);if("0"!==n||56===i||57===i){if(e)return this.state.invalidTemplateEscapePosition=t,null;this.state.strict?this.raise(t,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=t)}return String.fromCharCode(r)}return String.fromCharCode(n)}}readHexChar(e,t,n){const r=this.state.pos,i=this.readInt(16,e,t,!1);return null===i&&(n?this.raise(r,"Bad character escape sequence"):(this.state.pos=r-1,this.state.invalidTemplateEscapePosition=r-1)),i}readWord1(){let e="";this.state.containsEsc=!1;const t=this.state.pos;let n=this.state.pos;for(;this.state.posthis.state.lastTokEnd&&this.raise(this.state.lastTokEnd,e)}unexpected(e,t="Unexpected token"){throw"string"!=typeof t&&(t=`Unexpected token, expected "${t.label}"`),this.raise(null!=e?e:this.state.start,t)}expectPlugin(e,t){if(!this.hasPlugin(e))throw this.raise(null!=t?t:this.state.start,`This experimental syntax requires enabling the parser plugin: '${e}'`,{missingPluginNames:[e]});return!0}expectOnePlugin(e,t){if(!e.some(e=>this.hasPlugin(e)))throw this.raise(null!=t?t:this.state.start,`This experimental syntax requires enabling one of the following parser plugin(s): '${e.join(", ")}'`,{missingPluginNames:e})}checkYieldAwaitInDefaultParams(){-1!==this.state.yieldPos&&(-1===this.state.awaitPos||this.state.yieldPos{throw n.node=e,n});if(this.state.errors.length>t.errors.length){const e=this.state;return this.state=t,{node:r,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const r=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:r};if(e===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:r};throw e}}}{startNode(){return new he(this,this.state.start,this.state.startLoc)}startNodeAt(e,t){return new he(this,e,t)}startNodeAtNode(e){return this.startNodeAt(e.start,e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)}finishNodeAt(e,t,n,r){return e.type=t,e.end=n,e.loc.end=r,this.options.ranges&&(e.range[1]=n),this.processComment(e),e}resetStartLocation(e,t,n){e.start=t,e.loc.start=n,this.options.ranges&&(e.range[0]=t)}resetEndLocation(e,t=this.state.lastTokEnd,n=this.state.lastTokEndLoc){e.end=t,e.loc.end=n,this.options.ranges&&(e.range[1]=t)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.start,t.loc.start)}}{toAssignable(e,t,n){var r;if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(let n=0,r=e.properties.length,a=r-1;n=n.left.start&&(t.start=0),this.checkLVal(u,void 0,void 0,"assignment expression");const o=fe(u);let c;return"ObjectPattern"===o.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===o.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&(u.extra&&u.extra.parenthesized||"ParenthesizedExpression"===u.type)&&this.raise(o.start,`You're trying to assign to a parenthesized expression, eg. instead of ${c}`),this.next(),n.right=this.parseMaybeAssign(e),this.finishNode(n,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u}parseMaybeConditional(e,t,n){const r=this.state.start,i=this.state.startLoc,a=this.state.potentialArrowAt,o=this.parseExprOps(e,t);return"ArrowFunctionExpression"===o.type&&o.start===a?o:t&&t.start?o:this.parseConditional(o,e,r,i,n)}parseConditional(e,t,n,r,i){if(this.eat(s.question)){const i=this.startNodeAt(n,r);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(s.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e}parseExprOps(e,t){const n=this.state.start,r=this.state.startLoc,i=this.state.potentialArrowAt,a=this.parseMaybeUnary(t);return"ArrowFunctionExpression"===a.type&&a.start===i?a:t&&t.start?a:this.parseExprOp(a,n,r,-1,e)}parseExprOp(e,t,n,r,i){const a=this.state.type.binop;if(!(null==a||i&&this.match(s._in))&&a>r){const o=this.state.value;if("|>"===o&&this.state.inFSharpPipelineDirectBody)return e;const u=this.startNodeAt(t,n);u.left=e,u.operator=o,"**"!==o||"UnaryExpression"!==e.type||!this.options.createParenthesizedExpressions&&e.extra&&e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");const c=this.state.type;if(c===s.pipeline?(this.expectPlugin("pipelineOperator"),this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(e,t)):c===s.nullishCoalescing&&this.expectPlugin("nullishCoalescingOperator"),this.next(),c===s.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(s.name)&&"await"===this.state.value&&this.scope.inAsync)throw this.raise(this.state.start,'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal');if(u.right=this.parseExprOpRightExpr(c,a,i),c===s.nullishCoalescing){if(!("LogicalExpression"!==e.type||"??"===e.operator||e.extra&&e.extra.parenthesized))throw this.raise(e.start,"Nullish coalescing operator(??) requires parens when mixing with logical operators");if(!("LogicalExpression"!==u.right.type||"??"===u.right.operator||u.right.extra&&u.right.extra.parenthesized))throw this.raise(u.right.start,"Nullish coalescing operator(??) requires parens when mixing with logical operators")}return this.finishNode(u,c===s.logicalOR||c===s.logicalAND||c===s.nullishCoalescing?"LogicalExpression":"BinaryExpression"),this.parseExprOp(u,t,n,r,i)}return e}parseExprOpRightExpr(e,t,n){const r=this.state.start,i=this.state.startLoc;switch(e){case s.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext(()=>this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(e,t,n),r,i));case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(t,n))}default:return this.parseExprOpBaseRightExpr(e,t,n)}}parseExprOpBaseRightExpr(e,t,n){const r=this.state.start,i=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),r,i,e.rightAssociative?t-1:t,n)}parseMaybeUnary(e){if(this.isContextual("await")&&this.isAwaitAllowed())return this.parseAwait();if(this.state.type.prefix){const t=this.startNode(),n=this.match(s.incDec);if(t.operator=this.state.value,t.prefix=!0,"throw"===t.operator&&this.expectPlugin("throwExpressions"),this.next(),t.argument=this.parseMaybeUnary(),e&&e.start&&this.unexpected(e.start),n)this.checkLVal(t.argument,void 0,void 0,"prefix operation");else if(this.state.strict&&"delete"===t.operator){const e=t.argument;"Identifier"===e.type?this.raise(t.start,"Deleting local variable in strict mode"):"MemberExpression"===e.type&&"PrivateName"===e.property.type&&this.raise(t.start,"Deleting a private field is not allowed")}return this.finishNode(t,n?"UpdateExpression":"UnaryExpression")}const t=this.state.start,n=this.state.startLoc;let r=this.parseExprSubscripts(e);if(e&&e.start)return r;for(;this.state.type.postfix&&!this.canInsertSemicolon();){const e=this.startNodeAt(t,n);e.operator=this.state.value,e.prefix=!1,e.argument=r,this.checkLVal(r,void 0,void 0,"postfix operation"),this.next(),r=this.finishNode(e,"UpdateExpression")}return r}parseExprSubscripts(e){const t=this.state.start,n=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===r?i:e&&e.start?i:this.parseSubscripts(i,t,n)}parseSubscripts(e,t,n,r){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsync(e),stop:!1};do{e=this.parseSubscript(e,t,n,r,i),i.maybeAsyncArrow=!1}while(!i.stop);return e}parseSubscript(e,t,n,r,i){if(!r&&this.eat(s.doubleColon)){const a=this.startNodeAt(t,n);return a.object=e,a.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),t,n,r)}if(this.match(s.questionDot)){if(this.expectPlugin("optionalChaining"),i.optionalChainMember=!0,r&&40===this.lookaheadCharCode())return i.stop=!0,e;this.next();const a=this.startNodeAt(t,n);return this.eat(s.bracketL)?(a.object=e,a.property=this.parseExpression(),a.computed=!0,a.optional=!0,this.expect(s.bracketR),this.finishNode(a,"OptionalMemberExpression")):this.eat(s.parenL)?(a.callee=e,a.arguments=this.parseCallExpressionArguments(s.parenR,!1),a.optional=!0,this.finishCallExpression(a,!0)):(a.object=e,a.property=this.parseIdentifier(!0),a.computed=!1,a.optional=!0,this.finishNode(a,"OptionalMemberExpression"))}if(this.eat(s.dot)){const r=this.startNodeAt(t,n);return r.object=e,r.property=this.parseMaybePrivateName(),r.computed=!1,"PrivateName"===r.property.type&&"Super"===r.object.type&&this.raise(t,"Private fields can't be accessed on super"),i.optionalChainMember?(r.optional=!1,this.finishNode(r,"OptionalMemberExpression")):this.finishNode(r,"MemberExpression")}if(this.eat(s.bracketL)){const r=this.startNodeAt(t,n);return r.object=e,r.property=this.parseExpression(),r.computed=!0,this.expect(s.bracketR),i.optionalChainMember?(r.optional=!1,this.finishNode(r,"OptionalMemberExpression")):this.finishNode(r,"MemberExpression")}if(!r&&this.match(s.parenL)){const r=this.state.maybeInArrowParameters,a=this.state.yieldPos,o=this.state.awaitPos;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.next();let u=this.startNodeAt(t,n);return u.callee=e,u.arguments=this.parseCallExpressionArguments(s.parenR,i.maybeAsyncArrow,"Import"===e.type,"Super"!==e.type,u),this.finishCallExpression(u,i.optionalChainMember),i.maybeAsyncArrow&&this.shouldParseAsyncArrow()?(i.stop=!0,u=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,n),u),this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=a,this.state.awaitPos=o):(this.toReferencedListDeep(u.arguments),-1!==a&&(this.state.yieldPos=a),(this.isAwaitAllowed()||r)&&-1===o||(this.state.awaitPos=o)),this.state.maybeInArrowParameters=r,u}return this.match(s.backQuote)?this.parseTaggedTemplateExpression(t,n,e,i):(i.stop=!0,e)}parseTaggedTemplateExpression(e,t,n,r,i){const a=this.startNodeAt(e,t);return a.tag=n,a.quasi=this.parseTemplate(!0),i&&(a.typeParameters=i),r.optionalChainMember&&this.raise(e,"Tagged Template Literals are not allowed in optionalChain"),this.finishNode(a,"TaggedTemplateExpression")}atPossibleAsync(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEnd===e.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(e.start,e.end)}finishCallExpression(e,t){if("Import"===e.callee.type)if(1!==e.arguments.length)this.raise(e.start,"import() requires exactly one argument");else{const t=e.arguments[0];t&&"SpreadElement"===t.type&&this.raise(t.start,"... is not allowed in import()")}return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,n,r,i){const a=[];let o,u=!0;const c=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(u)u=!1;else if(this.expect(s.comma),this.match(e)){n&&this.raise(this.state.lastTokStart,"Trailing comma is disallowed inside import(...) arguments"),i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}this.match(s.parenL)&&!o&&(o=this.state.start),a.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0,r))}return t&&o&&this.shouldParseAsyncArrow()&&this.unexpected(),this.state.inFSharpPipelineDirectBody=c,a}shouldParseAsyncArrow(){return this.match(s.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var n;return this.expect(s.arrow),this.parseArrowExpression(e,t.arguments,!0,null==(n=t.extra)?void 0:n.trailingComma),e}parseNoCallExpr(){const e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)}parseExprAtom(e){this.state.type===s.slash&&this.readRegexp();const t=this.state.potentialArrowAt===this.state.start;let n;switch(this.state.type){case s._super:return n=this.startNode(),this.next(),!this.match(s.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(n.start,"super is only allowed in object methods and classes"):this.raise(n.start,"super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?"),this.match(s.parenL)||this.match(s.bracketL)||this.match(s.dot)||this.raise(n.start,"super can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop])"),this.finishNode(n,"Super");case s._import:return n=this.startNode(),this.next(),this.match(s.dot)?this.parseImportMetaProperty(n):(this.expectPlugin("dynamicImport",n.start),this.match(s.parenL)||this.unexpected(null,s.parenL),this.finishNode(n,"Import"));case s._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case s.name:{n=this.startNode();const e=this.state.containsEsc,r=this.parseIdentifier();if(!e&&"async"===r.name&&this.match(s._function)&&!this.canInsertSemicolon()){const e=this.state.context.length-1;if(this.state.context[e]!==v.functionStatement)throw new Error("Internal error");return this.state.context[e]=v.functionExpression,this.next(),this.parseFunction(n,void 0,!0)}if(t&&!e&&"async"===r.name&&this.match(s.name)&&!this.canInsertSemicolon()){const e=[this.parseIdentifier()];return this.expect(s.arrow),this.parseArrowExpression(n,e,!0),n}return t&&this.match(s.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(n,[r],!1),n):r}case s._do:{this.expectPlugin("doExpressions");const e=this.startNode();this.next();const t=this.state.labels;return this.state.labels=[],e.body=this.parseBlock(),this.state.labels=t,this.finishNode(e,"DoExpression")}case s.regexp:{const e=this.state.value;return n=this.parseLiteral(e.value,"RegExpLiteral"),n.pattern=e.pattern,n.flags=e.flags,n}case s.num:return this.parseLiteral(this.state.value,"NumericLiteral");case s.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case s.string:return this.parseLiteral(this.state.value,"StringLiteral");case s._null:return n=this.startNode(),this.next(),this.finishNode(n,"NullLiteral");case s._true:case s._false:return this.parseBooleanLiteral();case s.parenL:return this.parseParenAndDistinguishExpression(t);case s.bracketL:{const t=this.state.inFSharpPipelineDirectBody;return this.state.inFSharpPipelineDirectBody=!1,n=this.startNode(),this.next(),n.elements=this.parseExprList(s.bracketR,!0,e,n),this.state.maybeInArrowParameters||this.toReferencedList(n.elements),this.state.inFSharpPipelineDirectBody=t,this.finishNode(n,"ArrayExpression")}case s.braceL:{const t=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const n=this.parseObj(!1,e);return this.state.inFSharpPipelineDirectBody=t,n}case s._function:return this.parseFunctionExpression();case s.at:this.parseDecorators();case s._class:return n=this.startNode(),this.takeDecorators(n),this.parseClass(n,!1);case s._new:return this.parseNew();case s.backQuote:return this.parseTemplate(!1);case s.doubleColon:{n=this.startNode(),this.next(),n.object=null;const e=n.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(n,"BindExpression");throw this.raise(e.start,"Binding should be performed on object property.")}case s.hash:if(this.state.inPipeline)return n=this.startNode(),"smart"!==this.getPluginOption("pipelineOperator","proposal")&&this.raise(n.start,"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option."),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext()||this.raise(n.start,"Topic reference was used in a lexical context without topic binding"),this.registerTopicReference(),this.finishNode(n,"PipelinePrimaryTopicReference");default:throw this.unexpected()}}parseBooleanLiteral(){const e=this.startNode();return e.value=this.match(s._true),this.next(),this.finishNode(e,"BooleanLiteral")}parseMaybePrivateName(){if(this.match(s.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]);const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space between # and identifier"),e.id=this.parseIdentifier(!0),this.finishNode(e,"PrivateName")}return this.parseIdentifier(!0)}parseFunctionExpression(){const e=this.startNode();let t=this.startNode();return this.next(),t=this.createIdentifier(t,"function"),this.scope.inGenerator&&this.eat(s.dot)?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e)}parseMetaProperty(e,t,n){e.meta=t,"function"===t.name&&"sent"===n&&(this.isContextual(n)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());const r=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==n||r)&&this.raise(e.property.start,`The only valid meta property for ${t.name} is ${t.name}.${n}`),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){const t=this.createIdentifier(this.startNodeAtNode(e),"import");return this.expect(s.dot),this.isContextual("meta")?(this.expectPlugin("importMeta"),this.inModule||this.raise(t.start,"import.meta may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),this.sawUnambiguousESM=!0):this.hasPlugin("importMeta")||this.raise(t.start,"Dynamic imports require a parameter: import('a.js')"),this.parseMetaProperty(e,t,"meta")}parseLiteral(e,t,n,r){n=n||this.state.start,r=r||this.state.startLoc;const i=this.startNodeAt(n,r);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(n,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)}parseParenAndDistinguishExpression(e){const t=this.state.start,n=this.state.startLoc;let r;this.expect(s.parenL);const i=this.state.maybeInArrowParameters,a=this.state.yieldPos,o=this.state.awaitPos,u=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.state.inFSharpPipelineDirectBody=!1;const c=this.state.start,l=this.state.startLoc,p=[],h={start:0},f={start:0};let d,y,v=!0;for(;!this.match(s.parenR);){if(v)v=!1;else if(this.expect(s.comma,f.start||null),this.match(s.parenR)){y=this.state.start;break}if(this.match(s.ellipsis)){const e=this.state.start,t=this.state.startLoc;d=this.state.start,p.push(this.parseParenItem(this.parseRestBinding(),e,t)),this.checkCommaAfterRest(41);break}p.push(this.parseMaybeAssign(!1,h,this.parseParenItem,f))}const m=this.state.start,g=this.state.startLoc;this.expect(s.parenR),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=u;let b=this.startNodeAt(t,n);if(e&&this.shouldParseArrow()&&(b=this.parseArrow(b))){this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=a,this.state.awaitPos=o;for(let e=0;e1?(r=this.startNodeAt(c,l),r.expressions=p,this.finishNodeAt(r,"SequenceExpression",m,g)):r=p[0],!this.options.createParenthesizedExpressions)return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",t),r;const x=this.startNodeAt(t,n);return x.expression=r,this.finishNode(x,"ParenthesizedExpression"),x}shouldParseArrow(){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(s.arrow))return e}parseParenItem(e,t,n){return e}parseNew(){const e=this.startNode();let t=this.startNode();if(this.next(),t=this.createIdentifier(t,"new"),this.eat(s.dot)){const n=this.parseMetaProperty(e,t,"target");if(!this.scope.inNonArrowFunction&&!this.state.inClassProperty){let e="new.target can only be used in functions";this.hasPlugin("classProperties")&&(e+=" or class properties"),this.raise(n.start,e)}return n}return e.callee=this.parseNoCallExpr(),"Import"===e.callee.type?this.raise(e.callee.start,"Cannot use new with import(...)"):"OptionalMemberExpression"===e.callee.type||"OptionalCallExpression"===e.callee.type?this.raise(this.state.lastTokEnd,"constructors in/after an Optional Chain are not allowed"):this.eat(s.questionDot)&&this.raise(this.state.start,"constructors in/after an Optional Chain are not allowed"),this.parseNewArguments(e),this.finishNode(e,"NewExpression")}parseNewArguments(e){if(this.eat(s.parenL)){const t=this.parseExprList(s.parenR);this.toReferencedList(t),e.arguments=t}else e.arguments=[]}parseTemplateElement(e){const t=this.startNode();return null===this.state.value&&(e?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition||0,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(s.backQuote),this.finishNode(t,"TemplateElement")}parseTemplate(e){const t=this.startNode();this.next(),t.expressions=[];let n=this.parseTemplateElement(e);for(t.quasis=[n];!n.tail;)this.expect(s.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(s.braceR),t.quasis.push(n=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")}parseObj(e,t){const n=Object.create(null);let r=!0;const i=this.startNode();for(i.properties=[],this.next();!this.eat(s.braceR);){if(r)r=!1;else if(this.expect(s.comma),this.match(s.braceR)){this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}const a=this.parseObjectMember(e,t);e||this.checkDuplicatedProto(a,n),a.shorthand&&this.addExtra(a,"shorthand",!0),i.properties.push(a)}return this.match(s.eq)||void 0===n.start||this.raise(n.start,"Redefinition of __proto__ property"),this.finishNode(i,e?"ObjectPattern":"ObjectExpression")}isAsyncProp(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.match(s.name)||this.match(s.num)||this.match(s.string)||this.match(s.bracketL)||this.state.type.keyword||this.match(s.star))&&!this.hasPrecedingLineBreak()}parseObjectMember(e,t){let n=[];if(this.match(s.at))for(this.hasPlugin("decorators")&&this.raise(this.state.start,"Stage 2 decorators disallow object literal property decorators");this.match(s.at);)n.push(this.parseDecorator());const r=this.startNode();let i,a,o=!1,u=!1;if(this.match(s.ellipsis))return n.length&&this.unexpected(),e?(this.next(),r.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(r,"RestElement")):this.parseSpread();n.length&&(r.decorators=n,n=[]),r.method=!1,(e||t)&&(i=this.state.start,a=this.state.startLoc),e||(o=this.eat(s.star));const c=this.state.containsEsc;return this.parsePropertyName(r),e||c||o||!this.isAsyncProp(r)?u=!1:(u=!0,o=this.eat(s.star),this.parsePropertyName(r)),this.parseObjPropValue(r,i,a,o,u,e,t,c),r}isGetterOrSetterMethod(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(s.string)||this.match(s.num)||this.match(s.bracketL)||this.match(s.name)||!!this.state.type.keyword)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}checkGetterSetterParams(e){const t=this.getGetterSetterExpectedParamCount(e),n=e.start;e.params.length!==t&&("get"===e.kind?this.raise(n,"getter must not have any formal parameters"):this.raise(n,"setter must have exactly one formal parameter")),"set"===e.kind&&"RestElement"===e.params[e.params.length-1].type&&this.raise(n,"setter function argument must not be a rest parameter")}parseObjectMethod(e,t,n,r,i){return n||t||this.match(s.parenL)?(r&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,n,!1,!1,"ObjectMethod")):!i&&this.isGetterOrSetterMethod(e,r)?((t||n)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e,!1,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(e),e):void 0}parseObjectProperty(e,t,n,r,i){return e.shorthand=!1,this.eat(s.colon)?(e.value=r?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),r?e.value=this.parseMaybeDefault(t,n,e.key.__clone()):this.match(s.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,n,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))}parseObjPropValue(e,t,n,r,i,a,o,s){const u=this.parseObjectMethod(e,r,i,a,s)||this.parseObjectProperty(e,t,n,a,o);return u||this.unexpected(),u}parsePropertyName(e){if(this.eat(s.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(s.bracketR);else{const t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(s.num)||this.match(s.string)?this.parseExprAtom():this.parseMaybePrivateName(),"PrivateName"!==e.key.type&&(e.computed=!1),this.state.inPropertyName=t}return e.key}initFunction(e,t){e.id=null,e.generator=!1,e.async=!!t}parseMethod(e,t,n,r,i,a,o=!1){const s=this.state.yieldPos,c=this.state.awaitPos;this.state.yieldPos=-1,this.state.awaitPos=-1,this.initFunction(e,n),e.generator=!!t;const l=r;return this.scope.enter(64|u(n,e.generator)|(o?256:0)|(i?128:0)),this.parseFunctionParams(e,l),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBodyAndFinish(e,a,!0),this.scope.exit(),this.state.yieldPos=s,this.state.awaitPos=c,e}parseArrowExpression(e,t,n,r){this.scope.enter(16|u(n,!1)),this.initFunction(e,n);const i=this.state.maybeInArrowParameters,a=this.state.yieldPos,o=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,t&&this.setArrowFunctionParameters(e,t,r),this.parseFunctionBody(e,!0),this.scope.exit(),this.state.maybeInArrowParameters=i,this.state.yieldPos=a,this.state.awaitPos=o,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,n){e.params=this.toAssignableList(t,!0,"arrow function parameters",n)}isStrictBody(e){if("BlockStatement"===e.body.type&&e.body.directives.length)for(let t=0,n=e.body.directives;t" after pipeline body; arrow function in pipeline body must be parenthesized');"PipelineTopicExpression"===t&&"SequenceExpression"===e.type&&this.raise(n,"Pipeline body may not be a comma-separated sequence expression")}parseSmartPipelineBodyInStyle(e,t,n,r){const i=this.startNodeAt(n,r);switch(t){case"PipelineBareFunction":i.callee=e;break;case"PipelineBareConstructor":i.callee=e.callee;break;case"PipelineBareAwaitedFunction":i.callee=e.argument;break;case"PipelineTopicExpression":this.topicReferenceWasUsedInCurrentTopicContext()||this.raise(n,"Pipeline is in topic style but does not use topic reference"),i.expression=e;break;default:throw new Error(`Internal @babel/parser error: Unknown pipeline style (${t})`)}return this.finishNode(i,t)}checkSmartPipelineBodyStyle(e){return e.type,this.isSimpleReference(e)?"PipelineBareFunction":"PipelineTopicExpression"}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}withTopicPermittingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withTopicForbiddingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSoloAwaitPermittingContext(e){const t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}primaryTopicReferenceIsAllowedInCurrentTopicContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentTopicContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e,t){const n=this.state.start,r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const a=this.parseExprOp(this.parseMaybeUnary(),n,r,e,t);return this.state.inFSharpPipelineDirectBody=i,a}}{parseTopLevel(e,t){if(t.sourceType=this.options.sourceType,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,s.eof),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let e=0,t=Array.from(this.scope.undefinedExports);ethis.parseStatement("do")),this.state.labels.pop(),this.expect(s._while),e.test=this.parseHeaderExpression(),this.eat(s.semi),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(de);let t=-1;if(this.isAwaitAllowed()&&this.eatContextual("await")&&(t=this.state.lastTokStart),this.scope.enter(0),this.expect(s.parenL),this.match(s.semi))return t>-1&&this.unexpected(t),this.parseFor(e,null);const n=this.isLet();if(this.match(s._var)||this.match(s._const)||n){const r=this.startNode(),i=n?"let":this.state.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),(this.match(s._in)||this.isContextual("of"))&&1===r.declarations.length?this.parseForIn(e,r,t):(t>-1&&this.unexpected(t),this.parseFor(e,r))}const r={start:0},i=this.parseExpression(!0,r);if(this.match(s._in)||this.isContextual("of")){const n=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(i,void 0,n),this.checkLVal(i,void 0,void 0,n),this.parseForIn(e,i,t)}return r.start&&this.unexpected(r.start),t>-1&&this.unexpected(t),this.parseFor(e,i)}parseFunctionStatement(e,t,n){return this.next(),this.parseFunction(e,1|(n?0:2),t)}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(s._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.scope.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();const t=e.cases=[];let n,r;for(this.expect(s.braceL),this.state.labels.push(ye),this.scope.enter(0);!this.match(s.braceR);)if(this.match(s._case)||this.match(s._default)){const e=this.match(s._case);n&&this.finishNode(n,"SwitchCase"),t.push(n=this.startNode()),n.consequent=[],this.next(),e?n.test=this.parseExpression():(r&&this.raise(this.state.lastTokStart,"Multiple default clauses"),r=!0,n.test=null),this.expect(s.colon)}else n?n.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),l.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(s._catch)){const t=this.startNode();if(this.next(),this.match(s.parenL)){this.expect(s.parenL),t.param=this.parseBindingAtom();const e="Identifier"===t.param.type;this.scope.enter(e?32:0),this.checkLVal(t.param,9,null,"catch clause"),this.expect(s.parenR)}else t.param=null,this.scope.enter(0);t.body=this.withTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(s._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")}parseVarStatement(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(de),e.body=this.withTopicForbiddingContext(()=>this.parseStatement("while")),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withTopicForbiddingContext(()=>this.parseStatement("with")),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,n,r){for(let e=0,r=this.state.labels;e=0;t--){const n=this.state.labels[t];if(n.statementStart!==e.start)break;n.statementStart=this.state.start,n.kind=i}return this.state.labels.push({name:t,kind:i,statementStart:this.state.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.state.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0){const n=this.startNode();return this.expect(s.braceL),t&&this.scope.enter(0),this.parseBlockBody(n,e,!1,s.braceR),t&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,n,r){const i=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(i,t?a:void 0,n,r)}parseBlockOrModuleBlockBody(e,t,n,r){let i,a,o=!1;for(;!this.eat(r);){o||!this.state.containsOctal||a||(a=this.state.octalPosition);const r=this.parseStatement(null,n);if(t&&!o&&this.isValidDirective(r)){const e=this.stmtToDirective(r);t.push(e),void 0===i&&"use strict"===e.value.value&&(i=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else o=!0,e.push(r)}!1===i&&this.setStrict(!1)}parseFor(e,t){return e.init=t,this.expect(s.semi),e.test=this.match(s.semi)?null:this.parseExpression(),this.expect(s.semi),e.update=this.match(s.parenR)?null:this.parseExpression(),this.expect(s.parenR),e.body=this.withTopicForbiddingContext(()=>this.parseStatement("for")),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,n){const r=this.match(s._in);return this.next(),r?n>-1&&this.unexpected(n):e.await=n>-1,"VariableDeclaration"!==t.type||null==t.declarations[0].init||r&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type?"AssignmentPattern"===t.type&&this.raise(t.start,"Invalid left-hand side in for-loop"):this.raise(t.start,`${r?"for-in":"for-of"} loop variable declaration may not have an initializer`),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(s.parenR),e.body=this.withTopicForbiddingContext(()=>this.parseStatement("for")),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")}parseVar(e,t,n){const r=e.declarations=[],i=this.hasPlugin("typescript");for(e.kind=n;;){const e=this.startNode();if(this.parseVarId(e,n),this.eat(s.eq)?e.init=this.parseMaybeAssign(t):("const"!==n||this.match(s._in)||this.isContextual("of")?"Identifier"===e.id.type||t&&(this.match(s._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):i||this.unexpected(),e.init=null),r.push(this.finishNode(e,"VariableDeclarator")),!this.eat(s.comma))break}return e}parseVarId(e,t){e.id=this.parseBindingAtom(),this.checkLVal(e.id,"var"===t?5:9,void 0,"variable declaration","var"!==t)}parseFunction(e,t=0,n=!1){const r=1&t,i=2&t,a=!(!r||4&t);this.initFunction(e,n),this.match(s.star)&&i&&this.raise(this.state.start,"Generators can only be declared at the top level or inside a block"),e.generator=this.eat(s.star),r&&(e.id=this.parseFunctionId(a));const o=this.state.maybeInArrowParameters,c=this.state.inClassProperty,l=this.state.yieldPos,p=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.inClassProperty=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,this.scope.enter(u(e.async,e.generator)),r||(e.id=this.parseFunctionId()),this.parseFunctionParams(e),this.withTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,r?"FunctionDeclaration":"FunctionExpression")}),this.scope.exit(),r&&!i&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=o,this.state.inClassProperty=c,this.state.yieldPos=l,this.state.awaitPos=p,e}parseFunctionId(e){return e||this.match(s.name)?this.parseIdentifier():null}parseFunctionParams(e,t){const n=this.state.inParameters;this.state.inParameters=!0,this.expect(s.parenL),e.params=this.parseBindingList(s.parenR,41,!1,t),this.state.inParameters=n,this.checkYieldAwaitInDefaultParams()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:9:17,e.id.start)}parseClass(e,t,n){this.next(),this.takeDecorators(e);const r=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass),this.state.strict=r,this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(s.eq)||this.match(s.semi)||this.match(s.braceR)}isClassMethod(){return this.match(s.parenL)}isNonstaticConstructor(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)}parseClassBody(e){this.state.classLevel++;const t={hadConstructor:!1};let n=[];const r=this.startNode();if(r.body=[],this.expect(s.braceL),this.withTopicForbiddingContext(()=>{for(;!this.eat(s.braceR);){if(this.eat(s.semi)){if(n.length>0)throw this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");continue}if(this.match(s.at)){n.push(this.parseDecorator());continue}const i=this.startNode();n.length&&(i.decorators=n,this.resetStartLocationFromNode(i,n[0]),n=[]),this.parseClassMember(r,i,t,e),"constructor"===i.kind&&i.decorators&&i.decorators.length>0&&this.raise(i.start,"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")}}),n.length)throw this.raise(this.state.start,"You have trailing decorators with no method");return this.state.classLevel--,this.finishNode(r,"ClassBody")}parseClassMember(e,t,n,r){let i=!1;const a=this.state.containsEsc;if(this.match(s.name)&&"static"===this.state.value){const n=this.parseIdentifier(!0);if(this.isClassMethod()){const r=t;return r.kind="method",r.computed=!1,r.key=n,r.static=!1,void this.pushClassMethod(e,r,!1,!1,!1,!1)}if(this.isClassProperty()){const r=t;return r.computed=!1,r.key=n,r.static=!1,void e.body.push(this.parseClassProperty(r))}if(a)throw this.unexpected();i=!0}this.parseClassMemberWithIsStatic(e,t,n,i,r)}parseClassMemberWithIsStatic(e,t,n,r,i){const a=t,o=t,u=t,c=t,l=a,p=a;if(t.static=r,this.eat(s.star))return l.kind="method",this.parseClassPropertyName(l),"PrivateName"===l.key.type?void this.pushClassPrivateMethod(e,o,!0,!1):(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be a generator"),void this.pushClassMethod(e,a,!0,!1,!1,!1));const h=this.state.containsEsc,f=this.parseClassPropertyName(t),d="PrivateName"===f.type,y="Identifier"===f.type,v=this.state.start;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(l.kind="method",d)return void this.pushClassPrivateMethod(e,o,!1,!1);const t=this.isNonstaticConstructor(a);let r=!1;t&&(a.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(f.start,"Duplicate constructor in the same class"),n.hadConstructor=!0,r=i),this.pushClassMethod(e,a,!1,!1,t,r)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,u);else if(!y||"async"!==f.name||h||this.isLineTerminator())!y||"get"!==f.name&&"set"!==f.name||h||this.match(s.star)&&this.isLineTerminator()?this.isLineTerminator()?d?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,u):this.unexpected():(l.kind=f.name,this.parseClassPropertyName(a),"PrivateName"===l.key.type?this.pushClassPrivateMethod(e,o,!1,!1):(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't have get/set modifier"),this.pushClassMethod(e,a,!1,!1,!1,!1)),this.checkGetterSetterParams(a));else{const t=this.eat(s.star);p.optional&&this.unexpected(v),l.kind="method",this.parseClassPropertyName(l),this.parsePostMemberNameModifiers(p),"PrivateName"===l.key.type?this.pushClassPrivateMethod(e,o,t,!0):(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be an async function"),this.pushClassMethod(e,a,t,!0,!1,!1))}}parseClassPropertyName(e){const t=this.parsePropertyName(e);return e.computed||!e.static||"prototype"!==t.name&&"prototype"!==t.value||this.raise(t.start,"Classes may not have static property named prototype"),"PrivateName"===t.type&&"constructor"===t.id.name&&this.raise(t.start,"Classes may not have a private field named '#constructor'"),t}pushClassProperty(e,t){t.computed||"constructor"!==t.key.name&&"constructor"!==t.key.value||this.raise(t.key.start,"Classes may not have a field named 'constructor'"),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){this.expectPlugin("classPrivateProperties",t.key.start),e.body.push(this.parseClassPrivateProperty(t))}pushClassMethod(e,t,n,r,i,a){e.body.push(this.parseMethod(t,n,r,i,a,"ClassMethod",!0))}pushClassPrivateMethod(e,t,n,r){this.expectPlugin("classPrivateMethods",t.key.start),e.body.push(this.parseMethod(t,n,r,!1,!1,"ClassPrivateMethod",!0))}parsePostMemberNameModifiers(e){}parseAccessModifier(){}parseClassPrivateProperty(e){return this.state.inClassProperty=!0,this.scope.enter(320),e.value=this.eat(s.eq)?this.parseMaybeAssign():null,this.semicolon(),this.state.inClassProperty=!1,this.scope.exit(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return e.typeAnnotation||this.expectPlugin("classProperties"),this.state.inClassProperty=!0,this.scope.enter(320),this.match(s.eq)?(this.expectPlugin("classProperties"),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.scope.exit(),this.finishNode(e,"ClassProperty")}parseClassId(e,t,n,r=139){this.match(s.name)?(e.id=this.parseIdentifier(),t&&this.checkLVal(e.id,r,void 0,"class name")):n||!t?e.id=null:this.unexpected(null,"A class name is required")}parseClassSuper(e){e.superClass=this.eat(s._extends)?this.parseExprSubscripts():null}parseExport(e){const t=this.maybeParseExportDefaultSpecifier(e),n=!t||this.eat(s.comma),r=n&&this.eatExportStar(e),i=r&&this.maybeParseExportNamespaceSpecifier(e),a=n&&(!i||this.eat(s.comma)),o=t||r;if(r&&!i)return t&&this.unexpected(),this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");const u=this.maybeParseExportNamedSpecifiers(e);if(t&&n&&!r&&!u||i&&a&&!u)throw this.unexpected(null,s.braceL);let c;if(o||u?(c=!1,this.parseExportFrom(e,o)):c=this.maybeParseExportDeclaration(e),o||u||c)return this.checkExport(e,!0,!1,!!e.source),this.finishNode(e,"ExportNamedDeclaration");if(this.eat(s._default))return e.declaration=this.parseExportDefaultExpression(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration");throw this.unexpected(null,s.braceL)}eatExportStar(e){return this.eat(s.star)}maybeParseExportDefaultSpecifier(e){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");const t=this.startNode();return t.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(t,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual("as")){e.specifiers||(e.specifiers=[]);const t=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),t.exported=this.parseIdentifier(!0),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){return!!this.match(s.braceL)&&(e.specifiers||(e.specifiers=[]),e.specifiers.push(...this.parseExportSpecifiers()),e.source=null,e.declaration=null,!0)}maybeParseExportDeclaration(e){if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){const e=this.nextTokenStart();this.isUnparsedContextual(e,"function")||this.unexpected(e,'Unexpected token, expected "function"')}return e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e),!0}return!1}isAsyncFunction(){if(!this.isContextual("async"))return!1;const e=this.nextTokenStart();return!l.test(this.input.slice(this.state.pos,e))&&this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const e=this.startNode(),t=this.isAsyncFunction();if(this.match(s._function)||t)return this.next(),t&&this.next(),this.parseFunction(e,5,t);if(this.match(s._class))return this.parseClass(e,!0,!0);if(this.match(s.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax"),this.parseDecorators(!1),this.parseClass(e,!0,!0);if(this.match(s._const)||this.match(s._var)||this.isLet())throw this.raise(this.state.start,"Only expressions, functions or classes are allowed as the `default` export.");{const e=this.parseMaybeAssign();return this.semicolon(),e}}parseExportDeclaration(e){return this.parseStatement(null)}isExportDefaultSpecifier(){if(this.match(s.name))return"async"!==this.state.value&&"let"!==this.state.value;if(!this.match(s._default))return!1;const e=this.nextTokenStart();return 44===this.input.charCodeAt(e)||this.isUnparsedContextual(e,"from")}parseExportFrom(e,t){this.eatContextual("from")?(e.source=this.parseImportSource(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()}shouldParseExportDeclaration(){if(this.match(s.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax")}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}checkExport(e,t,n,r){if(t)if(n)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(let t=0,n=e.specifiers;t-1&&this.raise(e.start,"default"===t?"Only one default export allowed per module.":`\`${t}\` has already been exported. Exported identifiers must be unique.`),this.state.exportedIdentifiers.push(t)}parseExportSpecifiers(){const e=[];let t=!0;for(this.expect(s.braceL);!this.eat(s.braceR);){if(t)t=!1;else if(this.expect(s.comma),this.eat(s.braceR))break;const n=this.startNode();n.local=this.parseIdentifier(!0),n.exported=this.eatContextual("as")?this.parseIdentifier(!0):n.local.__clone(),e.push(this.finishNode(n,"ExportSpecifier"))}return e}parseImport(e){if(e.specifiers=[],!this.match(s.string)){const t=!this.maybeParseDefaultImportSpecifier(e)||this.eat(s.comma),n=t&&this.maybeParseStarImportSpecifier(e);t&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual("from")}return e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(s.string)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(e){return this.match(s.name)}parseImportSpecifierLocal(e,t,n,r){t.local=this.parseIdentifier(),this.checkLVal(t.local,9,void 0,r),e.specifiers.push(this.finishNode(t,n))}maybeParseDefaultImportSpecifier(e){return!!this.shouldParseDefaultImport(e)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(s.star)){const t=this.startNode();return this.next(),this.expectContextual("as"),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(s.braceL);!this.eat(s.braceR);){if(t)t=!1;else{if(this.eat(s.colon))throw this.raise(this.state.start,"ES2015 named imports do not destructure. Use another statement for destructuring after the import.");if(this.expect(s.comma),this.eat(s.braceR))break}this.parseImportSpecifier(e)}}parseImportSpecifier(e){const t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,9,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))}}{constructor(e,t){super(e=function(e){const t={};for(let n=0,r=Object.keys(te);n`'${e}'`).join(", "))}(e.plugins),n=function(e){const t=ee.filter(t=>q(e,t)),n=t.join("/");let r=ge[n];if(!r){r=ve;for(let e=0;e!0}],e.set(n,a);break;case"invalidate":a=[{value:s,valid:o.validator()}],e.set(n,a);break;case"valid":a?a.push({value:s,valid:o.validator()}):(a=[{value:s,valid:o.validator()}],e.set(n,a))}return s}}Object.defineProperty(t,"__esModule",{value:!0}),t.makeStrongCache=function(e){return r(new Map,e)},t.makeWeakCache=function(e){return r(new WeakMap,e)},t.assertSimpleType=a;class i{constructor(e){this._active=!0,this._never=!1,this._forever=!1,this._invalidate=!1,this._configured=!1,this._pairs=[],this._data=e}simple(){return function(e){function t(t){if("boolean"!=typeof t)return e.using(()=>a(t()));t?e.forever():e.never()}return t.forever=()=>e.forever(),t.never=()=>e.never(),t.using=t=>e.using(()=>a(t())),t.invalidate=t=>e.invalidate(()=>a(t())),t}(this)}mode(){return this._never?"never":this._forever?"forever":this._invalidate?"invalidate":"valid"}forever(){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never)throw new Error("Caching has already been configured with .never()");this._forever=!0,this._configured=!0}never(){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._forever)throw new Error("Caching has already been configured with .forever()");this._never=!0,this._configured=!0}using(e){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never||this._forever)throw new Error("Caching has already been configured with .never or .forever()");this._configured=!0;const t=e(this._data);return this._pairs.push([t,e]),t}invalidate(e){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never||this._forever)throw new Error("Caching has already been configured with .never or .forever()");this._invalidate=!0,this._configured=!0;const t=e(this._data);return this._pairs.push([t,e]),t}validator(){const e=this._pairs;return t=>e.every(([e,n])=>e===n(t))}deactivate(){this._active=!1}configured(){return this._configured}}function a(e){if(null!=e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e)throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");return e}},function(e,t,n){var r=n(34);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(93);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Plugin=function(e){throw new Error(`The (${e}) Babel 5 plugin is being run with an unsupported Babel version.`)},Object.defineProperty(t,"File",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"buildExternalHelpers",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"resolvePlugin",{enumerable:!0,get:function(){return a.resolvePlugin}}),Object.defineProperty(t,"resolvePreset",{enumerable:!0,get:function(){return a.resolvePreset}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return o.version}}),Object.defineProperty(t,"getEnv",{enumerable:!0,get:function(){return s.getEnv}}),Object.defineProperty(t,"tokTypes",{enumerable:!0,get:function(){return function(){const e=n(49);return function(){return e},e}().tokTypes}}),Object.defineProperty(t,"traverse",{enumerable:!0,get:function(){return function(){const e=v(n(18));return function(){return e},e}().default}}),Object.defineProperty(t,"template",{enumerable:!0,get:function(){return function(){const e=v(n(50));return function(){return e},e}().default}}),Object.defineProperty(t,"createConfigItem",{enumerable:!0,get:function(){return c.createConfigItem}}),Object.defineProperty(t,"loadPartialConfig",{enumerable:!0,get:function(){return l.loadPartialConfig}}),Object.defineProperty(t,"loadOptions",{enumerable:!0,get:function(){return l.loadOptions}}),Object.defineProperty(t,"transform",{enumerable:!0,get:function(){return p.transform}}),Object.defineProperty(t,"transformSync",{enumerable:!0,get:function(){return p.transformSync}}),Object.defineProperty(t,"transformAsync",{enumerable:!0,get:function(){return p.transformAsync}}),Object.defineProperty(t,"transformFile",{enumerable:!0,get:function(){return h.transformFile}}),Object.defineProperty(t,"transformFileSync",{enumerable:!0,get:function(){return h.transformFileSync}}),Object.defineProperty(t,"transformFileAsync",{enumerable:!0,get:function(){return h.transformFileAsync}}),Object.defineProperty(t,"transformFromAst",{enumerable:!0,get:function(){return f.transformFromAst}}),Object.defineProperty(t,"transformFromAstSync",{enumerable:!0,get:function(){return f.transformFromAstSync}}),Object.defineProperty(t,"transformFromAstAsync",{enumerable:!0,get:function(){return f.transformFromAstAsync}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.parse}}),Object.defineProperty(t,"parseSync",{enumerable:!0,get:function(){return d.parseSync}}),Object.defineProperty(t,"parseAsync",{enumerable:!0,get:function(){return d.parseAsync}}),t.types=t.OptionManager=t.DEFAULT_EXTENSIONS=void 0;var r=v(n(96)),i=v(n(383)),a=n(51),o=n(384),s=n(155);function u(){const e=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(10));return u=function(){return e},e}Object.defineProperty(t,"types",{enumerable:!0,get:function(){return u()}});var c=n(52),l=n(36),p=n(391),h=n(433),f=n(434),d=n(435);function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function v(e){return e&&e.__esModule?e:{default:e}}const m=Object.freeze([".js",".jsx",".es6",".es",".mjs"]);t.DEFAULT_EXTENSIONS=m;t.OptionManager=class{init(e){return(0,l.loadOptions)(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=Object.keys(t);for(const r of n)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){var r=n(37),i=n(194),a=n(195),o=n(196),s=n(197),u=n(198);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t,n){var r=n(24)(n(16),"Map");e.exports=r},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(205),i=n(212),a=n(214),o=n(215),s=n(216);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(109),i=n(226),a=n(29);e.exports=function(e){return a(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(231),i=n(112),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return a.call(e,t)})))}:i;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(303)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(20))},function(e,t,n){var r=n(128),i=n(29),a=n(305),o=n(81),s=n(308),u=Math.max;e.exports=function(e,t,n,c){e=i(e)?e:s(e),n=n&&!c?o(n):0;var l=e.length;return n<0&&(n=u(l+n,0)),a(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&r(e,t,n)>-1}},function(e,t,n){var r=n(306);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++nn.comments)):n.shouldPrintComment=n.shouldPrintComment||(e=>n.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0);"auto"===n.compact&&(n.compact=e.length>5e5,n.compact&&console.error("[BABEL] Note: The code generator has deoptimised the styling of "+`${t.filename} as it exceeds the max of 500KB.`));n.compact&&(n.indent.adjustMultilineComment=!1);return n}(n,t),t.sourceMaps?new r.default(t,n):null),this.ast=e}generate(){return super.generate(this.ast)}}t.CodeGenerator=class{constructor(e,t,n){this._generator=new o(e,t,n)}generate(){return this._generator.generate()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=function(e,t){const{placeholderWhitelist:n=e.placeholderWhitelist,placeholderPattern:r=e.placeholderPattern,preserveComments:i=e.preserveComments,syntacticPlaceholders:a=e.syntacticPlaceholders}=t;return{parser:Object.assign({},e.parser,{},t.parser),placeholderWhitelist:n,placeholderPattern:r,preserveComments:i,syntacticPlaceholders:a}},t.validate=function(e){if(null!=e&&"object"!=typeof e)throw new Error("Unknown template options.");const t=e||{},{placeholderWhitelist:n,placeholderPattern:r,preserveComments:i,syntacticPlaceholders:a}=t,o=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(t,["placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders"]);if(null!=n&&!(n instanceof Set))throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");if(null!=r&&!(r instanceof RegExp)&&!1!==r)throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");if(null!=i&&"boolean"!=typeof i)throw new Error("'.preserveComments' must be a boolean, null, or undefined");if(null!=a&&"boolean"!=typeof a)throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");if(!0===a&&(null!=n||null!=r))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");return{parser:o,placeholderWhitelist:n||void 0,placeholderPattern:null==r?void 0:r,preserveComments:null!=i&&i,syntacticPlaceholders:null==a?void 0:a}},t.normalizeReplacements=function(e){if(Array.isArray(e))return e.reduce((e,t,n)=>(e["$"+n]=t,e),{});if("object"==typeof e||null==e)return e||void 0;throw new Error("Template replacements must be an array, object, null, or undefined")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor(e,t,n){this.key=e.name||n,this.manipulateOptions=e.manipulateOptions,this.post=e.post,this.pre=e.pre,this.visitor=e.visitor||{},this.parserOverride=e.parserOverride,this.generatorOverride=e.generatorOverride,this.options=t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=function(e,t){return l({type:"root",source:e},t)};a(n(87));var r=a(n(386)),i=n(159);function a(e){return e&&e.__esModule?e:{default:e}}const o={cwd:i.assertString,root:i.assertString,rootMode:i.assertRootMode,configFile:i.assertConfigFileSearch,caller:i.assertCallerMetadata,filename:i.assertString,filenameRelative:i.assertString,code:i.assertBoolean,ast:i.assertBoolean,envName:i.assertString},s={babelrc:i.assertBoolean,babelrcRoots:i.assertBabelrcSearch},u={extends:i.assertString,ignore:i.assertIgnoreList,only:i.assertIgnoreList},c={inputSourceMap:i.assertInputSourceMap,presets:i.assertPluginList,plugins:i.assertPluginList,passPerPreset:i.assertBoolean,env:function(e,t){if("env"===e.parent.type)throw new Error(`${(0,i.msg)(e)} is not allowed inside of another .env block`);const n=e.parent,r=(0,i.assertObject)(e,t);if(r)for(const t of Object.keys(r)){const a=(0,i.assertObject)((0,i.access)(e,t),r[t]);a&&l({type:"env",name:t,parent:n},a)}return r},overrides:function(e,t){if("env"===e.parent.type)throw new Error(`${(0,i.msg)(e)} is not allowed inside an .env block`);if("overrides"===e.parent.type)throw new Error(`${(0,i.msg)(e)} is not allowed inside an .overrides block`);const n=e.parent,r=(0,i.assertArray)(e,t);if(r)for(const[t,a]of r.entries()){const r=(0,i.access)(e,t),o=(0,i.assertObject)(r,a);if(!o)throw new Error(`${(0,i.msg)(r)} must be an object`);l({type:"overrides",index:t,parent:n},o)}return r},test:i.assertConfigApplicableTest,include:i.assertConfigApplicableTest,exclude:i.assertConfigApplicableTest,retainLines:i.assertBoolean,comments:i.assertBoolean,shouldPrintComment:i.assertFunction,compact:i.assertCompact,minified:i.assertBoolean,auxiliaryCommentBefore:i.assertString,auxiliaryCommentAfter:i.assertString,sourceType:i.assertSourceType,wrapPluginVisitorMethod:i.assertFunction,highlightCode:i.assertBoolean,sourceMaps:i.assertSourceMaps,sourceMap:i.assertSourceMaps,sourceFileName:i.assertString,sourceRoot:i.assertString,getModuleId:i.assertFunction,moduleRoot:i.assertString,moduleIds:i.assertBoolean,moduleId:i.assertString,parserOpts:i.assertObject,generatorOpts:i.assertObject};function l(e,t){const n=function e(t){return"root"===t.type?t.source:e(t.parent)}(e);return function(e){if(h(e,"sourceMap")&&h(e,"sourceMaps"))throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both")}(t),Object.keys(t).forEach(r=>{const a={type:"option",name:r,parent:e};if("preset"===n&&u[r])throw new Error(`${(0,i.msg)(a)} is not allowed in preset options`);if("arguments"!==n&&o[r])throw new Error(`${(0,i.msg)(a)} is only allowed in root programmatic options`);if("arguments"!==n&&"configfile"!==n&&s[r]){if("babelrcfile"===n||"extendsfile"===n)throw new Error(`${(0,i.msg)(a)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, `+"or babel.config.js/config file options");throw new Error(`${(0,i.msg)(a)} is only allowed in root programmatic options, or babel.config.js/config file options`)}(c[r]||u[r]||s[r]||o[r]||p)(a,t[r])}),t}function p(e){const t=e.name;if(r.default[t]){const{message:n,version:a=5}=r.default[t];throw new ReferenceError(`Using removed Babel ${a} option: ${(0,i.msg)(e)} - ${n}`)}{const t=`Unknown option: ${(0,i.msg)(e)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`;throw new ReferenceError(t)}}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){var r=n(15),i=n(34),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nthis.code,getScope:()=>this.scope,addHelper:this.addHelper.bind(this),buildError:this.buildCodeFrameError.bind(this)},this.opts=e,this.code=t,this.ast=n,this.inputMap=r,this.path=i().NodePath.get({hub:this.hub,parentPath:null,parent:this.ast,container:this.ast,key:"program"}).setContext(),this.scope=this.path.scope}get shebang(){const{interpreter:e}=this.path.node;return e?e.value:""}set shebang(e){e?this.path.get("interpreter").replaceWith(o().interpreterDirective(e)):this.path.get("interpreter").remove()}set(e,t){if("helpersNamespace"===e)throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.If you are using @babel/plugin-external-helpers you will need to use a newer version than the one you currently have installed. If you have your own implementation, you'll want to explore using 'helperGenerator' alongside 'file.availableHelper()'.");this._map.set(e,t)}get(e){return this._map.get(e)}has(e){return this._map.has(e)}getModuleName(){const{filename:e,filenameRelative:t=e,moduleId:n,moduleIds:r=!!n,getModuleId:i,sourceRoot:a,moduleRoot:o=a,sourceRoot:s=o}=this.opts;if(!r)return null;if(null!=n&&!i)return n;let u=null!=o?o+"/":"";if(t){const e=null!=s?new RegExp("^"+s+"/?"):"";u+=t.replace(e,"").replace(/\.(\w*?)$/,"")}return u=u.replace(/\\/g,"/"),i&&i(u)||u}addImport(){throw new Error("This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed from that module, such as 'addNamed' or 'addDefault'.")}availableHelper(e,t){let n;try{n=r().minVersion(e)}catch(e){if("BABEL_HELPER_UNKNOWN"!==e.code)throw e;return!1}return"string"!=typeof t||(s().default.valid(t)&&(t=`^${t}`),!s().default.intersects(`<${n}`,t)&&!s().default.intersects(">=8.0.0",t))}addHelper(e){const t=this.declarations[e];if(t)return o().cloneNode(t);const n=this.get("helperGenerator");if(n){const t=n(e);if(t)return t}r().ensure(e);const i=this.declarations[e]=this.scope.generateUidIdentifier(e),a={};for(const t of r().getDependencies(e))a[t]=this.addHelper(t);const{nodes:s,globals:u}=r().get(e,e=>a[e],i,Object.keys(this.scope.getAllBindings()));return u.forEach(e=>{this.path.scope.hasBinding(e,!0)&&this.path.scope.rename(e)}),s.forEach(e=>{e._compact=!0}),this.path.unshiftContainer("body",s),this.path.get("body").forEach(e=>{-1!==s.indexOf(e.node)&&e.isVariableDeclaration()&&this.scope.registerDeclaration(e)}),i}addTemplateObject(){throw new Error("This function has been moved into the template literal transform itself.")}buildCodeFrameError(e,t,n=SyntaxError){let r=e&&(e.loc||e._loc);if(!r&&e){const n={loc:null};(0,i().default)(e,l,this.scope,n),r=n.loc;let a="This is an error on an internal node. Probably an internal error.";r&&(a+=" Location has been estimated."),t+=` (${a})`}if(r){const{highlightCode:e=!0}=this.opts;t+="\n"+(0,a().codeFrameColumns)(this.code,{start:{line:r.start.line,column:r.start.column+1},end:r.end&&r.start.line===r.end.line?{line:r.end.line,column:r.end.column+1}:void 0},{highlightCode:e})}return new n(t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.get=p,t.minVersion=function(e){return l(e).minVersion()},t.getDependencies=function(e){return Array.from(l(e).dependencies.values())},t.ensure=function(e){l(e)},t.default=t.list=void 0;var r=s(n(18)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(10)),a=s(n(382));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function u(e){const t=[];for(;e.parentPath;e=e.parentPath)t.push(e.key),e.inList&&t.push(e.listKey);return t.reverse().join(".")}const c=Object.create(null);function l(e){if(!c[e]){const t=a.default[e];if(!t)throw Object.assign(new ReferenceError(`Unknown helper ${e}`),{code:"BABEL_HELPER_UNKNOWN",helper:e});const n=()=>i.file(t.ast()),o=function(e){const t=new Set,n=new Set,i=new Map;let o,s;const c=[],l=[],p=[];if((0,r.default)(e,{ImportDeclaration(e){const t=e.node.source.value;if(!a.default[t])throw e.buildCodeFrameError(`Unknown helper ${t}`);if(1!==e.get("specifiers").length||!e.get("specifiers.0").isImportDefaultSpecifier())throw e.buildCodeFrameError("Helpers can only import a default value");const n=e.node.specifiers[0].local;i.set(n,t),l.push(u(e))},ExportDefaultDeclaration(e){const t=e.get("declaration");if(t.isFunctionDeclaration()){if(!t.node.id)throw t.buildCodeFrameError("Helpers should give names to their exported func declaration");o=t.node.id.name}s=u(e)},ExportAllDeclaration(e){throw e.buildCodeFrameError("Helpers can only export default")},ExportNamedDeclaration(e){throw e.buildCodeFrameError("Helpers can only export default")},Statement(e){e.isModuleDeclaration()||e.skip()}}),(0,r.default)(e,{Program(e){const t=e.scope.getAllBindings();Object.keys(t).forEach(e=>{e!==o&&(i.has(t[e].identifier)||n.add(e))})},ReferencedIdentifier(e){const n=e.node.name,r=e.scope.getBinding(n,!0);r?i.has(r.identifier)&&p.push(u(e)):t.add(n)},AssignmentExpression(e){const t=e.get("left");if(!(o in t.getBindingIdentifiers()))return;if(!t.isIdentifier())throw t.buildCodeFrameError("Only simple assignments to exports are allowed in helpers");const n=e.scope.getBinding(o);n&&n.scope.path.isProgram()&&c.push(u(e))}}),!s)throw new Error("Helpers must default-export something.");return c.reverse(),{globals:Array.from(t),localBindingNames:Array.from(n),dependencies:i,exportBindingAssignments:c,exportPath:s,exportName:o,importBindingsReferences:p,importPaths:l}}(n());c[e]={build(e,t,a){const s=n();return function(e,t,n,a,o){if(a&&!n)throw new Error("Unexpected local bindings for module-based helpers.");if(!n)return;const{localBindingNames:s,dependencies:u,exportBindingAssignments:c,exportPath:l,exportName:p,importBindingsReferences:h,importPaths:f}=t,d={};u.forEach((e,t)=>{d[t.name]="function"==typeof o&&o(e)||t});const y={},v=new Set(a||[]);s.forEach(e=>{let t=e;for(;v.has(t);)t="_"+t;t!==e&&(y[e]=t)}),"Identifier"===n.type&&p!==n.name&&(y[p]=n.name),(0,r.default)(e,{Program(e){const t=e.get(l),r=f.map(t=>e.get(t)),a=h.map(t=>e.get(t)),o=t.get("declaration");if("Identifier"===n.type)o.isFunctionDeclaration()?t.replaceWith(o):t.replaceWith(i.variableDeclaration("var",[i.variableDeclarator(n,o.node)]));else{if("MemberExpression"!==n.type)throw new Error("Unexpected helper format.");o.isFunctionDeclaration()?(c.forEach(t=>{const r=e.get(t);r.replaceWith(i.assignmentExpression("=",n,r.node))}),t.replaceWith(o),e.pushContainer("body",i.expressionStatement(i.assignmentExpression("=",n,i.identifier(p))))):t.replaceWith(i.expressionStatement(i.assignmentExpression("=",n,o.node)))}Object.keys(y).forEach(t=>{e.scope.rename(t,y[t])});for(const e of r)e.remove();for(const e of a){const t=i.cloneNode(d[e.node.name]);e.replaceWith(t)}e.stop()}})}(s,o,t,a,e),{nodes:s.program.body,globals:o.globals}},minVersion:()=>t.minVersion,dependencies:o.dependencies}}return c[e]}function p(e,t,n,r){return l(e).build(t,n,r)}const h=Object.keys(a.default).map(e=>e.replace(/^_/,"")).filter(e=>"__esModule"!==e);t.list=h;var f=p;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ForAwaitStatement=t.NumericLiteralTypeAnnotation=t.ExistentialTypeParam=t.SpreadProperty=t.RestProperty=t.Flow=t.Pure=t.Generated=t.User=t.Var=t.BlockScoped=t.Referenced=t.Scope=t.Expression=t.Statement=t.BindingIdentifier=t.ReferencedMemberExpression=t.ReferencedIdentifier=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(10));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}const a={types:["Identifier","JSXIdentifier"],checkPath(e,t){const{node:n,parent:i}=e;if(!r.isIdentifier(n,t)&&!r.isJSXMemberExpression(i,t)){if(!r.isJSXIdentifier(n,t))return!1;if(r.react.isCompatTag(n.name))return!1}return r.isReferenced(n,i,e.parentPath.parent)}};t.ReferencedIdentifier=a;const o={types:["MemberExpression"],checkPath:({node:e,parent:t})=>r.isMemberExpression(e)&&r.isReferenced(e,t)};t.ReferencedMemberExpression=o;const s={types:["Identifier"],checkPath(e){const{node:t,parent:n}=e,i=e.parentPath.parent;return r.isIdentifier(t)&&r.isBinding(t,n,i)}};t.BindingIdentifier=s;const u={types:["Statement"],checkPath({node:e,parent:t}){if(r.isStatement(e)){if(r.isVariableDeclaration(e)){if(r.isForXStatement(t,{left:e}))return!1;if(r.isForStatement(t,{init:e}))return!1}return!0}return!1}};t.Statement=u;const c={types:["Expression"],checkPath:e=>e.isIdentifier()?e.isReferencedIdentifier():r.isExpression(e.node)};t.Expression=c;const l={types:["Scopable"],checkPath:e=>r.isScope(e.node,e.parent)};t.Scope=l;const p={checkPath:e=>r.isReferenced(e.node,e.parent)};t.Referenced=p;const h={checkPath:e=>r.isBlockScoped(e.node)};t.BlockScoped=h;const f={types:["VariableDeclaration"],checkPath:e=>r.isVar(e.node)};t.Var=f;const d={checkPath:e=>e.node&&!!e.node.loc};t.User=d;const y={checkPath:e=>!e.isUser()};t.Generated=y;const v={checkPath:(e,t)=>e.scope.isPure(e.node,t)};t.Pure=v;const m={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:({node:e})=>!!r.isFlow(e)||(r.isImportDeclaration(e)?"type"===e.importKind||"typeof"===e.importKind:r.isExportDeclaration(e)?"type"===e.exportKind:!!r.isImportSpecifier(e)&&("type"===e.importKind||"typeof"===e.importKind))};t.Flow=m;const g={types:["RestElement"],checkPath:e=>e.parentPath&&e.parentPath.isObjectPattern()};t.RestProperty=g;const b={types:["RestElement"],checkPath:e=>e.parentPath&&e.parentPath.isObjectExpression()};t.SpreadProperty=b;t.ExistentialTypeParam={types:["ExistsTypeAnnotation"]};t.NumericLiteralTypeAnnotation={types:["NumberLiteralTypeAnnotation"]};const x={types:["ForOfStatement"],checkPath:({node:e})=>!0===e.await};t.ForAwaitStatement=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=e.split(".");return e=>(0,i.default)(e,n,t)};var r,i=(r=n(100))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(!(0,r.isMemberExpression)(e))return!1;const i=Array.isArray(t)?t:t.split("."),a=[];let o;for(o=e;(0,r.isMemberExpression)(o);o=o.object)a.push(o.property);if(a.push(o),a.lengthi.length)return!1;for(let e=0,t=a.length-1;e=97&&o<=122||o>=65&&o<=90||36===o||95===o;for(a=new Array(128),o=0;o<128;++o)a[o]=o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||36===o||95===o;e.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&r.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(e){return e<128?i[e]:n.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES5:function(e){return e<128?a[e]:n.NonAsciiIdentifierPart.test(s(e))},isIdentifierStartES6:function(e){return e<128?i[e]:t.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES6:function(e){return e<128?a[e]:t.NonAsciiIdentifierPart.test(s(e))}}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e===t)return!0;const n=r.PLACEHOLDERS_ALIAS[e];if(n)for(const e of n)if(t===e)return!0;return!1};var r=n(13)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PLACEHOLDERS_FLIPPED_ALIAS=t.PLACEHOLDERS_ALIAS=t.PLACEHOLDERS=void 0;var r=n(19);const i=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"];t.PLACEHOLDERS=i;const a={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};t.PLACEHOLDERS_ALIAS=a;for(const e of i){const t=r.ALIAS_KEYS[e];t&&t.length&&(a[e]=t)}const o={};t.PLACEHOLDERS_FLIPPED_ALIAS=o,Object.keys(a).forEach(e=>{a[e].forEach(t=>{Object.hasOwnProperty.call(o,t)||(o[t]=[]),o[t].push(e)})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!(!e||!r.VISITOR_KEYS[e.type])};var r=n(13)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){const n={},i={},a=[],o=[];for(let s=0;s=0)){if((0,r.isAnyTypeAnnotation)(u))return[u];if((0,r.isFlowBaseAnnotation)(u))i[u.type]=u;else if((0,r.isUnionTypeAnnotation)(u))a.indexOf(u.types)<0&&(t=t.concat(u.types),a.push(u.types));else if((0,r.isGenericTypeAnnotation)(u)){const t=u.id.name;if(n[t]){let r=n[t];r.typeParameters?u.typeParameters&&(r.typeParameters.params=e(r.typeParameters.params.concat(u.typeParameters.params))):r=u.typeParameters}else n[t]=u}else o.push(u)}}for(const e of Object.keys(i))o.push(i[e]);for(const e of Object.keys(n))o.push(n[e]);return o};var r=n(11)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(e,!1)};var r,i=(r=n(33))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(!n||!e)return e;const r=`${t}Comments`;e[r]?e[r]="leading"===t?n.concat(e[r]):e[r].concat(n):e[r]=n;return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,i.default)("innerComments",e,t)};var r,i=(r=n(77))&&r.__esModule?r:{default:r}},function(e,t,n){var r=n(61),i=n(266),a=n(267);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++te.isScope());return e&&e.scope}get parentBlock(){return this.path.parent}get hub(){return this.path.hub}traverse(e,t,n){(0,o.default)(e,t,this,n,this.path)}generateDeclaredUidIdentifier(e){const t=this.generateUidIdentifier(e);return this.push({id:t}),l.cloneNode(t)}generateUidIdentifier(e){return l.identifier(this.generateUid(e))}generateUid(e="temp"){let t;e=l.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");let n=0;do{t=this._generateUid(e,n),n++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));const r=this.getProgramParent();return r.references[t]=!0,r.uids[t]=!0,t}_generateUid(e,t){let n=e;return t>1&&(n+=t),`_${n}`}generateUidBasedOnNode(e,t){let n=e;l.isAssignmentExpression(e)?n=e.left:l.isVariableDeclarator(e)?n=e.id:(l.isObjectProperty(n)||l.isObjectMethod(n))&&(n=n.key);const r=[];!function e(t,n){if(l.isModuleDeclaration(t))if(t.source)e(t.source,n);else if(t.specifiers&&t.specifiers.length)for(const r of t.specifiers)e(r,n);else t.declaration&&e(t.declaration,n);else if(l.isModuleSpecifier(t))e(t.local,n);else if(l.isMemberExpression(t))e(t.object,n),e(t.property,n);else if(l.isIdentifier(t))n.push(t.name);else if(l.isLiteral(t))n.push(t.value);else if(l.isCallExpression(t))e(t.callee,n);else if(l.isObjectExpression(t)||l.isObjectPattern(t))for(const r of t.properties)e(r.key||r.argument,n);else l.isPrivateName(t)?e(t.id,n):l.isThisExpression(t)?n.push("this"):l.isSuper(t)&&n.push("super")}(n,r);let i=r.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUid(i.slice(0,20))}generateUidIdentifierBasedOnNode(e,t){return l.identifier(this.generateUidBasedOnNode(e,t))}isStatic(e){if(l.isThisExpression(e)||l.isSuper(e))return!0;if(l.isIdentifier(e)){const t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1}maybeGenerateMemoised(e,t){if(this.isStatic(e))return null;{const n=this.generateUidIdentifierBasedOnNode(e);return t?n:(this.push({id:n}),l.cloneNode(n))}}checkBlockScopedCollisions(e,t,n,r){if("param"===t)return;if("local"===e.kind)return;if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.buildError(r,`Duplicate declaration "${n}"`,TypeError)}rename(e,t,n){const r=this.getBinding(e);if(r)return t=t||this.generateUidIdentifier(e).name,new a.default(r,e,t).rename(n)}_renameFromMap(e,t,n,r){e[t]&&(e[n]=r,e[t]=null)}dump(){const e=(0,i.default)("-",60);console.log(e);let t=this;do{console.log("#",t.block.type);for(const e of Object.keys(t.bindings)){const n=t.bindings[e];console.log(" -",e,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)}toArray(e,t){if(l.isIdentifier(e)){const t=this.getBinding(e.name);if(t&&t.constant&&t.path.isGenericType("Array"))return e}if(l.isArrayExpression(e))return e;if(l.isIdentifier(e,{name:"arguments"}))return l.callExpression(l.memberExpression(l.memberExpression(l.memberExpression(l.identifier("Array"),l.identifier("prototype")),l.identifier("slice")),l.identifier("call")),[e]);let n;const r=[e];return!0===t?n="toConsumableArray":t?(r.push(l.numericLiteral(t)),n="slicedToArray"):n="toArray",l.callExpression(this.hub.addHelper(n),r)}hasLabel(e){return!!this.getLabel(e)}getLabel(e){return this.labels.get(e)}registerLabel(e){this.labels.set(e.node.label.name,e)}registerDeclaration(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration()){const t=e.get("declarations");for(const n of t)this.registerBinding(e.node.kind,n)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration()){const t=e.get("specifiers");for(const e of t)this.registerBinding("module",e)}else if(e.isExportDeclaration()){const t=e.get("declaration");(t.isClassDeclaration()||t.isFunctionDeclaration()||t.isVariableDeclaration())&&this.registerDeclaration(t)}else this.registerBinding("unknown",e)}buildUndefinedNode(){return l.unaryExpression("void",l.numericLiteral(0),!0)}registerConstantViolation(e){const t=e.getBindingIdentifiers();for(const n of Object.keys(t)){const t=this.getBinding(n);t&&t.reassign(e)}}registerBinding(e,t,n=t){if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration()){const n=t.get("declarations");for(const t of n)this.registerBinding(e,t);return}const r=this.getProgramParent(),i=t.getOuterBindingIdentifiers(!0);for(const t of Object.keys(i))for(const a of i[t]){const i=this.getOwnBinding(t);if(i){if(i.identifier===a)continue;this.checkBlockScopedCollisions(i,e,t,a)}r.references[t]=!0,i?this.registerConstantViolation(n):this.bindings[t]=new u.default({identifier:a,scope:this,path:n,kind:e})}}addGlobal(e){this.globals[e.name]=e}hasUid(e){let t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1}hasGlobal(e){let t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1}hasReference(e){let t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1}isPure(e,t){if(l.isIdentifier(e)){const n=this.getBinding(e.name);return!!n&&(!t||n.constant)}if(l.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(l.isClassBody(e)){for(const n of e.body)if(!this.isPure(n,t))return!1;return!0}if(l.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(l.isArrayExpression(e)){for(const n of e.elements)if(!this.isPure(n,t))return!1;return!0}if(l.isObjectExpression(e)){for(const n of e.properties)if(!this.isPure(n,t))return!1;return!0}if(l.isClassMethod(e))return!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind);if(l.isProperty(e))return!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t);if(l.isUnaryExpression(e))return this.isPure(e.argument,t);if(l.isTaggedTemplateExpression(e))return l.matchesPattern(e.tag,"String.raw")&&!this.hasBinding("String",!0)&&this.isPure(e.quasi,t);if(l.isTemplateLiteral(e)){for(const n of e.expressions)if(!this.isPure(n,t))return!1;return!0}return l.isPureish(e)}setData(e,t){return this.data[e]=t}getData(e){let t=this;do{const n=t.data[e];if(null!=n)return n}while(t=t.parent)}removeData(e){let t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)}init(){this.references||this.crawl()}crawl(){const e=this.path;if(this.references=Object.create(null),this.bindings=Object.create(null),this.globals=Object.create(null),this.uids=Object.create(null),this.data=Object.create(null),e.isLoop())for(const t of l.FOR_INIT_KEYS){const n=e.get(t);n.isBlockScoped()&&this.registerBinding(n.node.kind,n)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[l.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[l.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction()){const t=e.get("params");for(const e of t)this.registerBinding("param",e)}if(e.isCatchClause()&&this.registerBinding("let",e),this.getProgramParent().crawling)return;const t={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(d,t),this.crawling=!1;for(const e of t.assignments){const t=e.getBindingIdentifiers();let n;for(const r of Object.keys(t))e.scope.getBinding(r)||(n=n||e.scope.getProgramParent(),n.addGlobal(t[r]));e.scope.registerConstantViolation(e)}for(const e of t.references){const t=e.scope.getBinding(e.node.name);t?t.reference(e):e.scope.getProgramParent().addGlobal(e.node)}for(const e of t.constantViolations)e.scope.registerConstantViolation(e)}push(e){let t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=(this.getFunctionParent()||this.getProgramParent()).path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(t.ensureBlock(),t=t.get("body"));const n=e.unique,r=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,a=`declaration:${r}:${i}`;let o=!n&&t.getData(a);if(!o){const e=l.variableDeclaration(r,[]);e._blockHoist=i,[o]=t.unshiftContainer("body",[e]),n||t.setData(a,o)}const s=l.variableDeclarator(e.id,e.init);o.node.declarations.push(s),this.registerBinding(r,o.get("declarations").pop())}getProgramParent(){let e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("Couldn't find a Program")}getFunctionParent(){let e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);return null}getBlockParent(){let e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getAllBindings(){const e=Object.create(null);let t=this;do{(0,s.default)(e,t.bindings),t=t.parent}while(t);return e}getAllBindingsOfKind(){const e=Object.create(null);for(const t of arguments){let n=this;do{for(const r of Object.keys(n.bindings)){const i=n.bindings[r];i.kind===t&&(e[r]=i)}n=n.parent}while(n)}return e}bindingIdentifierEquals(e,t){return this.getBindingIdentifier(e)===t}getBinding(e){let t=this;do{const n=t.getOwnBinding(e);if(n)return n}while(t=t.parent)}getOwnBinding(e){return this.bindings[e]}getBindingIdentifier(e){const t=this.getBinding(e);return t&&t.identifier}getOwnBindingIdentifier(e){const t=this.bindings[e];return t&&t.identifier}hasOwnBinding(e){return!!this.getOwnBinding(e)}hasBinding(e,t){return!!e&&(!!this.hasOwnBinding(e)||(!!this.parentHasBinding(e,t)||(!!this.hasUid(e)||(!(t||!(0,r.default)(v.globals,e))||!(t||!(0,r.default)(v.contextVariables,e))))))}parentHasBinding(e,t){return this.parent&&this.parent.hasBinding(e,t)}moveBindingTo(e,t){const n=this.getBinding(e);n&&(n.scope.removeOwnBinding(e),n.scope=t,t.bindings[e]=n)}removeOwnBinding(e){delete this.bindings[e]}removeBinding(e){const t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);let n=this;do{n.uids[e]&&(n.uids[e]=!1)}while(n=n.parent)}}t.default=v,v.globals=Object.keys(c.default.builtin),v.contextVariables=["arguments","undefined","Infinity","NaN"]},function(e,t,n){var r=n(310),i=n(83),a=n(81),o=n(84);e.exports=function(e,t,n){return t=(n?i(e,t,n):void 0===t)?1:a(t),r(o(e),t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor({identifier:e,scope:t,path:n,kind:r}){this.identifier=e,this.scope=t,this.path=n,this.kind=r,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue()}deoptValue(){this.clearValue(),this.hasDeoptedValue=!0}setValue(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)}clearValue(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null}reassign(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)}reference(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))}dereference(){this.references--,this.referenced=!!this.references}}},function(e,t,n){var r=n(46),i=n(315),a=n(317);e.exports=function(e,t){return a(i(e,t,r),e+"")}},function(e,t,n){t.SourceMapGenerator=n(144).SourceMapGenerator,t.SourceMapConsumer=n(326).SourceMapConsumer,t.SourceNode=n(329).SourceNode},function(e,t,n){var r=n(145),i=n(35),a=n(146).ArraySet,o=n(325).MappingList;function s(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new o,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(e){var t=e.sourceRoot,n=new s({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=i.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&n.setSourceContent(t,r)})),n},s.prototype.addMapping=function(e){var t=i.getArg(e,"generated"),n=i.getArg(e,"original",null),r=i.getArg(e,"source",null),a=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,a),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=a&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:a})},s.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=i.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var o=this._sourceRoot;null!=o&&(r=i.relative(o,r));var s=new a,u=new a;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=n&&(t.source=i.join(n,t.source)),null!=o&&(t.source=i.relative(o,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var c=t.source;null==c||s.has(c)||s.add(c);var l=t.name;null==l||u.has(l)||u.add(l)}),this),this._sources=s,this._names=u,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=i.join(n,t)),null!=o&&(t=i.relative(o,t)),this.setSourceContent(t,r))}),this)},s.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},s.prototype._serializeMappings=function(){for(var e,t,n,a,o=0,s=1,u=0,c=0,l=0,p=0,h="",f=this._mappings.toArray(),d=0,y=f.length;d0){if(!i.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=r.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(a=this._sources.indexOf(t.source),e+=r.encode(a-p),p=a,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-l),l=n)),h+=e}return h},s.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=i.relative(t,e));var n=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=s},function(e,t,n){var r=n(324);t.encode=function(e){var t,n="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,(i>>>=5)>0&&(t|=32),n+=r.encode(t)}while(i>0);return n},t.decode=function(e,t,n){var i,a,o,s,u=e.length,c=0,l=0;do{if(t>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&a),c+=(a&=31)<>1,1==(1&o)?-s:s),n.rest=t}},function(e,t,n){var r=n(35),i=Object.prototype.hasOwnProperty,a="undefined"!=typeof Map;function o(){this._array=[],this._set=a?new Map:Object.create(null)}o.fromArray=function(e,t){for(var n=new o,r=0,i=e.length;r=0)return t}else{var n=r.toSetString(e);if(i.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e{this.word(e.name)})},t.ArgumentPlaceholder=function(){this.token("?")},t.SpreadElement=t.RestElement=function(e){this.token("..."),this.print(e.argument,e)},t.ObjectPattern=t.ObjectExpression=function(e){const t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space());this.token("}")},t.ObjectMethod=function(e){this.printJoin(e.decorators,e),this._methodHead(e),this.space(),this.print(e.body,e)},t.ObjectProperty=function(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(i.isAssignmentPattern(e.value)&&i.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&i.isIdentifier(e.key)&&i.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(":"),this.space(),this.print(e.value,e)},t.ArrayPattern=t.ArrayExpression=function(e){const t=e.elements,n=t.length;this.token("["),this.printInnerComments(e);for(let r=0;r0&&this.space(),this.print(i,e),r{u[t]=u[t]||[],u[t].push(e)}),k[e]=t},t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.FLIPPED_ALIAS_KEYS=t.ALIAS_KEYS=t.VISITOR_KEYS=void 0;var r,i=(r=n(73))&&r.__esModule?r:{default:r},a=n(75);const o={};t.VISITOR_KEYS=o;const s={};t.ALIAS_KEYS=s;const u={};t.FLIPPED_ALIAS_KEYS=u;const c={};t.NODE_FIELDS=c;const l={};t.BUILDER_KEYS=l;const p={};function h(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":typeof e}function f(e){return{validate:e}}function d(e){return"string"==typeof e?g(e):g(...e)}function y(e){return x(b("array"),m(e))}function v(e){return y(d(e))}function m(e){function t(t,n,r){if(Array.isArray(r))for(let i=0;i1)for(var n=1;n","<",">=","<="];t.BOOLEAN_NUMBER_BINARY_OPERATORS=r;const i=["==","===","!=","!=="];t.EQUALITY_BINARY_OPERATORS=i;const a=[...i,"in","instanceof"];t.COMPARISON_BINARY_OPERATORS=a;const o=[...a,...r];t.BOOLEAN_BINARY_OPERATORS=o;const s=["-","/","%","*","**","&","|",">>",">>>","<<","^"];t.NUMBER_BINARY_OPERATORS=s;const u=["+",...s,...o];t.BINARY_OPERATORS=u;const c=["delete","!"];t.BOOLEAN_UNARY_OPERATORS=c;const l=["+","-","~"];t.NUMBER_UNARY_OPERATORS=l;const p=["typeof"];t.STRING_UNARY_OPERATORS=p;const h=["void","throw",...c,...l,...p];t.UNARY_OPERATORS=h;t.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};const f=Symbol.for("var used to be block scoped");t.BLOCK_SCOPED_SYMBOL=f;const d=Symbol.for("should not be considered a local binding");t.NOT_LOCAL_BINDING=d},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,i="/"===o.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var a=t.isAbsolute(e),o="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&o&&(e+="/"),(a?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,u=0;u=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(20))},function(e,t,n){var r=n(16).Symbol;e.exports=r},function(e,t,n){var r=n(109),i=n(223),a=n(29);e.exports=function(e){return a(e)?r(e):i(e)}},function(e,t,n){var r=n(103),i=n(65);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e&&!i.default.keyword.isReservedWordES6(e,!0)&&("await"!==e&&i.default.keyword.isIdentifierNameES6(e))};var r,i=(r=n(118))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=n(13);const i=Function.call.bind(Object.prototype.hasOwnProperty);function a(e,t){return e&&"string"==typeof e.type&&"CommentLine"!==e.type&&"CommentBlock"!==e.type?s(e,t):e}function o(e,t){return Array.isArray(e)?e.map(e=>a(e,t)):a(e,t)}function s(e,t=!0){if(!e)return e;const{type:n}=e,a={type:n};if("Identifier"===n)a.name=e.name,i(e,"optional")&&"boolean"==typeof e.optional&&(a.optional=e.optional),i(e,"typeAnnotation")&&(a.typeAnnotation=t?o(e.typeAnnotation,!0):e.typeAnnotation);else{if(!i(r.NODE_FIELDS,n))throw new Error(`Unknown node type: "${n}"`);for(const s of Object.keys(r.NODE_FIELDS[n]))i(e,s)&&(a[s]=t?o(e[s],!0):e[s])}return i(e,"loc")&&(a.loc=e.loc),i(e,"leadingComments")&&(a.leadingComments=e.leadingComments),i(e,"innerComments")&&(a.innerComments=e.innerComments),i(e,"trailingComments")&&(a.trailingComments=e.trailingComments),i(e,"extra")&&(a.extra=Object.assign({},e.extra)),a}},function(e,t,n){var r=n(22),i=n(17);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var n=e,r=i(e);if(r){if(!r.path)return e;n=r.path}for(var o,s=t.isAbsolute(n),u=n.split(/\/+/),c=0,l=u.length-1;l>=0;l--)"."===(o=u[l])?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(n=u.join("/"))&&(n=s?"/":"."),r?(r.path=n,a(r)):n}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),s=i(e);if(s&&(e=s.path||"/"),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var u="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=u,a(s)):u},t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(n)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function u(e){return e}function c(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function l(e,t){return e===t?0:e>t?1:-1}t.toSetString=s?u:function(e){return c(e)?"$"+e:e},t.fromSetString=s?u:function(e){return c(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=e.source-t.source;return 0!==r?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)||n?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=e.generatedLine-t.generatedLine)?r:e.name-t.name},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)||n?r:0!==(r=e.source-t.source)?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)?r:e.name-t.name},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=l(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)?n:l(e.name,t.name)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadOptions=function(e){const t=(0,i.default)(e);return t?t.options:null},Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"loadPartialConfig",{enumerable:!0,get:function(){return a.loadPartialConfig}});var r,i=(r=n(385))&&r.__esModule?r:{default:r},a=n(160)},function(e,t,n){var r=n(189),i=n(190),a=n(191),o=n(192),s=n(193);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++ti?e(t):t,c=e.split(a),{start:l,end:p,markerLines:h}=function(e,t,n){const r=Object.assign({column:0,line:-1},e.start),i=Object.assign({},r,e.end),{linesAbove:a=2,linesBelow:o=3}=n||{},s=r.line,u=r.column,c=i.line,l=i.column;let p=Math.max(s-(a+1),0),h=Math.min(t.length,c+o);-1===s&&(p=0),-1===c&&(h=t.length);const f=c-s,d={};if(f)for(let e=0;e<=f;e++){const n=e+s;if(u)if(0===e){const e=t[n-1].length;d[n]=[u,e-u+1]}else if(e===f)d[n]=[0,l];else{const r=t[n-e].length;d[n]=[0,r]}else d[n]=!0}else d[s]=u===l?!u||[u,0]:[u,l-u];return{start:p,end:h,markerLines:d}}(t,c,n),f=t.start&&"number"==typeof t.start.column,d=String(p).length;let y=(i?(0,r().default)(e,n):e).split(a).slice(l,p).map((e,t)=>{const r=l+1+t,i=` ${` ${r}`.slice(-d)} | `,a=h[r],o=!h[r+1];if(a){let t="";if(Array.isArray(a)){const r=e.slice(0,Math.max(a[0]-1,0)).replace(/[^\t]/g," "),c=a[1]||1;t=["\n ",u(s.gutter,i.replace(/\d/g," ")),r,u(s.marker,"^").repeat(c)].join(""),o&&n.message&&(t+=" "+u(s.message,n.message))}return[u(s.marker,">"),u(s.gutter,i),e,t].join("")}return` ${u(s.gutter,i)}${e}`}).join("\n");return n.message&&!f&&(y=`${" ".repeat(d+1)}${n.message}\n${y}`),i?o.reset(y):y}}).call(this,n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t={}){this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}}const i=new Map;function a(e,t={}){t.keyword=e;const n=new r(e,t);return i.set(e,n),n}function o(e,t){return new r(e,{beforeExpr:!0,binop:t})}const s={num:new r("num",{startsExpr:!0}),bigint:new r("bigint",{startsExpr:!0}),regexp:new r("regexp",{startsExpr:!0}),string:new r("string",{startsExpr:!0}),name:new r("name",{startsExpr:!0}),eof:new r("eof"),bracketL:new r("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new r("]"),braceL:new r("{",{beforeExpr:!0,startsExpr:!0}),braceBarL:new r("{|",{beforeExpr:!0,startsExpr:!0}),braceR:new r("}"),braceBarR:new r("|}"),parenL:new r("(",{beforeExpr:!0,startsExpr:!0}),parenR:new r(")"),comma:new r(",",{beforeExpr:!0}),semi:new r(";",{beforeExpr:!0}),colon:new r(":",{beforeExpr:!0}),doubleColon:new r("::",{beforeExpr:!0}),dot:new r("."),question:new r("?",{beforeExpr:!0}),questionDot:new r("?."),arrow:new r("=>",{beforeExpr:!0}),template:new r("template"),ellipsis:new r("...",{beforeExpr:!0}),backQuote:new r("`",{startsExpr:!0}),dollarBraceL:new r("${",{beforeExpr:!0,startsExpr:!0}),at:new r("@"),hash:new r("#",{startsExpr:!0}),interpreterDirective:new r("#!..."),eq:new r("=",{beforeExpr:!0,isAssign:!0}),assign:new r("_=",{beforeExpr:!0,isAssign:!0}),incDec:new r("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),bang:new r("!",{beforeExpr:!0,prefix:!0,startsExpr:!0}),tilde:new r("~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),pipeline:o("|>",0),nullishCoalescing:o("??",1),logicalOR:o("||",2),logicalAND:o("&&",3),bitwiseOR:o("|",4),bitwiseXOR:o("^",5),bitwiseAND:o("&",6),equality:o("==/!=/===/!==",7),relational:o("/<=/>=",8),bitShift:o("<>/>>>",9),plusMin:new r("+/-",{beforeExpr:!0,binop:10,prefix:!0,startsExpr:!0}),modulo:new r("%",{beforeExpr:!0,binop:11,startsExpr:!0}),star:o("*",11),slash:o("/",11),exponent:new r("**",{beforeExpr:!0,binop:12,rightAssociative:!0}),_break:a("break"),_case:a("case",{beforeExpr:!0}),_catch:a("catch"),_continue:a("continue"),_debugger:a("debugger"),_default:a("default",{beforeExpr:!0}),_do:a("do",{isLoop:!0,beforeExpr:!0}),_else:a("else",{beforeExpr:!0}),_finally:a("finally"),_for:a("for",{isLoop:!0}),_function:a("function",{startsExpr:!0}),_if:a("if"),_return:a("return",{beforeExpr:!0}),_switch:a("switch"),_throw:a("throw",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_try:a("try"),_var:a("var"),_const:a("const"),_while:a("while",{isLoop:!0}),_with:a("with"),_new:a("new",{beforeExpr:!0,startsExpr:!0}),_this:a("this",{startsExpr:!0}),_super:a("super",{startsExpr:!0}),_class:a("class",{startsExpr:!0}),_extends:a("extends",{beforeExpr:!0}),_export:a("export"),_import:a("import",{startsExpr:!0}),_null:a("null",{startsExpr:!0}),_true:a("true",{startsExpr:!0}),_false:a("false",{startsExpr:!0}),_in:a("in",{beforeExpr:!0,binop:8}),_instanceof:a("instanceof",{beforeExpr:!0,binop:8}),_typeof:a("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:a("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:a("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})};function u(e,t){return 2|(e?4:0)|(t?8:0)}function c(e){return null!=e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}const l=/\r\n?|[\n\u2028\u2029]/,p=new RegExp(l.source,"g");function h(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}const f=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function d(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}class y{constructor(e,t,n,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r}}const v={braceStatement:new y("{",!1),braceExpression:new y("{",!0),templateQuasi:new y("${",!1),parenStatement:new y("(",!1),parenExpression:new y("(",!0),template:new y("`",!0,!0,e=>e.readTmplToken()),functionExpression:new y("function",!0),functionStatement:new y("function",!1)};s.parenR.updateContext=s.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);let e=this.state.context.pop();e===v.braceStatement&&"function"===this.curContext().token&&(e=this.state.context.pop()),this.state.exprAllowed=!e.isExpr},s.name.updateContext=function(e){let t=!1;e!==s.dot&&("of"===this.state.value&&!this.state.exprAllowed||"yield"===this.state.value&&this.scope.inGenerator)&&(t=!0),this.state.exprAllowed=t,this.state.isIterator&&(this.state.isIterator=!1)},s.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?v.braceStatement:v.braceExpression),this.state.exprAllowed=!0},s.dollarBraceL.updateContext=function(){this.state.context.push(v.templateQuasi),this.state.exprAllowed=!0},s.parenL.updateContext=function(e){const t=e===s._if||e===s._for||e===s._with||e===s._while;this.state.context.push(t?v.parenStatement:v.parenExpression),this.state.exprAllowed=!0},s.incDec.updateContext=function(){},s._function.updateContext=s._class.updateContext=function(e){!e.beforeExpr||e===s.semi||e===s._else||e===s._return&&l.test(this.input.slice(this.state.lastTokEnd,this.state.start))||(e===s.colon||e===s.braceL)&&this.curContext()===v.b_stat?this.state.context.push(v.functionStatement):this.state.context.push(v.functionExpression),this.state.exprAllowed=!1},s.backQuote.updateContext=function(){this.curContext()===v.template?this.state.context.pop():this.state.context.push(v.template),this.state.exprAllowed=!1};const m=["eval","arguments"],g=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),b=new Set(m),x=(e,t)=>t&&"await"===e||"enum"===e;function k(e,t){return x(e,t)||g.has(e)}function w(e){return b.has(e)}function S(e,t){return k(e,t)||w(e)}const P=/^in(stanceof)?$/;let E="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",T="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const O=new RegExp("["+E+"]"),C=new RegExp("["+E+T+"]");E=T=null;const D=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],A=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239];function j(e,t){let n=65536;for(let r=0,i=t.length;re)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function $(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&O.test(String.fromCharCode(e)):j(e,D)))}function M(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&C.test(String.fromCharCode(e)):j(e,D)||j(e,A))))}const I=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]);function F(e){return"type"===e.importKind||"typeof"===e.importKind}function L(e){return(e.type===s.name||!!e.type.keyword)&&"from"!==e.value}const _={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const B=/\*?\s*@((?:no)?flow)\b/;const R={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},N=/^[\da-fA-F]+$/,V=/^\d+$/;function z(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function G(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return G(e.object)+"."+G(e.property);throw new Error("Node had unexpected type: "+e.type)}v.j_oTag=new y("...",!0,!0),s.jsxName=new r("jsxName"),s.jsxText=new r("jsxText",{beforeExpr:!0}),s.jsxTagStart=new r("jsxTagStart",{startsExpr:!0}),s.jsxTagEnd=new r("jsxTagEnd"),s.jsxTagStart.updateContext=function(){this.state.context.push(v.j_expr),this.state.context.push(v.j_oTag),this.state.exprAllowed=!1},s.jsxTagEnd.updateContext=function(e){const t=this.state.context.pop();t===v.j_oTag&&e===s.slash||t===v.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===v.j_expr):this.state.exprAllowed=!0};class H{constructor(e){this.var=[],this.lexical=[],this.functions=[],this.flags=e}}class U{constructor(e,t){this.scopeStack=[],this.undefinedExports=new Map,this.raise=e,this.inModule=t}get inFunction(){return(2&this.currentVarScope().flags)>0}get inGenerator(){return(8&this.currentVarScope().flags)>0}get inAsync(){return(4&this.currentVarScope().flags)>0}get allowSuper(){return(64&this.currentThisScope().flags)>0}get allowDirectSuper(){return(128&this.currentThisScope().flags)>0}get inClass(){return(256&this.currentThisScope().flags)>0}get inNonArrowFunction(){return(2&this.currentThisScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new H(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(e){return!!(2&e.flags||!this.inModule&&1&e.flags)}declareName(e,t,n){let r=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(r,e,t,n),16&t?r.functions.push(e):r.lexical.push(e),8&t&&this.maybeExportDefined(r,e);else if(4&t)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,e,t,n),r.var.push(e),this.maybeExportDefined(r,e),!(515&r.flags));--i);this.inModule&&1&r.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,n,r){this.isRedeclaredInScope(e,t,n)&&this.raise(r,`Identifier '${t}' has already been declared`)}isRedeclaredInScope(e,t,n){return!!(1&n)&&(8&n?e.lexical.indexOf(t)>-1||e.functions.indexOf(t)>-1||e.var.indexOf(t)>-1:16&n?e.lexical.indexOf(t)>-1||!this.treatFunctionsAsVarInScope(e)&&e.var.indexOf(t)>-1:e.lexical.indexOf(t)>-1&&!(32&e.flags&&e.lexical[0]===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.indexOf(t)>-1)}checkLocalExport(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&-1===this.scopeStack[0].functions.indexOf(e.name)&&this.undefinedExports.set(e.name,e.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScope(){for(let e=this.scopeStack.length-1;;e--){const t=this.scopeStack[e];if(515&t.flags)return t}}currentThisScope(){for(let e=this.scopeStack.length-1;;e--){const t=this.scopeStack[e];if((515&t.flags||256&t.flags)&&!(16&t.flags))return t}}}class Y extends H{constructor(...e){super(...e),this.types=[],this.enums=[],this.constEnums=[],this.classes=[],this.exportOnlyBindings=[]}}class W extends U{createScope(e){return new Y(e)}declareName(e,t,n){const r=this.currentScope();if(1024&t)return this.maybeExportDefined(r,e),void r.exportOnlyBindings.push(e);super.declareName(...arguments),2&t&&(1&t||(this.checkRedeclarationInScope(r,e,t,n),this.maybeExportDefined(r,e)),r.types.push(e)),256&t&&r.enums.push(e),512&t&&r.constEnums.push(e),128&t&&r.classes.push(e)}isRedeclaredInScope(e,t,n){if(e.enums.indexOf(t)>-1){if(256&n){return!!(512&n)!==e.constEnums.indexOf(t)>-1}return!0}return 128&n&&e.classes.indexOf(t)>-1?e.lexical.indexOf(t)>-1&&!!(1&n):!!(2&n&&e.types.indexOf(t)>-1)||super.isRedeclaredInScope(...arguments)}checkLocalExport(e){-1===this.scopeStack[0].types.indexOf(e.name)&&-1===this.scopeStack[0].exportOnlyBindings.indexOf(e.name)&&super.checkLocalExport(e)}}function K(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}function X(e){if(!e)throw new Error("Assert fail")}s.placeholder=new r("%%",{startsExpr:!0});function q(e,t){return e.some(e=>Array.isArray(e)?e[0]===t:e===t)}function J(e,t,n){const r=e.find(e=>Array.isArray(e)?e[0]===t:e===t);return r&&Array.isArray(r)?r[1][n]:null}const Z=["minimal","smart","fsharp"];const Q={estree:e=>class extends e{estreeParseRegExpLiteral({pattern:e,flags:t}){let n=null;try{n=new RegExp(e,t)}catch(e){}const r=this.estreeParseLiteral(n);return r.regex={pattern:e,flags:t},r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}directiveToStmt(e){const t=e.value,n=this.startNodeAt(e.start,e.loc.start),r=this.startNodeAt(t.start,t.loc.start);return r.value=t.value,r.raw=t.extra.raw,n.expression=this.finishNodeAt(r,"Literal",t.end,t.loc.end),n.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(n,"ExpressionStatement",e.end,e.loc.end)}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){c(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}checkGetterSetterParams(e){const t=e,n="get"===t.kind?0:1,r=t.start;t.value.params.length!==n?"get"===t.kind?this.raise(r,"getter must not have any formal parameters"):this.raise(r,"setter must have exactly one formal parameter"):"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raise(r,"setter function argument must not be a rest parameter")}checkLVal(e,t=64,n,r,i){switch(e.type){case"ObjectPattern":e.properties.forEach(e=>{this.checkLVal("Property"===e.type?e.value:e,t,n,"object destructuring pattern",i)});break;default:super.checkLVal(e,t,n,r,i)}}checkDuplicatedProto(e,t){if("SpreadElement"===e.type||e.computed||e.method||e.shorthand)return;const n=e.key;"__proto__"===("Identifier"===n.type?n.name:String(n.value))&&"init"===e.kind&&(t.used&&!t.start&&(t.start=n.start),t.used=!0)}isStrictBody(e){if("BlockStatement"===e.body.type&&e.body.body.length>0)for(let t=0,n=e.body.body;tthis.directiveToStmt(e));e.body=i.concat(e.body),delete e.directives}pushClassMethod(e,t,n,r,i,a){this.parseMethod(t,n,r,i,a,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parseExprAtom(e){switch(this.state.type){case s.regexp:return this.estreeParseRegExpLiteral(this.state.value);case s.num:case s.string:return this.estreeParseLiteral(this.state.value);case s._null:return this.estreeParseLiteral(null);case s._true:return this.estreeParseLiteral(!0);case s._false:return this.estreeParseLiteral(!1);default:return super.parseExprAtom(e)}}parseLiteral(e,t,n,r){const i=super.parseLiteral(e,t,n,r);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(e,t,n=!1){super.parseFunctionBody(e,t,n),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,n,r,i,a,o=!1){let s=this.startNode();return s.kind=e.kind,s=super.parseMethod(s,t,n,r,i,a,o),s.type="FunctionExpression",delete s.kind,e.value=s,a="ClassMethod"===a?"MethodDefinition":a,this.finishNode(e,a)}parseObjectMethod(e,t,n,r,i){const a=super.parseObjectMethod(e,t,n,r,i);return a&&(a.type="Property","method"===a.kind&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(e,t,n,r,i){const a=super.parseObjectProperty(e,t,n,r,i);return a&&(a.kind="init",a.type="Property"),a}toAssignable(e,t,n){return c(e)?(this.toAssignable(e.value,t,n),e):super.toAssignable(e,t,n)}toAssignableObjectExpressionProp(e,t,n){if("get"===e.kind||"set"===e.kind)throw this.raise(e.key.start,"Object pattern can't contain getter or setter");if(e.method)throw this.raise(e.key.start,"Object pattern can't contain methods");super.toAssignableObjectExpressionProp(e,t,n)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated JSX contents");const n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:return this.state.pos===this.state.start?60===n&&this.state.exprAllowed?(++this.state.pos,this.finishToken(s.jsxTagStart)):super.getTokenFromCode(n):(e+=this.input.slice(t,this.state.pos),this.finishToken(s.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:h(n)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let n;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,n=e?"\n":"\r\n"):n=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,n}jsxReadString(e){let t="",n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated string constant");const r=this.input.charCodeAt(this.state.pos);if(r===e)break;38===r?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadEntity(),n=this.state.pos):h(r)?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}return t+=this.input.slice(n,this.state.pos++),this.finishToken(s.string,t)}jsxReadEntity(){let e,t="",n=0,r=this.input[this.state.pos];const i=++this.state.pos;for(;this.state.pos"):!z(i)&&z(a)?this.raise(a.start,"Expected corresponding JSX closing tag for <"+G(i.name)+">"):z(i)||z(a)||G(a.name)!==G(i.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+G(i.name)+">")}if(z(i)?(n.openingFragment=i,n.closingFragment=a):(n.openingElement=i,n.closingElement=a),n.children=r,this.isRelational("<"))throw this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?");return z(i)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")}jsxParseElement(){const e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)}parseExprAtom(e){return this.match(s.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(s.jsxTagStart)?this.jsxParseElement():this.isRelational("<")&&33!==this.input.charCodeAt(this.state.pos)?(this.finishToken(s.jsxTagStart),this.jsxParseElement()):super.parseExprAtom(e)}getTokenFromCode(e){if(this.state.inPropertyName)return super.getTokenFromCode(e);const t=this.curContext();if(t===v.j_expr)return this.jsxReadToken();if(t===v.j_oTag||t===v.j_cTag){if($(e))return this.jsxReadWord();if(62===e)return++this.state.pos,this.finishToken(s.jsxTagEnd);if((34===e||39===e)&&t===v.j_oTag)return this.jsxReadString(e)}return 60===e&&this.state.exprAllowed&&33!==this.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(s.jsxTagStart)):super.getTokenFromCode(e)}updateContext(e){if(this.match(s.braceL)){const t=this.curContext();t===v.j_oTag?this.state.context.push(v.braceExpression):t===v.j_expr?this.state.context.push(v.templateQuasi):super.updateContext(e),this.state.exprAllowed=!0}else{if(!this.match(s.slash)||e!==s.jsxTagStart)return super.updateContext(e);this.state.context.length-=2,this.state.context.push(v.j_cTag),this.state.exprAllowed=!1}}},flow:e=>class extends e{constructor(e,t){super(e,t),this.flowPragma=void 0}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,t){return e!==s.string&&e!==s.semi&&e!==s.interpreterDirective&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){const t=B.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}return super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(e||s.colon);const n=this.flowParseType();return this.state.inType=t,n}flowParsePredicate(){const e=this.startNode(),t=this.state.startLoc,n=this.state.start;this.expect(s.modulo);const r=this.state.startLoc;return this.expectContextual("checks"),t.line===r.line&&t.column===r.column-1||this.raise(n,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(s.parenL)?(e.value=this.parseExpression(),this.expect(s.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(s.colon);let t=null,n=null;return this.match(s.modulo)?(this.state.inType=e,n=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(s.modulo)&&(n=this.flowParsePredicate())),[t,n]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier(),n=this.startNode(),r=this.startNode();this.isRelational("<")?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(s.parenL);const i=this.flowParseFunctionTypeParams();return n.params=i.params,n.rest=i.rest,this.expect(s.parenR),[n.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(n,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(s._class))return this.flowParseDeclareClass(e);if(this.match(s._function))return this.flowParseDeclareFunction(e);if(this.match(s._var))return this.flowParseDeclareVariable(e);if(this.eatContextual("module"))return this.match(s.dot)?this.flowParseDeclareModuleExports(e):(t&&this.raise(this.state.lastTokStart,"`declare module` cannot be used inside another `declare module`"),this.flowParseDeclareModule(e));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(e);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(e);if(this.isContextual("interface"))return this.flowParseDeclareInterface(e);if(this.match(s._export))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(s.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();const t=e.body=this.startNode(),n=t.body=[];for(this.expect(s.braceL);!this.match(s.braceR);){let e=this.startNode();this.match(s._import)?(this.next(),this.isContextual("type")||this.match(s._typeof)||this.raise(this.state.lastTokStart,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(e)):(this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),e=this.flowParseDeclare(e,!0)),n.push(e)}this.scope.exit(),this.expect(s.braceR),this.finishNode(t,"BlockStatement");let r=null,i=!1;const a="Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module";return n.forEach(e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(i&&this.raise(e.start,"Duplicate `declare module.exports` statement"),"ES"===r&&this.raise(e.start,a),r="CommonJS",i=!0):("CommonJS"===r&&this.raise(e.start,a),r="ES")}),e.kind=r||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(s._export),this.eat(s._default))return this.match(s._function)||this.match(s._class)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(s._const)||this.isLet()||(this.isContextual("type")||this.isContextual("interface"))&&!t){const e=this.state.value,t=_[e];this.unexpected(this.state.start,`\`declare export ${e}\` is not supported. Use \`${t}\` instead`)}if(this.match(s._var)||this.match(s._function)||this.match(s._class)||this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(s.star)||this.match(s.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(e=this.parseExport(e)).type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){return this.next(),this.flowParseTypeAlias(e),e.type="DeclareTypeAlias",e}flowParseDeclareOpaqueType(e){return this.next(),this.flowParseOpaqueType(e,!0),e.type="DeclareOpaqueType",e}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t=!1){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.implements=[],e.mixins=[],this.eat(s._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(s.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(s.comma))}if(this.isContextual("implements")){this.next();do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(s.comma))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){"_"===e&&this.raise(this.state.start,"`_` is only allowed as a type argument to call or new")}checkReservedType(e,t,n){I.has(e)&&(n?this.raise(t,`Cannot overwrite reserved type ${e}`):this.raise(t,`Unexpected reserved type ${e}`))}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.start,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(s.eq),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(s.colon)&&(e.supertype=this.flowParseTypeInitialiser(s.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(s.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const t=this.state.start,n=this.startNode(),r=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return n.name=i.name,n.variance=r,n.bound=i.typeAnnotation,this.match(s.eq)?(this.eat(s.eq),n.default=this.flowParseType()):e&&this.raise(t,"Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),this.finishNode(n,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(s.jsxTagStart)?this.next():this.unexpected();let n=!1;do{const e=this.flowParseTypeParameter(n);t.params.push(e),e.default&&(n=!0),this.isRelational(">")||this.expect(s.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expectRelational("<");const n=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(s.comma);return this.state.noAnonFunctionType=n,this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(s.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual("interface"),e.extends=[],this.eat(s._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(s.comma));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(s.num)||this.match(s.string)?this.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,n){return e.static=t,this.lookahead().type===s.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(s.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=n,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(s.bracketR),this.expect(s.bracketR),this.isRelational("<")||this.match(s.parenL)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start))):(e.method=!1,this.eat(s.question)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(s.parenL);!this.match(s.parenR)&&!this.match(s.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(s.parenR)||this.expect(s.comma);return this.eat(s.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(s.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){const n=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(n),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:n,allowProto:r,allowInexact:i}){const a=this.state.inType;this.state.inType=!0;const o=this.startNode();let u,c;o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let l=!1;for(t&&this.match(s.braceBarL)?(this.expect(s.braceBarL),u=s.braceBarR,c=!0):(this.expect(s.braceL),u=s.braceR,c=!1),o.exact=c;!this.match(u);){let t=!1,a=null,u=null;const h=this.startNode();if(r&&this.isContextual("proto")){const t=this.lookahead();t.type!==s.colon&&t.type!==s.question&&(this.next(),a=this.state.start,e=!1)}if(e&&this.isContextual("static")){const e=this.lookahead();e.type!==s.colon&&e.type!==s.question&&(this.next(),t=!0)}const f=this.flowParseVariance();if(this.eat(s.bracketL))null!=a&&this.unexpected(a),this.eat(s.bracketL)?(f&&this.unexpected(f.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(h,t))):o.indexers.push(this.flowParseObjectTypeIndexer(h,t,f));else if(this.match(s.parenL)||this.isRelational("<"))null!=a&&this.unexpected(a),f&&this.unexpected(f.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(h,t));else{var p;let e="init";if(this.isContextual("get")||this.isContextual("set")){const t=this.lookahead();t.type!==s.name&&t.type!==s.string&&t.type!==s.num||(e=this.state.value,this.next())}const r=this.flowParseObjectTypeProperty(h,t,a,f,e,n,null!=(p=i)?p:!c);null===r?(l=!0,u=this.state.lastTokStart):o.properties.push(r)}this.flowObjectTypeSemicolon(),!u||this.match(s.braceR)||this.match(s.braceBarR)||this.raise(u,"Explicit inexact syntax must appear at the end of an inexact object")}this.expect(u),n&&(o.inexact=l);const h=this.finishNode(o,"ObjectTypeAnnotation");return this.state.inType=a,h}flowParseObjectTypeProperty(e,t,n,r,i,a,o){if(this.eat(s.ellipsis)){return this.match(s.comma)||this.match(s.semi)||this.match(s.braceR)||this.match(s.braceBarR)?(a?o||this.raise(this.state.lastTokStart,"Explicit inexact syntax cannot appear inside an explicit exact object type"):this.raise(this.state.lastTokStart,"Explicit inexact syntax cannot appear in class or interface definitions"),r&&this.raise(r.start,"Explicit inexact syntax cannot have variance"),null):(a||this.raise(this.state.lastTokStart,"Spread operator cannot appear in class or interface definitions"),null!=n&&this.unexpected(n),r&&this.raise(r.start,"Spread properties cannot have variance"),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"))}{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=n,e.kind=i;let a=!1;return this.isRelational("<")||this.match(s.parenL)?(e.method=!0,null!=n&&this.unexpected(n),r&&this.unexpected(r.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParams(e)):("init"!==i&&this.unexpected(),e.method=!1,this.eat(s.question)&&(a=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=a,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const t="get"===e.kind?0:1,n=e.start;e.value.params.length+(e.value.rest?1:0)!==t&&("get"===e.kind?this.raise(n,"getter must not have any formal parameters"):this.raise(n,"setter must have exactly one formal parameter")),"set"===e.kind&&e.value.rest&&this.raise(n,"setter function argument must not be a rest parameter")}flowObjectTypeSemicolon(){this.eat(s.semi)||this.eat(s.comma)||this.match(s.braceR)||this.match(s.braceBarR)||this.unexpected()}flowParseQualifiedTypeIdentifier(e,t,n){e=e||this.state.start,t=t||this.state.startLoc;let r=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(s.dot);){const n=this.startNodeAt(e,t);n.qualification=r,n.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(n,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,t,n){const r=this.startNodeAt(e,t);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t,n),this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(s._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(s.bracketL);this.state.possuper.parseFunctionBody(e,!0,n)):super.parseFunctionBody(e,!1,n)}parseFunctionBodyAndFinish(e,t,n=!1){if(this.match(s.colon)){const t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}super.parseFunctionBodyAndFinish(e,t,n)}parseStatement(e,t){if(this.state.strict&&this.match(s.name)&&"interface"===this.state.value){const e=this.startNode();return this.next(),this.flowParseInterface(e)}if(this.shouldParseEnums()&&this.isContextual("enum")){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}{const n=super.parseStatement(e,t);return void 0!==this.flowPragma||this.isValidDirective(n)||(this.flowPragma=null),n}}parseExpressionStatement(e,t){if("Identifier"===t.type)if("declare"===t.name){if(this.match(s._class)||this.match(s.name)||this.match(s._function)||this.match(s._var)||this.match(s._export))return this.flowParseDeclare(e)}else if(this.match(s.name)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||this.shouldParseEnums()&&this.isContextual("enum")||super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){return(!this.match(s.name)||!("type"===this.state.value||"interface"===this.state.value||"opaque"===this.state.value||this.shouldParseEnums()&&"enum"===this.state.value))&&super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual("enum")){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,n,r,i){if(!this.match(s.question))return e;if(i){const a=this.tryParse(()=>super.parseConditional(e,t,n,r));return a.node?(a.error&&(this.state=a.failState),a.node):(i.start=a.error.pos||this.state.start,e)}this.expect(s.question);const a=this.state.clone(),o=this.state.noArrowAt,u=this.startNodeAt(n,r);let{consequent:c,failed:l}=this.tryParseConditionalConsequent(),[p,h]=this.getArrowLikeExpressions(c);if(l||h.length>0){const e=[...o];if(h.length>0){this.state=a,this.state.noArrowAt=e;for(let t=0;t1&&this.raise(a.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),l&&1===p.length&&(this.state=a,this.state.noArrowAt=e.concat(p[0].start),({consequent:c,failed:l}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(c,!0),this.state.noArrowAt=o,this.expect(s.colon),u.test=e,u.consequent=c,u.alternate=this.forwardNoArrowParamsConversionAt(u,()=>this.parseMaybeAssign(t,void 0,void 0,void 0)),this.finishNode(u,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssign(),t=!this.match(s.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const n=[e],r=[];for(;0!==n.length;){const e=n.pop();"ArrowFunctionExpression"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):r.push(e),n.push(e.body)):"ConditionalExpression"===e.type&&(n.push(e.consequent),n.push(e.alternate))}return t?(r.forEach(e=>this.finishArrowValidation(e)),[r,[]]):function(e,t){const n=[],r=[];for(let i=0;ie.params.every(e=>this.isAssignable(e,!0)))}finishArrowValidation(e){var t;this.toAssignableList(e.params,!0,"arrow function parameters",null==(t=e.extra)?void 0:t.trailingComma),this.scope.enter(16|u(!1,!1)),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let n;return-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),n=t(),this.state.noArrowParamsConversionAt.pop()):n=t(),n}parseParenItem(e,t,n){if(e=super.parseParenItem(e,t,n),this.eat(s.question)&&(e.optional=!0,this.resetEndLocation(e)),this.match(s.colon)){const r=this.startNodeAt(t,n);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExport(e){const t=super.parseExport(e);return"ExportNamedDeclaration"!==t.type&&"ExportAllDeclaration"!==t.type||(t.exportKind=t.exportKind||"value"),t}parseExportDeclaration(e){if(this.isContextual("type")){e.exportKind="type";const t=this.startNode();return this.next(),this.match(s.braceL)?(e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual("opaque")){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual("interface")){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual("enum")){e.exportKind="value";const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(...arguments)||!(!this.isContextual("type")||this.lookahead().type!==s.star)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){const t=this.state.start,n=super.maybeParseExportNamespaceSpecifier(e);return n&&"type"===e.exportKind&&this.unexpected(t),n}parseClassId(e,t,n){super.parseClassId(e,t,n),this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);return 123===e&&124===t?this.finishOp(s.braceBarL,2):!this.state.inType||62!==e&&60!==e?function(e,t){return 64===e&&64===t}(e,t)?(this.state.isIterator=!0,super.readWord()):super.getTokenFromCode(e):this.finishOp(s.relational,1)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":return!0;case"ObjectExpression":{const t=e.properties.length-1;return e.properties.every((e,n)=>"ObjectMethod"!==e.type&&(n===t||"SpreadElement"===e.type)&&this.isAssignable(e))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(e=>this.isAssignable(e));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":case"TypeCastExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toAssignable(e,t,n){return"TypeCastExpression"===e.type?super.toAssignable(this.typeCastToParameter(e),t,n):super.toAssignable(e,t,n)}toAssignableList(e,t,n,r){for(let t=0;t1)&&t||this.raise(r.typeAnnotation.start,"The type cast expression is expected to be wrapped with parenthesis")}return e}checkLVal(e,t=64,n,r){if("TypeCastExpression"!==e.type)return super.checkLVal(e,t,n,r)}parseClassProperty(e){return this.match(s.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(s.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(s.colon)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(s.colon)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,n,r,i,a){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,n,r,i,a)}pushClassPrivateMethod(e,t,n,r){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,n,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();const t=e.implements=[];do{const e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(s.comma))}}parsePropertyName(e){const t=this.flowParseVariance(),n=super.parsePropertyName(e);return e.variance=t,n}parseObjPropValue(e,t,n,r,i,a,o,u){let c;e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(c=this.flowParseTypeParameterDeclaration(),this.match(s.parenL)||this.unexpected()),super.parseObjPropValue(e,t,n,r,i,a,o,u),c&&((e.value||e).typeParameters=c)}parseAssignableListItemTypes(e){return this.eat(s.question)&&("Identifier"!==e.type&&this.raise(e.start,"A binding pattern parameter cannot be optional in an implementation signature."),e.optional=!0),this.match(s.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.resetEndLocation(e),e}parseMaybeDefault(e,t,n){const r=super.parseMaybeDefault(e,t,n);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.startsuper.parseMaybeAssign(e,t,n,r),a),!i.error)return i.node;const{context:o}=this.state;o[o.length-1]===v.j_oTag?o.length-=2:o[o.length-1]===v.j_expr&&(o.length-=1)}if(i&&i.error||this.isRelational("<")){let o;a=a||this.state.clone();const s=this.tryParse(()=>{o=this.flowParseTypeParameterDeclaration();const i=this.forwardNoArrowParamsConversionAt(o,()=>super.parseMaybeAssign(e,t,n,r));return i.typeParameters=o,this.resetStartLocationFromNode(i,o),i},a),u=s.node&&"ArrowFunctionExpression"===s.node.type?s.node:null;if(!s.error&&u)return u;if(i&&i.node)return this.state=i.failState,i.node;if(u)return this.state=s.failState,u;if(i&&i.thrown)throw i.error;if(s.thrown)throw s.error;throw this.raise(o.start,"Expected an arrow function after this type parameter declaration")}return super.parseMaybeAssign(e,t,n,r)}parseArrow(e){if(this.match(s.colon)){const t=this.tryParse(()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(s.arrow)||this.unexpected(),n});if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(){return this.match(s.colon)||super.shouldParseArrow()}setArrowFunctionParameters(e,t){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,n){if(!n||-1===this.state.noArrowParamsConversionAt.indexOf(e.start))return super.checkParams(...arguments)}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(e,t,n,r){if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(t)){this.next();const r=this.startNodeAt(t,n);r.callee=e,r.arguments=this.parseCallExpressionArguments(s.parenR,!1),e=this.finishNode(r,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.isRelational("<")){const i=this.state.clone(),a=this.tryParse(e=>this.parseAsyncArrowWithTypeParameters(t,n)||e(),i);if(!a.error&&!a.aborted)return a.node;const o=this.tryParse(()=>super.parseSubscripts(e,t,n,r),i);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,t,n,r)}parseSubscript(e,t,n,r,i){if(this.match(s.questionDot)&&this.isLookaheadRelational("<")){if(this.expectPlugin("optionalChaining"),i.optionalChainMember=!0,r)return i.stop=!0,e;this.next();const a=this.startNodeAt(t,n);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(s.parenL),a.arguments=this.parseCallExpressionArguments(s.parenR,!1),a.optional=!0,this.finishCallExpression(a,!0)}if(!r&&this.shouldParseTypes()&&this.isRelational("<")){const r=this.startNodeAt(t,n);r.callee=e;const a=this.tryParse(()=>(r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(s.parenL),r.arguments=this.parseCallExpressionArguments(s.parenR,!1),i.optionalChainMember&&(r.optional=!1),this.finishCallExpression(r,i.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(e,t,n,r,i)}parseNewArguments(e){let t=null;this.shouldParseTypes()&&this.isRelational("<")&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t,super.parseNewArguments(e)}parseAsyncArrowWithTypeParameters(e,t){const n=this.startNodeAt(e,t);if(this.parseFunctionParams(n),this.parseArrow(n))return this.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(s.braceBarR,2)}parseTopLevel(e,t){const n=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(this.state.pos,"Unterminated flow-comment"),n}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment())return this.state.hasFlowComment&&this.unexpected(null,"Cannot have a flow comment inside another flow comment"),this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0);if(this.state.hasFlowComment){const e=this.input.indexOf("*-/",this.state.pos+=2);if(-1===e)throw this.raise(this.state.pos-2,"Unterminated comment");this.state.pos=e+3}else super.skipBlockComment()}skipFlowComment(){const{pos:e}=this.state;let t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;const n=this.input.charCodeAt(t+e),r=this.input.charCodeAt(t+e+1);return 58===n&&58===r?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===n&&58!==r&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(this.state.pos,"Unterminated comment")}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:n}){this.raise(e,`Boolean enum members need to be initialized. Use either \`${n} = true,\` `+`or \`${n} = false,\` in enum \`${t}\`.`)}flowEnumErrorInvalidMemberName(e,{enumName:t,memberName:n}){const r=n[0].toUpperCase()+n.slice(1);this.raise(e,"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using "+`\`${n}\`, consider using \`${r}\`, in enum \`${t}\`.`)}flowEnumErrorDuplicateMemberName(e,{enumName:t,memberName:n}){this.raise(e,`Enum member names need to be unique, but the name \`${n}\` has already been used `+`before in enum \`${t}\`.`)}flowEnumErrorInconsistentMemberValues(e,{enumName:t}){this.raise(e,`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or `+"consistently use literals (either booleans, numbers, or strings) for all member initializers.")}flowEnumErrorInvalidExplicitType(e,{enumName:t,suppliedType:n}){const r="Use one of `boolean`, `number`, `string`, or `symbol` in "+`enum \`${t}\`.`,i=null===n?`Supplied enum type is not valid. ${r}`:`Enum type \`${n}\` is not valid. ${r}`;return this.raise(e,i)}flowEnumErrorInvalidMemberInitializer(e,{enumName:t,explicitType:n,memberName:r}){let i=null;switch(n){case"boolean":case"number":case"string":i=`Enum \`${t}\` has type \`${n}\`, so the initializer of `+`\`${r}\` needs to be a ${n} literal.`;break;case"symbol":i=`Symbol enum members cannot be initialized. Use \`${r},\` in `+`enum \`${t}\`.`;break;default:i=`The enum member initializer for \`${r}\` needs to be a literal (either `+`a boolean, number, or string) in enum \`${t}\`.`}return this.raise(e,i)}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:n}){this.raise(e,`Number enum members need to be initialized, e.g. \`${n} = 1\` in enum \`${t}\`.`)}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(e,"String enum members need to consistently either all use initializers, or use no initializers, "+`in enum \`${t}\`.`)}flowEnumMemberInit(){const e=this.state.start,t=()=>this.match(s.comma)||this.match(s.braceR);switch(this.state.type){case s.num:{const n=this.parseLiteral(this.state.value,"NumericLiteral");return t()?{type:"number",pos:n.start,value:n}:{type:"invalid",pos:e}}case s.string:{const n=this.parseLiteral(this.state.value,"StringLiteral");return t()?{type:"string",pos:n.start,value:n}:{type:"invalid",pos:e}}case s._true:case s._false:{const n=this.parseBooleanLiteral();return t()?{type:"boolean",pos:n.start,value:n}:{type:"invalid",pos:e}}default:return{type:"invalid",pos:e}}}flowEnumMemberRaw(){const e=this.state.start;return{id:this.parseIdentifier(!0),init:this.eat(s.eq)?this.flowEnumMemberInit():{type:"none",pos:e}}}flowEnumCheckExplicitTypeMismatch(e,t,n){const{explicitType:r}=t;null!==r&&r!==n&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){const n=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};for(;!this.match(s.braceR);){const i=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),u=a.name;if(""===u)continue;/^[a-z]/.test(u)&&this.flowEnumErrorInvalidMemberName(a.start,{enumName:e,memberName:u}),n.has(u)&&this.flowEnumErrorDuplicateMemberName(a.start,{enumName:e,memberName:u}),n.add(u);const c={enumName:e,explicitType:t,memberName:u};switch(i.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.pos,c,"boolean"),i.init=o.value,r.booleanMembers.push(this.finishNode(i,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.pos,c,"number"),i.init=o.value,r.numberMembers.push(this.finishNode(i,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.pos,c,"string"),i.init=o.value,r.stringMembers.push(this.finishNode(i,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.pos,c);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.pos,c);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.pos,c);break;default:r.defaultedMembers.push(this.finishNode(i,"EnumDefaultedMember"))}}this.match(s.braceR)||this.expect(s.comma)}return r}flowEnumStringMembers(e,t,{enumName:n}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(let t=0;t(e.members=[],this.expect(s.braceR),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const a=i.booleanMembers.length,o=i.numberMembers.length,u=i.stringMembers.length,c=i.defaultedMembers.length;if(a||o||u||c){if(a||o){if(!o&&!u&&a>=c){for(let e=0,n=i.defaultedMembers;e=c){for(let e=0,n=i.defaultedMembers;eclass extends e{getScopeHandler(){return W}tsIsIdentifier(){return this.match(s.name)}tsNextTokenCanFollowModifier(){return this.next(),!(this.hasPrecedingLineBreak()||this.match(s.parenL)||this.match(s.parenR)||this.match(s.colon)||this.match(s.eq)||this.match(s.question)||this.match(s.bang))}tsParseModifier(e){if(!this.match(s.name))return;const t=this.state.value;return-1!==e.indexOf(t)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?t:void 0}tsParseModifiers(e){const t=Object.create(null);for(;;){const n=this.state.start,r=this.tsParseModifier(e);if(!r)break;Object.hasOwnProperty.call(t,r)&&this.raise(n,`Duplicate modifier: '${r}'`),t[r]=!0}return t}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(s.braceR);case"HeritageClauseElement":return this.match(s.braceL);case"TupleElementTypes":return this.match(s.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")}tsParseList(e,t){const n=[];for(;!this.tsIsListTerminator(e);)n.push(t());return n}tsParseDelimitedList(e,t){return K(this.tsParseDelimitedListWorker(e,t,!0))}tsParseDelimitedListWorker(e,t,n){const r=[];for(;!this.tsIsListTerminator(e);){const i=t();if(null==i)return;if(r.push(i),!this.eat(s.comma)){if(this.tsIsListTerminator(e))break;return void(n&&this.expect(s.comma))}}return r}tsParseBracketedList(e,t,n,r){r||(n?this.expect(s.bracketL):this.expectRelational("<"));const i=this.tsParseDelimitedList(e,t);return n?this.expect(s.bracketR):this.expectRelational(">"),i}tsParseImportType(){const e=this.startNode();return this.expect(s._import),this.expect(s.parenL),this.match(s.string)||this.raise(this.state.start,"Argument in a type import must be a string literal"),e.argument=this.parseExprAtom(),this.expect(s.parenR),this.eat(s.dot)&&(e.qualifier=this.tsParseEntityName(!0)),this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e){let t=this.parseIdentifier();for(;this.eat(s.dot);){const n=this.startNodeAtNode(t);n.left=t,n.right=this.parseIdentifier(e),t=this.finishNode(n,"TSQualifiedName")}return t}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(s._typeof),this.match(s._import)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(!0),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(){const e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsEatThenParseType(s._extends),e.default=this.tsEatThenParseType(s.eq),this.finishNode(e,"TSTypeParameter")}tsTryParseTypeParameters(){if(this.isRelational("<"))return this.tsParseTypeParameters()}tsParseTypeParameters(){const e=this.startNode();return this.isRelational("<")||this.match(s.jsxTagStart)?this.next():this.unexpected(),e.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(e,"TSTypeParameterDeclaration")}tsTryNextParseConstantContext(){return this.lookahead().type===s._const?(this.next(),this.tsParseTypeReference()):null}tsFillSignature(e,t){const n=e===s.arrow;t.typeParameters=this.tsTryParseTypeParameters(),this.expect(s.parenL),t.parameters=this.tsParseBindingListForSignature(),n?t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){return this.parseBindingList(s.parenR,41).map(e=>("Identifier"!==e.type&&"RestElement"!==e.type&&"ObjectPattern"!==e.type&&"ArrayPattern"!==e.type&&this.raise(e.start,"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern,"+`instead got ${e.type}`),e))}tsParseTypeMemberSemicolon(){this.eat(s.comma)||this.semicolon()}tsParseSignatureMember(e,t){return this.tsFillSignature(s.colon,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),this.eat(s.name)&&this.match(s.colon)}tsTryParseIndexSignature(e){if(!this.match(s.bracketL)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(s.bracketL);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(s.bracketR),e.parameters=[t];const n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(s.question)&&(e.optional=!0);const n=e;if(t||!this.match(s.parenL)&&!this.isRelational("<")){const e=n;t&&(e.readonly=!0);const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSPropertySignature")}{const e=n;return this.tsFillSignature(s.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSMethodSignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(s.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(s._new)){const t=this.startNode();return this.next(),this.match(s.parenL)||this.isRelational("<")?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}const t=!!this.tsParseModifier(["readonly"]),n=this.tsTryParseIndexSignature(e);return n?(t&&(e.readonly=!0),n):(this.parsePropertyName(e),this.tsParsePropertyOrMethodSignature(e,t))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(s.braceL);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(s.braceR),e}tsIsStartOfMappedType(){return this.next(),this.eat(s.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(s.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(s._in))))}tsParseMappedTypeParameter(){const e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsExpectThenParseType(s._in),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){const e=this.startNode();return this.expect(s.braceL),this.match(s.plusMin)?(e.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(e.readonly=!0),this.expect(s.bracketL),e.typeParameter=this.tsParseMappedTypeParameter(),this.expect(s.bracketR),this.match(s.plusMin)?(e.optional=this.state.value,this.next(),this.expect(s.question)):this.eat(s.question)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(s.braceR),this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(e=>{"TSOptionalType"===e.type?t=!0:t&&"TSRestType"!==e.type&&this.raise(e.start,"A required element cannot follow an optional element.")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){if(this.match(s.ellipsis)){const e=this.startNode();return this.next(),e.typeAnnotation=this.tsParseType(),this.match(s.comma)&&93!==this.lookaheadCharCode()&&this.raiseRestNotLast(this.state.start),this.finishNode(e,"TSRestType")}const e=this.tsParseType();if(this.eat(s.question)){const t=this.startNodeAtNode(e);return t.typeAnnotation=e,this.finishNode(t,"TSOptionalType")}return e}tsParseParenthesizedType(){const e=this.startNode();return this.expect(s.parenL),e.typeAnnotation=this.tsParseType(),this.expect(s.parenR),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e){const t=this.startNode();return"TSConstructorType"===e&&this.expect(s._new),this.tsFillSignature(s.arrow,t),this.finishNode(t,e)}tsParseLiteralTypeNode(){const e=this.startNode();return e.literal=(()=>{switch(this.state.type){case s.num:case s.string:case s._true:case s._false:return this.parseExprAtom();default:throw this.unexpected()}})(),this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){const e=this.startNode(),t=this.parseTemplate(!1);return t.expressions.length>0&&this.raise(t.expressions[0].start,"Template literal types cannot have any substitution"),e.literal=t,this.finishNode(e,"TSLiteralType")}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case s.name:case s._void:case s._null:{const e=this.match(s._void)?"TSVoidKeyword":this.match(s._null)?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==e&&46!==this.lookaheadCharCode()){const t=this.startNode();return this.next(),this.finishNode(t,e)}return this.tsParseTypeReference()}case s.string:case s.num:case s._true:case s._false:return this.tsParseLiteralTypeNode();case s.plusMin:if("-"===this.state.value){const e=this.startNode();if(this.lookahead().type!==s.num)throw this.unexpected();return e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case s._this:return this.tsParseThisTypeOrThisTypePredicate();case s._typeof:return this.tsParseTypeQuery();case s._import:return this.tsParseImportType();case s.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case s.bracketL:return this.tsParseTupleType();case s.parenL:return this.tsParseParenthesizedType();case s.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(s.bracketL);)if(this.match(s.bracketR)){const t=this.startNodeAtNode(e);t.elementType=e,this.expect(s.bracketR),e=this.finishNode(t,"TSArrayType")}else{const t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(s.bracketR),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(e){const t=this.startNode();return this.expectContextual(e),t.operator=e,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===e&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(e.start,"'readonly' type modifier is only permitted on array and tuple literal types.")}}tsParseInferType(){const e=this.startNode();this.expectContextual("infer");const t=this.startNode();return t.name=this.parseIdentifierName(t.start),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseTypeOperatorOrHigher(){const e=["keyof","unique","readonly"].find(e=>this.isContextual(e));return e?this.tsParseTypeOperator(e):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}tsParseUnionOrIntersectionType(e,t,n){this.eat(n);let r=t();if(this.match(n)){const i=[r];for(;this.eat(n);)i.push(t());const a=this.startNodeAtNode(r);a.types=i,r=this.finishNode(a,e)}return r}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),s.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),s.bitwiseOR)}tsIsStartOfFunctionType(){return!!this.isRelational("<")||this.match(s.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(this.match(s.name)||this.match(s._this))return this.next(),!0;if(this.match(s.braceL)){let e=1;for(this.next();e>0;)this.match(s.braceL)?++e:this.match(s.braceR)&&--e,this.next();return!0}if(this.match(s.bracketL)){let e=1;for(this.next();e>0;)this.match(s.bracketL)?++e:this.match(s.bracketR)&&--e,this.next();return!0}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(s.parenR)||this.match(s.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(s.colon)||this.match(s.comma)||this.match(s.question)||this.match(s.eq))return!0;if(this.match(s.parenR)&&(this.next(),this.match(s.arrow)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{const t=this.startNode();this.expect(e);const n=this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(s._this)){let e=this.tsParseThisTypeOrThisTypePredicate();if("TSThisType"===e.type){const n=this.startNodeAtNode(t);n.parameterName=e,n.asserts=!0,e=this.finishNode(n,"TSTypePredicate")}else e.asserts=!0;return t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}const r=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!r){if(!n)return this.tsParseTypeAnnotation(!1,t);const e=this.startNodeAtNode(t);return e.parameterName=this.parseIdentifier(),e.asserts=n,t.typeAnnotation=this.finishNode(e,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}const i=this.tsParseTypeAnnotation(!1),a=this.startNodeAtNode(t);return a.parameterName=r,a.typeAnnotation=i,a.asserts=n,t.typeAnnotation=this.finishNode(a,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(s.colon)?this.tsParseTypeOrTypePredicateAnnotation(s.colon):void 0}tsTryParseTypeAnnotation(){return this.match(s.colon)?this.tsParseTypeAnnotation():void 0}tsTryParseType(){return this.tsEatThenParseType(s.colon)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(!this.match(s.name)||"asserts"!==this.state.value||this.hasPrecedingLineBreak())return!1;const e=this.state.containsEsc;return this.next(),!(!this.match(s.name)&&!this.match(s._this))&&(e&&this.raise(this.state.lastTokStart,"Escape sequence in keyword asserts"),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType(()=>{e&&this.expect(s.colon),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){X(this.state.inType);const e=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(s._extends))return e;const t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsParseNonConditionalType(),this.expect(s.question),t.trueType=this.tsParseType(),this.expect(s.colon),t.falseType=this.tsParseType(),this.finishNode(t,"TSConditionalType")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(s._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){const e=this.startNode(),t=this.tsTryNextParseConstantContext();return e.typeAnnotation=t||this.tsNextThenParseType(),this.expectRelational(">"),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const t=this.state.start,n=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return n.length||this.raise(t,`'${e}' list cannot be empty.`),n}tsParseExpressionWithTypeArguments(){const e=this.startNode();return e.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}tsParseInterfaceDeclaration(e){e.id=this.parseIdentifier(),this.checkLVal(e.id,130,void 0,"typescript interface declaration"),e.typeParameters=this.tsTryParseTypeParameters(),this.eat(s._extends)&&(e.extends=this.tsParseHeritageClause("extends"));const t=this.startNode();return t.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(t,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkLVal(e.id,2,void 0,"typescript type alias"),e.typeParameters=this.tsTryParseTypeParameters(),e.typeAnnotation=this.tsExpectThenParseType(s.eq),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){const t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsEatThenParseType(e){return this.match(e)?this.tsNextThenParseType():void 0}tsExpectThenParseType(e){return this.tsDoThenParseType(()=>this.expect(e))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(e){return this.tsInType(()=>(e(),this.tsParseType()))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(s.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(s.eq)&&(e.initializer=this.parseMaybeAssign()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t){return t&&(e.const=!0),e.id=this.parseIdentifier(),this.checkLVal(e.id,t?779:267,void 0,"typescript enum declaration"),this.expect(s.braceL),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(s.braceR),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(s.braceL),this.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,s.braceR),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkLVal(e.id,1024,null,"module or namespace declaration"),this.eat(s.dot)){const t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(512),e.body=this.tsParseModuleBlock(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual("global")?(e.global=!0,e.id=this.parseIdentifier()):this.match(s.string)?e.id=this.parseExprAtom():this.unexpected(),this.match(s.braceL)?(this.scope.enter(512),e.body=this.tsParseModuleBlock(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t){return e.isExport=t||!1,e.id=this.parseIdentifier(),this.checkLVal(e.id,9,void 0,"import equals declaration"),this.expect(s.eq),e.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual("require")&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const e=this.startNode();if(this.expectContextual("require"),this.expect(s.parenL),!this.match(s.string))throw this.unexpected();return e.expression=this.parseExprAtom(),this.expect(s.parenR),this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const t=this.state.clone(),n=e();return this.state=t,n}tsTryParseAndCatch(e){const t=this.tryParse(t=>e()||t());if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){const t=this.state.clone(),n=e();return void 0!==n&&!1!==n?n:void(this.state=t)}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t,n=this.state.type;switch(this.isContextual("let")&&(n=s._var,t="let"),n){case s._function:return this.parseFunctionStatement(e,!1,!0);case s._class:return e.declare=!0,this.parseClass(e,!0,!1);case s._const:if(this.match(s._const)&&this.isLookaheadContextual("enum"))return this.expect(s._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(e,!0);case s._var:return t=t||this.state.value,this.parseVarStatement(e,t);case s.name:{const t=this.state.value;return"global"===t?this.tsParseAmbientExternalModuleDeclaration(e):this.tsParseDeclaration(e,t,!0)}}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}tsParseExpressionStatement(e,t){switch(t.name){case"declare":{const t=this.tsTryParseDeclare(e);if(t)return t.declare=!0,t;break}case"global":if(this.match(s.braceL)){this.scope.enter(512);const n=e;return n.global=!0,n.id=t,n.body=this.tsParseModuleBlock(),this.scope.exit(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1)}}tsParseDeclaration(e,t,n){switch(t){case"abstract":if(this.tsCheckLineTerminatorAndMatch(s._class,n)){const t=e;return t.abstract=!0,n&&(this.next(),this.match(s._class)||this.unexpected(null,s._class)),this.parseClass(t,!0,!1)}break;case"enum":if(n||this.match(s.name))return n&&this.next(),this.tsParseEnumDeclaration(e,!1);break;case"interface":if(this.tsCheckLineTerminatorAndMatch(s.name,n))return n&&this.next(),this.tsParseInterfaceDeclaration(e);break;case"module":if(n&&this.next(),this.match(s.string))return this.tsParseAmbientExternalModuleDeclaration(e);if(this.tsCheckLineTerminatorAndMatch(s.name,n))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"namespace":if(this.tsCheckLineTerminatorAndMatch(s.name,n))return n&&this.next(),this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminatorAndMatch(s.name,n))return n&&this.next(),this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminatorAndMatch(e,t){return(t||this.match(e))&&!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e,t){if(!this.isRelational("<"))return;const n=this.tsTryParseAndCatch(()=>{const n=this.startNodeAt(e,t);return n.typeParameters=this.tsParseTypeParameters(),super.parseFunctionParams(n),n.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(s.arrow),n});return n?this.parseArrowExpression(n,null,!0):void 0}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expectRelational("<"),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){if(this.match(s.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){const n=this.state.start,r=this.state.startLoc;let i,a=!1;e&&(i=this.parseAccessModifier(),a=!!this.tsParseModifier(["readonly"]));const o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o);const s=this.parseMaybeDefault(o.start,o.loc.start,o);if(i||a){const e=this.startNodeAt(n,r);return t.length&&(e.decorators=t),i&&(e.accessibility=i),a&&(e.readonly=a),"Identifier"!==s.type&&"AssignmentPattern"!==s.type&&this.raise(e.start,"A parameter property may not be declared using a binding pattern."),e.parameter=s,this.finishNode(e,"TSParameterProperty")}return t.length&&(o.decorators=t),s}parseFunctionBodyAndFinish(e,t,n=!1){this.match(s.colon)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(s.colon));const r="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t?"TSDeclareMethod":void 0;r&&!this.match(s.braceL)&&this.isLineTerminator()?this.finishNode(e,r):super.parseFunctionBodyAndFinish(e,t,n)}registerFunctionStatementId(e){!e.body&&e.id?this.checkLVal(e.id,1024,null,"function name"):super.registerFunctionStatementId(...arguments)}parseSubscript(e,t,n,r,i){if(!this.hasPrecedingLineBreak()&&this.match(s.bang)){this.state.exprAllowed=!1,this.next();const r=this.startNodeAt(t,n);return r.expression=e,this.finishNode(r,"TSNonNullExpression")}if(this.isRelational("<")){const a=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsync(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t,n);if(e)return e}const a=this.startNodeAt(t,n);a.callee=e;const o=this.tsParseTypeArguments();if(o){if(!r&&this.eat(s.parenL))return a.arguments=this.parseCallExpressionArguments(s.parenR,!1),a.typeParameters=o,this.finishCallExpression(a,i.optionalChainMember);if(this.match(s.backQuote))return this.parseTaggedTemplateExpression(t,n,e,i,o)}this.unexpected()});if(a)return a}return super.parseSubscript(e,t,n,r,i)}parseNewArguments(e){if(this.isRelational("<")){const t=this.tsTryParseAndCatch(()=>{const e=this.tsParseTypeArguments();return this.match(s.parenL)||this.unexpected(),e});t&&(e.typeParameters=t)}super.parseNewArguments(e)}parseExprOp(e,t,n,r,i){if(K(s._in.binop)>r&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){const a=this.startNodeAt(t,n);a.expression=e;const o=this.tsTryNextParseConstantContext();return a.typeAnnotation=o||this.tsNextThenParseType(),this.finishNode(a,"TSAsExpression"),this.parseExprOp(a,t,n,r,i)}return super.parseExprOp(e,t,n,r,i)}checkReservedWord(e,t,n,r){}checkDuplicateExports(){}parseImport(e){return this.match(s.name)&&this.lookahead().type===s.eq?this.tsParseImportEqualsDeclaration(e):super.parseImport(e)}parseExport(e){if(this.match(s._import))return this.expect(s._import),this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(s.eq)){const t=e;return t.expression=this.parseExpression(),this.semicolon(),this.finishNode(t,"TSExportAssignment")}if(this.eatContextual("as")){const t=e;return this.expectContextual("namespace"),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}return super.parseExport(e)}isAbstractClass(){return this.isContextual("abstract")&&this.lookahead().type===s._class}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),this.parseClass(e,!0,!0),e.abstract=!0,e}if("interface"===this.state.value){const e=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(e)return e}return super.parseExportDefaultExpression()}parseStatementContent(e,t){if(this.state.type===s._const){const e=this.lookahead();if(e.type===s.name&&"enum"===e.value){const e=this.startNode();return this.expect(s._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(e,!0)}}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parseClassMember(e,t,n,r){const i=this.parseAccessModifier();i&&(t.accessibility=i),super.parseClassMember(e,t,n,r)}parseClassMemberWithIsStatic(e,t,n,r,i){const a=this.tsParseModifiers(["abstract","readonly","declare"]);Object.assign(t,a);const o=this.tsTryParseIndexSignature(t);if(o)return e.body.push(o),a.abstract&&this.raise(t.start,"Index signatures cannot have the 'abstract' modifier"),r&&this.raise(t.start,"Index signatures cannot have the 'static' modifier"),void(t.accessibility&&this.raise(t.start,`Index signatures cannot have an accessibility modifier ('${t.accessibility}')`));super.parseClassMemberWithIsStatic(e,t,n,r,i)}parsePostMemberNameModifiers(e){this.eat(s.question)&&(e.optional=!0),e.readonly&&this.match(s.parenL)&&this.raise(e.start,"Class methods cannot have the 'readonly' modifier"),e.declare&&this.match(s.parenL)&&this.raise(e.start,"Class methods cannot have the 'declare' modifier")}parseExpressionStatement(e,t){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t):void 0)||super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,n,r,i){if(!i||!this.match(s.question))return super.parseConditional(e,t,n,r,i);const a=this.tryParse(()=>super.parseConditional(e,t,n,r));return a.node?(a.error&&(this.state=a.failState),a.node):(i.start=a.error.pos||this.state.start,e)}parseParenItem(e,t,n){if(e=super.parseParenItem(e,t,n),this.eat(s.question)&&(e.optional=!0,this.resetEndLocation(e)),this.match(s.colon)){const r=this.startNodeAt(t,n);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){const t=this.state.start,n=this.state.startLoc,r=this.eatContextual("declare");let i;return this.match(s.name)&&(i=this.tsTryParseExportDeclaration()),i||(i=super.parseExportDeclaration(e)),i&&r&&(this.resetStartLocation(i,t,n),i.declare=!0),i}parseClassId(e,t,n){if((!t||n)&&this.isContextual("implements"))return;super.parseClassId(e,t,n,e.declare?1024:139);const r=this.tsTryParseTypeParameters();r&&(e.typeParameters=r)}parseClassPropertyAnnotation(e){!e.optional&&this.eat(s.bang)&&(e.definite=!0);const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){return this.parseClassPropertyAnnotation(e),e.declare&&this.match(s.equal)&&this.raise(this.state.start,"'declare' class fields cannot have an initializer"),super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(e.start,"Private elements cannot have the 'abstract' modifier."),e.accessibility&&this.raise(e.start,`Private elements cannot have an accessibility modifier ('${e.accessibility}')`),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}pushClassMethod(e,t,n,r,i,a){const o=this.tsTryParseTypeParameters();o&&(t.typeParameters=o),super.pushClassMethod(e,t,n,r,i,a)}pushClassPrivateMethod(e,t,n,r){const i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i),super.pushClassPrivateMethod(e,t,n,r)}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,...t){const n=this.tsTryParseTypeParameters();n&&(e.typeParameters=n),super.parseObjPropValue(e,...t)}parseFunctionParams(e,t){const n=this.tsTryParseTypeParameters();n&&(e.typeParameters=n),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&this.eat(s.bang)&&(e.definite=!0);const n=this.tsTryParseTypeAnnotation();n&&(e.id.typeAnnotation=n,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(s.colon)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(...e){let t,n,r,i;if(this.match(s.jsxTagStart)){if(t=this.state.clone(),n=this.tryParse(()=>super.parseMaybeAssign(...e),t),!n.error)return n.node;const{context:r}=this.state;r[r.length-1]===v.j_oTag?r.length-=2:r[r.length-1]===v.j_expr&&(r.length-=1)}if(!(n&&n.error||this.isRelational("<")))return super.parseMaybeAssign(...e);t=t||this.state.clone();const a=this.tryParse(t=>{i=this.tsParseTypeParameters();const n=super.parseMaybeAssign(...e);return("ArrowFunctionExpression"!==n.type||n.extra&&n.extra.parenthesized)&&t(),i&&0!==i.params.length&&this.resetStartLocationFromNode(n,i),n.typeParameters=i,n},t);if(!a.error&&!a.aborted)return a.node;if(!n&&(X(!this.hasPlugin("jsx")),r=this.tryParse(()=>super.parseMaybeAssign(...e),t),!r.error))return r.node;if(n&&n.node)return this.state=n.failState,n.node;if(a.node)return this.state=a.failState,a.node;if(r&&r.node)return this.state=r.failState,r.node;if(n&&n.thrown)throw n.error;if(a.thrown)throw a.error;if(r&&r.thrown)throw r.error;throw n&&n.error||a.error||r&&r.error}parseMaybeUnary(e){return!this.hasPlugin("jsx")&&this.isRelational("<")?this.tsParseTypeAssertion():super.parseMaybeUnary(e)}parseArrow(e){if(this.match(s.colon)){const t=this.tryParse(e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(s.colon);return!this.canInsertSemicolon()&&this.match(s.arrow)||e(),t});if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e){this.eat(s.question)&&("Identifier"!==e.type&&this.raise(e.start,"A binding pattern parameter cannot be optional in an implementation signature."),e.optional=!0);const t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}toAssignable(e,t,n){switch(e.type){case"TSTypeCastExpression":return super.toAssignable(this.typeCastToParameter(e),t,n);case"TSParameterProperty":return super.toAssignable(e,t,n);case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return e.expression=this.toAssignable(e.expression,t,n),e;default:return super.toAssignable(e,t,n)}}checkLVal(e,t=64,n,r){switch(e.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(e.parameter,t,n,"parameter property");case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return void this.checkLVal(e.expression,t,n,r);default:return void super.checkLVal(e,t,n,r)}}parseBindingAtom(){switch(this.state.type){case s._this:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseMaybeDecoratorArguments(e){if(this.isRelational("<")){const t=this.tsParseTypeArguments();if(this.match(s.parenL)){const n=super.parseMaybeDecoratorArguments(e);return n.typeParameters=t,n}this.unexpected(this.state.start,s.parenL)}return super.parseMaybeDecoratorArguments(e)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(s.bang)||this.match(s.colon)||super.isClassProperty()}parseMaybeDefault(...e){const t=super.parseMaybeDefault(...e);return"AssignmentPattern"===t.type&&t.typeAnnotation&&t.right.startthis.tsParseTypeArguments());t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e),n=e.params[0];return n&&"Identifier"===n.type&&"this"===n.name?t+1:t}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(s.modulo)){const e=this.state.start,t=this.startNode();if(this.eat(s.modulo),this.match(s.name)){const e=this.parseIdentifierName(this.state.start),n=this.createIdentifier(t,e);if(n.type="V8IntrinsicIdentifier",this.match(s.parenL))return n}this.unexpected(e)}}parseExprAtom(){return this.parseV8Intrinsic()||super.parseExprAtom(...arguments)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(s.placeholder)){const t=this.startNode();return this.next(),this.assertNoSpace("Unexpected space in placeholder."),t.name=super.parseIdentifier(!0),this.assertNoSpace("Unexpected space in placeholder."),this.expect(s.placeholder),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){const n=!(!e.expectedNode||"Placeholder"!==e.type);return e.expectedNode=t,n?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){return 37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(s.placeholder,2):super.getTokenFromCode(...arguments)}parseExprAtom(){return this.parsePlaceholder("Expression")||super.parseExprAtom(...arguments)}parseIdentifier(){return this.parsePlaceholder("Identifier")||super.parseIdentifier(...arguments)}checkReservedWord(e){void 0!==e&&super.checkReservedWord(...arguments)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom(...arguments)}checkLVal(e){"Placeholder"!==e.type&&super.checkLVal(...arguments)}toAssignable(e){return e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?(e.expectedNode="Pattern",e):super.toAssignable(...arguments)}verifyBreakContinue(e){e.label&&"Placeholder"===e.label.type||super.verifyBreakContinue(...arguments)}parseExpressionStatement(e,t){if("Placeholder"!==t.type||t.extra&&t.extra.parenthesized)return super.parseExpressionStatement(...arguments);if(this.match(s.colon)){const n=e;return n.label=this.finishPlaceholder(t,"Identifier"),this.next(),n.body=this.parseStatement("label"),this.finishNode(n,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}parseBlock(){return this.parsePlaceholder("BlockStatement")||super.parseBlock(...arguments)}parseFunctionId(){return this.parsePlaceholder("Identifier")||super.parseFunctionId(...arguments)}parseClass(e,t,n){const r=t?"ClassDeclaration":"ClassExpression";this.next(),this.takeDecorators(e);const i=this.parsePlaceholder("Identifier");if(i)if(this.match(s._extends)||this.match(s.placeholder)||this.match(s.braceL))e.id=i;else{if(n||!t)return e.id=null,e.body=this.finishPlaceholder(i,"ClassBody"),this.finishNode(e,r);this.unexpected(null,"A class name is required")}else this.parseClassId(e,t,n);return this.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||this.parseClassBody(!!e.superClass),this.finishNode(e,r)}parseExport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseExport(...arguments);if(!this.isContextual("from")&&!this.match(s.comma))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(t,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const n=this.startNode();return n.exported=t,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(e)}maybeParseExportDefaultSpecifier(e){return!!(e.specifiers&&e.specifiers.length>0)||super.maybeParseExportDefaultSpecifier(...arguments)}checkExport(e){const{specifiers:t}=e;t&&t.length&&(e.specifiers=t.filter(e=>"Placeholder"===e.exported.type)),super.checkExport(e),e.specifiers=t}parseImport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(...arguments);if(e.specifiers=[],!this.isContextual("from")&&!this.match(s.comma))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const n=this.startNodeAtNode(t);if(n.local=t,this.finishNode(n,"ImportDefaultSpecifier"),e.specifiers.push(n),this.eat(s.comma)){this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)}return this.expectContextual("from"),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource(...arguments)}}},ee=Object.keys(Q),te={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1};class ne{constructor(e,t){this.line=e,this.column=t}}class re{constructor(e,t){this.start=e,this.end=t}}function ie(e){return e[e.length-1]}class ae{constructor(){this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.inParameters=!1,this.maybeInArrowParameters=!1,this.inPipeline=!1,this.inType=!1,this.noAnonFunctionType=!1,this.inPropertyName=!1,this.inClassProperty=!1,this.hasFlowComment=!1,this.isIterator=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.yieldPos=-1,this.awaitPos=-1,this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=0,this.lineStart=0,this.type=s.eof,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[v.braceStatement],this.exprAllowed=!0,this.containsEsc=!1,this.containsOctal=!1,this.octalPosition=null,this.exportedIdentifiers=[],this.invalidTemplateEscapePosition=null}init(e){this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.curLine=e.startLine,this.startLoc=this.endLoc=this.curPosition()}curPosition(){return new ne(this.curLine,this.pos-this.lineStart)}clone(e){const t=new ae,n=Object.keys(this);for(let r=0,i=n.length;r=48&&e<=57};const se=new Set(["g","m","s","i","y","u"]),ue={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},ce={bin:[48,49]};ce.oct=[...ce.bin,50,51,52,53,54,55],ce.dec=[...ce.oct,56,57],ce.hex=[...ce.dec,65,66,67,68,69,70,97,98,99,100,101,102];class le{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new re(e.startLoc,e.endLoc)}}const pe=/^('|")((?:\\?.)*?)\1/;class he{constructor(e,t,n){this.type="",this.start=t,this.end=0,this.loc=new re(n),e&&e.options.ranges&&(this.range=[t,0]),e&&e.filename&&(this.loc.filename=e.filename)}__clone(){const e=new he,t=Object.keys(this);for(let n=0,r=t.length;n"ParenthesizedExpression"===e.type?fe(e.expression):e;const de={kind:"loop"},ye={kind:"switch"};class ve extends class extends class extends class extends class extends class extends class extends class extends class extends class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){return this.plugins.has(e)}getPluginOption(e,t){if(this.hasPlugin(e))return this.plugins.get(e)[t]}}{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)}adjustCommentsAfterTrailingComma(e,t,n){if(0===this.state.leadingComments.length)return;let r=null,i=t.length;for(;null===r&&i>0;)r=t[--i];if(null===r)return;for(let e=0;e0?r.trailingComments=a:void 0!==r.trailingComments&&(r.trailingComments=[])}processComment(e){if("Program"===e.type&&e.body.length>0)return;const t=this.state.commentStack;let n,r,i,a,o;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(t.length>0){const n=ie(t);n.trailingComments&&n.trailingComments[0].start>=e.end&&(i=n.trailingComments,delete n.trailingComments)}for(t.length>0&&ie(t).start>=e.start&&(n=t.pop());t.length>0&&ie(t).start>=e.start;)r=t.pop();if(!r&&n&&(r=n),n)switch(e.type){case"ObjectExpression":this.adjustCommentsAfterTrailingComma(e,e.properties);break;case"ObjectPattern":this.adjustCommentsAfterTrailingComma(e,e.properties,!0);break;case"CallExpression":this.adjustCommentsAfterTrailingComma(e,e.arguments);break;case"ArrayExpression":this.adjustCommentsAfterTrailingComma(e,e.elements);break;case"ArrayPattern":this.adjustCommentsAfterTrailingComma(e,e.elements,!0)}else this.state.commentPreviousNode&&("ImportSpecifier"===this.state.commentPreviousNode.type&&"ImportSpecifier"!==e.type||"ExportSpecifier"===this.state.commentPreviousNode.type&&"ExportSpecifier"!==e.type)&&this.adjustCommentsAfterTrailingComma(e,[this.state.commentPreviousNode],!0);if(r){if(r.leadingComments)if(r!==e&&r.leadingComments.length>0&&ie(r.leadingComments).end<=e.start)e.leadingComments=r.leadingComments,delete r.leadingComments;else for(a=r.leadingComments.length-2;a>=0;--a)if(r.leadingComments[a].end<=e.start){e.leadingComments=r.leadingComments.splice(0,a+1);break}}else if(this.state.leadingComments.length>0)if(ie(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(o=0;o0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(a=0;ae.start);a++);const t=this.state.leadingComments.slice(0,a);t.length&&(e.leadingComments=t),i=this.state.leadingComments.slice(a),0===i.length&&(i=null)}this.state.commentPreviousNode=e,i&&(i.length&&i[0].start>=e.start&&ie(i).end<=e.end?e.innerComments=i:e.trailingComments=i),t.push(e)}}{getLocationForPosition(e){let t;return t=e===this.state.start?this.state.startLoc:e===this.state.lastTokStart?this.state.lastTokStartLoc:e===this.state.end?this.state.endLoc:e===this.state.lastTokEnd?this.state.lastTokEndLoc:function(e,t){let n,r=1,i=0;for(p.lastIndex=0;(n=p.exec(e))&&n.index=this.length?this.finishToken(s.eof):e.override?e.override(this):this.getTokenFromCode(this.input.codePointAt(this.state.pos))}pushComment(e,t,n,r,i,a){const o={type:e?"CommentBlock":"CommentLine",value:t,start:n,end:r,loc:new re(i,a)};this.options.tokens&&this.state.tokens.push(o),this.state.comments.push(o),this.addComment(o)}skipBlockComment(){const e=this.state.curPosition(),t=this.state.pos,n=this.input.indexOf("*/",this.state.pos+2);if(-1===n)throw this.raise(t,"Unterminated comment");let r;for(this.state.pos=n+2,p.lastIndex=t;(r=p.exec(this.input))&&r.index=48&&t<=57)throw this.raise(this.state.pos,"Unexpected digit after hash token");if((this.hasPlugin("classPrivateProperties")||this.hasPlugin("classPrivateMethods"))&&this.state.classLevel>0)return++this.state.pos,void this.finishToken(s.hash);if("smart"!==this.getPluginOption("pipelineOperator","proposal"))throw this.raise(this.state.pos,"Unexpected character '#'");this.finishOp(s.hash,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(s.ellipsis)):(++this.state.pos,this.finishToken(s.dot))}readToken_slash(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(s.assign,2):this.finishOp(s.slash,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;const e=this.state.pos;this.state.pos+=1;let t=this.input.charCodeAt(this.state.pos);if(33!==t)return!1;for(;!h(t)&&++this.state.pos=48&&t<=57?(++this.state.pos,this.finishToken(s.question)):(this.state.pos+=2,this.finishToken(s.questionDot)):61===t?this.finishOp(s.assign,3):this.finishOp(s.nullishCoalescing,2)}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(s.parenL);case 41:return++this.state.pos,void this.finishToken(s.parenR);case 59:return++this.state.pos,void this.finishToken(s.semi);case 44:return++this.state.pos,void this.finishToken(s.comma);case 91:return++this.state.pos,void this.finishToken(s.bracketL);case 93:return++this.state.pos,void this.finishToken(s.bracketR);case 123:return++this.state.pos,void this.finishToken(s.braceL);case 125:return++this.state.pos,void this.finishToken(s.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(s.doubleColon,2):(++this.state.pos,this.finishToken(s.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(s.backQuote);case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:case 62:return void this.readToken_lt_gt(e);case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(s.tilde,1);case 64:return++this.state.pos,void this.finishToken(s.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if($(e))return void this.readWord()}throw this.raise(this.state.pos,`Unexpected character '${String.fromCodePoint(e)}'`)}finishOp(e,t){const n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,n)}readRegexp(){const e=this.state.pos;let t,n;for(;;){if(this.state.pos>=this.length)throw this.raise(e,"Unterminated regular expression");const r=this.input.charAt(this.state.pos);if(l.test(r))throw this.raise(e,"Unterminated regular expression");if(t)t=!1;else{if("["===r)n=!0;else if("]"===r&&n)n=!1;else if("/"===r&&!n)break;t="\\"===r}++this.state.pos}const r=this.input.slice(e,this.state.pos);++this.state.pos;let i="";for(;this.state.pos-1&&this.raise(this.state.pos+1,"Duplicate regular expression flag");else{if(!M(t)&&92!==t)break;this.raise(this.state.pos+1,"Invalid regular expression flag")}++this.state.pos,i+=e}this.finishToken(s.regexp,{pattern:r,flags:i})}readInt(e,t,n,r=!0){const i=this.state.pos,a=16===e?ue.hex:ue.decBinOct,o=16===e?ce.hex:10===e?ce.dec:8===e?ce.oct:ce.bin;let s=!1,u=0;for(let i=0,c=null==t?1/0:t;i-1||a.indexOf(t)>-1||Number.isNaN(t))&&this.raise(this.state.pos,"A numeric separator is only allowed between two digits"),r||this.raise(this.state.pos,"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences"),++this.state.pos}else{if(c=t>=97?t-97+10:t>=65?t-65+10:oe(t)?t-48:1/0,c>=e)if(this.options.errorRecovery&&c<=9)c=0,this.raise(this.state.start+i+2,"Expected number in radix "+e);else{if(!n)break;c=0,s=!0}++this.state.pos,u=u*e+c}}return this.state.pos===i||null!=t&&this.state.pos-i!==t||s?null:u}readRadixNumber(e){const t=this.state.pos;let n=!1;this.state.pos+=2;const r=this.readInt(e);if(null==r&&this.raise(this.state.start+2,"Expected number in radix "+e),this.hasPlugin("bigInt")&&110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,n=!0),$(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,"Identifier directly after number");if(n){const e=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(s.bigint,e)}else this.finishToken(s.num,r)}readNumber(e){const t=this.state.pos;let n=!1,r=!1,i=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number");let a=this.state.pos-t>=2&&48===this.input.charCodeAt(t);a&&(this.state.strict&&this.raise(t,"Legacy octal literals are not allowed in strict mode"),/[89]/.test(this.input.slice(t,this.state.pos))&&(a=!1,i=!0));let o=this.input.charCodeAt(this.state.pos);if(46!==o||a||(++this.state.pos,this.readInt(10),n=!0,o=this.input.charCodeAt(this.state.pos)),69!==o&&101!==o||a||(o=this.input.charCodeAt(++this.state.pos),43!==o&&45!==o||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0,o=this.input.charCodeAt(this.state.pos)),this.hasPlugin("numericSeparator")&&(a||i)){const e=this.input.slice(t,this.state.pos).indexOf("_");e>0&&this.raise(e+t,"Numeric separator can not be used after leading 0")}if(this.hasPlugin("bigInt")&&110===o&&((n||a||i)&&this.raise(t,"Invalid BigIntLiteral"),++this.state.pos,r=!0),$(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,"Identifier directly after number");const u=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");if(r)return void this.finishToken(s.bigint,u);const c=a?parseInt(u,8):parseFloat(u);this.finishToken(s.num,c)}readCodePoint(e){let t;if(123===this.input.charCodeAt(this.state.pos)){const n=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,!0,e),++this.state.pos,null===t)--this.state.invalidTemplateEscapePosition;else if(t>1114111){if(!e)return this.state.invalidTemplateEscapePosition=n-2,null;this.raise(n,"Code point out of bounds")}}else t=this.readHexChar(4,!1,e);return t}readString(e){let t="",n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated string constant");const r=this.input.charCodeAt(this.state.pos);if(r===e)break;if(92===r)t+=this.input.slice(n,this.state.pos),t+=this.readEscapedChar(!1),n=this.state.pos;else if(8232===r||8233===r)++this.state.pos,++this.state.curLine;else{if(h(r))throw this.raise(this.state.start,"Unterminated string constant");++this.state.pos}}t+=this.input.slice(n,this.state.pos++),this.finishToken(s.string,t)}readTmplToken(){let e="",t=this.state.pos,n=!1;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated template");const r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(s.template)?36===r?(this.state.pos+=2,void this.finishToken(s.dollarBraceL)):(++this.state.pos,void this.finishToken(s.backQuote)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(s.template,n?null:e));if(92===r){e+=this.input.slice(t,this.state.pos);const r=this.readEscapedChar(!0);null===r?n=!0:e+=r,t=this.state.pos}else if(h(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}}readEscapedChar(e){const t=!e,n=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,n){case 110:return"\n";case 114:return"\r";case 120:{const e=this.readHexChar(2,!1,t);return null===e?null:String.fromCharCode(e)}case 117:{const e=this.readCodePoint(t);return null===e?null:String.fromCodePoint(e)}case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(e){const e=this.state.pos-1;return this.state.invalidTemplateEscapePosition=e,null}default:if(n>=48&&n<=55){const t=this.state.pos-1;let n=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),this.state.pos+=n.length-1;const i=this.input.charCodeAt(this.state.pos);if("0"!==n||56===i||57===i){if(e)return this.state.invalidTemplateEscapePosition=t,null;this.state.strict?this.raise(t,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=t)}return String.fromCharCode(r)}return String.fromCharCode(n)}}readHexChar(e,t,n){const r=this.state.pos,i=this.readInt(16,e,t,!1);return null===i&&(n?this.raise(r,"Bad character escape sequence"):(this.state.pos=r-1,this.state.invalidTemplateEscapePosition=r-1)),i}readWord1(){let e="";this.state.containsEsc=!1;const t=this.state.pos;let n=this.state.pos;for(;this.state.posthis.state.lastTokEnd&&this.raise(this.state.lastTokEnd,e)}unexpected(e,t="Unexpected token"){throw"string"!=typeof t&&(t=`Unexpected token, expected "${t.label}"`),this.raise(null!=e?e:this.state.start,t)}expectPlugin(e,t){if(!this.hasPlugin(e))throw this.raise(null!=t?t:this.state.start,`This experimental syntax requires enabling the parser plugin: '${e}'`,{missingPluginNames:[e]});return!0}expectOnePlugin(e,t){if(!e.some(e=>this.hasPlugin(e)))throw this.raise(null!=t?t:this.state.start,`This experimental syntax requires enabling one of the following parser plugin(s): '${e.join(", ")}'`,{missingPluginNames:e})}checkYieldAwaitInDefaultParams(){-1!==this.state.yieldPos&&(-1===this.state.awaitPos||this.state.yieldPos{throw n.node=e,n});if(this.state.errors.length>t.errors.length){const e=this.state;return this.state=t,{node:r,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const r=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:r};if(e===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:r};throw e}}}{startNode(){return new he(this,this.state.start,this.state.startLoc)}startNodeAt(e,t){return new he(this,e,t)}startNodeAtNode(e){return this.startNodeAt(e.start,e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)}finishNodeAt(e,t,n,r){return e.type=t,e.end=n,e.loc.end=r,this.options.ranges&&(e.range[1]=n),this.processComment(e),e}resetStartLocation(e,t,n){e.start=t,e.loc.start=n,this.options.ranges&&(e.range[0]=t)}resetEndLocation(e,t=this.state.lastTokEnd,n=this.state.lastTokEndLoc){e.end=t,e.loc.end=n,this.options.ranges&&(e.range[1]=t)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.start,t.loc.start)}}{toAssignable(e,t,n){var r;if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(let n=0,r=e.properties.length,a=r-1;n=n.left.start&&(t.start=0),this.checkLVal(u,void 0,void 0,"assignment expression");const o=fe(u);let c;return"ObjectPattern"===o.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===o.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&(u.extra&&u.extra.parenthesized||"ParenthesizedExpression"===u.type)&&this.raise(o.start,`You're trying to assign to a parenthesized expression, eg. instead of ${c}`),this.next(),n.right=this.parseMaybeAssign(e),this.finishNode(n,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u}parseMaybeConditional(e,t,n){const r=this.state.start,i=this.state.startLoc,a=this.state.potentialArrowAt,o=this.parseExprOps(e,t);return"ArrowFunctionExpression"===o.type&&o.start===a?o:t&&t.start?o:this.parseConditional(o,e,r,i,n)}parseConditional(e,t,n,r,i){if(this.eat(s.question)){const i=this.startNodeAt(n,r);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(s.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e}parseExprOps(e,t){const n=this.state.start,r=this.state.startLoc,i=this.state.potentialArrowAt,a=this.parseMaybeUnary(t);return"ArrowFunctionExpression"===a.type&&a.start===i?a:t&&t.start?a:this.parseExprOp(a,n,r,-1,e)}parseExprOp(e,t,n,r,i){const a=this.state.type.binop;if(!(null==a||i&&this.match(s._in))&&a>r){const o=this.state.value;if("|>"===o&&this.state.inFSharpPipelineDirectBody)return e;const u=this.startNodeAt(t,n);u.left=e,u.operator=o,"**"!==o||"UnaryExpression"!==e.type||!this.options.createParenthesizedExpressions&&e.extra&&e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");const c=this.state.type;if(c===s.pipeline?(this.expectPlugin("pipelineOperator"),this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(e,t)):c===s.nullishCoalescing&&this.expectPlugin("nullishCoalescingOperator"),this.next(),c===s.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(s.name)&&"await"===this.state.value&&this.scope.inAsync)throw this.raise(this.state.start,'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal');if(u.right=this.parseExprOpRightExpr(c,a,i),c===s.nullishCoalescing){if(!("LogicalExpression"!==e.type||"??"===e.operator||e.extra&&e.extra.parenthesized))throw this.raise(e.start,"Nullish coalescing operator(??) requires parens when mixing with logical operators");if(!("LogicalExpression"!==u.right.type||"??"===u.right.operator||u.right.extra&&u.right.extra.parenthesized))throw this.raise(u.right.start,"Nullish coalescing operator(??) requires parens when mixing with logical operators")}return this.finishNode(u,c===s.logicalOR||c===s.logicalAND||c===s.nullishCoalescing?"LogicalExpression":"BinaryExpression"),this.parseExprOp(u,t,n,r,i)}return e}parseExprOpRightExpr(e,t,n){const r=this.state.start,i=this.state.startLoc;switch(e){case s.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext(()=>this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(e,t,n),r,i));case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(t,n))}default:return this.parseExprOpBaseRightExpr(e,t,n)}}parseExprOpBaseRightExpr(e,t,n){const r=this.state.start,i=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),r,i,e.rightAssociative?t-1:t,n)}parseMaybeUnary(e){if(this.isContextual("await")&&this.isAwaitAllowed())return this.parseAwait();if(this.state.type.prefix){const t=this.startNode(),n=this.match(s.incDec);if(t.operator=this.state.value,t.prefix=!0,"throw"===t.operator&&this.expectPlugin("throwExpressions"),this.next(),t.argument=this.parseMaybeUnary(),e&&e.start&&this.unexpected(e.start),n)this.checkLVal(t.argument,void 0,void 0,"prefix operation");else if(this.state.strict&&"delete"===t.operator){const e=t.argument;"Identifier"===e.type?this.raise(t.start,"Deleting local variable in strict mode"):"MemberExpression"===e.type&&"PrivateName"===e.property.type&&this.raise(t.start,"Deleting a private field is not allowed")}return this.finishNode(t,n?"UpdateExpression":"UnaryExpression")}const t=this.state.start,n=this.state.startLoc;let r=this.parseExprSubscripts(e);if(e&&e.start)return r;for(;this.state.type.postfix&&!this.canInsertSemicolon();){const e=this.startNodeAt(t,n);e.operator=this.state.value,e.prefix=!1,e.argument=r,this.checkLVal(r,void 0,void 0,"postfix operation"),this.next(),r=this.finishNode(e,"UpdateExpression")}return r}parseExprSubscripts(e){const t=this.state.start,n=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===r?i:e&&e.start?i:this.parseSubscripts(i,t,n)}parseSubscripts(e,t,n,r){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsync(e),stop:!1};do{e=this.parseSubscript(e,t,n,r,i),i.maybeAsyncArrow=!1}while(!i.stop);return e}parseSubscript(e,t,n,r,i){if(!r&&this.eat(s.doubleColon)){const a=this.startNodeAt(t,n);return a.object=e,a.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),t,n,r)}if(this.match(s.questionDot)){if(this.expectPlugin("optionalChaining"),i.optionalChainMember=!0,r&&40===this.lookaheadCharCode())return i.stop=!0,e;this.next();const a=this.startNodeAt(t,n);return this.eat(s.bracketL)?(a.object=e,a.property=this.parseExpression(),a.computed=!0,a.optional=!0,this.expect(s.bracketR),this.finishNode(a,"OptionalMemberExpression")):this.eat(s.parenL)?(a.callee=e,a.arguments=this.parseCallExpressionArguments(s.parenR,!1),a.optional=!0,this.finishCallExpression(a,!0)):(a.object=e,a.property=this.parseIdentifier(!0),a.computed=!1,a.optional=!0,this.finishNode(a,"OptionalMemberExpression"))}if(this.eat(s.dot)){const r=this.startNodeAt(t,n);return r.object=e,r.property=this.parseMaybePrivateName(),r.computed=!1,"PrivateName"===r.property.type&&"Super"===r.object.type&&this.raise(t,"Private fields can't be accessed on super"),i.optionalChainMember?(r.optional=!1,this.finishNode(r,"OptionalMemberExpression")):this.finishNode(r,"MemberExpression")}if(this.eat(s.bracketL)){const r=this.startNodeAt(t,n);return r.object=e,r.property=this.parseExpression(),r.computed=!0,this.expect(s.bracketR),i.optionalChainMember?(r.optional=!1,this.finishNode(r,"OptionalMemberExpression")):this.finishNode(r,"MemberExpression")}if(!r&&this.match(s.parenL)){const r=this.state.maybeInArrowParameters,a=this.state.yieldPos,o=this.state.awaitPos;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.next();let u=this.startNodeAt(t,n);return u.callee=e,u.arguments=this.parseCallExpressionArguments(s.parenR,i.maybeAsyncArrow,"Import"===e.type,"Super"!==e.type,u),this.finishCallExpression(u,i.optionalChainMember),i.maybeAsyncArrow&&this.shouldParseAsyncArrow()?(i.stop=!0,u=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,n),u),this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=a,this.state.awaitPos=o):(this.toReferencedListDeep(u.arguments),-1!==a&&(this.state.yieldPos=a),(this.isAwaitAllowed()||r)&&-1===o||(this.state.awaitPos=o)),this.state.maybeInArrowParameters=r,u}return this.match(s.backQuote)?this.parseTaggedTemplateExpression(t,n,e,i):(i.stop=!0,e)}parseTaggedTemplateExpression(e,t,n,r,i){const a=this.startNodeAt(e,t);return a.tag=n,a.quasi=this.parseTemplate(!0),i&&(a.typeParameters=i),r.optionalChainMember&&this.raise(e,"Tagged Template Literals are not allowed in optionalChain"),this.finishNode(a,"TaggedTemplateExpression")}atPossibleAsync(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEnd===e.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(e.start,e.end)}finishCallExpression(e,t){if("Import"===e.callee.type)if(1!==e.arguments.length)this.raise(e.start,"import() requires exactly one argument");else{const t=e.arguments[0];t&&"SpreadElement"===t.type&&this.raise(t.start,"... is not allowed in import()")}return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,n,r,i){const a=[];let o,u=!0;const c=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(u)u=!1;else if(this.expect(s.comma),this.match(e)){n&&this.raise(this.state.lastTokStart,"Trailing comma is disallowed inside import(...) arguments"),i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}this.match(s.parenL)&&!o&&(o=this.state.start),a.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0,r))}return t&&o&&this.shouldParseAsyncArrow()&&this.unexpected(),this.state.inFSharpPipelineDirectBody=c,a}shouldParseAsyncArrow(){return this.match(s.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var n;return this.expect(s.arrow),this.parseArrowExpression(e,t.arguments,!0,null==(n=t.extra)?void 0:n.trailingComma),e}parseNoCallExpr(){const e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)}parseExprAtom(e){this.state.type===s.slash&&this.readRegexp();const t=this.state.potentialArrowAt===this.state.start;let n;switch(this.state.type){case s._super:return n=this.startNode(),this.next(),!this.match(s.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(n.start,"super is only allowed in object methods and classes"):this.raise(n.start,"super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?"),this.match(s.parenL)||this.match(s.bracketL)||this.match(s.dot)||this.raise(n.start,"super can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop])"),this.finishNode(n,"Super");case s._import:return n=this.startNode(),this.next(),this.match(s.dot)?this.parseImportMetaProperty(n):(this.expectPlugin("dynamicImport",n.start),this.match(s.parenL)||this.unexpected(null,s.parenL),this.finishNode(n,"Import"));case s._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case s.name:{n=this.startNode();const e=this.state.containsEsc,r=this.parseIdentifier();if(!e&&"async"===r.name&&this.match(s._function)&&!this.canInsertSemicolon()){const e=this.state.context.length-1;if(this.state.context[e]!==v.functionStatement)throw new Error("Internal error");return this.state.context[e]=v.functionExpression,this.next(),this.parseFunction(n,void 0,!0)}if(t&&!e&&"async"===r.name&&this.match(s.name)&&!this.canInsertSemicolon()){const e=[this.parseIdentifier()];return this.expect(s.arrow),this.parseArrowExpression(n,e,!0),n}return t&&this.match(s.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(n,[r],!1),n):r}case s._do:{this.expectPlugin("doExpressions");const e=this.startNode();this.next();const t=this.state.labels;return this.state.labels=[],e.body=this.parseBlock(),this.state.labels=t,this.finishNode(e,"DoExpression")}case s.regexp:{const e=this.state.value;return n=this.parseLiteral(e.value,"RegExpLiteral"),n.pattern=e.pattern,n.flags=e.flags,n}case s.num:return this.parseLiteral(this.state.value,"NumericLiteral");case s.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case s.string:return this.parseLiteral(this.state.value,"StringLiteral");case s._null:return n=this.startNode(),this.next(),this.finishNode(n,"NullLiteral");case s._true:case s._false:return this.parseBooleanLiteral();case s.parenL:return this.parseParenAndDistinguishExpression(t);case s.bracketL:{const t=this.state.inFSharpPipelineDirectBody;return this.state.inFSharpPipelineDirectBody=!1,n=this.startNode(),this.next(),n.elements=this.parseExprList(s.bracketR,!0,e,n),this.state.maybeInArrowParameters||this.toReferencedList(n.elements),this.state.inFSharpPipelineDirectBody=t,this.finishNode(n,"ArrayExpression")}case s.braceL:{const t=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const n=this.parseObj(!1,e);return this.state.inFSharpPipelineDirectBody=t,n}case s._function:return this.parseFunctionExpression();case s.at:this.parseDecorators();case s._class:return n=this.startNode(),this.takeDecorators(n),this.parseClass(n,!1);case s._new:return this.parseNew();case s.backQuote:return this.parseTemplate(!1);case s.doubleColon:{n=this.startNode(),this.next(),n.object=null;const e=n.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(n,"BindExpression");throw this.raise(e.start,"Binding should be performed on object property.")}case s.hash:if(this.state.inPipeline)return n=this.startNode(),"smart"!==this.getPluginOption("pipelineOperator","proposal")&&this.raise(n.start,"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option."),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext()||this.raise(n.start,"Topic reference was used in a lexical context without topic binding"),this.registerTopicReference(),this.finishNode(n,"PipelinePrimaryTopicReference");default:throw this.unexpected()}}parseBooleanLiteral(){const e=this.startNode();return e.value=this.match(s._true),this.next(),this.finishNode(e,"BooleanLiteral")}parseMaybePrivateName(){if(this.match(s.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]);const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space between # and identifier"),e.id=this.parseIdentifier(!0),this.finishNode(e,"PrivateName")}return this.parseIdentifier(!0)}parseFunctionExpression(){const e=this.startNode();let t=this.startNode();return this.next(),t=this.createIdentifier(t,"function"),this.scope.inGenerator&&this.eat(s.dot)?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e)}parseMetaProperty(e,t,n){e.meta=t,"function"===t.name&&"sent"===n&&(this.isContextual(n)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());const r=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==n||r)&&this.raise(e.property.start,`The only valid meta property for ${t.name} is ${t.name}.${n}`),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){const t=this.createIdentifier(this.startNodeAtNode(e),"import");return this.expect(s.dot),this.isContextual("meta")?(this.expectPlugin("importMeta"),this.inModule||this.raise(t.start,"import.meta may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),this.sawUnambiguousESM=!0):this.hasPlugin("importMeta")||this.raise(t.start,"Dynamic imports require a parameter: import('a.js')"),this.parseMetaProperty(e,t,"meta")}parseLiteral(e,t,n,r){n=n||this.state.start,r=r||this.state.startLoc;const i=this.startNodeAt(n,r);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(n,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)}parseParenAndDistinguishExpression(e){const t=this.state.start,n=this.state.startLoc;let r;this.expect(s.parenL);const i=this.state.maybeInArrowParameters,a=this.state.yieldPos,o=this.state.awaitPos,u=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.state.inFSharpPipelineDirectBody=!1;const c=this.state.start,l=this.state.startLoc,p=[],h={start:0},f={start:0};let d,y,v=!0;for(;!this.match(s.parenR);){if(v)v=!1;else if(this.expect(s.comma,f.start||null),this.match(s.parenR)){y=this.state.start;break}if(this.match(s.ellipsis)){const e=this.state.start,t=this.state.startLoc;d=this.state.start,p.push(this.parseParenItem(this.parseRestBinding(),e,t)),this.checkCommaAfterRest(41);break}p.push(this.parseMaybeAssign(!1,h,this.parseParenItem,f))}const m=this.state.start,g=this.state.startLoc;this.expect(s.parenR),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=u;let b=this.startNodeAt(t,n);if(e&&this.shouldParseArrow()&&(b=this.parseArrow(b))){this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=a,this.state.awaitPos=o;for(let e=0;e1?(r=this.startNodeAt(c,l),r.expressions=p,this.finishNodeAt(r,"SequenceExpression",m,g)):r=p[0],!this.options.createParenthesizedExpressions)return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",t),r;const x=this.startNodeAt(t,n);return x.expression=r,this.finishNode(x,"ParenthesizedExpression"),x}shouldParseArrow(){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(s.arrow))return e}parseParenItem(e,t,n){return e}parseNew(){const e=this.startNode();let t=this.startNode();if(this.next(),t=this.createIdentifier(t,"new"),this.eat(s.dot)){const n=this.parseMetaProperty(e,t,"target");if(!this.scope.inNonArrowFunction&&!this.state.inClassProperty){let e="new.target can only be used in functions";this.hasPlugin("classProperties")&&(e+=" or class properties"),this.raise(n.start,e)}return n}return e.callee=this.parseNoCallExpr(),"Import"===e.callee.type?this.raise(e.callee.start,"Cannot use new with import(...)"):"OptionalMemberExpression"===e.callee.type||"OptionalCallExpression"===e.callee.type?this.raise(this.state.lastTokEnd,"constructors in/after an Optional Chain are not allowed"):this.eat(s.questionDot)&&this.raise(this.state.start,"constructors in/after an Optional Chain are not allowed"),this.parseNewArguments(e),this.finishNode(e,"NewExpression")}parseNewArguments(e){if(this.eat(s.parenL)){const t=this.parseExprList(s.parenR);this.toReferencedList(t),e.arguments=t}else e.arguments=[]}parseTemplateElement(e){const t=this.startNode();return null===this.state.value&&(e?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition||0,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(s.backQuote),this.finishNode(t,"TemplateElement")}parseTemplate(e){const t=this.startNode();this.next(),t.expressions=[];let n=this.parseTemplateElement(e);for(t.quasis=[n];!n.tail;)this.expect(s.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(s.braceR),t.quasis.push(n=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")}parseObj(e,t){const n=Object.create(null);let r=!0;const i=this.startNode();for(i.properties=[],this.next();!this.eat(s.braceR);){if(r)r=!1;else if(this.expect(s.comma),this.match(s.braceR)){this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}const a=this.parseObjectMember(e,t);e||this.checkDuplicatedProto(a,n),a.shorthand&&this.addExtra(a,"shorthand",!0),i.properties.push(a)}return this.match(s.eq)||void 0===n.start||this.raise(n.start,"Redefinition of __proto__ property"),this.finishNode(i,e?"ObjectPattern":"ObjectExpression")}isAsyncProp(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.match(s.name)||this.match(s.num)||this.match(s.string)||this.match(s.bracketL)||this.state.type.keyword||this.match(s.star))&&!this.hasPrecedingLineBreak()}parseObjectMember(e,t){let n=[];if(this.match(s.at))for(this.hasPlugin("decorators")&&this.raise(this.state.start,"Stage 2 decorators disallow object literal property decorators");this.match(s.at);)n.push(this.parseDecorator());const r=this.startNode();let i,a,o=!1,u=!1;if(this.match(s.ellipsis))return n.length&&this.unexpected(),e?(this.next(),r.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(r,"RestElement")):this.parseSpread();n.length&&(r.decorators=n,n=[]),r.method=!1,(e||t)&&(i=this.state.start,a=this.state.startLoc),e||(o=this.eat(s.star));const c=this.state.containsEsc;return this.parsePropertyName(r),e||c||o||!this.isAsyncProp(r)?u=!1:(u=!0,o=this.eat(s.star),this.parsePropertyName(r)),this.parseObjPropValue(r,i,a,o,u,e,t,c),r}isGetterOrSetterMethod(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(s.string)||this.match(s.num)||this.match(s.bracketL)||this.match(s.name)||!!this.state.type.keyword)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}checkGetterSetterParams(e){const t=this.getGetterSetterExpectedParamCount(e),n=e.start;e.params.length!==t&&("get"===e.kind?this.raise(n,"getter must not have any formal parameters"):this.raise(n,"setter must have exactly one formal parameter")),"set"===e.kind&&"RestElement"===e.params[e.params.length-1].type&&this.raise(n,"setter function argument must not be a rest parameter")}parseObjectMethod(e,t,n,r,i){return n||t||this.match(s.parenL)?(r&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,n,!1,!1,"ObjectMethod")):!i&&this.isGetterOrSetterMethod(e,r)?((t||n)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e,!1,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(e),e):void 0}parseObjectProperty(e,t,n,r,i){return e.shorthand=!1,this.eat(s.colon)?(e.value=r?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),r?e.value=this.parseMaybeDefault(t,n,e.key.__clone()):this.match(s.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,n,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))}parseObjPropValue(e,t,n,r,i,a,o,s){const u=this.parseObjectMethod(e,r,i,a,s)||this.parseObjectProperty(e,t,n,a,o);return u||this.unexpected(),u}parsePropertyName(e){if(this.eat(s.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(s.bracketR);else{const t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(s.num)||this.match(s.string)?this.parseExprAtom():this.parseMaybePrivateName(),"PrivateName"!==e.key.type&&(e.computed=!1),this.state.inPropertyName=t}return e.key}initFunction(e,t){e.id=null,e.generator=!1,e.async=!!t}parseMethod(e,t,n,r,i,a,o=!1){const s=this.state.yieldPos,c=this.state.awaitPos;this.state.yieldPos=-1,this.state.awaitPos=-1,this.initFunction(e,n),e.generator=!!t;const l=r;return this.scope.enter(64|u(n,e.generator)|(o?256:0)|(i?128:0)),this.parseFunctionParams(e,l),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBodyAndFinish(e,a,!0),this.scope.exit(),this.state.yieldPos=s,this.state.awaitPos=c,e}parseArrowExpression(e,t,n,r){this.scope.enter(16|u(n,!1)),this.initFunction(e,n);const i=this.state.maybeInArrowParameters,a=this.state.yieldPos,o=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,t&&this.setArrowFunctionParameters(e,t,r),this.parseFunctionBody(e,!0),this.scope.exit(),this.state.maybeInArrowParameters=i,this.state.yieldPos=a,this.state.awaitPos=o,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,n){e.params=this.toAssignableList(t,!0,"arrow function parameters",n)}isStrictBody(e){if("BlockStatement"===e.body.type&&e.body.directives.length)for(let t=0,n=e.body.directives;t" after pipeline body; arrow function in pipeline body must be parenthesized');"PipelineTopicExpression"===t&&"SequenceExpression"===e.type&&this.raise(n,"Pipeline body may not be a comma-separated sequence expression")}parseSmartPipelineBodyInStyle(e,t,n,r){const i=this.startNodeAt(n,r);switch(t){case"PipelineBareFunction":i.callee=e;break;case"PipelineBareConstructor":i.callee=e.callee;break;case"PipelineBareAwaitedFunction":i.callee=e.argument;break;case"PipelineTopicExpression":this.topicReferenceWasUsedInCurrentTopicContext()||this.raise(n,"Pipeline is in topic style but does not use topic reference"),i.expression=e;break;default:throw new Error(`Internal @babel/parser error: Unknown pipeline style (${t})`)}return this.finishNode(i,t)}checkSmartPipelineBodyStyle(e){return e.type,this.isSimpleReference(e)?"PipelineBareFunction":"PipelineTopicExpression"}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}withTopicPermittingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withTopicForbiddingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSoloAwaitPermittingContext(e){const t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}primaryTopicReferenceIsAllowedInCurrentTopicContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentTopicContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e,t){const n=this.state.start,r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const a=this.parseExprOp(this.parseMaybeUnary(),n,r,e,t);return this.state.inFSharpPipelineDirectBody=i,a}}{parseTopLevel(e,t){if(t.sourceType=this.options.sourceType,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,s.eof),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let e=0,t=Array.from(this.scope.undefinedExports);ethis.parseStatement("do")),this.state.labels.pop(),this.expect(s._while),e.test=this.parseHeaderExpression(),this.eat(s.semi),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(de);let t=-1;if(this.isAwaitAllowed()&&this.eatContextual("await")&&(t=this.state.lastTokStart),this.scope.enter(0),this.expect(s.parenL),this.match(s.semi))return t>-1&&this.unexpected(t),this.parseFor(e,null);const n=this.isLet();if(this.match(s._var)||this.match(s._const)||n){const r=this.startNode(),i=n?"let":this.state.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),(this.match(s._in)||this.isContextual("of"))&&1===r.declarations.length?this.parseForIn(e,r,t):(t>-1&&this.unexpected(t),this.parseFor(e,r))}const r={start:0},i=this.parseExpression(!0,r);if(this.match(s._in)||this.isContextual("of")){const n=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(i,void 0,n),this.checkLVal(i,void 0,void 0,n),this.parseForIn(e,i,t)}return r.start&&this.unexpected(r.start),t>-1&&this.unexpected(t),this.parseFor(e,i)}parseFunctionStatement(e,t,n){return this.next(),this.parseFunction(e,1|(n?0:2),t)}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(s._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.scope.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();const t=e.cases=[];let n,r;for(this.expect(s.braceL),this.state.labels.push(ye),this.scope.enter(0);!this.match(s.braceR);)if(this.match(s._case)||this.match(s._default)){const e=this.match(s._case);n&&this.finishNode(n,"SwitchCase"),t.push(n=this.startNode()),n.consequent=[],this.next(),e?n.test=this.parseExpression():(r&&this.raise(this.state.lastTokStart,"Multiple default clauses"),r=!0,n.test=null),this.expect(s.colon)}else n?n.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),l.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(s._catch)){const t=this.startNode();if(this.next(),this.match(s.parenL)){this.expect(s.parenL),t.param=this.parseBindingAtom();const e="Identifier"===t.param.type;this.scope.enter(e?32:0),this.checkLVal(t.param,9,null,"catch clause"),this.expect(s.parenR)}else t.param=null,this.scope.enter(0);t.body=this.withTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(s._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")}parseVarStatement(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(de),e.body=this.withTopicForbiddingContext(()=>this.parseStatement("while")),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withTopicForbiddingContext(()=>this.parseStatement("with")),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,n,r){for(let e=0,r=this.state.labels;e=0;t--){const n=this.state.labels[t];if(n.statementStart!==e.start)break;n.statementStart=this.state.start,n.kind=i}return this.state.labels.push({name:t,kind:i,statementStart:this.state.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.state.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0){const n=this.startNode();return this.expect(s.braceL),t&&this.scope.enter(0),this.parseBlockBody(n,e,!1,s.braceR),t&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,n,r){const i=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(i,t?a:void 0,n,r)}parseBlockOrModuleBlockBody(e,t,n,r){let i,a,o=!1;for(;!this.eat(r);){o||!this.state.containsOctal||a||(a=this.state.octalPosition);const r=this.parseStatement(null,n);if(t&&!o&&this.isValidDirective(r)){const e=this.stmtToDirective(r);t.push(e),void 0===i&&"use strict"===e.value.value&&(i=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else o=!0,e.push(r)}!1===i&&this.setStrict(!1)}parseFor(e,t){return e.init=t,this.expect(s.semi),e.test=this.match(s.semi)?null:this.parseExpression(),this.expect(s.semi),e.update=this.match(s.parenR)?null:this.parseExpression(),this.expect(s.parenR),e.body=this.withTopicForbiddingContext(()=>this.parseStatement("for")),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,n){const r=this.match(s._in);return this.next(),r?n>-1&&this.unexpected(n):e.await=n>-1,"VariableDeclaration"!==t.type||null==t.declarations[0].init||r&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type?"AssignmentPattern"===t.type&&this.raise(t.start,"Invalid left-hand side in for-loop"):this.raise(t.start,`${r?"for-in":"for-of"} loop variable declaration may not have an initializer`),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(s.parenR),e.body=this.withTopicForbiddingContext(()=>this.parseStatement("for")),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")}parseVar(e,t,n){const r=e.declarations=[],i=this.hasPlugin("typescript");for(e.kind=n;;){const e=this.startNode();if(this.parseVarId(e,n),this.eat(s.eq)?e.init=this.parseMaybeAssign(t):("const"!==n||this.match(s._in)||this.isContextual("of")?"Identifier"===e.id.type||t&&(this.match(s._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):i||this.unexpected(),e.init=null),r.push(this.finishNode(e,"VariableDeclarator")),!this.eat(s.comma))break}return e}parseVarId(e,t){e.id=this.parseBindingAtom(),this.checkLVal(e.id,"var"===t?5:9,void 0,"variable declaration","var"!==t)}parseFunction(e,t=0,n=!1){const r=1&t,i=2&t,a=!(!r||4&t);this.initFunction(e,n),this.match(s.star)&&i&&this.raise(this.state.start,"Generators can only be declared at the top level or inside a block"),e.generator=this.eat(s.star),r&&(e.id=this.parseFunctionId(a));const o=this.state.maybeInArrowParameters,c=this.state.inClassProperty,l=this.state.yieldPos,p=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.inClassProperty=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,this.scope.enter(u(e.async,e.generator)),r||(e.id=this.parseFunctionId()),this.parseFunctionParams(e),this.withTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,r?"FunctionDeclaration":"FunctionExpression")}),this.scope.exit(),r&&!i&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=o,this.state.inClassProperty=c,this.state.yieldPos=l,this.state.awaitPos=p,e}parseFunctionId(e){return e||this.match(s.name)?this.parseIdentifier():null}parseFunctionParams(e,t){const n=this.state.inParameters;this.state.inParameters=!0,this.expect(s.parenL),e.params=this.parseBindingList(s.parenR,41,!1,t),this.state.inParameters=n,this.checkYieldAwaitInDefaultParams()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:9:17,e.id.start)}parseClass(e,t,n){this.next(),this.takeDecorators(e);const r=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass),this.state.strict=r,this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(s.eq)||this.match(s.semi)||this.match(s.braceR)}isClassMethod(){return this.match(s.parenL)}isNonstaticConstructor(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)}parseClassBody(e){this.state.classLevel++;const t={hadConstructor:!1};let n=[];const r=this.startNode();if(r.body=[],this.expect(s.braceL),this.withTopicForbiddingContext(()=>{for(;!this.eat(s.braceR);){if(this.eat(s.semi)){if(n.length>0)throw this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");continue}if(this.match(s.at)){n.push(this.parseDecorator());continue}const i=this.startNode();n.length&&(i.decorators=n,this.resetStartLocationFromNode(i,n[0]),n=[]),this.parseClassMember(r,i,t,e),"constructor"===i.kind&&i.decorators&&i.decorators.length>0&&this.raise(i.start,"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")}}),n.length)throw this.raise(this.state.start,"You have trailing decorators with no method");return this.state.classLevel--,this.finishNode(r,"ClassBody")}parseClassMember(e,t,n,r){let i=!1;const a=this.state.containsEsc;if(this.match(s.name)&&"static"===this.state.value){const n=this.parseIdentifier(!0);if(this.isClassMethod()){const r=t;return r.kind="method",r.computed=!1,r.key=n,r.static=!1,void this.pushClassMethod(e,r,!1,!1,!1,!1)}if(this.isClassProperty()){const r=t;return r.computed=!1,r.key=n,r.static=!1,void e.body.push(this.parseClassProperty(r))}if(a)throw this.unexpected();i=!0}this.parseClassMemberWithIsStatic(e,t,n,i,r)}parseClassMemberWithIsStatic(e,t,n,r,i){const a=t,o=t,u=t,c=t,l=a,p=a;if(t.static=r,this.eat(s.star))return l.kind="method",this.parseClassPropertyName(l),"PrivateName"===l.key.type?void this.pushClassPrivateMethod(e,o,!0,!1):(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be a generator"),void this.pushClassMethod(e,a,!0,!1,!1,!1));const h=this.state.containsEsc,f=this.parseClassPropertyName(t),d="PrivateName"===f.type,y="Identifier"===f.type,v=this.state.start;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(l.kind="method",d)return void this.pushClassPrivateMethod(e,o,!1,!1);const t=this.isNonstaticConstructor(a);let r=!1;t&&(a.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(f.start,"Duplicate constructor in the same class"),n.hadConstructor=!0,r=i),this.pushClassMethod(e,a,!1,!1,t,r)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,u);else if(!y||"async"!==f.name||h||this.isLineTerminator())!y||"get"!==f.name&&"set"!==f.name||h||this.match(s.star)&&this.isLineTerminator()?this.isLineTerminator()?d?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,u):this.unexpected():(l.kind=f.name,this.parseClassPropertyName(a),"PrivateName"===l.key.type?this.pushClassPrivateMethod(e,o,!1,!1):(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't have get/set modifier"),this.pushClassMethod(e,a,!1,!1,!1,!1)),this.checkGetterSetterParams(a));else{const t=this.eat(s.star);p.optional&&this.unexpected(v),l.kind="method",this.parseClassPropertyName(l),this.parsePostMemberNameModifiers(p),"PrivateName"===l.key.type?this.pushClassPrivateMethod(e,o,t,!0):(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be an async function"),this.pushClassMethod(e,a,t,!0,!1,!1))}}parseClassPropertyName(e){const t=this.parsePropertyName(e);return e.computed||!e.static||"prototype"!==t.name&&"prototype"!==t.value||this.raise(t.start,"Classes may not have static property named prototype"),"PrivateName"===t.type&&"constructor"===t.id.name&&this.raise(t.start,"Classes may not have a private field named '#constructor'"),t}pushClassProperty(e,t){t.computed||"constructor"!==t.key.name&&"constructor"!==t.key.value||this.raise(t.key.start,"Classes may not have a field named 'constructor'"),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){this.expectPlugin("classPrivateProperties",t.key.start),e.body.push(this.parseClassPrivateProperty(t))}pushClassMethod(e,t,n,r,i,a){e.body.push(this.parseMethod(t,n,r,i,a,"ClassMethod",!0))}pushClassPrivateMethod(e,t,n,r){this.expectPlugin("classPrivateMethods",t.key.start),e.body.push(this.parseMethod(t,n,r,!1,!1,"ClassPrivateMethod",!0))}parsePostMemberNameModifiers(e){}parseAccessModifier(){}parseClassPrivateProperty(e){return this.state.inClassProperty=!0,this.scope.enter(320),e.value=this.eat(s.eq)?this.parseMaybeAssign():null,this.semicolon(),this.state.inClassProperty=!1,this.scope.exit(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return e.typeAnnotation||this.expectPlugin("classProperties"),this.state.inClassProperty=!0,this.scope.enter(320),this.match(s.eq)?(this.expectPlugin("classProperties"),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.scope.exit(),this.finishNode(e,"ClassProperty")}parseClassId(e,t,n,r=139){this.match(s.name)?(e.id=this.parseIdentifier(),t&&this.checkLVal(e.id,r,void 0,"class name")):n||!t?e.id=null:this.unexpected(null,"A class name is required")}parseClassSuper(e){e.superClass=this.eat(s._extends)?this.parseExprSubscripts():null}parseExport(e){const t=this.maybeParseExportDefaultSpecifier(e),n=!t||this.eat(s.comma),r=n&&this.eatExportStar(e),i=r&&this.maybeParseExportNamespaceSpecifier(e),a=n&&(!i||this.eat(s.comma)),o=t||r;if(r&&!i)return t&&this.unexpected(),this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");const u=this.maybeParseExportNamedSpecifiers(e);if(t&&n&&!r&&!u||i&&a&&!u)throw this.unexpected(null,s.braceL);let c;if(o||u?(c=!1,this.parseExportFrom(e,o)):c=this.maybeParseExportDeclaration(e),o||u||c)return this.checkExport(e,!0,!1,!!e.source),this.finishNode(e,"ExportNamedDeclaration");if(this.eat(s._default))return e.declaration=this.parseExportDefaultExpression(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration");throw this.unexpected(null,s.braceL)}eatExportStar(e){return this.eat(s.star)}maybeParseExportDefaultSpecifier(e){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");const t=this.startNode();return t.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(t,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual("as")){e.specifiers||(e.specifiers=[]);const t=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),t.exported=this.parseIdentifier(!0),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){return!!this.match(s.braceL)&&(e.specifiers||(e.specifiers=[]),e.specifiers.push(...this.parseExportSpecifiers()),e.source=null,e.declaration=null,!0)}maybeParseExportDeclaration(e){if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){const e=this.nextTokenStart();this.isUnparsedContextual(e,"function")||this.unexpected(e,'Unexpected token, expected "function"')}return e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e),!0}return!1}isAsyncFunction(){if(!this.isContextual("async"))return!1;const e=this.nextTokenStart();return!l.test(this.input.slice(this.state.pos,e))&&this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const e=this.startNode(),t=this.isAsyncFunction();if(this.match(s._function)||t)return this.next(),t&&this.next(),this.parseFunction(e,5,t);if(this.match(s._class))return this.parseClass(e,!0,!0);if(this.match(s.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax"),this.parseDecorators(!1),this.parseClass(e,!0,!0);if(this.match(s._const)||this.match(s._var)||this.isLet())throw this.raise(this.state.start,"Only expressions, functions or classes are allowed as the `default` export.");{const e=this.parseMaybeAssign();return this.semicolon(),e}}parseExportDeclaration(e){return this.parseStatement(null)}isExportDefaultSpecifier(){if(this.match(s.name))return"async"!==this.state.value&&"let"!==this.state.value;if(!this.match(s._default))return!1;const e=this.nextTokenStart();return 44===this.input.charCodeAt(e)||this.isUnparsedContextual(e,"from")}parseExportFrom(e,t){this.eatContextual("from")?(e.source=this.parseImportSource(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()}shouldParseExportDeclaration(){if(this.match(s.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax")}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}checkExport(e,t,n,r){if(t)if(n)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(let t=0,n=e.specifiers;t-1&&this.raise(e.start,"default"===t?"Only one default export allowed per module.":`\`${t}\` has already been exported. Exported identifiers must be unique.`),this.state.exportedIdentifiers.push(t)}parseExportSpecifiers(){const e=[];let t=!0;for(this.expect(s.braceL);!this.eat(s.braceR);){if(t)t=!1;else if(this.expect(s.comma),this.eat(s.braceR))break;const n=this.startNode();n.local=this.parseIdentifier(!0),n.exported=this.eatContextual("as")?this.parseIdentifier(!0):n.local.__clone(),e.push(this.finishNode(n,"ExportSpecifier"))}return e}parseImport(e){if(e.specifiers=[],!this.match(s.string)){const t=!this.maybeParseDefaultImportSpecifier(e)||this.eat(s.comma),n=t&&this.maybeParseStarImportSpecifier(e);t&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual("from")}return e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(s.string)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(e){return this.match(s.name)}parseImportSpecifierLocal(e,t,n,r){t.local=this.parseIdentifier(),this.checkLVal(t.local,9,void 0,r),e.specifiers.push(this.finishNode(t,n))}maybeParseDefaultImportSpecifier(e){return!!this.shouldParseDefaultImport(e)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(s.star)){const t=this.startNode();return this.next(),this.expectContextual("as"),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(s.braceL);!this.eat(s.braceR);){if(t)t=!1;else{if(this.eat(s.colon))throw this.raise(this.state.start,"ES2015 named imports do not destructure. Use another statement for destructuring after the import.");if(this.expect(s.comma),this.eat(s.braceR))break}this.parseImportSpecifier(e)}}parseImportSpecifier(e){const t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,9,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))}}{constructor(e,t){super(e=function(e){const t={};for(let n=0,r=Object.keys(te);n`'${e}'`).join(", "))}(e.plugins),n=function(e){const t=ee.filter(t=>q(e,t)),n=t.join("/");let r=ge[n];if(!r){r=ve;for(let e=0;e!0}],e.set(n,a);break;case"invalidate":a=[{value:s,valid:o.validator()}],e.set(n,a);break;case"valid":a?a.push({value:s,valid:o.validator()}):(a=[{value:s,valid:o.validator()}],e.set(n,a))}return s}}Object.defineProperty(t,"__esModule",{value:!0}),t.makeStrongCache=function(e){return r(new Map,e)},t.makeWeakCache=function(e){return r(new WeakMap,e)},t.assertSimpleType=a;class i{constructor(e){this._active=!0,this._never=!1,this._forever=!1,this._invalidate=!1,this._configured=!1,this._pairs=[],this._data=e}simple(){return function(e){function t(t){if("boolean"!=typeof t)return e.using(()=>a(t()));t?e.forever():e.never()}return t.forever=()=>e.forever(),t.never=()=>e.never(),t.using=t=>e.using(()=>a(t())),t.invalidate=t=>e.invalidate(()=>a(t())),t}(this)}mode(){return this._never?"never":this._forever?"forever":this._invalidate?"invalidate":"valid"}forever(){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never)throw new Error("Caching has already been configured with .never()");this._forever=!0,this._configured=!0}never(){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._forever)throw new Error("Caching has already been configured with .forever()");this._never=!0,this._configured=!0}using(e){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never||this._forever)throw new Error("Caching has already been configured with .never or .forever()");this._configured=!0;const t=e(this._data);return this._pairs.push([t,e]),t}invalidate(e){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never||this._forever)throw new Error("Caching has already been configured with .never or .forever()");this._invalidate=!0,this._configured=!0;const t=e(this._data);return this._pairs.push([t,e]),t}validator(){const e=this._pairs;return t=>e.every(([e,n])=>e===n(t))}deactivate(){this._active=!1}configured(){return this._configured}}function a(e){if(null!=e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e)throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");return e}},function(e,t,n){var r=n(34);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(93);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Plugin=function(e){throw new Error(`The (${e}) Babel 5 plugin is being run with an unsupported Babel version.`)},Object.defineProperty(t,"File",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"buildExternalHelpers",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"resolvePlugin",{enumerable:!0,get:function(){return a.resolvePlugin}}),Object.defineProperty(t,"resolvePreset",{enumerable:!0,get:function(){return a.resolvePreset}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return o.version}}),Object.defineProperty(t,"getEnv",{enumerable:!0,get:function(){return s.getEnv}}),Object.defineProperty(t,"tokTypes",{enumerable:!0,get:function(){return function(){const e=n(49);return function(){return e},e}().tokTypes}}),Object.defineProperty(t,"traverse",{enumerable:!0,get:function(){return function(){const e=v(n(18));return function(){return e},e}().default}}),Object.defineProperty(t,"template",{enumerable:!0,get:function(){return function(){const e=v(n(50));return function(){return e},e}().default}}),Object.defineProperty(t,"createConfigItem",{enumerable:!0,get:function(){return c.createConfigItem}}),Object.defineProperty(t,"loadPartialConfig",{enumerable:!0,get:function(){return l.loadPartialConfig}}),Object.defineProperty(t,"loadOptions",{enumerable:!0,get:function(){return l.loadOptions}}),Object.defineProperty(t,"transform",{enumerable:!0,get:function(){return p.transform}}),Object.defineProperty(t,"transformSync",{enumerable:!0,get:function(){return p.transformSync}}),Object.defineProperty(t,"transformAsync",{enumerable:!0,get:function(){return p.transformAsync}}),Object.defineProperty(t,"transformFile",{enumerable:!0,get:function(){return h.transformFile}}),Object.defineProperty(t,"transformFileSync",{enumerable:!0,get:function(){return h.transformFileSync}}),Object.defineProperty(t,"transformFileAsync",{enumerable:!0,get:function(){return h.transformFileAsync}}),Object.defineProperty(t,"transformFromAst",{enumerable:!0,get:function(){return f.transformFromAst}}),Object.defineProperty(t,"transformFromAstSync",{enumerable:!0,get:function(){return f.transformFromAstSync}}),Object.defineProperty(t,"transformFromAstAsync",{enumerable:!0,get:function(){return f.transformFromAstAsync}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.parse}}),Object.defineProperty(t,"parseSync",{enumerable:!0,get:function(){return d.parseSync}}),Object.defineProperty(t,"parseAsync",{enumerable:!0,get:function(){return d.parseAsync}}),t.types=t.OptionManager=t.DEFAULT_EXTENSIONS=void 0;var r=v(n(96)),i=v(n(383)),a=n(51),o=n(384),s=n(155);function u(){const e=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(10));return u=function(){return e},e}Object.defineProperty(t,"types",{enumerable:!0,get:function(){return u()}});var c=n(52),l=n(36),p=n(391),h=n(433),f=n(434),d=n(435);function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function v(e){return e&&e.__esModule?e:{default:e}}const m=Object.freeze([".js",".jsx",".es6",".es",".mjs"]);t.DEFAULT_EXTENSIONS=m;t.OptionManager=class{init(e){return(0,l.loadOptions)(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=Object.keys(t);for(const r of n)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){var r=n(37),i=n(194),a=n(195),o=n(196),s=n(197),u=n(198);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t,n){var r=n(24)(n(16),"Map");e.exports=r},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(205),i=n(212),a=n(214),o=n(215),s=n(216);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(109),i=n(226),a=n(29);e.exports=function(e){return a(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(231),i=n(112),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return a.call(e,t)})))}:i;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(303)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(20))},function(e,t,n){var r=n(128),i=n(29),a=n(305),o=n(81),s=n(308),u=Math.max;e.exports=function(e,t,n,c){e=i(e)?e:s(e),n=n&&!c?o(n):0;var l=e.length;return n<0&&(n=u(l+n,0)),a(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&r(e,t,n)>-1}},function(e,t,n){var r=n(306);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++nn.comments)):n.shouldPrintComment=n.shouldPrintComment||(e=>n.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0);"auto"===n.compact&&(n.compact=e.length>5e5,n.compact&&console.error("[BABEL] Note: The code generator has deoptimised the styling of "+`${t.filename} as it exceeds the max of 500KB.`));n.compact&&(n.indent.adjustMultilineComment=!1);return n}(n,t),t.sourceMaps?new r.default(t,n):null),this.ast=e}generate(){return super.generate(this.ast)}}t.CodeGenerator=class{constructor(e,t,n){this._generator=new o(e,t,n)}generate(){return this._generator.generate()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=function(e,t){const{placeholderWhitelist:n=e.placeholderWhitelist,placeholderPattern:r=e.placeholderPattern,preserveComments:i=e.preserveComments,syntacticPlaceholders:a=e.syntacticPlaceholders}=t;return{parser:Object.assign({},e.parser,{},t.parser),placeholderWhitelist:n,placeholderPattern:r,preserveComments:i,syntacticPlaceholders:a}},t.validate=function(e){if(null!=e&&"object"!=typeof e)throw new Error("Unknown template options.");const t=e||{},{placeholderWhitelist:n,placeholderPattern:r,preserveComments:i,syntacticPlaceholders:a}=t,o=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(t,["placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders"]);if(null!=n&&!(n instanceof Set))throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");if(null!=r&&!(r instanceof RegExp)&&!1!==r)throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");if(null!=i&&"boolean"!=typeof i)throw new Error("'.preserveComments' must be a boolean, null, or undefined");if(null!=a&&"boolean"!=typeof a)throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");if(!0===a&&(null!=n||null!=r))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");return{parser:o,placeholderWhitelist:n||void 0,placeholderPattern:null==r?void 0:r,preserveComments:null!=i&&i,syntacticPlaceholders:null==a?void 0:a}},t.normalizeReplacements=function(e){if(Array.isArray(e))return e.reduce((e,t,n)=>(e["$"+n]=t,e),{});if("object"==typeof e||null==e)return e||void 0;throw new Error("Template replacements must be an array, object, null, or undefined")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor(e,t,n){this.key=e.name||n,this.manipulateOptions=e.manipulateOptions,this.post=e.post,this.pre=e.pre,this.visitor=e.visitor||{},this.parserOverride=e.parserOverride,this.generatorOverride=e.generatorOverride,this.options=t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=function(e,t){return l({type:"root",source:e},t)};a(n(87));var r=a(n(386)),i=n(159);function a(e){return e&&e.__esModule?e:{default:e}}const o={cwd:i.assertString,root:i.assertString,rootMode:i.assertRootMode,configFile:i.assertConfigFileSearch,caller:i.assertCallerMetadata,filename:i.assertString,filenameRelative:i.assertString,code:i.assertBoolean,ast:i.assertBoolean,envName:i.assertString},s={babelrc:i.assertBoolean,babelrcRoots:i.assertBabelrcSearch},u={extends:i.assertString,ignore:i.assertIgnoreList,only:i.assertIgnoreList},c={inputSourceMap:i.assertInputSourceMap,presets:i.assertPluginList,plugins:i.assertPluginList,passPerPreset:i.assertBoolean,env:function(e,t){if("env"===e.parent.type)throw new Error(`${(0,i.msg)(e)} is not allowed inside of another .env block`);const n=e.parent,r=(0,i.assertObject)(e,t);if(r)for(const t of Object.keys(r)){const a=(0,i.assertObject)((0,i.access)(e,t),r[t]);a&&l({type:"env",name:t,parent:n},a)}return r},overrides:function(e,t){if("env"===e.parent.type)throw new Error(`${(0,i.msg)(e)} is not allowed inside an .env block`);if("overrides"===e.parent.type)throw new Error(`${(0,i.msg)(e)} is not allowed inside an .overrides block`);const n=e.parent,r=(0,i.assertArray)(e,t);if(r)for(const[t,a]of r.entries()){const r=(0,i.access)(e,t),o=(0,i.assertObject)(r,a);if(!o)throw new Error(`${(0,i.msg)(r)} must be an object`);l({type:"overrides",index:t,parent:n},o)}return r},test:i.assertConfigApplicableTest,include:i.assertConfigApplicableTest,exclude:i.assertConfigApplicableTest,retainLines:i.assertBoolean,comments:i.assertBoolean,shouldPrintComment:i.assertFunction,compact:i.assertCompact,minified:i.assertBoolean,auxiliaryCommentBefore:i.assertString,auxiliaryCommentAfter:i.assertString,sourceType:i.assertSourceType,wrapPluginVisitorMethod:i.assertFunction,highlightCode:i.assertBoolean,sourceMaps:i.assertSourceMaps,sourceMap:i.assertSourceMaps,sourceFileName:i.assertString,sourceRoot:i.assertString,getModuleId:i.assertFunction,moduleRoot:i.assertString,moduleIds:i.assertBoolean,moduleId:i.assertString,parserOpts:i.assertObject,generatorOpts:i.assertObject};function l(e,t){const n=function e(t){return"root"===t.type?t.source:e(t.parent)}(e);return function(e){if(h(e,"sourceMap")&&h(e,"sourceMaps"))throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both")}(t),Object.keys(t).forEach(r=>{const a={type:"option",name:r,parent:e};if("preset"===n&&u[r])throw new Error(`${(0,i.msg)(a)} is not allowed in preset options`);if("arguments"!==n&&o[r])throw new Error(`${(0,i.msg)(a)} is only allowed in root programmatic options`);if("arguments"!==n&&"configfile"!==n&&s[r]){if("babelrcfile"===n||"extendsfile"===n)throw new Error(`${(0,i.msg)(a)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, `+"or babel.config.js/config file options");throw new Error(`${(0,i.msg)(a)} is only allowed in root programmatic options, or babel.config.js/config file options`)}(c[r]||u[r]||s[r]||o[r]||p)(a,t[r])}),t}function p(e){const t=e.name;if(r.default[t]){const{message:n,version:a=5}=r.default[t];throw new ReferenceError(`Using removed Babel ${a} option: ${(0,i.msg)(e)} - ${n}`)}{const t=`Unknown option: ${(0,i.msg)(e)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`;throw new ReferenceError(t)}}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){var r=n(15),i=n(34),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nthis.code,getScope:()=>this.scope,addHelper:this.addHelper.bind(this),buildError:this.buildCodeFrameError.bind(this)},this.opts=e,this.code=t,this.ast=n,this.inputMap=r,this.path=i().NodePath.get({hub:this.hub,parentPath:null,parent:this.ast,container:this.ast,key:"program"}).setContext(),this.scope=this.path.scope}get shebang(){const{interpreter:e}=this.path.node;return e?e.value:""}set shebang(e){e?this.path.get("interpreter").replaceWith(o().interpreterDirective(e)):this.path.get("interpreter").remove()}set(e,t){if("helpersNamespace"===e)throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.If you are using @babel/plugin-external-helpers you will need to use a newer version than the one you currently have installed. If you have your own implementation, you'll want to explore using 'helperGenerator' alongside 'file.availableHelper()'.");this._map.set(e,t)}get(e){return this._map.get(e)}has(e){return this._map.has(e)}getModuleName(){const{filename:e,filenameRelative:t=e,moduleId:n,moduleIds:r=!!n,getModuleId:i,sourceRoot:a,moduleRoot:o=a,sourceRoot:s=o}=this.opts;if(!r)return null;if(null!=n&&!i)return n;let u=null!=o?o+"/":"";if(t){const e=null!=s?new RegExp("^"+s+"/?"):"";u+=t.replace(e,"").replace(/\.(\w*?)$/,"")}return u=u.replace(/\\/g,"/"),i&&i(u)||u}addImport(){throw new Error("This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed from that module, such as 'addNamed' or 'addDefault'.")}availableHelper(e,t){let n;try{n=r().minVersion(e)}catch(e){if("BABEL_HELPER_UNKNOWN"!==e.code)throw e;return!1}return"string"!=typeof t||(s().default.valid(t)&&(t=`^${t}`),!s().default.intersects(`<${n}`,t)&&!s().default.intersects(">=8.0.0",t))}addHelper(e){const t=this.declarations[e];if(t)return o().cloneNode(t);const n=this.get("helperGenerator");if(n){const t=n(e);if(t)return t}r().ensure(e);const i=this.declarations[e]=this.scope.generateUidIdentifier(e),a={};for(const t of r().getDependencies(e))a[t]=this.addHelper(t);const{nodes:s,globals:u}=r().get(e,e=>a[e],i,Object.keys(this.scope.getAllBindings()));return u.forEach(e=>{this.path.scope.hasBinding(e,!0)&&this.path.scope.rename(e)}),s.forEach(e=>{e._compact=!0}),this.path.unshiftContainer("body",s),this.path.get("body").forEach(e=>{-1!==s.indexOf(e.node)&&e.isVariableDeclaration()&&this.scope.registerDeclaration(e)}),i}addTemplateObject(){throw new Error("This function has been moved into the template literal transform itself.")}buildCodeFrameError(e,t,n=SyntaxError){let r=e&&(e.loc||e._loc);if(!r&&e){const n={loc:null};(0,i().default)(e,l,this.scope,n),r=n.loc;let a="This is an error on an internal node. Probably an internal error.";r&&(a+=" Location has been estimated."),t+=` (${a})`}if(r){const{highlightCode:e=!0}=this.opts;t+="\n"+(0,a().codeFrameColumns)(this.code,{start:{line:r.start.line,column:r.start.column+1},end:r.end&&r.start.line===r.end.line?{line:r.end.line,column:r.end.column+1}:void 0},{highlightCode:e})}return new n(t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.get=p,t.minVersion=function(e){return l(e).minVersion()},t.getDependencies=function(e){return Array.from(l(e).dependencies.values())},t.ensure=function(e){l(e)},t.default=t.list=void 0;var r=s(n(18)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(10)),a=s(n(382));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function u(e){const t=[];for(;e.parentPath;e=e.parentPath)t.push(e.key),e.inList&&t.push(e.listKey);return t.reverse().join(".")}const c=Object.create(null);function l(e){if(!c[e]){const t=a.default[e];if(!t)throw Object.assign(new ReferenceError(`Unknown helper ${e}`),{code:"BABEL_HELPER_UNKNOWN",helper:e});const n=()=>i.file(t.ast()),o=function(e){const t=new Set,n=new Set,i=new Map;let o,s;const c=[],l=[],p=[];if((0,r.default)(e,{ImportDeclaration(e){const t=e.node.source.value;if(!a.default[t])throw e.buildCodeFrameError(`Unknown helper ${t}`);if(1!==e.get("specifiers").length||!e.get("specifiers.0").isImportDefaultSpecifier())throw e.buildCodeFrameError("Helpers can only import a default value");const n=e.node.specifiers[0].local;i.set(n,t),l.push(u(e))},ExportDefaultDeclaration(e){const t=e.get("declaration");if(t.isFunctionDeclaration()){if(!t.node.id)throw t.buildCodeFrameError("Helpers should give names to their exported func declaration");o=t.node.id.name}s=u(e)},ExportAllDeclaration(e){throw e.buildCodeFrameError("Helpers can only export default")},ExportNamedDeclaration(e){throw e.buildCodeFrameError("Helpers can only export default")},Statement(e){e.isModuleDeclaration()||e.skip()}}),(0,r.default)(e,{Program(e){const t=e.scope.getAllBindings();Object.keys(t).forEach(e=>{e!==o&&(i.has(t[e].identifier)||n.add(e))})},ReferencedIdentifier(e){const n=e.node.name,r=e.scope.getBinding(n,!0);r?i.has(r.identifier)&&p.push(u(e)):t.add(n)},AssignmentExpression(e){const t=e.get("left");if(!(o in t.getBindingIdentifiers()))return;if(!t.isIdentifier())throw t.buildCodeFrameError("Only simple assignments to exports are allowed in helpers");const n=e.scope.getBinding(o);n&&n.scope.path.isProgram()&&c.push(u(e))}}),!s)throw new Error("Helpers must default-export something.");return c.reverse(),{globals:Array.from(t),localBindingNames:Array.from(n),dependencies:i,exportBindingAssignments:c,exportPath:s,exportName:o,importBindingsReferences:p,importPaths:l}}(n());c[e]={build(e,t,a){const s=n();return function(e,t,n,a,o){if(a&&!n)throw new Error("Unexpected local bindings for module-based helpers.");if(!n)return;const{localBindingNames:s,dependencies:u,exportBindingAssignments:c,exportPath:l,exportName:p,importBindingsReferences:h,importPaths:f}=t,d={};u.forEach((e,t)=>{d[t.name]="function"==typeof o&&o(e)||t});const y={},v=new Set(a||[]);s.forEach(e=>{let t=e;for(;v.has(t);)t="_"+t;t!==e&&(y[e]=t)}),"Identifier"===n.type&&p!==n.name&&(y[p]=n.name),(0,r.default)(e,{Program(e){const t=e.get(l),r=f.map(t=>e.get(t)),a=h.map(t=>e.get(t)),o=t.get("declaration");if("Identifier"===n.type)o.isFunctionDeclaration()?t.replaceWith(o):t.replaceWith(i.variableDeclaration("var",[i.variableDeclarator(n,o.node)]));else{if("MemberExpression"!==n.type)throw new Error("Unexpected helper format.");o.isFunctionDeclaration()?(c.forEach(t=>{const r=e.get(t);r.replaceWith(i.assignmentExpression("=",n,r.node))}),t.replaceWith(o),e.pushContainer("body",i.expressionStatement(i.assignmentExpression("=",n,i.identifier(p))))):t.replaceWith(i.expressionStatement(i.assignmentExpression("=",n,o.node)))}Object.keys(y).forEach(t=>{e.scope.rename(t,y[t])});for(const e of r)e.remove();for(const e of a){const t=i.cloneNode(d[e.node.name]);e.replaceWith(t)}e.stop()}})}(s,o,t,a,e),{nodes:s.program.body,globals:o.globals}},minVersion:()=>t.minVersion,dependencies:o.dependencies}}return c[e]}function p(e,t,n,r){return l(e).build(t,n,r)}const h=Object.keys(a.default).map(e=>e.replace(/^_/,"")).filter(e=>"__esModule"!==e);t.list=h;var f=p;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ForAwaitStatement=t.NumericLiteralTypeAnnotation=t.ExistentialTypeParam=t.SpreadProperty=t.RestProperty=t.Flow=t.Pure=t.Generated=t.User=t.Var=t.BlockScoped=t.Referenced=t.Scope=t.Expression=t.Statement=t.BindingIdentifier=t.ReferencedMemberExpression=t.ReferencedIdentifier=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(10));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}const a={types:["Identifier","JSXIdentifier"],checkPath(e,t){const{node:n,parent:i}=e;if(!r.isIdentifier(n,t)&&!r.isJSXMemberExpression(i,t)){if(!r.isJSXIdentifier(n,t))return!1;if(r.react.isCompatTag(n.name))return!1}return r.isReferenced(n,i,e.parentPath.parent)}};t.ReferencedIdentifier=a;const o={types:["MemberExpression"],checkPath:({node:e,parent:t})=>r.isMemberExpression(e)&&r.isReferenced(e,t)};t.ReferencedMemberExpression=o;const s={types:["Identifier"],checkPath(e){const{node:t,parent:n}=e,i=e.parentPath.parent;return r.isIdentifier(t)&&r.isBinding(t,n,i)}};t.BindingIdentifier=s;const u={types:["Statement"],checkPath({node:e,parent:t}){if(r.isStatement(e)){if(r.isVariableDeclaration(e)){if(r.isForXStatement(t,{left:e}))return!1;if(r.isForStatement(t,{init:e}))return!1}return!0}return!1}};t.Statement=u;const c={types:["Expression"],checkPath:e=>e.isIdentifier()?e.isReferencedIdentifier():r.isExpression(e.node)};t.Expression=c;const l={types:["Scopable"],checkPath:e=>r.isScope(e.node,e.parent)};t.Scope=l;const p={checkPath:e=>r.isReferenced(e.node,e.parent)};t.Referenced=p;const h={checkPath:e=>r.isBlockScoped(e.node)};t.BlockScoped=h;const f={types:["VariableDeclaration"],checkPath:e=>r.isVar(e.node)};t.Var=f;const d={checkPath:e=>e.node&&!!e.node.loc};t.User=d;const y={checkPath:e=>!e.isUser()};t.Generated=y;const v={checkPath:(e,t)=>e.scope.isPure(e.node,t)};t.Pure=v;const m={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:({node:e})=>!!r.isFlow(e)||(r.isImportDeclaration(e)?"type"===e.importKind||"typeof"===e.importKind:r.isExportDeclaration(e)?"type"===e.exportKind:!!r.isImportSpecifier(e)&&("type"===e.importKind||"typeof"===e.importKind))};t.Flow=m;const g={types:["RestElement"],checkPath:e=>e.parentPath&&e.parentPath.isObjectPattern()};t.RestProperty=g;const b={types:["RestElement"],checkPath:e=>e.parentPath&&e.parentPath.isObjectExpression()};t.SpreadProperty=b;t.ExistentialTypeParam={types:["ExistsTypeAnnotation"]};t.NumericLiteralTypeAnnotation={types:["NumberLiteralTypeAnnotation"]};const x={types:["ForOfStatement"],checkPath:({node:e})=>!0===e.await};t.ForAwaitStatement=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=e.split(".");return e=>(0,i.default)(e,n,t)};var r,i=(r=n(100))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(!(0,r.isMemberExpression)(e))return!1;const i=Array.isArray(t)?t:t.split("."),a=[];let o;for(o=e;(0,r.isMemberExpression)(o);o=o.object)a.push(o.property);if(a.push(o),a.lengthi.length)return!1;for(let e=0,t=a.length-1;e=97&&o<=122||o>=65&&o<=90||36===o||95===o;for(a=new Array(128),o=0;o<128;++o)a[o]=o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||36===o||95===o;e.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&r.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(e){return e<128?i[e]:n.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES5:function(e){return e<128?a[e]:n.NonAsciiIdentifierPart.test(s(e))},isIdentifierStartES6:function(e){return e<128?i[e]:t.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES6:function(e){return e<128?a[e]:t.NonAsciiIdentifierPart.test(s(e))}}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e===t)return!0;const n=r.PLACEHOLDERS_ALIAS[e];if(n)for(const e of n)if(t===e)return!0;return!1};var r=n(13)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PLACEHOLDERS_FLIPPED_ALIAS=t.PLACEHOLDERS_ALIAS=t.PLACEHOLDERS=void 0;var r=n(19);const i=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"];t.PLACEHOLDERS=i;const a={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};t.PLACEHOLDERS_ALIAS=a;for(const e of i){const t=r.ALIAS_KEYS[e];t&&t.length&&(a[e]=t)}const o={};t.PLACEHOLDERS_FLIPPED_ALIAS=o,Object.keys(a).forEach(e=>{a[e].forEach(t=>{Object.hasOwnProperty.call(o,t)||(o[t]=[]),o[t].push(e)})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!(!e||!r.VISITOR_KEYS[e.type])};var r=n(13)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){const n={},i={},a=[],o=[];for(let s=0;s=0)){if((0,r.isAnyTypeAnnotation)(u))return[u];if((0,r.isFlowBaseAnnotation)(u))i[u.type]=u;else if((0,r.isUnionTypeAnnotation)(u))a.indexOf(u.types)<0&&(t=t.concat(u.types),a.push(u.types));else if((0,r.isGenericTypeAnnotation)(u)){const t=u.id.name;if(n[t]){let r=n[t];r.typeParameters?u.typeParameters&&(r.typeParameters.params=e(r.typeParameters.params.concat(u.typeParameters.params))):r=u.typeParameters}else n[t]=u}else o.push(u)}}for(const e of Object.keys(i))o.push(i[e]);for(const e of Object.keys(n))o.push(n[e]);return o};var r=n(11)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(e,!1)};var r,i=(r=n(33))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(!n||!e)return e;const r=`${t}Comments`;e[r]?e[r]="leading"===t?n.concat(e[r]):e[r].concat(n):e[r]=n;return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,i.default)("innerComments",e,t)};var r,i=(r=n(77))&&r.__esModule?r:{default:r}},function(e,t,n){var r=n(61),i=n(266),a=n(267);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++te.isScope());return e&&e.scope}get parentBlock(){return this.path.parent}get hub(){return this.path.hub}traverse(e,t,n){(0,o.default)(e,t,this,n,this.path)}generateDeclaredUidIdentifier(e){const t=this.generateUidIdentifier(e);return this.push({id:t}),l.cloneNode(t)}generateUidIdentifier(e){return l.identifier(this.generateUid(e))}generateUid(e="temp"){let t;e=l.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");let n=0;do{t=this._generateUid(e,n),n++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));const r=this.getProgramParent();return r.references[t]=!0,r.uids[t]=!0,t}_generateUid(e,t){let n=e;return t>1&&(n+=t),`_${n}`}generateUidBasedOnNode(e,t){let n=e;l.isAssignmentExpression(e)?n=e.left:l.isVariableDeclarator(e)?n=e.id:(l.isObjectProperty(n)||l.isObjectMethod(n))&&(n=n.key);const r=[];!function e(t,n){if(l.isModuleDeclaration(t))if(t.source)e(t.source,n);else if(t.specifiers&&t.specifiers.length)for(const r of t.specifiers)e(r,n);else t.declaration&&e(t.declaration,n);else if(l.isModuleSpecifier(t))e(t.local,n);else if(l.isMemberExpression(t))e(t.object,n),e(t.property,n);else if(l.isIdentifier(t))n.push(t.name);else if(l.isLiteral(t))n.push(t.value);else if(l.isCallExpression(t))e(t.callee,n);else if(l.isObjectExpression(t)||l.isObjectPattern(t))for(const r of t.properties)e(r.key||r.argument,n);else l.isPrivateName(t)?e(t.id,n):l.isThisExpression(t)?n.push("this"):l.isSuper(t)&&n.push("super")}(n,r);let i=r.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUid(i.slice(0,20))}generateUidIdentifierBasedOnNode(e,t){return l.identifier(this.generateUidBasedOnNode(e,t))}isStatic(e){if(l.isThisExpression(e)||l.isSuper(e))return!0;if(l.isIdentifier(e)){const t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1}maybeGenerateMemoised(e,t){if(this.isStatic(e))return null;{const n=this.generateUidIdentifierBasedOnNode(e);return t?n:(this.push({id:n}),l.cloneNode(n))}}checkBlockScopedCollisions(e,t,n,r){if("param"===t)return;if("local"===e.kind)return;if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.buildError(r,`Duplicate declaration "${n}"`,TypeError)}rename(e,t,n){const r=this.getBinding(e);if(r)return t=t||this.generateUidIdentifier(e).name,new a.default(r,e,t).rename(n)}_renameFromMap(e,t,n,r){e[t]&&(e[n]=r,e[t]=null)}dump(){const e=(0,i.default)("-",60);console.log(e);let t=this;do{console.log("#",t.block.type);for(const e of Object.keys(t.bindings)){const n=t.bindings[e];console.log(" -",e,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)}toArray(e,t){if(l.isIdentifier(e)){const t=this.getBinding(e.name);if(t&&t.constant&&t.path.isGenericType("Array"))return e}if(l.isArrayExpression(e))return e;if(l.isIdentifier(e,{name:"arguments"}))return l.callExpression(l.memberExpression(l.memberExpression(l.memberExpression(l.identifier("Array"),l.identifier("prototype")),l.identifier("slice")),l.identifier("call")),[e]);let n;const r=[e];return!0===t?n="toConsumableArray":t?(r.push(l.numericLiteral(t)),n="slicedToArray"):n="toArray",l.callExpression(this.hub.addHelper(n),r)}hasLabel(e){return!!this.getLabel(e)}getLabel(e){return this.labels.get(e)}registerLabel(e){this.labels.set(e.node.label.name,e)}registerDeclaration(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration()){const t=e.get("declarations");for(const n of t)this.registerBinding(e.node.kind,n)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration()){const t=e.get("specifiers");for(const e of t)this.registerBinding("module",e)}else if(e.isExportDeclaration()){const t=e.get("declaration");(t.isClassDeclaration()||t.isFunctionDeclaration()||t.isVariableDeclaration())&&this.registerDeclaration(t)}else this.registerBinding("unknown",e)}buildUndefinedNode(){return l.unaryExpression("void",l.numericLiteral(0),!0)}registerConstantViolation(e){const t=e.getBindingIdentifiers();for(const n of Object.keys(t)){const t=this.getBinding(n);t&&t.reassign(e)}}registerBinding(e,t,n=t){if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration()){const n=t.get("declarations");for(const t of n)this.registerBinding(e,t);return}const r=this.getProgramParent(),i=t.getOuterBindingIdentifiers(!0);for(const t of Object.keys(i))for(const a of i[t]){const i=this.getOwnBinding(t);if(i){if(i.identifier===a)continue;this.checkBlockScopedCollisions(i,e,t,a)}r.references[t]=!0,i?this.registerConstantViolation(n):this.bindings[t]=new u.default({identifier:a,scope:this,path:n,kind:e})}}addGlobal(e){this.globals[e.name]=e}hasUid(e){let t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1}hasGlobal(e){let t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1}hasReference(e){let t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1}isPure(e,t){if(l.isIdentifier(e)){const n=this.getBinding(e.name);return!!n&&(!t||n.constant)}if(l.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(l.isClassBody(e)){for(const n of e.body)if(!this.isPure(n,t))return!1;return!0}if(l.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(l.isArrayExpression(e)){for(const n of e.elements)if(!this.isPure(n,t))return!1;return!0}if(l.isObjectExpression(e)){for(const n of e.properties)if(!this.isPure(n,t))return!1;return!0}if(l.isClassMethod(e))return!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind);if(l.isProperty(e))return!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t);if(l.isUnaryExpression(e))return this.isPure(e.argument,t);if(l.isTaggedTemplateExpression(e))return l.matchesPattern(e.tag,"String.raw")&&!this.hasBinding("String",!0)&&this.isPure(e.quasi,t);if(l.isTemplateLiteral(e)){for(const n of e.expressions)if(!this.isPure(n,t))return!1;return!0}return l.isPureish(e)}setData(e,t){return this.data[e]=t}getData(e){let t=this;do{const n=t.data[e];if(null!=n)return n}while(t=t.parent)}removeData(e){let t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)}init(){this.references||this.crawl()}crawl(){const e=this.path;if(this.references=Object.create(null),this.bindings=Object.create(null),this.globals=Object.create(null),this.uids=Object.create(null),this.data=Object.create(null),e.isLoop())for(const t of l.FOR_INIT_KEYS){const n=e.get(t);n.isBlockScoped()&&this.registerBinding(n.node.kind,n)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[l.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[l.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction()){const t=e.get("params");for(const e of t)this.registerBinding("param",e)}if(e.isCatchClause()&&this.registerBinding("let",e),this.getProgramParent().crawling)return;const t={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(d,t),this.crawling=!1;for(const e of t.assignments){const t=e.getBindingIdentifiers();let n;for(const r of Object.keys(t))e.scope.getBinding(r)||(n=n||e.scope.getProgramParent(),n.addGlobal(t[r]));e.scope.registerConstantViolation(e)}for(const e of t.references){const t=e.scope.getBinding(e.node.name);t?t.reference(e):e.scope.getProgramParent().addGlobal(e.node)}for(const e of t.constantViolations)e.scope.registerConstantViolation(e)}push(e){let t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=(this.getFunctionParent()||this.getProgramParent()).path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(t.ensureBlock(),t=t.get("body"));const n=e.unique,r=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,a=`declaration:${r}:${i}`;let o=!n&&t.getData(a);if(!o){const e=l.variableDeclaration(r,[]);e._blockHoist=i,[o]=t.unshiftContainer("body",[e]),n||t.setData(a,o)}const s=l.variableDeclarator(e.id,e.init);o.node.declarations.push(s),this.registerBinding(r,o.get("declarations").pop())}getProgramParent(){let e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("Couldn't find a Program")}getFunctionParent(){let e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);return null}getBlockParent(){let e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getAllBindings(){const e=Object.create(null);let t=this;do{(0,s.default)(e,t.bindings),t=t.parent}while(t);return e}getAllBindingsOfKind(){const e=Object.create(null);for(const t of arguments){let n=this;do{for(const r of Object.keys(n.bindings)){const i=n.bindings[r];i.kind===t&&(e[r]=i)}n=n.parent}while(n)}return e}bindingIdentifierEquals(e,t){return this.getBindingIdentifier(e)===t}getBinding(e){let t=this;do{const n=t.getOwnBinding(e);if(n)return n}while(t=t.parent)}getOwnBinding(e){return this.bindings[e]}getBindingIdentifier(e){const t=this.getBinding(e);return t&&t.identifier}getOwnBindingIdentifier(e){const t=this.bindings[e];return t&&t.identifier}hasOwnBinding(e){return!!this.getOwnBinding(e)}hasBinding(e,t){return!!e&&(!!this.hasOwnBinding(e)||(!!this.parentHasBinding(e,t)||(!!this.hasUid(e)||(!(t||!(0,r.default)(v.globals,e))||!(t||!(0,r.default)(v.contextVariables,e))))))}parentHasBinding(e,t){return this.parent&&this.parent.hasBinding(e,t)}moveBindingTo(e,t){const n=this.getBinding(e);n&&(n.scope.removeOwnBinding(e),n.scope=t,t.bindings[e]=n)}removeOwnBinding(e){delete this.bindings[e]}removeBinding(e){const t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);let n=this;do{n.uids[e]&&(n.uids[e]=!1)}while(n=n.parent)}}t.default=v,v.globals=Object.keys(c.default.builtin),v.contextVariables=["arguments","undefined","Infinity","NaN"]},function(e,t,n){var r=n(310),i=n(83),a=n(81),o=n(84);e.exports=function(e,t,n){return t=(n?i(e,t,n):void 0===t)?1:a(t),r(o(e),t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor({identifier:e,scope:t,path:n,kind:r}){this.identifier=e,this.scope=t,this.path=n,this.kind=r,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue()}deoptValue(){this.clearValue(),this.hasDeoptedValue=!0}setValue(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)}clearValue(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null}reassign(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)}reference(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))}dereference(){this.references--,this.referenced=!!this.references}}},function(e,t,n){var r=n(46),i=n(315),a=n(317);e.exports=function(e,t){return a(i(e,t,r),e+"")}},function(e,t,n){t.SourceMapGenerator=n(144).SourceMapGenerator,t.SourceMapConsumer=n(326).SourceMapConsumer,t.SourceNode=n(329).SourceNode},function(e,t,n){var r=n(145),i=n(35),a=n(146).ArraySet,o=n(325).MappingList;function s(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new o,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(e){var t=e.sourceRoot,n=new s({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=i.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&n.setSourceContent(t,r)})),n},s.prototype.addMapping=function(e){var t=i.getArg(e,"generated"),n=i.getArg(e,"original",null),r=i.getArg(e,"source",null),a=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,a),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=a&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:a})},s.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=i.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var o=this._sourceRoot;null!=o&&(r=i.relative(o,r));var s=new a,u=new a;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=n&&(t.source=i.join(n,t.source)),null!=o&&(t.source=i.relative(o,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var c=t.source;null==c||s.has(c)||s.add(c);var l=t.name;null==l||u.has(l)||u.add(l)}),this),this._sources=s,this._names=u,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=i.join(n,t)),null!=o&&(t=i.relative(o,t)),this.setSourceContent(t,r))}),this)},s.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},s.prototype._serializeMappings=function(){for(var e,t,n,a,o=0,s=1,u=0,c=0,l=0,p=0,h="",f=this._mappings.toArray(),d=0,y=f.length;d0){if(!i.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=r.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(a=this._sources.indexOf(t.source),e+=r.encode(a-p),p=a,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-l),l=n)),h+=e}return h},s.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=i.relative(t,e));var n=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=s},function(e,t,n){var r=n(324);t.encode=function(e){var t,n="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,(i>>>=5)>0&&(t|=32),n+=r.encode(t)}while(i>0);return n},t.decode=function(e,t,n){var i,a,o,s,u=e.length,c=0,l=0;do{if(t>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&a),c+=(a&=31)<>1,1==(1&o)?-s:s),n.rest=t}},function(e,t,n){var r=n(35),i=Object.prototype.hasOwnProperty,a="undefined"!=typeof Map;function o(){this._array=[],this._set=a?new Map:Object.create(null)}o.fromArray=function(e,t){for(var n=new o,r=0,i=e.length;r=0)return t}else{var n=r.toSetString(e);if(i.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e{this.word(e.name)})},t.ArgumentPlaceholder=function(){this.token("?")},t.SpreadElement=t.RestElement=function(e){this.token("..."),this.print(e.argument,e)},t.ObjectPattern=t.ObjectExpression=function(e){const t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space());this.token("}")},t.ObjectMethod=function(e){this.printJoin(e.decorators,e),this._methodHead(e),this.space(),this.print(e.body,e)},t.ObjectProperty=function(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(i.isAssignmentPattern(e.value)&&i.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&i.isIdentifier(e.key)&&i.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(":"),this.space(),this.print(e.value,e)},t.ArrayPattern=t.ArrayExpression=function(e){const t=e.elements,n=t.length;this.token("["),this.printInnerComments(e);for(let r=0;r0&&this.space(),this.print(i,e),r * @license MIT */ -var r=n(342),i=n(343),a=n(344);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return N(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=n;as&&(n=s-u),a=n;a>=0;a--){for(var p=!0,h=0;hi&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&c)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=p}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,i),l=e.slice(t,n),p=0;pi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function $(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function F(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,a){return a||F(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function _(e,t,n,r,a){return a||F(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||$(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);$(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);$(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return _(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return _(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function V(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(60))},function(e,t,n){var r=n(360),i={};for(var a in r)r.hasOwnProperty(a)&&(i[r[a]]=a);var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var s in o)if(o.hasOwnProperty(s)){if(!("channels"in o[s]))throw new Error("missing channels property: "+s);if(!("labels"in o[s]))throw new Error("missing channel labels property: "+s);if(o[s].labels.length!==o[s].channels)throw new Error("channel and label counts mismatch: "+s);var u=o[s].channels,c=o[s].labels;delete o[s].channels,delete o[s].labels,Object.defineProperty(o[s],"channels",{value:u}),Object.defineProperty(o[s],"labels",{value:c})}function l(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}o.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),u=s-o;return s===o?t=0:r===s?t=(i-a)/u:i===s?t=2+(a-r)/u:a===s&&(t=4+(r-i)/u),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+s)/2,[t,100*(s===o?0:n<=.5?u/(s+o):u/(2-s-o)),100*n]},o.rgb.hsv=function(e){var t,n,r,i,a,o=e[0]/255,s=e[1]/255,u=e[2]/255,c=Math.max(o,s,u),l=c-Math.min(o,s,u),p=function(e){return(c-e)/6/l+.5};return 0===l?i=a=0:(a=l/c,t=p(o),n=p(s),r=p(u),o===c?i=r-n:s===c?i=1/3+t-r:u===c&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*c]},o.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[o.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},o.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},o.rgb.keyword=function(e){var t=i[e];if(t)return t;var n,a=1/0;for(var o in r)if(r.hasOwnProperty(o)){var s=l(e,r[o]);s.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},o.rgb.lab=function(e){var t=o.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},o.hsl.rgb=function(e){var t,n,r,i,a,o=e[0]/360,s=e[1]/100,u=e[2]/100;if(0===s)return[a=255*u,a,a];t=2*u-(n=u<.5?u*(1+s):u+s-u*s),i=[0,0,0];for(var c=0;c<3;c++)(r=o+1/3*-(c-1))<0&&r++,r>1&&r--,a=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[c]=255*a;return i},o.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(0===r?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},o.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),u=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,u,o];case 1:return[s,r,o];case 2:return[o,r,u];case 3:return[o,s,r];case 4:return[u,o,r];case 5:return[r,o,s]}},o.hsv.hsl=function(e){var t,n,r,i=e[0],a=e[1]/100,o=e[2]/100,s=Math.max(o,.01);return r=(2-a)*o,n=a*s,[i,100*(n=(n/=(t=(2-a)*s)<=1?t:2-t)||0),100*(r/=2)]},o.hwb.rgb=function(e){var t,n,r,i,a,o,s,u=e[0]/360,c=e[1]/100,l=e[2]/100,p=c+l;switch(p>1&&(c/=p,l/=p),r=6*u-(t=Math.floor(6*u)),0!=(1&t)&&(r=1-r),i=c+r*((n=1-l)-c),t){default:case 6:case 0:a=n,o=i,s=c;break;case 1:a=i,o=n,s=c;break;case 2:a=c,o=n,s=i;break;case 3:a=c,o=i,s=n;break;case 4:a=i,o=c,s=n;break;case 5:a=n,o=c,s=i}return[255*a,255*o,255*s]},o.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},o.xyz.rgb=function(e){var t,n,r,i=e[0]/100,a=e[1]/100,o=e[2]/100;return n=-.9689*i+1.8758*a+.0415*o,r=.0557*i+-.204*a+1.057*o,t=(t=3.2406*i+-1.5372*a+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},o.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},o.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var a=Math.pow(n,3),o=Math.pow(t,3),s=Math.pow(r,3);return n=a>.008856?a:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},o.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},o.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},o.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(a+=60),a},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},o.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},o.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},o.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},o.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.max(Math.max(n,r),i),o=Math.min(Math.min(n,r),i),s=a-o;return t=s<=0?0:a===n?(r-i)/s%6:a===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?o/(1-s):0)]},o.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},o.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},o.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,a=[0,0,0],o=t%1*6,s=o%1,u=1-s;switch(Math.floor(o)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=u,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=u,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=u}return i=(1-n)*r,[255*(n*a[0]+i),255*(n*a[1]+i),255*(n*a[2]+i)]},o.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},o.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},o.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},o.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]},o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){const o=function(e,t){t=Object.assign({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,sourceType:"module"},t,{plugins:(t.plugins||[]).concat("placeholders")});try{return(0,i.parse)(e,t)}catch(t){const n=t.loc;throw n&&(t.message+="\n"+(0,a.codeFrameColumns)(e,{start:n}),t.code="BABEL_TEMPLATE_PARSE_ERROR"),t}}(t,n.parser),{placeholderWhitelist:s,placeholderPattern:c,preserveComments:l,syntacticPlaceholders:p}=n;r.removePropertiesDeep(o,{preserveComments:l}),e.validate(o);const h={placeholders:[],placeholderNames:new Set},f={placeholders:[],placeholderNames:new Set},d={value:void 0};return r.traverse(o,u,{syntactic:h,legacy:f,isLegacyRef:d,placeholderWhitelist:s,placeholderPattern:c,syntacticPlaceholders:p}),Object.assign({ast:o},d.value?f:h)};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(10)),i=n(49),a=n(48);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}const s=/^[_$A-Z0-9]+$/;function u(e,t,n){let i;if(r.isPlaceholder(e)){if(!1===n.syntacticPlaceholders)throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");i=e.name.name,n.isLegacyRef.value=!1}else{if(!1===n.isLegacyRef.value||n.syntacticPlaceholders)return;if(r.isIdentifier(e)||r.isJSXIdentifier(e))i=e.name,n.isLegacyRef.value=!0;else{if(!r.isStringLiteral(e))return;i=e.value,n.isLegacyRef.value=!0}}if(!n.isLegacyRef.value&&(null!=n.placeholderPattern||null!=n.placeholderWhitelist))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");if(n.isLegacyRef.value&&(!1===n.placeholderPattern||!(n.placeholderPattern||s).test(i))&&(!n.placeholderWhitelist||!n.placeholderWhitelist.has(i)))return;t=t.slice();const{node:a,key:o}=t[t.length-1];let u;r.isStringLiteral(e)||r.isPlaceholder(e,{expectedNode:"StringLiteral"})?u="string":r.isNewExpression(a)&&"arguments"===o||r.isCallExpression(a)&&"arguments"===o||r.isFunction(a)&&"params"===o?u="param":r.isExpressionStatement(a)&&!r.isPlaceholder(e)?(u="statement",t=t.slice(0,-1)):u=r.isStatement(e)&&r.isPlaceholder(e)?"statement":"other";const{placeholders:c,placeholderNames:l}=n.isLegacyRef.value?n.legacy:n.syntactic;c.push({name:i,type:u,resolve:e=>function(e,t){let n=e;for(let e=0;e{if(!Object.prototype.hasOwnProperty.call(t,e.name)){const t=e.name;throw new Error(`Error: No substitution given for "${t}". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['${t}'])}\n - { placeholderPattern: /^${t}$/ }`)}}),Object.keys(t).forEach(t=>{if(!e.placeholderNames.has(t))throw new Error(`Unknown substitution "${t}" given`)}));return e.placeholders.slice().reverse().forEach(e=>{try{!function(e,t,n){e.isDuplicate&&(Array.isArray(n)?n=n.map(e=>r.cloneNode(e)):"object"==typeof n&&(n=r.cloneNode(n)));const{parent:i,key:a,index:o}=e.resolve(t);if("string"===e.type){if("string"==typeof n&&(n=r.stringLiteral(n)),!n||!r.isStringLiteral(n))throw new Error("Expected string substitution")}else if("statement"===e.type)void 0===o?n?Array.isArray(n)?n=r.blockStatement(n):"string"==typeof n?n=r.expressionStatement(r.identifier(n)):r.isStatement(n)||(n=r.expressionStatement(n)):n=r.emptyStatement():n&&!Array.isArray(n)&&("string"==typeof n&&(n=r.identifier(n)),r.isStatement(n)||(n=r.expressionStatement(n)));else if("param"===e.type){if("string"==typeof n&&(n=r.identifier(n)),void 0===o)throw new Error("Assertion failure.")}else if("string"==typeof n&&(n=r.identifier(n)),Array.isArray(n))throw new Error("Cannot replace single expression with an array.");if(void 0===o)r.validate(i,a,n),i[a]=n;else{const t=i[a].slice();"statement"===e.type||"param"===e.type?null==n?t.splice(o,1):Array.isArray(n)?t.splice(o,1,...n):t[o]=n:t[o]=n,r.validate(i,a,t),i[a]=t}}(e,n,t&&t[e.name]||null)}catch(t){throw t.message=`@babel/template placeholder "${e.name}": ${t.message}`,t}}),n};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(10));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}},function(e,t,n){(function(n){var r;t=e.exports=W,r="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var i=Number.MAX_SAFE_INTEGER||9007199254740991,a=t.re=[],o=t.src=[],s=0,u=s++;o[u]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var l=s++;o[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var p=s++;o[p]="("+o[u]+")\\.("+o[u]+")\\.("+o[u]+")";var h=s++;o[h]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var f=s++;o[f]="(?:"+o[u]+"|"+o[l]+")";var d=s++;o[d]="(?:"+o[c]+"|"+o[l]+")";var y=s++;o[y]="(?:-("+o[f]+"(?:\\."+o[f]+")*))";var v=s++;o[v]="(?:-?("+o[d]+"(?:\\."+o[d]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var g=s++;o[g]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var b=s++,x="v?"+o[p]+o[y]+"?"+o[g]+"?";o[b]="^"+x+"$";var k="[v=\\s]*"+o[h]+o[v]+"?"+o[g]+"?",w=s++;o[w]="^"+k+"$";var S=s++;o[S]="((?:<|>)?=?)";var P=s++;o[P]=o[c]+"|x|X|\\*";var E=s++;o[E]=o[u]+"|x|X|\\*";var T=s++;o[T]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[y]+")?"+o[g]+"?)?)?";var O=s++;o[O]="[v=\\s]*("+o[P]+")(?:\\.("+o[P]+")(?:\\.("+o[P]+")(?:"+o[v]+")?"+o[g]+"?)?)?";var C=s++;o[C]="^"+o[S]+"\\s*"+o[T]+"$";var D=s++;o[D]="^"+o[S]+"\\s*"+o[O]+"$";var A=s++;o[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var j=s++;o[j]="(?:~>?)";var $=s++;o[$]="(\\s*)"+o[j]+"\\s+",a[$]=new RegExp(o[$],"g");var M=s++;o[M]="^"+o[j]+o[T]+"$";var I=s++;o[I]="^"+o[j]+o[O]+"$";var F=s++;o[F]="(?:\\^)";var L=s++;o[L]="(\\s*)"+o[F]+"\\s+",a[L]=new RegExp(o[L],"g");var _=s++;o[_]="^"+o[F]+o[T]+"$";var B=s++;o[B]="^"+o[F]+o[O]+"$";var R=s++;o[R]="^"+o[S]+"\\s*("+k+")$|^$";var N=s++;o[N]="^"+o[S]+"\\s*("+x+")$|^$";var V=s++;o[V]="(\\s*)"+o[S]+"\\s*("+k+"|"+o[T]+")",a[V]=new RegExp(o[V],"g");var z=s++;o[z]="^\\s*("+o[T]+")\\s+-\\s+("+o[T]+")\\s*$";var G=s++;o[G]="^\\s*("+o[O]+")\\s+-\\s+("+o[O]+")\\s*$";var H=s++;o[H]="(<|>)?=?\\s*\\*";for(var U=0;U<35;U++)r(U,o[U]),a[U]||(a[U]=new RegExp(o[U]));function Y(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof W)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?a[w]:a[b]).test(e))return null;try{return new W(e,t)}catch(e){return null}}function W(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof W){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof W))return new W(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var n=e.trim().match(t.loose?a[w]:a[b]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new W(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(Q(e,t))return null;var n=Y(e),r=Y(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var a="prerelease"}for(var o in n)if(("major"===o||"minor"===o||"patch"===o)&&n[o]!==r[o])return i+o;return a},t.compareIdentifiers=K;var X=/^[0-9]+$/;function K(e,t){var n=X.test(e),r=X.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function Z(e,t,n){return q(e,t,n)<0}function Q(e,t,n){return 0===q(e,t,n)}function ee(e,t,n){return 0!==q(e,t,n)}function te(e,t,n){return q(e,t,n)>=0}function ne(e,t,n){return q(e,t,n)<=0}function re(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Q(e,n,r);case"!=":return ee(e,n,r);case">":return J(e,n,r);case">=":return te(e,n,r);case"<":return Z(e,n,r);case"<=":return ne(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ae?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return K(t,e)},t.major=function(e,t){return new W(e,t).major},t.minor=function(e,t){return new W(e,t).minor},t.patch=function(e,t){return new W(e,t).patch},t.compare=q,t.compareLoose=function(e,t){return q(e,t,!0)},t.rcompare=function(e,t,n){return q(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compare(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.rcompare(e,r,n)}))},t.gt=J,t.lt=Z,t.eq=Q,t.neq=ee,t.gte=te,t.lte=ne,t.cmp=re,t.Comparator=ie;var ae={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ie)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ue(e,t,n,r,i,a,o,s,u,c,l,p,h){return((t=se(n)?"":se(r)?">="+n+".0.0":se(i)?">="+n+"."+r+".0":">="+t)+" "+(s=se(u)?"":se(c)?"<"+(+u+1)+".0.0":se(l)?"<"+u+"."+(+c+1)+".0":p?"<="+u+"."+c+"."+l+"-"+p:"<="+s)).trim()}function ce(e,t,n){for(var i=0;i0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}function le(e,t,n){try{t=new oe(t,n)}catch(e){return!1}return t.test(e)}function pe(e,t,n,r){var i,a,o,s,u;switch(e=new W(e,r),t=new oe(t,r),n){case">":i=J,a=ne,o=Z,s=">",u=">=";break;case"<":i=Z,a=te,o=J,s="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,r))return!1;for(var c=0;c=0.0.0")),p=p||e,h=h||e,i(e.semver,p.semver,r)?p=e:o(e.semver,h.semver,r)&&(h=e)})),p.operator===s||p.operator===u)return!1;if((!h.operator||h.operator===s)&&a(e,h.semver))return!1;if(h.operator===u&&o(e,h.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?a[R]:a[N],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new W(n[2],this.options.loose):this.semver=ae},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ae||("string"==typeof e&&(e=new W(e,this.options)),re(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),le(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),le(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||a&&o||s||u},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?a[G]:a[z];e=e.replace(n,ue),r("hyphen replace",e),e=e.replace(a[V],"$1$2$3"),r("comparator trim",e,a[V]),e=(e=(e=e.replace(a[$],"$1~")).replace(a[L],"$1^")).split(/\s+/).join(" ");var i=t?a[R]:a[N],o=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?a[B]:a[_];return e.replace(n,(function(t,n,i,a,o){var s;return r("caret",e,t,n,i,a,o),se(n)?s="":se(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":se(a)?s="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),s="0"===n?"0"===i?">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+"-"+o+" <"+(+n+1)+".0.0"):(r("no pr"),s="0"===n?"0"===i?">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"),r("caret return",s),s}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?a[I]:a[M];return e.replace(n,(function(t,n,i,a,o){var s;return r("tilde",e,t,n,i,a,o),se(n)?s="":se(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":se(a)?s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":o?(r("replaceTilde pr",o),s=">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0"):s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0",r("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?a[D]:a[C];return e.replace(n,(function(t,n,i,a,o,s){r("xRange",e,t,n,i,a,o,s);var u=se(i),c=u||se(a),l=c||se(o);return"="===n&&l&&(n=""),u?t=">"===n||"<"===n?"<0.0.0":"*":n&&l?(c&&(a=0),o=0,">"===n?(n=">=",c?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===n&&(n="<",c?i=+i+1:a=+a+1),t=n+i+"."+a+"."+o):c?t=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(a[H],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(i)}))),o=o.map((function(e){return new ie(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new W(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!J(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(n&&e.test(n))return n;return null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return pe(e,t,"<",n)},t.gtr=function(e,t,n){return pe(e,t,">",n)},t.outside=pe,t.prerelease=function(e,t){var n=Y(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof W)return e;if("string"!=typeof e)return null;var t=e.match(a[A]);if(null==t)return null;return Y(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}}).call(this,n(20))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnv=function(t="development"){return e.env.BABEL_ENV||"production"}}).call(this,n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCachedDescriptors=function(e,t,n){const{plugins:r,presets:i,passPerPreset:a}=t;return{options:t,plugins:r?()=>c(r,e)(n):()=>[],presets:i?()=>s(i,e)(n)(!!a):()=>[]}},t.createUncachedDescriptors=function(e,t,n){let r,i;return{options:t,plugins:()=>(r||(r=f(t.plugins||[],e,n)),r),presets:()=>(i||(i=h(t.presets||[],e,n,!!t.passPerPreset)),i)}},t.createDescriptor=y;var r=n(51),i=n(52),a=n(53);const o=new WeakMap,s=(0,a.makeWeakCache)((e,t)=>{const n=t.using(e=>e);return(0,a.makeStrongCache)(t=>(0,a.makeStrongCache)(r=>h(e,n,t,r).map(e=>p(o,e))))}),u=new WeakMap,c=(0,a.makeWeakCache)((e,t)=>{const n=t.using(e=>e);return(0,a.makeStrongCache)(t=>f(e,n,t).map(e=>p(u,e)))}),l={};function p(e,t){const{value:n,options:r=l}=t;if(!1===r)return t;let i=e.get(n);i||(i=new WeakMap,e.set(n,i));let a=i.get(r);if(a||(a=[],i.set(r,a)),-1===a.indexOf(t)){const e=a.filter(e=>{return r=t,(n=e).name===r.name&&n.value===r.value&&n.options===r.options&&n.dirname===r.dirname&&n.alias===r.alias&&n.ownPass===r.ownPass&&(n.file&&n.file.request)===(r.file&&r.file.request)&&(n.file&&n.file.resolved)===(r.file&&r.file.resolved);var n,r});if(e.length>0)return e[0];a.push(t)}return t}function h(e,t,n,r){return d("preset",e,t,n,r)}function f(e,t,n){return d("plugin",e,t,n)}function d(e,t,n,r,i){const a=t.map((t,a)=>y(t,n,{type:e,alias:`${r}$${a}`,ownPass:!!i}));return function(e){const t=new Map;for(const n of e){if("function"!=typeof n.value)continue;let r=t.get(n.value);if(r||(r=new Set,t.set(n.value,r)),r.has(n.name)){const t=e.filter(e=>e.value===n.value);throw new Error(["Duplicate plugin/preset detected.","If you'd like to use two separate instances of a plugin,","they need separate names, e.g.",""," plugins: ["," ['some-plugin', {}],"," ['some-plugin', {}, 'some unique name'],"," ]","","Duplicates detected are:",`${JSON.stringify(t,null,2)}`].join("\n"))}r.add(n.name)}}(a),a}function y(e,t,{type:n,alias:a,ownPass:o}){const s=(0,i.getItemDescriptor)(e);if(s)return s;let u,c,l=e;Array.isArray(l)&&(3===l.length?[l,c,u]=l:[l,c]=l);let p=void 0,h=null;if("string"==typeof l){if("string"!=typeof n)throw new Error("To resolve a string-based item, the type of item must be given");const e="plugin"===n?r.loadPlugin:r.loadPreset,i=l;({filepath:h,value:l}=e(l,t)),p={request:i,resolved:h}}if(!l)throw new Error(`Unexpected falsy value: ${String(l)}`);if("object"==typeof l&&l.__esModule){if(!l.default)throw new Error("Must export a default export when using ES6 modules.");l=l.default}if("object"!=typeof l&&"function"!=typeof l)throw new Error(`Unsupported format: ${typeof l}. Expected an object or a function.`);if(null!==h&&"object"==typeof l&&l)throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${h}`);return{name:u,alias:h||a,value:l,options:c,dirname:t,ownPass:o,file:p}}},function(e,t,n){"use strict";function r(e,t){for(const n of Object.keys(t)){const r=t[n];void 0!==r&&(e[n]=r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeOptions=function(e,t){for(const n of Object.keys(t))if("parserOpts"===n&&t.parserOpts){const n=t.parserOpts;r(e.parserOpts=e.parserOpts||{},n)}else if("generatorOpts"===n&&t.generatorOpts){const n=t.generatorOpts;r(e.generatorOpts=e.generatorOpts||{},n)}else{const r=t[n];void 0!==r&&(e[n]=r)}}},function(e,t,n){"use strict";function r(){const e=l(n(26));return r=function(){return e},e}function i(){const e=l(n(79));return i=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.buildPresetChain=function(e,t){const n=h(e,t);return n?{plugins:F(n.plugins),presets:F(n.presets),options:n.options.map(e=>I(e))}:null},t.buildRootChain=function(e,t){const n=x({options:e,dirname:t.cwd},t);if(!n)return null;let i;"string"==typeof e.configFile?i=(0,s.loadConfig)(e.configFile,t.cwd,t.envName,t.caller):!1!==e.configFile&&(i=(0,s.findRootConfig)(t.root,t.envName,t.caller));let{babelrc:a,babelrcRoots:u}=e,c=t.cwd;const l={options:[],presets:[],plugins:[]};if(i){const e=m(i),n=k(e,t);if(!n)return null;void 0===a&&(a=e.options.babelrc),void 0===u&&(c=e.dirname,u=e.options.babelrcRoots),$(l,n)}const p="string"==typeof t.filename?(0,s.findPackageData)(t.filename):null;let h,f;const d={options:[],presets:[],plugins:[]};if((!0===a||void 0===a)&&p&&function(e,t,n,i){if("boolean"==typeof n)return n;const a=e.root;if(void 0===n)return-1!==t.directories.indexOf(a);let s=n;Array.isArray(s)||(s=[s]);if(s=s.map(e=>"string"==typeof e?r().default.resolve(i,e):e),1===s.length&&s[0]===a)return-1!==t.directories.indexOf(a);return s.some(n=>("string"==typeof n&&(n=(0,o.default)(n,i)),t.directories.some(t=>N(n,i,t,e))))}(t,p,u,c)){if(({ignore:h,config:f}=(0,s.findRelativeConfig)(p,t.envName,t.caller)),h&&B(t,h.ignore,null,h.dirname))return null;if(f){const e=k(g(f),t);if(!e)return null;$(d,e)}}const y=$($($({options:[],presets:[],plugins:[]},l),d),n);return{plugins:F(y.plugins),presets:F(y.presets),options:y.options.map(e=>I(e)),ignore:h||void 0,babelrc:f||void 0,config:i||void 0}},t.buildPresetChainWalker=void 0;var a=n(88),o=l(n(387)),s=n(51),u=n(53),c=n(156);function l(e){return e&&e.__esModule?e:{default:e}}const p=(0,i().default)("babel:config:config-chain");const h=A({init:e=>e,root:e=>f(e),env:(e,t)=>d(e)(t),overrides:(e,t)=>y(e)(t),overridesEnv:(e,t,n)=>v(e)(t)(n)});t.buildPresetChainWalker=h;const f=(0,u.makeWeakCache)(e=>T(e,e.alias,c.createUncachedDescriptors)),d=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>O(e,e.alias,c.createUncachedDescriptors,t))),y=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>C(e,e.alias,c.createUncachedDescriptors,t))),v=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>(0,u.makeStrongCache)(n=>D(e,e.alias,c.createUncachedDescriptors,t,n))));const m=(0,u.makeWeakCache)(e=>({filepath:e.filepath,dirname:e.dirname,options:(0,a.validate)("configfile",e.options)})),g=(0,u.makeWeakCache)(e=>({filepath:e.filepath,dirname:e.dirname,options:(0,a.validate)("babelrcfile",e.options)})),b=(0,u.makeWeakCache)(e=>({filepath:e.filepath,dirname:e.dirname,options:(0,a.validate)("extendsfile",e.options)})),x=A({root:e=>T(e,"base",c.createCachedDescriptors),env:(e,t)=>O(e,"base",c.createCachedDescriptors,t),overrides:(e,t)=>C(e,"base",c.createCachedDescriptors,t),overridesEnv:(e,t,n)=>D(e,"base",c.createCachedDescriptors,t,n)}),k=A({root:e=>w(e),env:(e,t)=>S(e)(t),overrides:(e,t)=>P(e)(t),overridesEnv:(e,t,n)=>E(e)(t)(n)}),w=(0,u.makeWeakCache)(e=>T(e,e.filepath,c.createUncachedDescriptors)),S=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>O(e,e.filepath,c.createUncachedDescriptors,t))),P=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>C(e,e.filepath,c.createUncachedDescriptors,t))),E=(0,u.makeWeakCache)(e=>(0,u.makeStrongCache)(t=>(0,u.makeStrongCache)(n=>D(e,e.filepath,c.createUncachedDescriptors,t,n))));function T({dirname:e,options:t},n,r){return r(e,t,n)}function O({dirname:e,options:t},n,r,i){const a=t.env&&t.env[i];return a?r(e,a,`${n}.env["${i}"]`):null}function C({dirname:e,options:t},n,r,i){const a=t.overrides&&t.overrides[i];if(!a)throw new Error("Assertion failure - missing override");return r(e,a,`${n}.overrides[${i}]`)}function D({dirname:e,options:t},n,r,i,a){const o=t.overrides&&t.overrides[i];if(!o)throw new Error("Assertion failure - missing override");const s=o.env&&o.env[a];return s?r(e,s,`${n}.overrides[${i}].env["${a}"]`):null}function A({root:e,env:t,overrides:n,overridesEnv:r}){return(i,a,o=new Set)=>{const{dirname:s}=i,u=[],c=e(i);if(L(c,s,a)){u.push(c);const e=t(i,a.envName);e&&L(e,s,a)&&u.push(e),(c.options.overrides||[]).forEach((e,t)=>{const o=n(i,t);if(L(o,s,a)){u.push(o);const e=r(i,t,a.envName);e&&L(e,s,a)&&u.push(e)}})}if(u.some(({options:{ignore:e,only:t}})=>B(a,e,t,s)))return null;const l={options:[],presets:[],plugins:[]};for(const e of u){if(!j(l,e.options,s,a,o))return null;M(l,e)}return l}}function j(e,t,n,r,i){if(void 0===t.extends)return!0;const a=(0,s.loadConfig)(t.extends,n,r.envName,r.caller);if(i.has(a))throw new Error(`Configuration cycle detected loading ${a.filepath}.\n`+"File already loaded following the config chain:\n"+Array.from(i,e=>` - ${e.filepath}`).join("\n"));i.add(a);const o=k(b(a),r,i);return i.delete(a),!!o&&($(e,o),!0)}function $(e,t){return e.options.push(...t.options),e.plugins.push(...t.plugins),e.presets.push(...t.presets),e}function M(e,{options:t,plugins:n,presets:r}){return e.options.push(t),e.plugins.push(...n()),e.presets.push(...r()),e}function I(e){const t=Object.assign({},e);return delete t.extends,delete t.env,delete t.overrides,delete t.plugins,delete t.presets,delete t.passPerPreset,delete t.ignore,delete t.only,delete t.test,delete t.include,delete t.exclude,Object.prototype.hasOwnProperty.call(t,"sourceMap")&&(t.sourceMaps=t.sourceMap,delete t.sourceMap),t}function F(e){const t=new Map,n=[];for(const r of e)if("function"==typeof r.value){const e=r.value;let i=t.get(e);i||(i=new Map,t.set(e,i));let a=i.get(r.name);a?a.value=r:(a={value:r},n.push(a),r.ownPass||i.set(r.name,a))}else n.push({value:r});return n.reduce((e,t)=>(e.push(t.value),e),[])}function L({options:e},t,n){return(void 0===e.test||_(n,e.test,t))&&(void 0===e.include||_(n,e.include,t))&&(void 0===e.exclude||!_(n,e.exclude,t))}function _(e,t,n){return R(e,Array.isArray(t)?t:[t],n)}function B(e,t,n,r){return t&&R(e,t,r)?(p("Ignored %o because it matched one of %O from %o",e.filename,t,r),!0):!(!n||R(e,n,r))&&(p("Ignored %o because it failed to match one of %O from %o",e.filename,n,r),!0)}function R(e,t,n){return t.some(t=>N(t,n,e.filename,e))}function N(e,t,n,r){if("function"==typeof e)return!!e(n,{dirname:t,envName:r.envName,caller:r.caller});if("string"!=typeof n)throw new Error("Configuration contains string/RegExp pattern, but no filename was passed to Babel");return"string"==typeof e&&(e=(0,o.default)(e,t)),e.test(n)}},function(e,t,n){"use strict";function r(e){switch(e.type){case"root":return"";case"env":return`${r(e.parent)}.env["${e.name}"]`;case"overrides":return`${r(e.parent)}.overrides[${e.index}]`;case"option":return`${r(e.parent)}.${e.name}`;case"access":return`${r(e.parent)}[${JSON.stringify(e.name)}]`;default:throw new Error(`Assertion failure: Unknown type ${e.type}`)}}function i(e,t){return{type:"access",name:t,parent:e}}function a(e,t){if(void 0!==t&&("object"!=typeof t||Array.isArray(t)||!t))throw new Error(`${r(e)} must be an object, or undefined`);return t}function o(e,t){if(null!=t&&!Array.isArray(t))throw new Error(`${r(e)} must be an array, or undefined`);return t}function s(e){return"string"==typeof e||"function"==typeof e||e instanceof RegExp}function u(e,t){if(("object"!=typeof t||!t)&&"string"!=typeof t&&"function"!=typeof t)throw new Error(`${r(e)} must be a string, object, function`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.msg=r,t.access=i,t.assertRootMode=function(e,t){if(void 0!==t&&"root"!==t&&"upward"!==t&&"upward-optional"!==t)throw new Error(`${r(e)} must be a "root", "upward", "upward-optional" or undefined`);return t},t.assertSourceMaps=function(e,t){if(void 0!==t&&"boolean"!=typeof t&&"inline"!==t&&"both"!==t)throw new Error(`${r(e)} must be a boolean, "inline", "both", or undefined`);return t},t.assertCompact=function(e,t){if(void 0!==t&&"boolean"!=typeof t&&"auto"!==t)throw new Error(`${r(e)} must be a boolean, "auto", or undefined`);return t},t.assertSourceType=function(e,t){if(void 0!==t&&"module"!==t&&"script"!==t&&"unambiguous"!==t)throw new Error(`${r(e)} must be "module", "script", "unambiguous", or undefined`);return t},t.assertCallerMetadata=function(e,t){const n=a(e,t);if(n){if("string"!=typeof n.name)throw new Error(`${r(e)} set but does not contain "name" property string`);for(const t of Object.keys(n)){const a=i(e,t),o=n[t];if(null!=o&&"boolean"!=typeof o&&"string"!=typeof o&&"number"!=typeof o)throw new Error(`${r(a)} must be null, undefined, a boolean, a string, or a number.`)}}return t},t.assertInputSourceMap=function(e,t){if(void 0!==t&&"boolean"!=typeof t&&("object"!=typeof t||!t))throw new Error(`${r(e)} must be a boolean, object, or undefined`);return t},t.assertString=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new Error(`${r(e)} must be a string, or undefined`);return t},t.assertFunction=function(e,t){if(void 0!==t&&"function"!=typeof t)throw new Error(`${r(e)} must be a function, or undefined`);return t},t.assertBoolean=function(e,t){if(void 0!==t&&"boolean"!=typeof t)throw new Error(`${r(e)} must be a boolean, or undefined`);return t},t.assertObject=a,t.assertArray=o,t.assertIgnoreList=function(e,t){const n=o(e,t);n&&n.forEach((t,n)=>function(e,t){if("string"!=typeof t&&"function"!=typeof t&&!(t instanceof RegExp))throw new Error(`${r(e)} must be an array of string/Function/RegExp values, or undefined`);return t}(i(e,n),t));return n},t.assertConfigApplicableTest=function(e,t){if(void 0===t)return t;if(Array.isArray(t))t.forEach((t,n)=>{if(!s(t))throw new Error(`${r(i(e,n))} must be a string/Function/RegExp.`)});else if(!s(t))throw new Error(`${r(e)} must be a string/Function/RegExp, or an array of those`);return t},t.assertConfigFileSearch=function(e,t){if(void 0!==t&&"boolean"!=typeof t&&"string"!=typeof t)throw new Error(`${r(e)} must be a undefined, a boolean, a string, `+`got ${JSON.stringify(t)}`);return t},t.assertBabelrcSearch=function(e,t){if(void 0===t||"boolean"==typeof t)return t;if(Array.isArray(t))t.forEach((t,n)=>{if(!s(t))throw new Error(`${r(i(e,n))} must be a string/Function/RegExp.`)});else if(!s(t))throw new Error(`${r(e)} must be a undefined, a boolean, a string/Function/RegExp `+`or an array of those, got ${JSON.stringify(t)}`);return t},t.assertPluginList=function(e,t){const n=o(e,t);n&&n.forEach((t,n)=>function(e,t){if(Array.isArray(t)){if(0===t.length)throw new Error(`${r(e)} must include an object`);if(t.length>3)throw new Error(`${r(e)} may only be a two-tuple or three-tuple`);if(u(i(e,0),t[0]),t.length>1){const n=t[1];if(void 0!==n&&!1!==n&&("object"!=typeof n||Array.isArray(n)||null===n))throw new Error(`${r(i(e,1))} must be an object, false, or undefined`)}if(3===t.length){const n=t[2];if(void 0!==n&&"string"!=typeof n)throw new Error(`${r(i(e,2))} must be a string, or undefined`)}}else u(e,t);return t}(i(e,n),t));return n}},function(e,t,n){"use strict";function r(){const e=p(n(26));return r=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=h,t.loadPartialConfig=function(e){const t=h(e);if(!t)return null;const{options:n,babelrc:r,ignore:a,config:o}=t;return(n.plugins||[]).forEach(e=>{if(e.value instanceof i.default)throw new Error("Passing cached plugin instances is not supported in babel.loadPartialConfig()")}),new f(n,r?r.filepath:void 0,a?a.filepath:void 0,o?o.filepath:void 0)};var i=p(n(87)),a=n(157),o=n(52),s=n(158),u=n(155),c=n(88),l=n(51);function p(e){return e&&e.__esModule?e:{default:e}}function h(e){if(null!=e&&("object"!=typeof e||Array.isArray(e)))throw new Error("Babel options must be an object, null, or undefined");const t=e?(0,c.validate)("arguments",e):{},{envName:n=(0,u.getEnv)(),cwd:i=".",root:p=".",rootMode:h="root",caller:f}=t,d=r().default.resolve(i),y=function(e,t){switch(t){case"root":return e;case"upward-optional":{const t=(0,l.findConfigUpwards)(e);return null===t?e:t}case"upward":{const t=(0,l.findConfigUpwards)(e);if(null!==t)return t;throw Object.assign(new Error('Babel was run with rootMode:"upward" but a root could not '+`be found when searching upward from "${e}".\n`+"One of the following config files must be in the directory tree: "+`"${l.ROOT_CONFIG_FILENAMES.join(", ")}".`),{code:"BABEL_ROOT_NOT_FOUND",dirname:e})}default:throw new Error("Assertion failure - unknown rootMode value.")}}(r().default.resolve(d,p),h),v={filename:"string"==typeof t.filename?r().default.resolve(i,t.filename):void 0,cwd:d,root:y,envName:n,caller:f},m=(0,s.buildRootChain)(t,v);if(!m)return null;const g={};return m.options.forEach(e=>{(0,a.mergeOptions)(g,e)}),g.babelrc=!1,g.configFile=!1,g.passPerPreset=!1,g.envName=v.envName,g.cwd=v.cwd,g.root=v.root,g.filename="string"==typeof v.filename?v.filename:void 0,g.plugins=m.plugins.map(e=>(0,o.createItemFromDescriptor)(e)),g.presets=m.presets.map(e=>(0,o.createItemFromDescriptor)(e)),{options:g,context:v,ignore:m.ignore,babelrc:m.babelrc,config:m.config}}class f{constructor(e,t,n,r){this.options=e,this.babelignore=n,this.babelrc=t,this.config=r,Object.freeze(this)}hasFilesystemConfig(){return void 0!==this.babelrc||void 0!==this.config}}Object.freeze(f.prototype)},function(e,t,n){"use strict";function r(){const e=c(n(18));return r=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.runAsync=function(e,t,n,r){let i;try{i=l(e,t,n)}catch(e){return r(e)}return r(null,i)},t.runSync=l;var i=c(n(392)),a=c(n(393)),o=c(n(168)),s=c(n(169)),u=c(n(431));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){const c=(0,s.default)(e.passes,(0,o.default)(e),t,n),l=c.opts;try{!function(e,t){for(const n of t){const t=[],o=[],s=[];for(const r of n.concat([(0,a.default)()])){const n=new i.default(e,r.key,r.options);t.push([r,n]),o.push(n),s.push(r.visitor)}for(const[n,r]of t){const t=n.pre;if(t){if(p(t.call(r,e)))throw new Error("You appear to be using an plugin with an async .pre, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.")}}const u=r().default.visitors.merge(s,o,e.opts.wrapPluginVisitorMethod);(0,r().default)(e.ast,u,e.scope);for(const[n,r]of t){const t=n.post;if(t){if(p(t.call(r,e)))throw new Error("You appear to be using an plugin with an async .post, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.")}}}}(c,e.passes)}catch(e){var h;throw e.message=`${null!=(h=l.filename)?h:"unknown"}: ${e.message}`,e.code||(e.code="BABEL_TRANSFORM_ERROR"),e}let f,d;try{!1!==l.code&&({outputCode:f,outputMap:d}=(0,u.default)(e.passes,c))}catch(e){var y;throw e.message=`${null!=(y=l.filename)?y:"unknown"}: ${e.message}`,e.code||(e.code="BABEL_GENERATE_ERROR"),e}return{metadata:c.metadata,options:l,ast:!0===l.ast?c.ast:null,code:void 0===f?null:f,map:void 0===d?null:d,sourceType:c.ast.program.sourceType}}function p(e){return!(!e||"object"!=typeof e&&"function"!=typeof e||!e.then||"function"!=typeof e.then)}},function(e,t,n){var r=n(401),i=n(17);e.exports=function e(t,n,a,o,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,a,o,e,s))}},function(e,t,n){var r=n(127),i=n(402),a=n(129);e.exports=function(e,t,n,o,s,u){var c=1&n,l=e.length,p=t.length;if(l!=p&&!(c&&p>l))return!1;var h=u.get(e);if(h&&u.get(t))return h==t;var f=-1,d=!0,y=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++f!e.test(t)||(n=t,!1))),[t,n]}function g(e,t){let n=null;return o().traverseFast(t,t=>{[t.leadingComments,n]=m(e,t.leadingComments,n),[t.innerComments,n]=m(e,t.innerComments,n),[t.trailingComments,n]=m(e,t.trailingComments,n)}),n}},function(e,t,n){"use strict";var r=n(428),i=n(26),a=n(429);function o(e,n){var o;(n=n||{}).isFileComment&&(e=function(e,n){var a=t.mapFileCommentRegex.exec(e),o=a[1]||a[2],s=i.resolve(n,o);try{return r.readFileSync(s,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+s+"\n"+e)}}(e,n.commentFileDir)),n.hasComment&&(e=function(e){return e.split(",").pop()}(e)),n.isEncoded&&(o=e,e=a.Buffer.from(o,"base64").toString()),(n.isJSON||n.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}Object.defineProperty(t,"commentRegex",{get:function(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}}),Object.defineProperty(t,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}}),o.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},o.prototype.toBase64=function(){var e=this.toJSON();return a.Buffer.from(e,"utf8").toString("base64")},o.prototype.toComment=function(e){var t="sourceMappingURL=data:application/json;charset=utf-8;base64,"+this.toBase64();return e&&e.multiline?"/*# "+t+" */":"//# "+t},o.prototype.toObject=function(){return JSON.parse(this.toJSON())},o.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error('property "'+e+'" already exists on the sourcemap, use set property instead');return this.setProperty(e,t)},o.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},o.prototype.getProperty=function(e){return this.sourcemap[e]},t.fromObject=function(e){return new o(e)},t.fromJSON=function(e){return new o(e,{isJSON:!0})},t.fromBase64=function(e){return new o(e,{isEncoded:!0})},t.fromComment=function(e){return new o(e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),{isEncoded:!0,hasComment:!0})},t.fromMapFileComment=function(e,t){return new o(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},t.fromSource=function(e){var n=e.match(t.commentRegex);return n?t.fromComment(n.pop()):null},t.fromMapFileSource=function(e,n){var r=e.match(t.mapFileCommentRegex);return r?t.fromMapFileComment(r.pop(),n):null},t.removeComments=function(e){return e.replace(t.commentRegex,"")},t.removeMapFileComments=function(e){return e.replace(t.mapFileCommentRegex,"")},t.generateMapFileComment=function(e,t){var n="sourceMappingURL="+e;return t&&t.multiline?"/*# "+n+" */":"//# "+n}},,,,,,,function(e,t,n){},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}},function(e,t,n){var r=n(93);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(21))&&r.__esModule?r:{default:r},a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(10));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}t.default=class{constructor(e,t,n,r){this.queue=null,this.parentPath=r,this.scope=e,this.state=n,this.opts=t}shouldVisit(e){const t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;const n=a.VISITOR_KEYS[e.type];if(!n||!n.length)return!1;for(const t of n)if(e[t])return!0;return!1}create(e,t,n,r){return i.default.get({parentPath:this.parentPath,parent:e,container:t,key:n,listKey:r})}maybeQueue(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))}visitMultiple(e,t,n){if(0===e.length)return!1;const r=[];for(let i=0;i=0)){if(t.push(r.node),r.visit()){n=!0;break}if(this.priorityQueue.length&&(n=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,n))break}for(const t of e)t.popContext();return this.queue=null,n}visit(e,t){const n=e[t];return!!n&&(Array.isArray(n)?this.visitMultiple(n,e,t):this.visitSingle(e,t))}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(0,((r=n(99))&&r.__esModule?r:{default:r}).default)("React.Component");t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e&&/^[a-z]/.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[];for(let n=0;nn.length)throw new Error(`${e}: Too many arguments passed. Received ${o} but can receive no more than ${n.length}`);const s={type:e};let u=0;n.forEach(n=>{const a=i.NODE_FIELDS[e][n];let c;u-1}},function(e,t,n){var r=n(38);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(37);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(37),i=n(59),a=n(61);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(103),i=n(202),a=n(23),o=n(105),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,p=c.hasOwnProperty,h=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||i(e))&&(r(e)?h:s).test(o(e))}},function(e,t,n){var r=n(27),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,i=n(203),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(16)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(206),i=n(37),a=n(59);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(e,t,n){var r=n(207),i=n(208),a=n(209),o=n(210),s=n(211);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=r)return!1;if(!(56320<=(a=e.charCodeAt(n))&&a<=57343))return!1;i=1024*(i-55296)+(a-56320)+65536}if(!o(i))return!1;o=t.isIdentifierPartES6}return!0}e.exports={isKeywordES5:r,isKeywordES6:i,isReservedWordES5:a,isReservedWordES6:o,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:s,isIdentifierNameES6:u,isIdentifierES5:function(e,t){return s(e)&&!a(e,t)},isIdentifierES6:function(e,t){return u(e)&&!o(e,t)}}}()},function(e,t,n){"use strict";var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(19));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}const a=(e,t="TypeParameterDeclaration")=>{(0,r.default)(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends","mixins","implements","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)(t),extends:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),mixins:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),implements:(0,r.validateOptional)((0,r.arrayOfType)("ClassImplements")),body:(0,r.validateType)("ObjectTypeAnnotation")}})};(0,r.default)("AnyTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow","FlowType"],fields:{elementType:(0,r.validateType)("FlowType")}}),(0,r.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("boolean"))}}),(0,r.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),a("DeclareClass"),(0,r.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),predicate:(0,r.validateOptionalType)("DeclaredPredicate")}}),a("DeclareInterface"),(0,r.default)("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)(["Identifier","StringLiteral"]),body:(0,r.validateType)("BlockStatement"),kind:(0,r.validateOptional)((0,r.assertOneOf)("CommonJS","ES"))}}),(0,r.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,r.validateType)("TypeAnnotation")}}),(0,r.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),right:(0,r.validateType)("FlowType")}}),(0,r.default)("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,r.validateOptionalType)("FlowType")}}),(0,r.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier")}}),(0,r.default)("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{declaration:(0,r.validateOptionalType)("Flow"),specifiers:(0,r.validateOptional)((0,r.arrayOfType)(["ExportSpecifier","ExportNamespaceSpecifier"])),source:(0,r.validateOptionalType)("StringLiteral"),default:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),(0,r.default)("DeclareExportAllDeclaration",{visitor:["source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{source:(0,r.validateType)("StringLiteral"),exportKind:(0,r.validateOptional)((0,r.assertOneOf)("type","value"))}}),(0,r.default)("DeclaredPredicate",{visitor:["value"],aliases:["Flow","FlowPredicate"],fields:{value:(0,r.validateType)("Flow")}}),(0,r.default)("ExistsTypeAnnotation",{aliases:["Flow","FlowType"]}),(0,r.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow","FlowType"],fields:{typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),params:(0,r.validate)((0,r.arrayOfType)("FunctionTypeParam")),rest:(0,r.validateOptionalType)("FunctionTypeParam"),returnType:(0,r.validateType)("FlowType")}}),(0,r.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{name:(0,r.validateOptionalType)("Identifier"),typeAnnotation:(0,r.validateType)("FlowType"),optional:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),(0,r.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow","FlowType"],fields:{id:(0,r.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),(0,r.default)("InferredPredicate",{aliases:["Flow","FlowPredicate"]}),(0,r.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{id:(0,r.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),a("InterfaceDeclaration"),(0,r.default)("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["Flow","FlowType"],fields:{extends:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),body:(0,r.validateType)("ObjectTypeAnnotation")}}),(0,r.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),(0,r.default)("MixedTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow","FlowType"],fields:{typeAnnotation:(0,r.validateType)("FlowType")}}),(0,r.default)("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("number"))}}),(0,r.default)("NumberTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["Flow","FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,r.validate)((0,r.arrayOfType)(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeIndexer")),callProperties:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeCallProperty")),internalSlots:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeInternalSlot")),exact:{validate:(0,r.assertValueType)("boolean"),default:!1},inexact:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),(0,r.default)("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["Flow","UserWhitespacable"],fields:{id:(0,r.validateType)("Identifier"),value:(0,r.validateType)("FlowType"),optional:(0,r.validate)((0,r.assertValueType)("boolean")),static:(0,r.validate)((0,r.assertValueType)("boolean")),method:(0,r.validate)((0,r.assertValueType)("boolean"))}}),(0,r.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{value:(0,r.validateType)("FlowType"),static:(0,r.validate)((0,r.assertValueType)("boolean"))}}),(0,r.default)("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["Flow","UserWhitespacable"],fields:{id:(0,r.validateOptionalType)("Identifier"),key:(0,r.validateType)("FlowType"),value:(0,r.validateType)("FlowType"),static:(0,r.validate)((0,r.assertValueType)("boolean")),variance:(0,r.validateOptionalType)("Variance")}}),(0,r.default)("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["Flow","UserWhitespacable"],fields:{key:(0,r.validateType)(["Identifier","StringLiteral"]),value:(0,r.validateType)("FlowType"),kind:(0,r.validate)((0,r.assertOneOf)("init","get","set")),static:(0,r.validate)((0,r.assertValueType)("boolean")),proto:(0,r.validate)((0,r.assertValueType)("boolean")),optional:(0,r.validate)((0,r.assertValueType)("boolean")),variance:(0,r.validateOptionalType)("Variance")}}),(0,r.default)("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["Flow","UserWhitespacable"],fields:{argument:(0,r.validateType)("FlowType")}}),(0,r.default)("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,r.validateOptionalType)("FlowType"),impltype:(0,r.validateType)("FlowType")}}),(0,r.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{id:(0,r.validateType)("Identifier"),qualification:(0,r.validateType)(["Identifier","QualifiedTypeIdentifier"])}}),(0,r.default)("StringLiteralTypeAnnotation",{builder:["value"],aliases:["Flow","FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("string"))}}),(0,r.default)("StringTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("ThisTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),(0,r.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow","FlowType"],fields:{argument:(0,r.validateType)("FlowType")}}),(0,r.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),right:(0,r.validateType)("FlowType")}}),(0,r.default)("TypeAnnotation",{aliases:["Flow"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("FlowType")}}),(0,r.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{expression:(0,r.validateType)("Expression"),typeAnnotation:(0,r.validateType)("TypeAnnotation")}}),(0,r.default)("TypeParameter",{aliases:["Flow"],visitor:["bound","default","variance"],fields:{name:(0,r.validate)((0,r.assertValueType)("string")),bound:(0,r.validateOptionalType)("TypeAnnotation"),default:(0,r.validateOptionalType)("FlowType"),variance:(0,r.validateOptionalType)("Variance")}}),(0,r.default)("TypeParameterDeclaration",{aliases:["Flow"],visitor:["params"],fields:{params:(0,r.validate)((0,r.arrayOfType)("TypeParameter"))}}),(0,r.default)("TypeParameterInstantiation",{aliases:["Flow"],visitor:["params"],fields:{params:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),(0,r.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow","FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),(0,r.default)("Variance",{aliases:["Flow"],builder:["kind"],fields:{kind:(0,r.validate)((0,r.assertOneOf)("minus","plus"))}}),(0,r.default)("VoidTypeAnnotation",{aliases:["Flow","FlowType","FlowBaseAnnotation"]}),(0,r.default)("EnumDeclaration",{alises:["Declaration"],visitor:["id","body"],fields:{id:(0,r.validateType)("Identifier"),body:(0,r.validateType)(["EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody"])}}),(0,r.default)("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicit:(0,r.validate)((0,r.assertValueType)("boolean")),members:(0,r.validateArrayOfType)("EnumBooleanMember")}}),(0,r.default)("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicit:(0,r.validate)((0,r.assertValueType)("boolean")),members:(0,r.validateArrayOfType)("EnumNumberMember")}}),(0,r.default)("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicit:(0,r.validate)((0,r.assertValueType)("boolean")),members:(0,r.validateArrayOfType)(["EnumStringMember","EnumDefaultedMember"])}}),(0,r.default)("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,r.validateArrayOfType)("EnumDefaultedMember")}}),(0,r.default)("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier"),init:(0,r.validateType)("BooleanLiteral")}}),(0,r.default)("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,r.validateType)("Identifier"),init:(0,r.validateType)("NumericLiteral")}}),(0,r.default)("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,r.validateType)("Identifier"),init:(0,r.validateType)("StringLiteral")}}),(0,r.default)("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier")}})},function(e,t,n){"use strict";var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(19));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}(0,r.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,r.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),(0,r.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),(0,r.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,r.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,r.assertNodeType)("JSXClosingElement")},children:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),(0,r.default)("JSXEmptyExpression",{aliases:["JSX"]}),(0,r.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,r.assertNodeType)("Expression","JSXEmptyExpression")}}}),(0,r.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("JSXIdentifier",{builder:["name"],aliases:["JSX"],fields:{name:{validate:(0,r.assertValueType)("string")}}}),(0,r.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX"],fields:{object:{validate:(0,r.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,r.assertNodeType)("JSXIdentifier")}}}),(0,r.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,r.assertNodeType)("JSXIdentifier")},name:{validate:(0,r.assertNodeType)("JSXIdentifier")}}}),(0,r.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1,validate:(0,r.assertValueType)("boolean")},attributes:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:(0,r.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),(0,r.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,r.assertValueType)("string")}}}),(0,r.default)("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["JSX","Immutable","Expression"],fields:{openingFragment:{validate:(0,r.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,r.assertNodeType)("JSXClosingFragment")},children:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),(0,r.default)("JSXOpeningFragment",{aliases:["JSX","Immutable"]}),(0,r.default)("JSXClosingFragment",{aliases:["JSX","Immutable"]})},function(e,t,n){"use strict";var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(19)),i=n(121);function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}(0,r.default)("Noop",{visitor:[]}),(0,r.default)("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:(0,r.assertNodeType)("Identifier")},expectedNode:{validate:(0,r.assertOneOf)(...i.PLACEHOLDERS)}}}),(0,r.default)("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,r.assertValueType)("string")}}})},function(e,t,n){"use strict";var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(19)),i=n(76);function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}(0,r.default)("ArgumentPlaceholder",{}),(0,r.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,r.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],fields:Object.assign({},i.classMethodOrPropertyCommon,{value:{validate:(0,r.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,r.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,r.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0},readonly:{validate:(0,r.assertValueType)("boolean"),optional:!0},declare:{validate:(0,r.assertValueType)("boolean"),optional:!0}})}),(0,r.default)("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,r.assertNodeType)("Expression")},property:{validate:function(){const e=(0,r.assertNodeType)("Identifier"),t=(0,r.assertNodeType)("Expression");return function(n,r,i){(n.computed?t:e)(n,r,i)}}()},computed:{default:!1},optional:{validate:(0,r.assertValueType)("boolean")}}}),(0,r.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]}),(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")))},optional:{validate:(0,r.assertValueType)("boolean")},typeArguments:{validate:(0,r.assertNodeType)("TypeParameterInstantiation"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}}}),(0,r.default)("ClassPrivateProperty",{visitor:["key","value","decorators"],builder:["key","value","decorators"],aliases:["Property","Private"],fields:{key:{validate:(0,r.assertNodeType)("PrivateName")},value:{validate:(0,r.assertNodeType)("Expression"),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0}}}),(0,r.default)("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},i.classMethodOrDeclareMethodCommon,{key:{validate:(0,r.assertNodeType)("PrivateName")},body:{validate:(0,r.assertNodeType)("BlockStatement")}})}),(0,r.default)("Import",{aliases:["Expression"]}),(0,r.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),(0,r.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,r.assertNodeType)("BlockStatement")}}}),(0,r.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,r.assertNodeType)("Identifier")}}}),(0,r.default)("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,r.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]})},function(e,t,n){"use strict";var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(19)),i=n(72),a=n(76);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}const s=(0,r.assertValueType)("boolean"),u={returnType:{validate:(0,r.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}};(0,r.default)("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,r.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,r.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,r.assertNodeType)("Identifier","AssignmentPattern")}}}),(0,r.default)("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},i.functionDeclarationCommon,{},u)}),(0,r.default)("TSDeclareMethod",{visitor:["decorators","key","typeParameters","params","returnType"],fields:Object.assign({},a.classMethodOrDeclareMethodCommon,{},u)}),(0,r.default)("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,r.validateType)("TSEntityName"),right:(0,r.validateType)("Identifier")}});const c={typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,r.validateArrayOfType)(["Identifier","RestElement"]),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation")},l={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:c};(0,r.default)("TSCallSignatureDeclaration",l),(0,r.default)("TSConstructSignatureDeclaration",l);const p={key:(0,r.validateType)("Expression"),computed:(0,r.validate)(s),optional:(0,r.validateOptional)(s)};(0,r.default)("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation","initializer"],fields:Object.assign({},p,{readonly:(0,r.validateOptional)(s),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation"),initializer:(0,r.validateOptionalType)("Expression")})}),(0,r.default)("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},c,{},p)}),(0,r.default)("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,r.validateOptional)(s),parameters:(0,r.validateArrayOfType)("Identifier"),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation")}});const h=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const e of h)(0,r.default)(e,{aliases:["TSType"],visitor:[],fields:{}});(0,r.default)("TSThisType",{aliases:["TSType"],visitor:[],fields:{}});const f={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"],fields:c};(0,r.default)("TSFunctionType",f),(0,r.default)("TSConstructorType",f),(0,r.default)("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,r.validateType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),(0,r.default)("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,r.validateType)(["Identifier","TSThisType"]),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation"),asserts:(0,r.validateOptional)(s)}}),(0,r.default)("TSTypeQuery",{aliases:["TSType"],visitor:["exprName"],fields:{exprName:(0,r.validateType)(["TSEntityName","TSImportType"])}}),(0,r.default)("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,r.validateArrayOfType)("TSTypeElement")}}),(0,r.default)("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,r.validateType)("TSType")}}),(0,r.default)("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,r.validateArrayOfType)("TSType")}}),(0,r.default)("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),(0,r.default)("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}});const d={aliases:["TSType"],visitor:["types"],fields:{types:(0,r.validateArrayOfType)("TSType")}};(0,r.default)("TSUnionType",d),(0,r.default)("TSIntersectionType",d),(0,r.default)("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,r.validateType)("TSType"),extendsType:(0,r.validateType)("TSType"),trueType:(0,r.validateType)("TSType"),falseType:(0,r.validateType)("TSType")}}),(0,r.default)("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,r.validateType)("TSTypeParameter")}}),(0,r.default)("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),(0,r.default)("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{operator:(0,r.validate)((0,r.assertValueType)("string")),typeAnnotation:(0,r.validateType)("TSType")}}),(0,r.default)("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,r.validateType)("TSType"),indexType:(0,r.validateType)("TSType")}}),(0,r.default)("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","typeAnnotation"],fields:{readonly:(0,r.validateOptional)(s),typeParameter:(0,r.validateType)("TSTypeParameter"),optional:(0,r.validateOptional)(s),typeAnnotation:(0,r.validateOptionalType)("TSType")}}),(0,r.default)("TSLiteralType",{aliases:["TSType"],visitor:["literal"],fields:{literal:(0,r.validateType)(["NumericLiteral","StringLiteral","BooleanLiteral"])}}),(0,r.default)("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,r.validateType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),(0,r.default)("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,r.validateOptional)(s),id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,r.validateOptional)((0,r.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,r.validateType)("TSInterfaceBody")}}),(0,r.default)("TSInterfaceBody",{visitor:["body"],fields:{body:(0,r.validateArrayOfType)("TSTypeElement")}}),(0,r.default)("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,r.validateOptional)(s),id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,r.validateType)("TSType")}}),(0,r.default)("TSAsExpression",{aliases:["Expression"],visitor:["expression","typeAnnotation"],fields:{expression:(0,r.validateType)("Expression"),typeAnnotation:(0,r.validateType)("TSType")}}),(0,r.default)("TSTypeAssertion",{aliases:["Expression"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,r.validateType)("TSType"),expression:(0,r.validateType)("Expression")}}),(0,r.default)("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,r.validateOptional)(s),const:(0,r.validateOptional)(s),id:(0,r.validateType)("Identifier"),members:(0,r.validateArrayOfType)("TSEnumMember"),initializer:(0,r.validateOptionalType)("Expression")}}),(0,r.default)("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,r.validateType)(["Identifier","StringLiteral"]),initializer:(0,r.validateOptionalType)("Expression")}}),(0,r.default)("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:(0,r.validateOptional)(s),global:(0,r.validateOptional)(s),id:(0,r.validateType)(["Identifier","StringLiteral"]),body:(0,r.validateType)(["TSModuleBlock","TSModuleDeclaration"])}}),(0,r.default)("TSModuleBlock",{aliases:["Scopable","Block","BlockParent"],visitor:["body"],fields:{body:(0,r.validateArrayOfType)("Statement")}}),(0,r.default)("TSImportType",{aliases:["TSType"],visitor:["argument","qualifier","typeParameters"],fields:{argument:(0,r.validateType)("StringLiteral"),qualifier:(0,r.validateOptionalType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),(0,r.default)("TSImportEqualsDeclaration",{aliases:["Statement"],visitor:["id","moduleReference"],fields:{isExport:(0,r.validate)(s),id:(0,r.validateType)("Identifier"),moduleReference:(0,r.validateType)(["TSEntityName","TSExternalModuleReference"])}}),(0,r.default)("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,r.validateType)("StringLiteral")}}),(0,r.default)("TSNonNullExpression",{aliases:["Expression"],visitor:["expression"],fields:{expression:(0,r.validateType)("Expression")}}),(0,r.default)("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,r.validateType)("Expression")}}),(0,r.default)("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier")}}),(0,r.default)("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,r.assertNodeType)("TSType")}}}),(0,r.default)("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSType")))}}}),(0,r.default)("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSTypeParameter")))}}}),(0,r.default)("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,r.assertValueType)("string")},constraint:{validate:(0,r.assertNodeType)("TSType"),optional:!0},default:{validate:(0,r.assertNodeType)("TSType"),optional:!0}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!(0,i.default)(e)){const t=e&&e.type||JSON.stringify(e);throw new TypeError(`Not a valid node of type "${t}"`)}};var r,i=(r=n(122))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertArrayExpression=function(e,t={}){a("ArrayExpression",e,t)},t.assertAssignmentExpression=function(e,t={}){a("AssignmentExpression",e,t)},t.assertBinaryExpression=function(e,t={}){a("BinaryExpression",e,t)},t.assertInterpreterDirective=function(e,t={}){a("InterpreterDirective",e,t)},t.assertDirective=function(e,t={}){a("Directive",e,t)},t.assertDirectiveLiteral=function(e,t={}){a("DirectiveLiteral",e,t)},t.assertBlockStatement=function(e,t={}){a("BlockStatement",e,t)},t.assertBreakStatement=function(e,t={}){a("BreakStatement",e,t)},t.assertCallExpression=function(e,t={}){a("CallExpression",e,t)},t.assertCatchClause=function(e,t={}){a("CatchClause",e,t)},t.assertConditionalExpression=function(e,t={}){a("ConditionalExpression",e,t)},t.assertContinueStatement=function(e,t={}){a("ContinueStatement",e,t)},t.assertDebuggerStatement=function(e,t={}){a("DebuggerStatement",e,t)},t.assertDoWhileStatement=function(e,t={}){a("DoWhileStatement",e,t)},t.assertEmptyStatement=function(e,t={}){a("EmptyStatement",e,t)},t.assertExpressionStatement=function(e,t={}){a("ExpressionStatement",e,t)},t.assertFile=function(e,t={}){a("File",e,t)},t.assertForInStatement=function(e,t={}){a("ForInStatement",e,t)},t.assertForStatement=function(e,t={}){a("ForStatement",e,t)},t.assertFunctionDeclaration=function(e,t={}){a("FunctionDeclaration",e,t)},t.assertFunctionExpression=function(e,t={}){a("FunctionExpression",e,t)},t.assertIdentifier=function(e,t={}){a("Identifier",e,t)},t.assertIfStatement=function(e,t={}){a("IfStatement",e,t)},t.assertLabeledStatement=function(e,t={}){a("LabeledStatement",e,t)},t.assertStringLiteral=function(e,t={}){a("StringLiteral",e,t)},t.assertNumericLiteral=function(e,t={}){a("NumericLiteral",e,t)},t.assertNullLiteral=function(e,t={}){a("NullLiteral",e,t)},t.assertBooleanLiteral=function(e,t={}){a("BooleanLiteral",e,t)},t.assertRegExpLiteral=function(e,t={}){a("RegExpLiteral",e,t)},t.assertLogicalExpression=function(e,t={}){a("LogicalExpression",e,t)},t.assertMemberExpression=function(e,t={}){a("MemberExpression",e,t)},t.assertNewExpression=function(e,t={}){a("NewExpression",e,t)},t.assertProgram=function(e,t={}){a("Program",e,t)},t.assertObjectExpression=function(e,t={}){a("ObjectExpression",e,t)},t.assertObjectMethod=function(e,t={}){a("ObjectMethod",e,t)},t.assertObjectProperty=function(e,t={}){a("ObjectProperty",e,t)},t.assertRestElement=function(e,t={}){a("RestElement",e,t)},t.assertReturnStatement=function(e,t={}){a("ReturnStatement",e,t)},t.assertSequenceExpression=function(e,t={}){a("SequenceExpression",e,t)},t.assertParenthesizedExpression=function(e,t={}){a("ParenthesizedExpression",e,t)},t.assertSwitchCase=function(e,t={}){a("SwitchCase",e,t)},t.assertSwitchStatement=function(e,t={}){a("SwitchStatement",e,t)},t.assertThisExpression=function(e,t={}){a("ThisExpression",e,t)},t.assertThrowStatement=function(e,t={}){a("ThrowStatement",e,t)},t.assertTryStatement=function(e,t={}){a("TryStatement",e,t)},t.assertUnaryExpression=function(e,t={}){a("UnaryExpression",e,t)},t.assertUpdateExpression=function(e,t={}){a("UpdateExpression",e,t)},t.assertVariableDeclaration=function(e,t={}){a("VariableDeclaration",e,t)},t.assertVariableDeclarator=function(e,t={}){a("VariableDeclarator",e,t)},t.assertWhileStatement=function(e,t={}){a("WhileStatement",e,t)},t.assertWithStatement=function(e,t={}){a("WithStatement",e,t)},t.assertAssignmentPattern=function(e,t={}){a("AssignmentPattern",e,t)},t.assertArrayPattern=function(e,t={}){a("ArrayPattern",e,t)},t.assertArrowFunctionExpression=function(e,t={}){a("ArrowFunctionExpression",e,t)},t.assertClassBody=function(e,t={}){a("ClassBody",e,t)},t.assertClassDeclaration=function(e,t={}){a("ClassDeclaration",e,t)},t.assertClassExpression=function(e,t={}){a("ClassExpression",e,t)},t.assertExportAllDeclaration=function(e,t={}){a("ExportAllDeclaration",e,t)},t.assertExportDefaultDeclaration=function(e,t={}){a("ExportDefaultDeclaration",e,t)},t.assertExportNamedDeclaration=function(e,t={}){a("ExportNamedDeclaration",e,t)},t.assertExportSpecifier=function(e,t={}){a("ExportSpecifier",e,t)},t.assertForOfStatement=function(e,t={}){a("ForOfStatement",e,t)},t.assertImportDeclaration=function(e,t={}){a("ImportDeclaration",e,t)},t.assertImportDefaultSpecifier=function(e,t={}){a("ImportDefaultSpecifier",e,t)},t.assertImportNamespaceSpecifier=function(e,t={}){a("ImportNamespaceSpecifier",e,t)},t.assertImportSpecifier=function(e,t={}){a("ImportSpecifier",e,t)},t.assertMetaProperty=function(e,t={}){a("MetaProperty",e,t)},t.assertClassMethod=function(e,t={}){a("ClassMethod",e,t)},t.assertObjectPattern=function(e,t={}){a("ObjectPattern",e,t)},t.assertSpreadElement=function(e,t={}){a("SpreadElement",e,t)},t.assertSuper=function(e,t={}){a("Super",e,t)},t.assertTaggedTemplateExpression=function(e,t={}){a("TaggedTemplateExpression",e,t)},t.assertTemplateElement=function(e,t={}){a("TemplateElement",e,t)},t.assertTemplateLiteral=function(e,t={}){a("TemplateLiteral",e,t)},t.assertYieldExpression=function(e,t={}){a("YieldExpression",e,t)},t.assertAnyTypeAnnotation=function(e,t={}){a("AnyTypeAnnotation",e,t)},t.assertArrayTypeAnnotation=function(e,t={}){a("ArrayTypeAnnotation",e,t)},t.assertBooleanTypeAnnotation=function(e,t={}){a("BooleanTypeAnnotation",e,t)},t.assertBooleanLiteralTypeAnnotation=function(e,t={}){a("BooleanLiteralTypeAnnotation",e,t)},t.assertNullLiteralTypeAnnotation=function(e,t={}){a("NullLiteralTypeAnnotation",e,t)},t.assertClassImplements=function(e,t={}){a("ClassImplements",e,t)},t.assertDeclareClass=function(e,t={}){a("DeclareClass",e,t)},t.assertDeclareFunction=function(e,t={}){a("DeclareFunction",e,t)},t.assertDeclareInterface=function(e,t={}){a("DeclareInterface",e,t)},t.assertDeclareModule=function(e,t={}){a("DeclareModule",e,t)},t.assertDeclareModuleExports=function(e,t={}){a("DeclareModuleExports",e,t)},t.assertDeclareTypeAlias=function(e,t={}){a("DeclareTypeAlias",e,t)},t.assertDeclareOpaqueType=function(e,t={}){a("DeclareOpaqueType",e,t)},t.assertDeclareVariable=function(e,t={}){a("DeclareVariable",e,t)},t.assertDeclareExportDeclaration=function(e,t={}){a("DeclareExportDeclaration",e,t)},t.assertDeclareExportAllDeclaration=function(e,t={}){a("DeclareExportAllDeclaration",e,t)},t.assertDeclaredPredicate=function(e,t={}){a("DeclaredPredicate",e,t)},t.assertExistsTypeAnnotation=function(e,t={}){a("ExistsTypeAnnotation",e,t)},t.assertFunctionTypeAnnotation=function(e,t={}){a("FunctionTypeAnnotation",e,t)},t.assertFunctionTypeParam=function(e,t={}){a("FunctionTypeParam",e,t)},t.assertGenericTypeAnnotation=function(e,t={}){a("GenericTypeAnnotation",e,t)},t.assertInferredPredicate=function(e,t={}){a("InferredPredicate",e,t)},t.assertInterfaceExtends=function(e,t={}){a("InterfaceExtends",e,t)},t.assertInterfaceDeclaration=function(e,t={}){a("InterfaceDeclaration",e,t)},t.assertInterfaceTypeAnnotation=function(e,t={}){a("InterfaceTypeAnnotation",e,t)},t.assertIntersectionTypeAnnotation=function(e,t={}){a("IntersectionTypeAnnotation",e,t)},t.assertMixedTypeAnnotation=function(e,t={}){a("MixedTypeAnnotation",e,t)},t.assertEmptyTypeAnnotation=function(e,t={}){a("EmptyTypeAnnotation",e,t)},t.assertNullableTypeAnnotation=function(e,t={}){a("NullableTypeAnnotation",e,t)},t.assertNumberLiteralTypeAnnotation=function(e,t={}){a("NumberLiteralTypeAnnotation",e,t)},t.assertNumberTypeAnnotation=function(e,t={}){a("NumberTypeAnnotation",e,t)},t.assertObjectTypeAnnotation=function(e,t={}){a("ObjectTypeAnnotation",e,t)},t.assertObjectTypeInternalSlot=function(e,t={}){a("ObjectTypeInternalSlot",e,t)},t.assertObjectTypeCallProperty=function(e,t={}){a("ObjectTypeCallProperty",e,t)},t.assertObjectTypeIndexer=function(e,t={}){a("ObjectTypeIndexer",e,t)},t.assertObjectTypeProperty=function(e,t={}){a("ObjectTypeProperty",e,t)},t.assertObjectTypeSpreadProperty=function(e,t={}){a("ObjectTypeSpreadProperty",e,t)},t.assertOpaqueType=function(e,t={}){a("OpaqueType",e,t)},t.assertQualifiedTypeIdentifier=function(e,t={}){a("QualifiedTypeIdentifier",e,t)},t.assertStringLiteralTypeAnnotation=function(e,t={}){a("StringLiteralTypeAnnotation",e,t)},t.assertStringTypeAnnotation=function(e,t={}){a("StringTypeAnnotation",e,t)},t.assertThisTypeAnnotation=function(e,t={}){a("ThisTypeAnnotation",e,t)},t.assertTupleTypeAnnotation=function(e,t={}){a("TupleTypeAnnotation",e,t)},t.assertTypeofTypeAnnotation=function(e,t={}){a("TypeofTypeAnnotation",e,t)},t.assertTypeAlias=function(e,t={}){a("TypeAlias",e,t)},t.assertTypeAnnotation=function(e,t={}){a("TypeAnnotation",e,t)},t.assertTypeCastExpression=function(e,t={}){a("TypeCastExpression",e,t)},t.assertTypeParameter=function(e,t={}){a("TypeParameter",e,t)},t.assertTypeParameterDeclaration=function(e,t={}){a("TypeParameterDeclaration",e,t)},t.assertTypeParameterInstantiation=function(e,t={}){a("TypeParameterInstantiation",e,t)},t.assertUnionTypeAnnotation=function(e,t={}){a("UnionTypeAnnotation",e,t)},t.assertVariance=function(e,t={}){a("Variance",e,t)},t.assertVoidTypeAnnotation=function(e,t={}){a("VoidTypeAnnotation",e,t)},t.assertEnumDeclaration=function(e,t={}){a("EnumDeclaration",e,t)},t.assertEnumBooleanBody=function(e,t={}){a("EnumBooleanBody",e,t)},t.assertEnumNumberBody=function(e,t={}){a("EnumNumberBody",e,t)},t.assertEnumStringBody=function(e,t={}){a("EnumStringBody",e,t)},t.assertEnumSymbolBody=function(e,t={}){a("EnumSymbolBody",e,t)},t.assertEnumBooleanMember=function(e,t={}){a("EnumBooleanMember",e,t)},t.assertEnumNumberMember=function(e,t={}){a("EnumNumberMember",e,t)},t.assertEnumStringMember=function(e,t={}){a("EnumStringMember",e,t)},t.assertEnumDefaultedMember=function(e,t={}){a("EnumDefaultedMember",e,t)},t.assertJSXAttribute=function(e,t={}){a("JSXAttribute",e,t)},t.assertJSXClosingElement=function(e,t={}){a("JSXClosingElement",e,t)},t.assertJSXElement=function(e,t={}){a("JSXElement",e,t)},t.assertJSXEmptyExpression=function(e,t={}){a("JSXEmptyExpression",e,t)},t.assertJSXExpressionContainer=function(e,t={}){a("JSXExpressionContainer",e,t)},t.assertJSXSpreadChild=function(e,t={}){a("JSXSpreadChild",e,t)},t.assertJSXIdentifier=function(e,t={}){a("JSXIdentifier",e,t)},t.assertJSXMemberExpression=function(e,t={}){a("JSXMemberExpression",e,t)},t.assertJSXNamespacedName=function(e,t={}){a("JSXNamespacedName",e,t)},t.assertJSXOpeningElement=function(e,t={}){a("JSXOpeningElement",e,t)},t.assertJSXSpreadAttribute=function(e,t={}){a("JSXSpreadAttribute",e,t)},t.assertJSXText=function(e,t={}){a("JSXText",e,t)},t.assertJSXFragment=function(e,t={}){a("JSXFragment",e,t)},t.assertJSXOpeningFragment=function(e,t={}){a("JSXOpeningFragment",e,t)},t.assertJSXClosingFragment=function(e,t={}){a("JSXClosingFragment",e,t)},t.assertNoop=function(e,t={}){a("Noop",e,t)},t.assertPlaceholder=function(e,t={}){a("Placeholder",e,t)},t.assertV8IntrinsicIdentifier=function(e,t={}){a("V8IntrinsicIdentifier",e,t)},t.assertArgumentPlaceholder=function(e,t={}){a("ArgumentPlaceholder",e,t)},t.assertAwaitExpression=function(e,t={}){a("AwaitExpression",e,t)},t.assertBindExpression=function(e,t={}){a("BindExpression",e,t)},t.assertClassProperty=function(e,t={}){a("ClassProperty",e,t)},t.assertOptionalMemberExpression=function(e,t={}){a("OptionalMemberExpression",e,t)},t.assertPipelineTopicExpression=function(e,t={}){a("PipelineTopicExpression",e,t)},t.assertPipelineBareFunction=function(e,t={}){a("PipelineBareFunction",e,t)},t.assertPipelinePrimaryTopicReference=function(e,t={}){a("PipelinePrimaryTopicReference",e,t)},t.assertOptionalCallExpression=function(e,t={}){a("OptionalCallExpression",e,t)},t.assertClassPrivateProperty=function(e,t={}){a("ClassPrivateProperty",e,t)},t.assertClassPrivateMethod=function(e,t={}){a("ClassPrivateMethod",e,t)},t.assertImport=function(e,t={}){a("Import",e,t)},t.assertDecorator=function(e,t={}){a("Decorator",e,t)},t.assertDoExpression=function(e,t={}){a("DoExpression",e,t)},t.assertExportDefaultSpecifier=function(e,t={}){a("ExportDefaultSpecifier",e,t)},t.assertExportNamespaceSpecifier=function(e,t={}){a("ExportNamespaceSpecifier",e,t)},t.assertPrivateName=function(e,t={}){a("PrivateName",e,t)},t.assertBigIntLiteral=function(e,t={}){a("BigIntLiteral",e,t)},t.assertTSParameterProperty=function(e,t={}){a("TSParameterProperty",e,t)},t.assertTSDeclareFunction=function(e,t={}){a("TSDeclareFunction",e,t)},t.assertTSDeclareMethod=function(e,t={}){a("TSDeclareMethod",e,t)},t.assertTSQualifiedName=function(e,t={}){a("TSQualifiedName",e,t)},t.assertTSCallSignatureDeclaration=function(e,t={}){a("TSCallSignatureDeclaration",e,t)},t.assertTSConstructSignatureDeclaration=function(e,t={}){a("TSConstructSignatureDeclaration",e,t)},t.assertTSPropertySignature=function(e,t={}){a("TSPropertySignature",e,t)},t.assertTSMethodSignature=function(e,t={}){a("TSMethodSignature",e,t)},t.assertTSIndexSignature=function(e,t={}){a("TSIndexSignature",e,t)},t.assertTSAnyKeyword=function(e,t={}){a("TSAnyKeyword",e,t)},t.assertTSBooleanKeyword=function(e,t={}){a("TSBooleanKeyword",e,t)},t.assertTSBigIntKeyword=function(e,t={}){a("TSBigIntKeyword",e,t)},t.assertTSNeverKeyword=function(e,t={}){a("TSNeverKeyword",e,t)},t.assertTSNullKeyword=function(e,t={}){a("TSNullKeyword",e,t)},t.assertTSNumberKeyword=function(e,t={}){a("TSNumberKeyword",e,t)},t.assertTSObjectKeyword=function(e,t={}){a("TSObjectKeyword",e,t)},t.assertTSStringKeyword=function(e,t={}){a("TSStringKeyword",e,t)},t.assertTSSymbolKeyword=function(e,t={}){a("TSSymbolKeyword",e,t)},t.assertTSUndefinedKeyword=function(e,t={}){a("TSUndefinedKeyword",e,t)},t.assertTSUnknownKeyword=function(e,t={}){a("TSUnknownKeyword",e,t)},t.assertTSVoidKeyword=function(e,t={}){a("TSVoidKeyword",e,t)},t.assertTSThisType=function(e,t={}){a("TSThisType",e,t)},t.assertTSFunctionType=function(e,t={}){a("TSFunctionType",e,t)},t.assertTSConstructorType=function(e,t={}){a("TSConstructorType",e,t)},t.assertTSTypeReference=function(e,t={}){a("TSTypeReference",e,t)},t.assertTSTypePredicate=function(e,t={}){a("TSTypePredicate",e,t)},t.assertTSTypeQuery=function(e,t={}){a("TSTypeQuery",e,t)},t.assertTSTypeLiteral=function(e,t={}){a("TSTypeLiteral",e,t)},t.assertTSArrayType=function(e,t={}){a("TSArrayType",e,t)},t.assertTSTupleType=function(e,t={}){a("TSTupleType",e,t)},t.assertTSOptionalType=function(e,t={}){a("TSOptionalType",e,t)},t.assertTSRestType=function(e,t={}){a("TSRestType",e,t)},t.assertTSUnionType=function(e,t={}){a("TSUnionType",e,t)},t.assertTSIntersectionType=function(e,t={}){a("TSIntersectionType",e,t)},t.assertTSConditionalType=function(e,t={}){a("TSConditionalType",e,t)},t.assertTSInferType=function(e,t={}){a("TSInferType",e,t)},t.assertTSParenthesizedType=function(e,t={}){a("TSParenthesizedType",e,t)},t.assertTSTypeOperator=function(e,t={}){a("TSTypeOperator",e,t)},t.assertTSIndexedAccessType=function(e,t={}){a("TSIndexedAccessType",e,t)},t.assertTSMappedType=function(e,t={}){a("TSMappedType",e,t)},t.assertTSLiteralType=function(e,t={}){a("TSLiteralType",e,t)},t.assertTSExpressionWithTypeArguments=function(e,t={}){a("TSExpressionWithTypeArguments",e,t)},t.assertTSInterfaceDeclaration=function(e,t={}){a("TSInterfaceDeclaration",e,t)},t.assertTSInterfaceBody=function(e,t={}){a("TSInterfaceBody",e,t)},t.assertTSTypeAliasDeclaration=function(e,t={}){a("TSTypeAliasDeclaration",e,t)},t.assertTSAsExpression=function(e,t={}){a("TSAsExpression",e,t)},t.assertTSTypeAssertion=function(e,t={}){a("TSTypeAssertion",e,t)},t.assertTSEnumDeclaration=function(e,t={}){a("TSEnumDeclaration",e,t)},t.assertTSEnumMember=function(e,t={}){a("TSEnumMember",e,t)},t.assertTSModuleDeclaration=function(e,t={}){a("TSModuleDeclaration",e,t)},t.assertTSModuleBlock=function(e,t={}){a("TSModuleBlock",e,t)},t.assertTSImportType=function(e,t={}){a("TSImportType",e,t)},t.assertTSImportEqualsDeclaration=function(e,t={}){a("TSImportEqualsDeclaration",e,t)},t.assertTSExternalModuleReference=function(e,t={}){a("TSExternalModuleReference",e,t)},t.assertTSNonNullExpression=function(e,t={}){a("TSNonNullExpression",e,t)},t.assertTSExportAssignment=function(e,t={}){a("TSExportAssignment",e,t)},t.assertTSNamespaceExportDeclaration=function(e,t={}){a("TSNamespaceExportDeclaration",e,t)},t.assertTSTypeAnnotation=function(e,t={}){a("TSTypeAnnotation",e,t)},t.assertTSTypeParameterInstantiation=function(e,t={}){a("TSTypeParameterInstantiation",e,t)},t.assertTSTypeParameterDeclaration=function(e,t={}){a("TSTypeParameterDeclaration",e,t)},t.assertTSTypeParameter=function(e,t={}){a("TSTypeParameter",e,t)},t.assertExpression=function(e,t={}){a("Expression",e,t)},t.assertBinary=function(e,t={}){a("Binary",e,t)},t.assertScopable=function(e,t={}){a("Scopable",e,t)},t.assertBlockParent=function(e,t={}){a("BlockParent",e,t)},t.assertBlock=function(e,t={}){a("Block",e,t)},t.assertStatement=function(e,t={}){a("Statement",e,t)},t.assertTerminatorless=function(e,t={}){a("Terminatorless",e,t)},t.assertCompletionStatement=function(e,t={}){a("CompletionStatement",e,t)},t.assertConditional=function(e,t={}){a("Conditional",e,t)},t.assertLoop=function(e,t={}){a("Loop",e,t)},t.assertWhile=function(e,t={}){a("While",e,t)},t.assertExpressionWrapper=function(e,t={}){a("ExpressionWrapper",e,t)},t.assertFor=function(e,t={}){a("For",e,t)},t.assertForXStatement=function(e,t={}){a("ForXStatement",e,t)},t.assertFunction=function(e,t={}){a("Function",e,t)},t.assertFunctionParent=function(e,t={}){a("FunctionParent",e,t)},t.assertPureish=function(e,t={}){a("Pureish",e,t)},t.assertDeclaration=function(e,t={}){a("Declaration",e,t)},t.assertPatternLike=function(e,t={}){a("PatternLike",e,t)},t.assertLVal=function(e,t={}){a("LVal",e,t)},t.assertTSEntityName=function(e,t={}){a("TSEntityName",e,t)},t.assertLiteral=function(e,t={}){a("Literal",e,t)},t.assertImmutable=function(e,t={}){a("Immutable",e,t)},t.assertUserWhitespacable=function(e,t={}){a("UserWhitespacable",e,t)},t.assertMethod=function(e,t={}){a("Method",e,t)},t.assertObjectMember=function(e,t={}){a("ObjectMember",e,t)},t.assertProperty=function(e,t={}){a("Property",e,t)},t.assertUnaryLike=function(e,t={}){a("UnaryLike",e,t)},t.assertPattern=function(e,t={}){a("Pattern",e,t)},t.assertClass=function(e,t={}){a("Class",e,t)},t.assertModuleDeclaration=function(e,t={}){a("ModuleDeclaration",e,t)},t.assertExportDeclaration=function(e,t={}){a("ExportDeclaration",e,t)},t.assertModuleSpecifier=function(e,t={}){a("ModuleSpecifier",e,t)},t.assertFlow=function(e,t={}){a("Flow",e,t)},t.assertFlowType=function(e,t={}){a("FlowType",e,t)},t.assertFlowBaseAnnotation=function(e,t={}){a("FlowBaseAnnotation",e,t)},t.assertFlowDeclaration=function(e,t={}){a("FlowDeclaration",e,t)},t.assertFlowPredicate=function(e,t={}){a("FlowPredicate",e,t)},t.assertEnumBody=function(e,t={}){a("EnumBody",e,t)},t.assertEnumMember=function(e,t={}){a("EnumMember",e,t)},t.assertJSX=function(e,t={}){a("JSX",e,t)},t.assertPrivate=function(e,t={}){a("Private",e,t)},t.assertTSTypeElement=function(e,t={}){a("TSTypeElement",e,t)},t.assertTSType=function(e,t={}){a("TSType",e,t)},t.assertNumberLiteral=function(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral"),a("NumberLiteral",e,t)},t.assertRegexLiteral=function(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"),a("RegexLiteral",e,t)},t.assertRestProperty=function(e,t){console.trace("The node type RestProperty has been renamed to RestElement"),a("RestProperty",e,t)},t.assertSpreadProperty=function(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement"),a("SpreadProperty",e,t)};var r,i=(r=n(73))&&r.__esModule?r:{default:r};function a(e,t,n){if(!(0,i.default)(e,t,n))throw new Error(`Expected type "${e}" with option ${JSON.stringify(n)}, `+`but instead got "${t.type}".`)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"===e)return(0,r.stringTypeAnnotation)();if("number"===e)return(0,r.numberTypeAnnotation)();if("undefined"===e)return(0,r.voidTypeAnnotation)();if("boolean"===e)return(0,r.booleanTypeAnnotation)();if("function"===e)return(0,r.genericTypeAnnotation)((0,r.identifier)("Function"));if("object"===e)return(0,r.genericTypeAnnotation)((0,r.identifier)("Object"));if("symbol"===e)return(0,r.genericTypeAnnotation)((0,r.identifier)("Symbol"));throw new Error("Invalid typeof value")};var r=n(14)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,a.default)(e);return 1===t.length?t[0]:(0,i.unionTypeAnnotation)(t)};var r,i=n(14),a=(r=n(123))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(e)};var r,i=(r=n(33))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,i.default)(e);return t.loc=null,t};var r,i=(r=n(124))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){return(0,i.default)(e,t,[{type:r?"CommentLine":"CommentBlock",value:n}])};var r,i=(r=n(125))&&r.__esModule?r:{default:r}},function(e,t,n){var r=n(265);e.exports=function(e){return e&&e.length?r(e):[]}},function(e,t,n){var r=n(127),i=n(268),a=n(272),o=n(129),s=n(273),u=n(78);e.exports=function(e,t,n){var c=-1,l=i,p=e.length,h=!0,f=[],d=f;if(n)h=!1,l=a;else if(p>=200){var y=t?null:s(e);if(y)return u(y);h=!1,l=o,d=new r}else d=t?[]:f;e:for(;++c-1}},function(e,t){e.exports=function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a{e[t]=null}),e};var r=n(25)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TSTYPE_TYPES=t.TSTYPEELEMENT_TYPES=t.PRIVATE_TYPES=t.JSX_TYPES=t.ENUMMEMBER_TYPES=t.ENUMBODY_TYPES=t.FLOWPREDICATE_TYPES=t.FLOWDECLARATION_TYPES=t.FLOWBASEANNOTATION_TYPES=t.FLOWTYPE_TYPES=t.FLOW_TYPES=t.MODULESPECIFIER_TYPES=t.EXPORTDECLARATION_TYPES=t.MODULEDECLARATION_TYPES=t.CLASS_TYPES=t.PATTERN_TYPES=t.UNARYLIKE_TYPES=t.PROPERTY_TYPES=t.OBJECTMEMBER_TYPES=t.METHOD_TYPES=t.USERWHITESPACABLE_TYPES=t.IMMUTABLE_TYPES=t.LITERAL_TYPES=t.TSENTITYNAME_TYPES=t.LVAL_TYPES=t.PATTERNLIKE_TYPES=t.DECLARATION_TYPES=t.PUREISH_TYPES=t.FUNCTIONPARENT_TYPES=t.FUNCTION_TYPES=t.FORXSTATEMENT_TYPES=t.FOR_TYPES=t.EXPRESSIONWRAPPER_TYPES=t.WHILE_TYPES=t.LOOP_TYPES=t.CONDITIONAL_TYPES=t.COMPLETIONSTATEMENT_TYPES=t.TERMINATORLESS_TYPES=t.STATEMENT_TYPES=t.BLOCK_TYPES=t.BLOCKPARENT_TYPES=t.SCOPABLE_TYPES=t.BINARY_TYPES=t.EXPRESSION_TYPES=void 0;var r=n(13);const i=r.FLIPPED_ALIAS_KEYS.Expression;t.EXPRESSION_TYPES=i;const a=r.FLIPPED_ALIAS_KEYS.Binary;t.BINARY_TYPES=a;const o=r.FLIPPED_ALIAS_KEYS.Scopable;t.SCOPABLE_TYPES=o;const s=r.FLIPPED_ALIAS_KEYS.BlockParent;t.BLOCKPARENT_TYPES=s;const u=r.FLIPPED_ALIAS_KEYS.Block;t.BLOCK_TYPES=u;const c=r.FLIPPED_ALIAS_KEYS.Statement;t.STATEMENT_TYPES=c;const l=r.FLIPPED_ALIAS_KEYS.Terminatorless;t.TERMINATORLESS_TYPES=l;const p=r.FLIPPED_ALIAS_KEYS.CompletionStatement;t.COMPLETIONSTATEMENT_TYPES=p;const h=r.FLIPPED_ALIAS_KEYS.Conditional;t.CONDITIONAL_TYPES=h;const f=r.FLIPPED_ALIAS_KEYS.Loop;t.LOOP_TYPES=f;const d=r.FLIPPED_ALIAS_KEYS.While;t.WHILE_TYPES=d;const y=r.FLIPPED_ALIAS_KEYS.ExpressionWrapper;t.EXPRESSIONWRAPPER_TYPES=y;const v=r.FLIPPED_ALIAS_KEYS.For;t.FOR_TYPES=v;const m=r.FLIPPED_ALIAS_KEYS.ForXStatement;t.FORXSTATEMENT_TYPES=m;const g=r.FLIPPED_ALIAS_KEYS.Function;t.FUNCTION_TYPES=g;const b=r.FLIPPED_ALIAS_KEYS.FunctionParent;t.FUNCTIONPARENT_TYPES=b;const x=r.FLIPPED_ALIAS_KEYS.Pureish;t.PUREISH_TYPES=x;const k=r.FLIPPED_ALIAS_KEYS.Declaration;t.DECLARATION_TYPES=k;const w=r.FLIPPED_ALIAS_KEYS.PatternLike;t.PATTERNLIKE_TYPES=w;const S=r.FLIPPED_ALIAS_KEYS.LVal;t.LVAL_TYPES=S;const P=r.FLIPPED_ALIAS_KEYS.TSEntityName;t.TSENTITYNAME_TYPES=P;const E=r.FLIPPED_ALIAS_KEYS.Literal;t.LITERAL_TYPES=E;const T=r.FLIPPED_ALIAS_KEYS.Immutable;t.IMMUTABLE_TYPES=T;const O=r.FLIPPED_ALIAS_KEYS.UserWhitespacable;t.USERWHITESPACABLE_TYPES=O;const C=r.FLIPPED_ALIAS_KEYS.Method;t.METHOD_TYPES=C;const D=r.FLIPPED_ALIAS_KEYS.ObjectMember;t.OBJECTMEMBER_TYPES=D;const A=r.FLIPPED_ALIAS_KEYS.Property;t.PROPERTY_TYPES=A;const j=r.FLIPPED_ALIAS_KEYS.UnaryLike;t.UNARYLIKE_TYPES=j;const $=r.FLIPPED_ALIAS_KEYS.Pattern;t.PATTERN_TYPES=$;const M=r.FLIPPED_ALIAS_KEYS.Class;t.CLASS_TYPES=M;const I=r.FLIPPED_ALIAS_KEYS.ModuleDeclaration;t.MODULEDECLARATION_TYPES=I;const F=r.FLIPPED_ALIAS_KEYS.ExportDeclaration;t.EXPORTDECLARATION_TYPES=F;const L=r.FLIPPED_ALIAS_KEYS.ModuleSpecifier;t.MODULESPECIFIER_TYPES=L;const _=r.FLIPPED_ALIAS_KEYS.Flow;t.FLOW_TYPES=_;const B=r.FLIPPED_ALIAS_KEYS.FlowType;t.FLOWTYPE_TYPES=B;const R=r.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation;t.FLOWBASEANNOTATION_TYPES=R;const N=r.FLIPPED_ALIAS_KEYS.FlowDeclaration;t.FLOWDECLARATION_TYPES=N;const V=r.FLIPPED_ALIAS_KEYS.FlowPredicate;t.FLOWPREDICATE_TYPES=V;const z=r.FLIPPED_ALIAS_KEYS.EnumBody;t.ENUMBODY_TYPES=z;const G=r.FLIPPED_ALIAS_KEYS.EnumMember;t.ENUMMEMBER_TYPES=G;const H=r.FLIPPED_ALIAS_KEYS.JSX;t.JSX_TYPES=H;const U=r.FLIPPED_ALIAS_KEYS.Private;t.PRIVATE_TYPES=U;const Y=r.FLIPPED_ALIAS_KEYS.TSTypeElement;t.TSTYPEELEMENT_TYPES=Y;const W=r.FLIPPED_ALIAS_KEYS.TSType;t.TSTYPE_TYPES=W},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t="body"){return e[t]=(0,i.default)(e[t],e)};var r,i=(r=n(133))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"eval"!==(e=(0,i.default)(e))&&"arguments"!==e||(e="_"+e);return e};var r,i=(r=n(134))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=e.key||e.property){!e.computed&&(0,r.isIdentifier)(t)&&(t=(0,i.stringLiteral)(t.name));return t};var r=n(11),i=n(14)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.isExpressionStatement)(e)&&(e=e.expression);if((0,r.isExpression)(e))return e;(0,r.isClass)(e)?e.type="ClassExpression":(0,r.isFunction)(e)&&(e.type="FunctionExpression");if(!(0,r.isExpression)(e))throw new Error(`cannot turn ${e.type} to an expression`);return e};var r=n(11)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=n(11),i=o(n(33)),a=o(n(135));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t=e.key){let n;return"method"===e.kind?s.increment()+"":(n=(0,r.isIdentifier)(t)?t.name:(0,r.isStringLiteral)(t)?JSON.stringify(t.value):JSON.stringify((0,a.default)((0,i.default)(t))),e.computed&&(n=`[${n}]`),e.static&&(n=`static:${n}`),n)}s.uid=0,s.increment=function(){return s.uid>=Number.MAX_SAFE_INTEGER?s.uid=0:s.uid++}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!e.length)return;const n=[],r=(0,i.default)(e,t,n);if(!r)return;for(const e of n)t.push(e);return r};var r,i=(r=n(283))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,s){const u=[];let c=!0;for(const l of t)if(c=!1,(0,i.isExpression)(l))u.push(l);else if((0,i.isExpressionStatement)(l))u.push(l.expression);else if((0,i.isVariableDeclaration)(l)){if("var"!==l.kind)return;for(const e of l.declarations){const t=(0,r.default)(e);for(const e of Object.keys(t))s.push({kind:l.kind,id:(0,o.default)(t[e])});e.init&&u.push((0,a.assignmentExpression)("=",e.id,e.init))}c=!0}else if((0,i.isIfStatement)(l)){const t=l.consequent?e([l.consequent],n,s):n.buildUndefinedNode(),r=l.alternate?e([l.alternate],n,s):n.buildUndefinedNode();if(!t||!r)return;u.push((0,a.conditionalExpression)(l.test,t,r))}else if((0,i.isBlockStatement)(l)){const t=e(l.body,n,s);if(!t)return;u.push(t)}else{if(!(0,i.isEmptyStatement)(l))return;c=!0}c&&u.push(n.buildUndefinedNode());return 1===u.length?u[0]:(0,a.sequenceExpression)(u)};var r=s(n(45)),i=n(11),a=n(14),o=s(n(33));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.isStatement)(e))return e;let n,a=!1;if((0,r.isClass)(e))a=!0,n="ClassDeclaration";else if((0,r.isFunction)(e))a=!0,n="FunctionDeclaration";else if((0,r.isAssignmentExpression)(e))return(0,i.expressionStatement)(e);a&&!e.id&&(n=!1);if(!n){if(t)return!1;throw new Error(`cannot turn ${e.type} to a statement`)}return e.type=n,e};var r=n(11),i=n(14)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){if(void 0===t)return(0,o.identifier)("undefined");if(!0===t||!1===t)return(0,o.booleanLiteral)(t);if(null===t)return(0,o.nullLiteral)();if("string"==typeof t)return(0,o.stringLiteral)(t);if("number"==typeof t){let e;if(Number.isFinite(t))e=(0,o.numericLiteral)(Math.abs(t));else{let n;n=Number.isNaN(t)?(0,o.numericLiteral)(0):(0,o.numericLiteral)(1),e=(0,o.binaryExpression)("/",n,(0,o.numericLiteral)(0))}return(t<0||Object.is(t,-0))&&(e=(0,o.unaryExpression)("-",e)),e}if((0,i.default)(t)){const e=t.source,n=t.toString().match(/\/([a-z]+|)$/)[1];return(0,o.regExpLiteral)(e,n)}if(Array.isArray(t))return(0,o.arrayExpression)(t.map(e));if((0,r.default)(t)){const n=[];for(const r of Object.keys(t)){let i;i=(0,a.default)(r)?(0,o.identifier)(r):(0,o.stringLiteral)(r),n.push((0,o.objectProperty)(i,e(t[r])))}return(0,o.objectExpression)(n)}throw new Error("don't know how to turn this value into a node")};var r=s(n(286)),i=s(n(287)),a=s(n(32)),o=n(14);function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(22),i=n(70),a=n(17),o=Function.prototype,s=Object.prototype,u=o.toString,c=s.hasOwnProperty,l=u.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},function(e,t,n){var r=n(288),i=n(31),a=n(43),o=a&&a.isRegExp,s=o?i(o):r;e.exports=s},function(e,t,n){var r=n(22),i=n(17);e.exports=function(e){return i(e)&&"[object RegExp]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n=!1){return e.object=(0,r.memberExpression)(e.object,e.property,e.computed),e.property=t,e.computed=!!n,e};var r=n(14)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!t)return e;for(const n of i.INHERIT_KEYS.optional)null==e[n]&&(e[n]=t[n]);for(const n of Object.keys(t))"_"===n[0]&&"__clone"!==n&&(e[n]=t[n]);for(const n of i.INHERIT_KEYS.force)e[n]=t[n];return(0,a.default)(e,t),e};var r,i=n(25),a=(r=n(131))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.object=(0,r.memberExpression)(t,e.object),e};var r=n(14)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,i.default)(e,t,!0)};var r,i=(r=n(45))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){"function"==typeof t&&(t={enter:t});const{enter:i,exit:a}=t;!function e(t,n,i,a,o){const s=r.VISITOR_KEYS[t.type];if(!s)return;n&&n(t,o,a);for(const r of s){const s=t[r];if(Array.isArray(s))for(let u=0;u=0)return!0}else if(a===e)return!0}return!1};var r,i=(r=n(45))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.isFunctionDeclaration)(e)||(0,i.isClassDeclaration)(e)||(0,a.default)(e)};var r,i=n(11),a=(r=n(138))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,i.default)(e.type,"Immutable"))return!0;if((0,a.isIdentifier)(e))return"undefined"===e.name;return!1};var r,i=(r=n(74))&&r.__esModule?r:{default:r},a=n(11)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){if("object"!=typeof t||"object"!=typeof n||null==t||null==n)return t===n;if(t.type!==n.type)return!1;const i=Object.keys(r.NODE_FIELDS[t.type]||t.type),a=r.VISITOR_KEYS[t.type];for(const r of i){if(typeof t[r]!=typeof n[r])return!1;if(null!=t[r]||null!=n[r]){if(null==t[r]||null==n[r])return!1;if(Array.isArray(t[r])){if(!Array.isArray(n[r]))return!1;if(t[r].length!==n[r].length)return!1;for(let i=0;i{if("%%"===n)return n;s++;const a=r.formatters[i];if("function"==typeof a){const r=e[s];n=a.call(t,r),e.splice(s,1),s--}return n}),r.formatArgs.call(t,e),(t.log||r.log).apply(t,e)}return o.namespace=e,o.enabled=r.enabled(e),o.useColors=r.useColors(),o.color=t(e),o.destroy=i,o.extend=a,"function"==typeof r.init&&r.init(o),r.instances.push(o),o}function i(){const e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function a(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){const e=[...r.names.map(o),...r.skips.map(o).map(e=>"-"+e)].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t{r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}},function(e,t){var n=1e3,r=6e4,i=36e5,a=24*i;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*a;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return o(e,t,a,"day");if(t>=i)return o(e,t,i,"hour");if(t>=r)return o(e,t,r,"minute");if(t>=n)return o(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(22),i=n(15),a=n(17);e.exports=function(e){return"string"==typeof e||!i(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(307);e.exports=function(e){return e?(e=r(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){var r=n(23),i=n(34),a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=s.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):o.test(e)?NaN:+e}},function(e,t,n){var r=n(309),i=n(28);e.exports=function(e){return null==e?[]:r(e,i(e))}},function(e,t,n){var r=n(82);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},function(e,t){var n=Math.floor;e.exports=function(e,t){var r="";if(!e||t<1||t>9007199254740991)return r;do{t%2&&(r+=e),(t=n(t/2))&&(e+=e)}while(t);return r}},function(e,t,n){var r=n(27),i=n(82),a=n(15),o=n(34),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return i(t,e)+"";if(o(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;a(n(141));var r=a(n(313));!function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n)}(n(10));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}const o={ReferencedIdentifier({node:e},t){e.name===t.oldName&&(e.name=t.newName)},Scope(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration"(e,t){const n=e.getOuterBindingIdentifiers();for(const e in n)e===t.oldName&&(n[e].name=t.newName)}};t.default=class{constructor(e,t,n){this.newName=n,this.oldName=t,this.binding=e}maybeConvertFromExportDeclaration(e){const t=e.parentPath;t.isExportDeclaration()&&(t.isExportDefaultDeclaration()&&!t.get("declaration").node.id||(0,r.default)(t))}maybeConvertFromClassFunctionDeclaration(e){}maybeConvertFromClassFunctionExpression(e){}rename(e){const{binding:t,oldName:n,newName:r}=this,{scope:i,path:a}=t,s=a.find(e=>e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression());if(s){s.getOuterBindingIdentifiers()[n]===t.identifier&&this.maybeConvertFromExportDeclaration(s)}i.traverse(e||i.block,o,this),e||(i.removeOwnBinding(n),i.bindings[r]=t,this.binding.identifier.name=r),t.type,s&&(this.maybeConvertFromClassFunctionDeclaration(s),this.maybeConvertFromClassFunctionExpression(s))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e.isExportDeclaration())throw new Error("Only export declarations can be splitted.");const t=e.isExportDefaultDeclaration(),n=e.get("declaration"),i=n.isClassDeclaration();if(t){const t=n.isFunctionDeclaration()||i,a=n.isScope()?n.scope.parent:n.scope;let o=n.node.id,s=!1;o||(s=!0,o=a.generateUidIdentifier("default"),(t||n.isFunctionExpression()||n.isClassExpression())&&(n.node.id=r.cloneNode(o)));const u=t?n:r.variableDeclaration("var",[r.variableDeclarator(r.cloneNode(o),n.node)]),c=r.exportNamedDeclaration(null,[r.exportSpecifier(r.cloneNode(o),r.identifier("default"))]);return e.insertAfter(c),e.replaceWith(u),s&&a.registerDeclaration(e),e}if(e.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");const a=n.getOuterBindingIdentifiers(),o=Object.keys(a).map(e=>r.exportSpecifier(r.identifier(e),r.identifier(e))),s=r.exportNamedDeclaration(null,o);return e.insertAfter(s),e.replaceWith(n.node),e};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(10));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}},function(e,t,n){var r=n(142),i=n(30),a=n(83),o=n(67),s=Object.prototype,u=s.hasOwnProperty,c=r((function(e,t){e=Object(e);var n=-1,r=t.length,c=r>2?t[2]:void 0;for(c&&a(t[0],t[1],c)&&(r=1);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){"use strict";e.exports=n(322)},function(e){e.exports=JSON.parse('{"builtin":{"Array":false,"ArrayBuffer":false,"Atomics":false,"BigInt":false,"BigInt64Array":false,"BigUint64Array":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"globalThis":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"SharedArrayBuffer":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"es5":{"Array":false,"Boolean":false,"constructor":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"propertyIsEnumerable":false,"RangeError":false,"ReferenceError":false,"RegExp":false,"String":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false},"es2015":{"Array":false,"ArrayBuffer":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"es2017":{"Array":false,"ArrayBuffer":false,"Atomics":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"SharedArrayBuffer":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"browser":{"AbortController":false,"AbortSignal":false,"addEventListener":false,"alert":false,"AnalyserNode":false,"Animation":false,"AnimationEffectReadOnly":false,"AnimationEffectTiming":false,"AnimationEffectTimingReadOnly":false,"AnimationEvent":false,"AnimationPlaybackEvent":false,"AnimationTimeline":false,"applicationCache":false,"ApplicationCache":false,"ApplicationCacheErrorEvent":false,"atob":false,"Attr":false,"Audio":false,"AudioBuffer":false,"AudioBufferSourceNode":false,"AudioContext":false,"AudioDestinationNode":false,"AudioListener":false,"AudioNode":false,"AudioParam":false,"AudioProcessingEvent":false,"AudioScheduledSourceNode":false,"AudioWorkletGlobalScope ":false,"AudioWorkletNode":false,"AudioWorkletProcessor":false,"BarProp":false,"BaseAudioContext":false,"BatteryManager":false,"BeforeUnloadEvent":false,"BiquadFilterNode":false,"Blob":false,"BlobEvent":false,"blur":false,"BroadcastChannel":false,"btoa":false,"BudgetService":false,"ByteLengthQueuingStrategy":false,"Cache":false,"caches":false,"CacheStorage":false,"cancelAnimationFrame":false,"cancelIdleCallback":false,"CanvasCaptureMediaStreamTrack":false,"CanvasGradient":false,"CanvasPattern":false,"CanvasRenderingContext2D":false,"ChannelMergerNode":false,"ChannelSplitterNode":false,"CharacterData":false,"clearInterval":false,"clearTimeout":false,"clientInformation":false,"ClipboardEvent":false,"close":false,"closed":false,"CloseEvent":false,"Comment":false,"CompositionEvent":false,"confirm":false,"console":false,"ConstantSourceNode":false,"ConvolverNode":false,"CountQueuingStrategy":false,"createImageBitmap":false,"Credential":false,"CredentialsContainer":false,"crypto":false,"Crypto":false,"CryptoKey":false,"CSS":false,"CSSConditionRule":false,"CSSFontFaceRule":false,"CSSGroupingRule":false,"CSSImportRule":false,"CSSKeyframeRule":false,"CSSKeyframesRule":false,"CSSMediaRule":false,"CSSNamespaceRule":false,"CSSPageRule":false,"CSSRule":false,"CSSRuleList":false,"CSSStyleDeclaration":false,"CSSStyleRule":false,"CSSStyleSheet":false,"CSSSupportsRule":false,"CustomElementRegistry":false,"customElements":false,"CustomEvent":false,"DataTransfer":false,"DataTransferItem":false,"DataTransferItemList":false,"defaultstatus":false,"defaultStatus":false,"DelayNode":false,"DeviceMotionEvent":false,"DeviceOrientationEvent":false,"devicePixelRatio":false,"dispatchEvent":false,"document":false,"Document":false,"DocumentFragment":false,"DocumentType":false,"DOMError":false,"DOMException":false,"DOMImplementation":false,"DOMMatrix":false,"DOMMatrixReadOnly":false,"DOMParser":false,"DOMPoint":false,"DOMPointReadOnly":false,"DOMQuad":false,"DOMRect":false,"DOMRectReadOnly":false,"DOMStringList":false,"DOMStringMap":false,"DOMTokenList":false,"DragEvent":false,"DynamicsCompressorNode":false,"Element":false,"ErrorEvent":false,"event":false,"Event":false,"EventSource":false,"EventTarget":false,"external":false,"fetch":false,"File":false,"FileList":false,"FileReader":false,"find":false,"focus":false,"FocusEvent":false,"FontFace":false,"FontFaceSetLoadEvent":false,"FormData":false,"frameElement":false,"frames":false,"GainNode":false,"Gamepad":false,"GamepadButton":false,"GamepadEvent":false,"getComputedStyle":false,"getSelection":false,"HashChangeEvent":false,"Headers":false,"history":false,"History":false,"HTMLAllCollection":false,"HTMLAnchorElement":false,"HTMLAreaElement":false,"HTMLAudioElement":false,"HTMLBaseElement":false,"HTMLBodyElement":false,"HTMLBRElement":false,"HTMLButtonElement":false,"HTMLCanvasElement":false,"HTMLCollection":false,"HTMLContentElement":false,"HTMLDataElement":false,"HTMLDataListElement":false,"HTMLDetailsElement":false,"HTMLDialogElement":false,"HTMLDirectoryElement":false,"HTMLDivElement":false,"HTMLDListElement":false,"HTMLDocument":false,"HTMLElement":false,"HTMLEmbedElement":false,"HTMLFieldSetElement":false,"HTMLFontElement":false,"HTMLFormControlsCollection":false,"HTMLFormElement":false,"HTMLFrameElement":false,"HTMLFrameSetElement":false,"HTMLHeadElement":false,"HTMLHeadingElement":false,"HTMLHRElement":false,"HTMLHtmlElement":false,"HTMLIFrameElement":false,"HTMLImageElement":false,"HTMLInputElement":false,"HTMLLabelElement":false,"HTMLLegendElement":false,"HTMLLIElement":false,"HTMLLinkElement":false,"HTMLMapElement":false,"HTMLMarqueeElement":false,"HTMLMediaElement":false,"HTMLMenuElement":false,"HTMLMetaElement":false,"HTMLMeterElement":false,"HTMLModElement":false,"HTMLObjectElement":false,"HTMLOListElement":false,"HTMLOptGroupElement":false,"HTMLOptionElement":false,"HTMLOptionsCollection":false,"HTMLOutputElement":false,"HTMLParagraphElement":false,"HTMLParamElement":false,"HTMLPictureElement":false,"HTMLPreElement":false,"HTMLProgressElement":false,"HTMLQuoteElement":false,"HTMLScriptElement":false,"HTMLSelectElement":false,"HTMLShadowElement":false,"HTMLSlotElement":false,"HTMLSourceElement":false,"HTMLSpanElement":false,"HTMLStyleElement":false,"HTMLTableCaptionElement":false,"HTMLTableCellElement":false,"HTMLTableColElement":false,"HTMLTableElement":false,"HTMLTableRowElement":false,"HTMLTableSectionElement":false,"HTMLTemplateElement":false,"HTMLTextAreaElement":false,"HTMLTimeElement":false,"HTMLTitleElement":false,"HTMLTrackElement":false,"HTMLUListElement":false,"HTMLUnknownElement":false,"HTMLVideoElement":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"IdleDeadline":false,"IIRFilterNode":false,"Image":false,"ImageBitmap":false,"ImageBitmapRenderingContext":false,"ImageCapture":false,"ImageData":false,"indexedDB":false,"innerHeight":false,"innerWidth":false,"InputEvent":false,"IntersectionObserver":false,"IntersectionObserverEntry":false,"Intl":false,"isSecureContext":false,"KeyboardEvent":false,"KeyframeEffect":false,"KeyframeEffectReadOnly":false,"length":false,"localStorage":false,"location":true,"Location":false,"locationbar":false,"matchMedia":false,"MediaDeviceInfo":false,"MediaDevices":false,"MediaElementAudioSourceNode":false,"MediaEncryptedEvent":false,"MediaError":false,"MediaKeyMessageEvent":false,"MediaKeySession":false,"MediaKeyStatusMap":false,"MediaKeySystemAccess":false,"MediaList":false,"MediaQueryList":false,"MediaQueryListEvent":false,"MediaRecorder":false,"MediaSettingsRange":false,"MediaSource":false,"MediaStream":false,"MediaStreamAudioDestinationNode":false,"MediaStreamAudioSourceNode":false,"MediaStreamEvent":false,"MediaStreamTrack":false,"MediaStreamTrackEvent":false,"menubar":false,"MessageChannel":false,"MessageEvent":false,"MessagePort":false,"MIDIAccess":false,"MIDIConnectionEvent":false,"MIDIInput":false,"MIDIInputMap":false,"MIDIMessageEvent":false,"MIDIOutput":false,"MIDIOutputMap":false,"MIDIPort":false,"MimeType":false,"MimeTypeArray":false,"MouseEvent":false,"moveBy":false,"moveTo":false,"MutationEvent":false,"MutationObserver":false,"MutationRecord":false,"name":false,"NamedNodeMap":false,"NavigationPreloadManager":false,"navigator":false,"Navigator":false,"NetworkInformation":false,"Node":false,"NodeFilter":false,"NodeIterator":false,"NodeList":false,"Notification":false,"OfflineAudioCompletionEvent":false,"OfflineAudioContext":false,"offscreenBuffering":false,"OffscreenCanvas":true,"onabort":true,"onafterprint":true,"onanimationend":true,"onanimationiteration":true,"onanimationstart":true,"onappinstalled":true,"onauxclick":true,"onbeforeinstallprompt":true,"onbeforeprint":true,"onbeforeunload":true,"onblur":true,"oncancel":true,"oncanplay":true,"oncanplaythrough":true,"onchange":true,"onclick":true,"onclose":true,"oncontextmenu":true,"oncuechange":true,"ondblclick":true,"ondevicemotion":true,"ondeviceorientation":true,"ondeviceorientationabsolute":true,"ondrag":true,"ondragend":true,"ondragenter":true,"ondragleave":true,"ondragover":true,"ondragstart":true,"ondrop":true,"ondurationchange":true,"onemptied":true,"onended":true,"onerror":true,"onfocus":true,"ongotpointercapture":true,"onhashchange":true,"oninput":true,"oninvalid":true,"onkeydown":true,"onkeypress":true,"onkeyup":true,"onlanguagechange":true,"onload":true,"onloadeddata":true,"onloadedmetadata":true,"onloadstart":true,"onlostpointercapture":true,"onmessage":true,"onmessageerror":true,"onmousedown":true,"onmouseenter":true,"onmouseleave":true,"onmousemove":true,"onmouseout":true,"onmouseover":true,"onmouseup":true,"onmousewheel":true,"onoffline":true,"ononline":true,"onpagehide":true,"onpageshow":true,"onpause":true,"onplay":true,"onplaying":true,"onpointercancel":true,"onpointerdown":true,"onpointerenter":true,"onpointerleave":true,"onpointermove":true,"onpointerout":true,"onpointerover":true,"onpointerup":true,"onpopstate":true,"onprogress":true,"onratechange":true,"onrejectionhandled":true,"onreset":true,"onresize":true,"onscroll":true,"onsearch":true,"onseeked":true,"onseeking":true,"onselect":true,"onstalled":true,"onstorage":true,"onsubmit":true,"onsuspend":true,"ontimeupdate":true,"ontoggle":true,"ontransitionend":true,"onunhandledrejection":true,"onunload":true,"onvolumechange":true,"onwaiting":true,"onwheel":true,"open":false,"openDatabase":false,"opener":false,"Option":false,"origin":false,"OscillatorNode":false,"outerHeight":false,"outerWidth":false,"PageTransitionEvent":false,"pageXOffset":false,"pageYOffset":false,"PannerNode":false,"parent":false,"Path2D":false,"PaymentAddress":false,"PaymentRequest":false,"PaymentRequestUpdateEvent":false,"PaymentResponse":false,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceLongTaskTiming":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceNavigationTiming":false,"PerformanceObserver":false,"PerformanceObserverEntryList":false,"PerformancePaintTiming":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"PeriodicWave":false,"Permissions":false,"PermissionStatus":false,"personalbar":false,"PhotoCapabilities":false,"Plugin":false,"PluginArray":false,"PointerEvent":false,"PopStateEvent":false,"postMessage":false,"Presentation":false,"PresentationAvailability":false,"PresentationConnection":false,"PresentationConnectionAvailableEvent":false,"PresentationConnectionCloseEvent":false,"PresentationConnectionList":false,"PresentationReceiver":false,"PresentationRequest":false,"print":false,"ProcessingInstruction":false,"ProgressEvent":false,"PromiseRejectionEvent":false,"prompt":false,"PushManager":false,"PushSubscription":false,"PushSubscriptionOptions":false,"queueMicrotask":false,"RadioNodeList":false,"Range":false,"ReadableStream":false,"registerProcessor":false,"RemotePlayback":false,"removeEventListener":false,"Request":false,"requestAnimationFrame":false,"requestIdleCallback":false,"resizeBy":false,"ResizeObserver":false,"ResizeObserverEntry":false,"resizeTo":false,"Response":false,"RTCCertificate":false,"RTCDataChannel":false,"RTCDataChannelEvent":false,"RTCDtlsTransport":false,"RTCIceCandidate":false,"RTCIceGatherer":false,"RTCIceTransport":false,"RTCPeerConnection":false,"RTCPeerConnectionIceEvent":false,"RTCRtpContributingSource":false,"RTCRtpReceiver":false,"RTCRtpSender":false,"RTCSctpTransport":false,"RTCSessionDescription":false,"RTCStatsReport":false,"RTCTrackEvent":false,"screen":false,"Screen":false,"screenLeft":false,"ScreenOrientation":false,"screenTop":false,"screenX":false,"screenY":false,"ScriptProcessorNode":false,"scroll":false,"scrollbars":false,"scrollBy":false,"scrollTo":false,"scrollX":false,"scrollY":false,"SecurityPolicyViolationEvent":false,"Selection":false,"self":false,"ServiceWorker":false,"ServiceWorkerContainer":false,"ServiceWorkerRegistration":false,"sessionStorage":false,"setInterval":false,"setTimeout":false,"ShadowRoot":false,"SharedWorker":false,"SourceBuffer":false,"SourceBufferList":false,"speechSynthesis":false,"SpeechSynthesisEvent":false,"SpeechSynthesisUtterance":false,"StaticRange":false,"status":false,"statusbar":false,"StereoPannerNode":false,"stop":false,"Storage":false,"StorageEvent":false,"StorageManager":false,"styleMedia":false,"StyleSheet":false,"StyleSheetList":false,"SubtleCrypto":false,"SVGAElement":false,"SVGAngle":false,"SVGAnimatedAngle":false,"SVGAnimatedBoolean":false,"SVGAnimatedEnumeration":false,"SVGAnimatedInteger":false,"SVGAnimatedLength":false,"SVGAnimatedLengthList":false,"SVGAnimatedNumber":false,"SVGAnimatedNumberList":false,"SVGAnimatedPreserveAspectRatio":false,"SVGAnimatedRect":false,"SVGAnimatedString":false,"SVGAnimatedTransformList":false,"SVGAnimateElement":false,"SVGAnimateMotionElement":false,"SVGAnimateTransformElement":false,"SVGAnimationElement":false,"SVGCircleElement":false,"SVGClipPathElement":false,"SVGComponentTransferFunctionElement":false,"SVGDefsElement":false,"SVGDescElement":false,"SVGDiscardElement":false,"SVGElement":false,"SVGEllipseElement":false,"SVGFEBlendElement":false,"SVGFEColorMatrixElement":false,"SVGFEComponentTransferElement":false,"SVGFECompositeElement":false,"SVGFEConvolveMatrixElement":false,"SVGFEDiffuseLightingElement":false,"SVGFEDisplacementMapElement":false,"SVGFEDistantLightElement":false,"SVGFEDropShadowElement":false,"SVGFEFloodElement":false,"SVGFEFuncAElement":false,"SVGFEFuncBElement":false,"SVGFEFuncGElement":false,"SVGFEFuncRElement":false,"SVGFEGaussianBlurElement":false,"SVGFEImageElement":false,"SVGFEMergeElement":false,"SVGFEMergeNodeElement":false,"SVGFEMorphologyElement":false,"SVGFEOffsetElement":false,"SVGFEPointLightElement":false,"SVGFESpecularLightingElement":false,"SVGFESpotLightElement":false,"SVGFETileElement":false,"SVGFETurbulenceElement":false,"SVGFilterElement":false,"SVGForeignObjectElement":false,"SVGGElement":false,"SVGGeometryElement":false,"SVGGradientElement":false,"SVGGraphicsElement":false,"SVGImageElement":false,"SVGLength":false,"SVGLengthList":false,"SVGLinearGradientElement":false,"SVGLineElement":false,"SVGMarkerElement":false,"SVGMaskElement":false,"SVGMatrix":false,"SVGMetadataElement":false,"SVGMPathElement":false,"SVGNumber":false,"SVGNumberList":false,"SVGPathElement":false,"SVGPatternElement":false,"SVGPoint":false,"SVGPointList":false,"SVGPolygonElement":false,"SVGPolylineElement":false,"SVGPreserveAspectRatio":false,"SVGRadialGradientElement":false,"SVGRect":false,"SVGRectElement":false,"SVGScriptElement":false,"SVGSetElement":false,"SVGStopElement":false,"SVGStringList":false,"SVGStyleElement":false,"SVGSVGElement":false,"SVGSwitchElement":false,"SVGSymbolElement":false,"SVGTextContentElement":false,"SVGTextElement":false,"SVGTextPathElement":false,"SVGTextPositioningElement":false,"SVGTitleElement":false,"SVGTransform":false,"SVGTransformList":false,"SVGTSpanElement":false,"SVGUnitTypes":false,"SVGUseElement":false,"SVGViewElement":false,"TaskAttributionTiming":false,"Text":false,"TextDecoder":false,"TextEncoder":false,"TextEvent":false,"TextMetrics":false,"TextTrack":false,"TextTrackCue":false,"TextTrackCueList":false,"TextTrackList":false,"TimeRanges":false,"toolbar":false,"top":false,"Touch":false,"TouchEvent":false,"TouchList":false,"TrackEvent":false,"TransitionEvent":false,"TreeWalker":false,"UIEvent":false,"URL":false,"URLSearchParams":false,"ValidityState":false,"visualViewport":false,"VisualViewport":false,"VTTCue":false,"WaveShaperNode":false,"WebAssembly":false,"WebGL2RenderingContext":false,"WebGLActiveInfo":false,"WebGLBuffer":false,"WebGLContextEvent":false,"WebGLFramebuffer":false,"WebGLProgram":false,"WebGLQuery":false,"WebGLRenderbuffer":false,"WebGLRenderingContext":false,"WebGLSampler":false,"WebGLShader":false,"WebGLShaderPrecisionFormat":false,"WebGLSync":false,"WebGLTexture":false,"WebGLTransformFeedback":false,"WebGLUniformLocation":false,"WebGLVertexArrayObject":false,"WebSocket":false,"WheelEvent":false,"window":false,"Window":false,"Worker":false,"WritableStream":false,"XMLDocument":false,"XMLHttpRequest":false,"XMLHttpRequestEventTarget":false,"XMLHttpRequestUpload":false,"XMLSerializer":false,"XPathEvaluator":false,"XPathExpression":false,"XPathResult":false,"XSLTProcessor":false},"worker":{"addEventListener":false,"applicationCache":false,"atob":false,"Blob":false,"BroadcastChannel":false,"btoa":false,"Cache":false,"caches":false,"clearInterval":false,"clearTimeout":false,"close":true,"console":false,"fetch":false,"FileReaderSync":false,"FormData":false,"Headers":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"ImageData":false,"importScripts":true,"indexedDB":false,"location":false,"MessageChannel":false,"MessagePort":false,"name":false,"navigator":false,"Notification":false,"onclose":true,"onconnect":true,"onerror":true,"onlanguagechange":true,"onmessage":true,"onoffline":true,"ononline":true,"onrejectionhandled":true,"onunhandledrejection":true,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"postMessage":true,"Promise":false,"queueMicrotask":false,"removeEventListener":false,"Request":false,"Response":false,"self":true,"ServiceWorkerRegistration":false,"setInterval":false,"setTimeout":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false,"WebSocket":false,"Worker":false,"WorkerGlobalScope":false,"XMLHttpRequest":false},"node":{"__dirname":false,"__filename":false,"Buffer":false,"clearImmediate":false,"clearInterval":false,"clearTimeout":false,"console":false,"exports":true,"global":false,"Intl":false,"module":false,"process":false,"queueMicrotask":false,"require":false,"setImmediate":false,"setInterval":false,"setTimeout":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false},"commonjs":{"exports":true,"global":false,"module":false,"require":false},"amd":{"define":false,"require":false},"mocha":{"after":false,"afterEach":false,"before":false,"beforeEach":false,"context":false,"describe":false,"it":false,"mocha":false,"run":false,"setup":false,"specify":false,"suite":false,"suiteSetup":false,"suiteTeardown":false,"teardown":false,"test":false,"xcontext":false,"xdescribe":false,"xit":false,"xspecify":false},"jasmine":{"afterAll":false,"afterEach":false,"beforeAll":false,"beforeEach":false,"describe":false,"expect":false,"fail":false,"fdescribe":false,"fit":false,"it":false,"jasmine":false,"pending":false,"runs":false,"spyOn":false,"spyOnProperty":false,"waits":false,"waitsFor":false,"xdescribe":false,"xit":false},"jest":{"afterAll":false,"afterEach":false,"beforeAll":false,"beforeEach":false,"describe":false,"expect":false,"fdescribe":false,"fit":false,"it":false,"jest":false,"pit":false,"require":false,"test":false,"xdescribe":false,"xit":false,"xtest":false},"qunit":{"asyncTest":false,"deepEqual":false,"equal":false,"expect":false,"module":false,"notDeepEqual":false,"notEqual":false,"notOk":false,"notPropEqual":false,"notStrictEqual":false,"ok":false,"propEqual":false,"QUnit":false,"raises":false,"start":false,"stop":false,"strictEqual":false,"test":false,"throws":false},"phantomjs":{"console":true,"exports":true,"phantom":true,"require":true,"WebPage":true},"couch":{"emit":false,"exports":false,"getRow":false,"log":false,"module":false,"provides":false,"require":false,"respond":false,"send":false,"start":false,"sum":false},"rhino":{"defineClass":false,"deserialize":false,"gc":false,"help":false,"importClass":false,"importPackage":false,"java":false,"load":false,"loadClass":false,"Packages":false,"print":false,"quit":false,"readFile":false,"readUrl":false,"runCommand":false,"seal":false,"serialize":false,"spawn":false,"sync":false,"toint32":false,"version":false},"nashorn":{"__DIR__":false,"__FILE__":false,"__LINE__":false,"com":false,"edu":false,"exit":false,"java":false,"Java":false,"javafx":false,"JavaImporter":false,"javax":false,"JSAdapter":false,"load":false,"loadWithNewGlobal":false,"org":false,"Packages":false,"print":false,"quit":false},"wsh":{"ActiveXObject":true,"Enumerator":true,"GetObject":true,"ScriptEngine":true,"ScriptEngineBuildVersion":true,"ScriptEngineMajorVersion":true,"ScriptEngineMinorVersion":true,"VBArray":true,"WScript":true,"WSH":true,"XDomainRequest":true},"jquery":{"$":false,"jQuery":false},"yui":{"YAHOO":false,"YAHOO_config":false,"YUI":false,"YUI_config":false},"shelljs":{"cat":false,"cd":false,"chmod":false,"config":false,"cp":false,"dirs":false,"echo":false,"env":false,"error":false,"exec":false,"exit":false,"find":false,"grep":false,"ln":false,"ls":false,"mkdir":false,"mv":false,"popd":false,"pushd":false,"pwd":false,"rm":false,"sed":false,"set":false,"target":false,"tempdir":false,"test":false,"touch":false,"which":false},"prototypejs":{"$":false,"$$":false,"$A":false,"$break":false,"$continue":false,"$F":false,"$H":false,"$R":false,"$w":false,"Abstract":false,"Ajax":false,"Autocompleter":false,"Builder":false,"Class":false,"Control":false,"Draggable":false,"Draggables":false,"Droppables":false,"Effect":false,"Element":false,"Enumerable":false,"Event":false,"Field":false,"Form":false,"Hash":false,"Insertion":false,"ObjectRange":false,"PeriodicalExecuter":false,"Position":false,"Prototype":false,"Scriptaculous":false,"Selector":false,"Sortable":false,"SortableObserver":false,"Sound":false,"Template":false,"Toggle":false,"Try":false},"meteor":{"_":false,"$":false,"Accounts":false,"AccountsClient":false,"AccountsCommon":false,"AccountsServer":false,"App":false,"Assets":false,"Blaze":false,"check":false,"Cordova":false,"DDP":false,"DDPRateLimiter":false,"DDPServer":false,"Deps":false,"EJSON":false,"Email":false,"HTTP":false,"Log":false,"Match":false,"Meteor":false,"Mongo":false,"MongoInternals":false,"Npm":false,"Package":false,"Plugin":false,"process":false,"Random":false,"ReactiveDict":false,"ReactiveVar":false,"Router":false,"ServiceConfiguration":false,"Session":false,"share":false,"Spacebars":false,"Template":false,"Tinytest":false,"Tracker":false,"UI":false,"Utils":false,"WebApp":false,"WebAppInternals":false},"mongo":{"_isWindows":false,"_rand":false,"BulkWriteResult":false,"cat":false,"cd":false,"connect":false,"db":false,"getHostName":false,"getMemInfo":false,"hostname":false,"ISODate":false,"listFiles":false,"load":false,"ls":false,"md5sumFile":false,"mkdir":false,"Mongo":false,"NumberInt":false,"NumberLong":false,"ObjectId":false,"PlanCache":false,"print":false,"printjson":false,"pwd":false,"quit":false,"removeFile":false,"rs":false,"sh":false,"UUID":false,"version":false,"WriteResult":false},"applescript":{"$":false,"Application":false,"Automation":false,"console":false,"delay":false,"Library":false,"ObjC":false,"ObjectSpecifier":false,"Path":false,"Progress":false,"Ref":false},"serviceworker":{"addEventListener":false,"applicationCache":false,"atob":false,"Blob":false,"BroadcastChannel":false,"btoa":false,"Cache":false,"caches":false,"CacheStorage":false,"clearInterval":false,"clearTimeout":false,"Client":false,"clients":false,"Clients":false,"close":true,"console":false,"ExtendableEvent":false,"ExtendableMessageEvent":false,"fetch":false,"FetchEvent":false,"FileReaderSync":false,"FormData":false,"Headers":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"ImageData":false,"importScripts":false,"indexedDB":false,"location":false,"MessageChannel":false,"MessagePort":false,"name":false,"navigator":false,"Notification":false,"onclose":true,"onconnect":true,"onerror":true,"onfetch":true,"oninstall":true,"onlanguagechange":true,"onmessage":true,"onmessageerror":true,"onnotificationclick":true,"onnotificationclose":true,"onoffline":true,"ononline":true,"onpush":true,"onpushsubscriptionchange":true,"onrejectionhandled":true,"onsync":true,"onunhandledrejection":true,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"postMessage":true,"Promise":false,"queueMicrotask":false,"registration":false,"removeEventListener":false,"Request":false,"Response":false,"self":false,"ServiceWorker":false,"ServiceWorkerContainer":false,"ServiceWorkerGlobalScope":false,"ServiceWorkerMessageEvent":false,"ServiceWorkerRegistration":false,"setInterval":false,"setTimeout":false,"skipWaiting":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false,"WebSocket":false,"WindowClient":false,"Worker":false,"WorkerGlobalScope":false,"XMLHttpRequest":false},"atomtest":{"advanceClock":false,"fakeClearInterval":false,"fakeClearTimeout":false,"fakeSetInterval":false,"fakeSetTimeout":false,"resetTimeouts":false,"waitsForPromise":false},"embertest":{"andThen":false,"click":false,"currentPath":false,"currentRouteName":false,"currentURL":false,"fillIn":false,"find":false,"findAll":false,"findWithAssert":false,"keyEvent":false,"pauseTest":false,"resumeTest":false,"triggerEvent":false,"visit":false,"wait":false},"protractor":{"$":false,"$$":false,"browser":false,"by":false,"By":false,"DartObject":false,"element":false,"protractor":false},"shared-node-browser":{"clearInterval":false,"clearTimeout":false,"console":false,"setInterval":false,"setTimeout":false,"URL":false,"URLSearchParams":false},"webextensions":{"browser":false,"chrome":false,"opr":false},"greasemonkey":{"cloneInto":false,"createObjectIn":false,"exportFunction":false,"GM":false,"GM_addStyle":false,"GM_deleteValue":false,"GM_getResourceText":false,"GM_getResourceURL":false,"GM_getValue":false,"GM_info":false,"GM_listValues":false,"GM_log":false,"GM_openInTab":false,"GM_registerMenuCommand":false,"GM_setClipboard":false,"GM_setValue":false,"GM_xmlhttpRequest":false,"unsafeWindow":false},"devtools":{"$":false,"$_":false,"$$":false,"$0":false,"$1":false,"$2":false,"$3":false,"$4":false,"$x":false,"chrome":false,"clear":false,"copy":false,"debug":false,"dir":false,"dirxml":false,"getEventListeners":false,"inspect":false,"keys":false,"monitor":false,"monitorEvents":false,"profile":false,"profileEnd":false,"queryObjects":false,"table":false,"undebug":false,"unmonitor":false,"unmonitorEvents":false,"values":false}}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(143))&&r.__esModule?r:{default:r};t.default=class{constructor(e,t){this._cachedMap=null,this._code=t,this._opts=e,this._rawMappings=[]}get(){if(!this._cachedMap){const e=this._cachedMap=new i.default.SourceMapGenerator({sourceRoot:this._opts.sourceRoot}),t=this._code;"string"==typeof t?e.setSourceContent(this._opts.sourceFileName.replace(/\\/g,"/"),t):"object"==typeof t&&Object.keys(t).forEach(n=>{e.setSourceContent(n.replace(/\\/g,"/"),t[n])}),this._rawMappings.forEach(t=>e.addMapping(t),e)}return this._cachedMap.toJSON()}getRawMappings(){return this._rawMappings.slice()}mark(e,t,n,r,i,a,o){this._lastGenLine!==e&&null===n||(o||this._lastGenLine!==e||this._lastSourceLine!==n||this._lastSourceColumn!==r)&&(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=n,this._lastSourceColumn=r,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==n?void 0:(a||this._opts.sourceFileName).replace(/\\/g,"/"),original:null==n?void 0:{line:n,column:r}}))}}},function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&ei||a==i&&s>=o||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.MappingList=i},function(e,t,n){var r=n(35),i=n(327),a=n(146).ArraySet,o=n(145),s=n(328).quickSort;function u(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new p(t):new c(t)}function c(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=r.getArg(t,"version"),i=r.getArg(t,"sources"),o=r.getArg(t,"names",[]),s=r.getArg(t,"sourceRoot",null),u=r.getArg(t,"sourcesContent",null),c=r.getArg(t,"mappings"),l=r.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);i=i.map(String).map(r.normalize).map((function(e){return s&&r.isAbsolute(s)&&r.isAbsolute(e)?r.relative(s,e):e})),this._names=a.fromArray(o.map(String),!0),this._sources=a.fromArray(i,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=c,this.file=l}function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function p(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=r.getArg(t,"version"),i=r.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new a,this._names=new a;var o={line:-1,column:0};this._sections=i.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=r.getArg(e,"offset"),n=r.getArg(t,"line"),i=r.getArg(t,"column");if(n=0){var s=this._originalMappings[o];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)a.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)a.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return a},t.SourceMapConsumer=u,c.prototype=Object.create(u.prototype),c.prototype.consumer=u,c.fromSourceMap=function(e){var t=Object.create(c.prototype),n=t._names=a.fromArray(e._names.toArray(),!0),i=t._sources=a.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),u=t.__generatedMappings=[],p=t.__originalMappings=[],h=0,f=o.length;h1&&(n.source=y+a[1],y+=a[1],n.originalLine=f+a[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=d+a[3],d=n.originalColumn,a.length>4&&(n.name=v+a[4],v+=a[4])),w.push(n),"number"==typeof n.originalLine&&k.push(n)}s(w,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=w,s(k,r.compareByOriginalPositions),this.__originalMappings=k},c.prototype._findMapping=function(e,t,n,r,a,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,t,a,o)},c.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var a=r.getArg(i,"source",null);null!==a&&(a=this._sources.at(a),null!=this.sourceRoot&&(a=r.join(this.sourceRoot,a)));var o=r.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:a,line:r.getArg(i,"originalLine",null),column:r.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},c.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=r.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=r.urlParse(this.sourceRoot))){var i=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if(null!=this.sourceRoot&&(t=r.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var n={source:t=this._sources.indexOf(t),originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===n.source)return{line:r.getArg(a,"generatedLine",null),column:r.getArg(a,"generatedColumn",null),lastColumn:r.getArg(a,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=c,p.prototype=Object.create(u.prototype),p.prototype.constructor=u,p.prototype._version=3,Object.defineProperty(p.prototype,"sources",{get:function(){for(var e=[],t=0;t0?r-u>1?e(u,r,i,a,o,s):s==t.LEAST_UPPER_BOUND?r1?e(n,u,i,a,o,s):s==t.LEAST_UPPER_BOUND?u:n<0?-1:n}(-1,n.length,e,n,r,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===r(n[a],n[a-1],!0);)--a;return a}},function(e,t){function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t,i,a){if(i=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},s.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n{r.call(this,e,t)}),this._printTrailingComments(e),a&&this.token(")"),this._printStack.pop(),this.format.concise=n,this._insideAux=i}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}getPossibleRaw(e){const t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw}printJoin(e,t,n={}){if(!e||!e.length)return;n.indent&&this.indent();const r={addNewlines:n.addNewlines};for(let i=0;i0;n&&this.indent(),this.print(e,t),n&&this.dedent()}printBlock(e){const t=e.body;s.isEmptyStatement(t)||this.space(),this.print(t,e)}_printTrailingComments(e){this._printComments(this._getComments(!1,e))}_printLeadingComments(e){this._printComments(this._getComments(!0,e))}printInnerComments(e,t=!0){e.innerComments&&e.innerComments.length&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())}printSequence(e,t,n={}){return n.statement=!0,this.printJoin(e,t,n)}printList(e,t,n={}){return null==n.separator&&(n.separator=v),this.printJoin(e,t,n)}_printNewline(e,t,n,r){if(this.format.retainLines||this.format.compact)return;if(this.format.concise)return void this.space();let i=0;if(this._buf.hasContent()){e||i++,r.addNewlines&&(i+=r.addNewlines(e,t)||0),(e?o.needsWhitespaceBefore:o.needsWhitespaceAfter)(t,n)&&i++}this.newline(i)}_getComments(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]}_printComment(e){if(!this.format.shouldPrintComment(e.value))return;if(e.ignore)return;if(this._printedComments.has(e))return;if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}const t="CommentBlock"===e.type;this.newline(this._buf.hasContent()&&!this._noLineTerminator&&t?1:0),this.endsWith("[")||this.endsWith("{")||this.space();let n=t||this._noLineTerminator?`/*${e.value}*/`:`//${e.value}\n`;if(t&&this.format.indent.adjustMultilineComment){const t=e.loc&&e.loc.start.column;if(t){const e=new RegExp("\\n\\s{1,"+t+"}","g");n=n.replace(e,"\n")}const r=Math.max(this._getIndent().length,this._buf.getCurrentColumn());n=n.replace(/\n(?!$)/g,`\n${(0,i.default)(" ",r)}`)}this.endsWith("/")&&this._space(),this.withSource("start",e.loc,()=>{this._append(n)}),this.newline(t&&!this._noLineTerminator?1:0)}_printComments(e){if(e&&e.length)for(const t of e)this._printComment(t)}}function v(){this.token(","),this.space()}t.default=y,Object.assign(y.prototype,u)},function(e,t,n){var r=n(81);e.exports=function(e){return"number"==typeof e&&e==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=/^[ \t]+$/;t.default=class{constructor(e){this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._disallowedPop=null,this._map=e}get(){this._flush();const e=this._map,t={code:this._buf.join("").trimRight(),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get(){return this.map=e.get()},set(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t}append(e){this._flush();const{line:t,column:n,filename:r,identifierName:i,force:a}=this._sourcePosition;this._append(e,t,n,i,r,a)}queue(e){if("\n"===e)for(;this._queue.length>0&&r.test(this._queue[0][0]);)this._queue.shift();const{line:t,column:n,filename:i,identifierName:a,force:o}=this._sourcePosition;this._queue.unshift([e,t,n,a,i,o])}_flush(){let e;for(;e=this._queue.pop();)this._append(...e)}_append(e,t,n,r,i,a){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,n,r,i,a),this._buf.push(e),this._last=e[e.length-1];for(let t=0;t0&&"\n"===this._queue[0][0]&&this._queue.shift()}removeLastSemicolon(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()}endsWith(e){if(1===e.length){let t;if(this._queue.length>0){const e=this._queue[0][0];t=e[e.length-1]}else t=this._last;return t===e}const t=this._last+this._queue.reduce((e,t)=>t[0]+e,"");return e.length<=t.length&&t.slice(-e.length)===e}hasContent(){return this._queue.length>0||!!this._last}exactSource(e,t){this.source("start",e,!0),t(),this.source("end",e),this._disallowPop("start",e)}source(e,t,n){e&&!t||this._normalizePosition(e,t,this._sourcePosition,n)}withSource(e,t,n){if(!this._map)return n();const r=this._sourcePosition.line,i=this._sourcePosition.column,a=this._sourcePosition.filename,o=this._sourcePosition.identifierName;this.source(e,t),n(),this._sourcePosition.force&&this._sourcePosition.line===r&&this._sourcePosition.column===i&&this._sourcePosition.filename===a||this._disallowedPop&&this._disallowedPop.line===r&&this._disallowedPop.column===i&&this._disallowedPop.filename===a||(this._sourcePosition.line=r,this._sourcePosition.column=i,this._sourcePosition.filename=a,this._sourcePosition.identifierName=o,this._sourcePosition.force=!1,this._disallowedPop=null)}_disallowPop(e,t){e&&!t||(this._disallowedPop=this._normalizePosition(e,t))}_normalizePosition(e,t,n,r){const i=t?t[e]:null;void 0===n&&(n={identifierName:null,line:null,column:null,filename:null,force:!1});const a=n.line,o=n.column,s=n.filename;return n.identifierName="start"===e&&t&&t.identifierName||null,n.line=i?i.line:null,n.column=i?i.column:null,n.filename=t&&t.filename||null,(r||n.line!==a||n.column!==o||n.filename!==s)&&(n.force=r),n}getCurrentColumn(){const e=this._queue.reduce((e,t)=>t[0]+e,""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t}getCurrentLine(){const e=this._queue.reduce((e,t)=>t[0]+e,"");let t=0;for(let n=0;n({before:e.consequent.length||t.cases[0]===e,after:!e.consequent.length&&t.cases[t.cases.length-1]===e}),LogicalExpression(e){if(r.isFunction(e.left)||r.isFunction(e.right))return{after:!0}},Literal(e){if("use strict"===e.value)return{after:!0}},CallExpression(e){if(r.isFunction(e.callee)||o(e))return{before:!0,after:!0}},VariableDeclaration(e){for(let t=0;te.declarations.map(e=>e.init),ArrayExpression:e=>e.elements,ObjectExpression:e=>e.properties};t.list=c,[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach((function([e,t]){"boolean"==typeof t&&(t={after:t,before:t}),[e].concat(r.FLIPPED_ALIAS_KEYS[e]||[]).forEach((function(e){u[e]=function(){return t}}))}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullableTypeAnnotation=function(e,t){return r.isArrayTypeAnnotation(t)},t.FunctionTypeAnnotation=function(e,t,n){return r.isUnionTypeAnnotation(t)||r.isIntersectionTypeAnnotation(t)||r.isArrayTypeAnnotation(t)||r.isTypeAnnotation(t)&&r.isArrowFunctionExpression(n[n.length-3])},t.UpdateExpression=function(e,t){return r.isMemberExpression(t,{object:e})||r.isCallExpression(t,{callee:e})||r.isNewExpression(t,{callee:e})||o(e,t)},t.ObjectExpression=function(e,t,n){return c(n,{considerArrow:!0})},t.DoExpression=function(e,t,n){return c(n)},t.Binary=function(e,t){if("**"===e.operator&&r.isBinaryExpression(t,{operator:"**"}))return t.left===e;if(o(e,t))return!0;if((r.isCallExpression(t)||r.isNewExpression(t))&&t.callee===e||r.isUnaryLike(t)||r.isMemberExpression(t)&&t.object===e||r.isAwaitExpression(t))return!0;if(r.isBinary(t)){const n=t.operator,i=a[n],o=e.operator,s=a[o];if(i===s&&t.right===e&&!r.isLogicalExpression(t)||i>s)return!0}return!1},t.IntersectionTypeAnnotation=t.UnionTypeAnnotation=function(e,t){return r.isArrayTypeAnnotation(t)||r.isNullableTypeAnnotation(t)||r.isIntersectionTypeAnnotation(t)||r.isUnionTypeAnnotation(t)},t.TSAsExpression=function(){return!0},t.TSTypeAssertion=function(){return!0},t.TSIntersectionType=t.TSUnionType=function(e,t){return r.isTSArrayType(t)||r.isTSOptionalType(t)||r.isTSIntersectionType(t)||r.isTSUnionType(t)||r.isTSRestType(t)},t.BinaryExpression=function(e,t){return"in"===e.operator&&(r.isVariableDeclarator(t)||r.isFor(t))},t.SequenceExpression=function(e,t){if(r.isForStatement(t)||r.isThrowStatement(t)||r.isReturnStatement(t)||r.isIfStatement(t)&&t.test===e||r.isWhileStatement(t)&&t.test===e||r.isForInStatement(t)&&t.right===e||r.isSwitchStatement(t)&&t.discriminant===e||r.isExpressionStatement(t)&&t.expression===e)return!1;return!0},t.AwaitExpression=t.YieldExpression=function(e,t){return r.isBinary(t)||r.isUnaryLike(t)||r.isCallExpression(t)||r.isMemberExpression(t)||r.isNewExpression(t)||r.isAwaitExpression(t)&&r.isYieldExpression(e)||r.isConditionalExpression(t)&&e===t.test||o(e,t)},t.ClassExpression=function(e,t,n){return c(n,{considerDefaultExports:!0})},t.UnaryLike=s,t.FunctionExpression=function(e,t,n){return c(n,{considerDefaultExports:!0})},t.ArrowFunctionExpression=function(e,t){return r.isExportDeclaration(t)||u(e,t)},t.ConditionalExpression=u,t.OptionalMemberExpression=function(e,t){return r.isCallExpression(t)||r.isMemberExpression(t)},t.AssignmentExpression=function(e){return!!r.isObjectPattern(e.left)||u(...arguments)},t.NewExpression=function(e,t){return o(e,t)};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(10));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}const a={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10},o=(e,t)=>(r.isClassDeclaration(t)||r.isClassExpression(t))&&t.superClass===e;function s(e,t){return r.isMemberExpression(t,{object:e})||r.isCallExpression(t,{callee:e})||r.isNewExpression(t,{callee:e})||r.isBinaryExpression(t,{operator:"**",left:e})||o(e,t)}function u(e,t){return!!(r.isUnaryLike(t)||r.isBinary(t)||r.isConditionalExpression(t,{test:e})||r.isAwaitExpression(t)||r.isOptionalMemberExpression(t)||r.isTaggedTemplateExpression(t)||r.isTSTypeAssertion(t)||r.isTSAsExpression(t))||s(e,t)}function c(e,{considerArrow:t=!1,considerDefaultExports:n=!1}={}){let i=e.length-1,a=e[i];i--;let o=e[i];for(;i>0;){if(r.isExpressionStatement(o,{expression:a})||r.isTaggedTemplateExpression(o)||n&&r.isExportDefaultDeclaration(o,{declaration:a})||t&&r.isArrowFunctionExpression(o,{body:a}))return!0;if(!(r.isCallExpression(o,{callee:a})||r.isSequenceExpression(o)&&o.expressions[0]===a||r.isMemberExpression(o,{object:a})||r.isConditional(o,{test:a})||r.isBinary(o,{left:a})||r.isAssignmentExpression(o,{left:a})))return!1;a=o,i--,o=e[i]}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(336);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})}));var i=n(337);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var a=n(338);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var o=n(339);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var s=n(340);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=n(148);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=n(149);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=n(345);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}));var p=n(346);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})}));var h=n(347);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})}));var f=n(348);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaggedTemplateExpression=function(e){this.print(e.tag,e),this.print(e.typeParameters,e),this.print(e.quasi,e)},t.TemplateElement=function(e,t){const n=t.quasis[0]===e,r=t.quasis[t.quasis.length-1]===e,i=(n?"`":"}")+e.value.raw+(r?"`":"${");this.token(i)},t.TemplateLiteral=function(e){const t=e.quasis;for(let n=0;ne.loc.start.line?(this.indent(),this.print(t,e),this.dedent(),this._catchUp("start",e.body.loc)):this.print(t,e),this.token(")")):this.print(t,e):this._params(e);this._predicate(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(10));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}},function(e,t,n){"use strict";(function(t){const n={},r=n.hasOwnProperty,i=(e,t)=>{for(const n in e)r.call(e,n)&&t(n,e[n])},a=n.toString,o=Array.isArray,s=t.isBuffer,u={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},c=/["'\\\b\f\n\r\t]/,l=/[0-9]/,p=/[ !#-&\(-\[\]-_a-~]/,h=(e,t)=>{const n=()=>{x=b,++t.indentLevel,b=t.indent.repeat(t.indentLevel)},r={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:!1,__inline2__:!1},f=t&&t.json;var d,y;f&&(r.quotes="double",r.wrap=!0),d=r,"single"!=(t=(y=t)?(i(y,(e,t)=>{d[e]=t}),d):d).quotes&&"double"!=t.quotes&&"backtick"!=t.quotes&&(t.quotes="single");const v="double"==t.quotes?'"':"backtick"==t.quotes?"`":"'",m=t.compact,g=t.lowercaseHex;let b=t.indent.repeat(t.indentLevel),x="";const k=t.__inline1__,w=t.__inline2__,S=m?"":"\n";let P,E=!0;const T="binary"==t.numbers,O="octal"==t.numbers,C="decimal"==t.numbers,D="hexadecimal"==t.numbers;if(f&&e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!(e=>"string"==typeof e||"[object String]"==a.call(e))(e)){if((e=>"[object Map]"==a.call(e))(e))return 0==e.size?"new Map()":(m||(t.__inline1__=!0,t.__inline2__=!1),"new Map("+h(Array.from(e),t)+")");if((e=>"[object Set]"==a.call(e))(e))return 0==e.size?"new Set()":"new Set("+h(Array.from(e),t)+")";if(s(e))return 0==e.length?"Buffer.from([])":"Buffer.from("+h(Array.from(e),t)+")";if(o(e))return P=[],t.wrap=!0,k&&(t.__inline1__=!1,t.__inline2__=!0),w||n(),((e,t)=>{const n=e.length;let r=-1;for(;++r{E=!1,w&&(t.__inline2__=!1),P.push((m||w?"":b)+h(e,t))}),E?"[]":w?"["+P.join(", ")+"]":"["+S+P.join(","+S)+S+(m?"":x)+"]";if(!(e=>"number"==typeof e||"[object Number]"==a.call(e))(e))return(e=>"[object Object]"==a.call(e))(e)?(P=[],t.wrap=!0,n(),i(e,(e,n)=>{E=!1,P.push((m?"":b)+h(e,t)+":"+(m?"":" ")+h(n,t))}),E?"{}":"{"+S+P.join(","+S)+S+(m?"":x)+"}"):f?JSON.stringify(e)||"null":String(e);if(f)return JSON.stringify(e);if(C)return String(e);if(D){let t=e.toString(16);return g||(t=t.toUpperCase()),"0x"+t}if(T)return"0b"+e.toString(2);if(O)return"0o"+e.toString(8)}const A=e;let j=-1;const $=A.length;for(P="";++j<$;){const e=A.charAt(j);if(t.es6){const e=A.charCodeAt(j);if(e>=55296&&e<=56319&&$>j+1){const t=A.charCodeAt(j+1);if(t>=56320&&t<=57343){let n=(1024*(e-55296)+t-56320+65536).toString(16);g||(n=n.toUpperCase()),P+="\\u{"+n+"}",++j;continue}}}if(!t.escapeEverything){if(p.test(e)){P+=e;continue}if('"'==e){P+=v==e?'\\"':e;continue}if("`"==e){P+=v==e?"\\`":e;continue}if("'"==e){P+=v==e?"\\'":e;continue}}if("\0"==e&&!f&&!l.test(A.charAt(j+1))){P+="\\0";continue}if(c.test(e)){P+=u[e];continue}const n=e.charCodeAt(0);if(t.minimal&&8232!=n&&8233!=n){P+=e;continue}let r=n.toString(16);g||(r=r.toUpperCase());const i=r.length>2||f,a="\\"+(i?"u":"x")+("0000"+r).slice(i?-4:-2);P+=a}return t.wrap&&(P=v+P+v),"`"==v&&(P=P.replace(/\$\{/g,"\\${")),t.isScriptContext?P.replace(/<\/(script|style)/gi,"<\\/$1").replace(/ - + diff --git a/src/ui/property-editor/OffsetPathListEditor.js b/src/ui/property-editor/OffsetPathListEditor.js index da01a37ba..8d5d01969 100644 --- a/src/ui/property-editor/OffsetPathListEditor.js +++ b/src/ui/property-editor/OffsetPathListEditor.js @@ -57,7 +57,6 @@ export default class OffsetPathListEditor extends UIElement { if (project) { project.allLayers .filter(it => it.is('svg-path', 'svg-polygon')) - .filter(it => it['motion-based']) .forEach(it => { paths[it.id] = it }); diff --git a/src/ui/property/AlignmentProperty.js b/src/ui/property/AlignmentProperty.js index ac5d6cdc1..48bd8b604 100644 --- a/src/ui/property/AlignmentProperty.js +++ b/src/ui/property/AlignmentProperty.js @@ -20,7 +20,7 @@ export default class AlignmentProperty extends BaseProperty { getBody() { return /*html*/` -
+
diff --git a/src/ui/property/BackgroundColorProperty.js b/src/ui/property/AppearanceProperty.js similarity index 96% rename from src/ui/property/BackgroundColorProperty.js rename to src/ui/property/AppearanceProperty.js index 0684bfb98..08b19b221 100644 --- a/src/ui/property/BackgroundColorProperty.js +++ b/src/ui/property/AppearanceProperty.js @@ -9,16 +9,12 @@ const overflow_list = [ 'auto' ] -export default class BackgroundColorProperty extends BaseProperty { +export default class AppearanceProperty extends BaseProperty { getTitle() { return this.$i18n('background.color.property.title'); } - isHideHeader() { - return true; - } - getOverflowList () { return overflow_list.map(it => { return `${it}:${this.$i18n(`background.color.property.overflow.${it}`)}` @@ -161,6 +157,6 @@ export default class BackgroundColorProperty extends BaseProperty { } [EVENT('refreshSelection')]() { - this.refresh(); + this.refreshShow(['artboard', 'rect', 'circle', 'image', 'video', 'text']); } } diff --git a/src/ui/property/BackgroundImageProperty.js b/src/ui/property/BackgroundImageProperty.js index 76e7550a0..2f373b77c 100644 --- a/src/ui/property/BackgroundImageProperty.js +++ b/src/ui/property/BackgroundImageProperty.js @@ -58,7 +58,7 @@ export default class BackgroundImageProperty extends BaseProperty { } [EVENT('refreshSelection')]() { - this.refreshShowIsNot(['project']); + this.refreshShow(['artboard', 'rect', 'circle', 'text', 'image', 'video']); } refresh() { diff --git a/src/ui/property/SVGItemProperty.js b/src/ui/property/SVGItemProperty.js index dd3200dd8..5949a158d 100644 --- a/src/ui/property/SVGItemProperty.js +++ b/src/ui/property/SVGItemProperty.js @@ -49,6 +49,7 @@ export default class SVGItemProperty extends BaseProperty { this.children.$strokeDashArray.setValue(current['stroke-dasharray'] || ' ') this.children.$strokeLineCap.setValue(current['stroke-linecap'] || 'butt') this.children.$strokeLineJoin.setValue(current['stroke-linejoin'] || 'miter') + this.children.$mixBlend.setValue(current['mix-blend-mode']) } else { this.$el.hide(); @@ -60,28 +61,10 @@ export default class SVGItemProperty extends BaseProperty { // update 를 어떻게 할지 고민 } - [BIND('$svgProperty')] () { - var current = this.$selection.current || {}; - var isMotionBased = !!current['motion-based'] - return { - style: { - display: isMotionBased ? 'none': 'block' - } - } - } - getBody() { var current = this.$selection.current || {}; return /*html*/` - -
- -
-
@@ -194,7 +177,20 @@ export default class SVGItemProperty extends BaseProperty { options="miter,bevel,round" onchange="changeValue" /> -
+
+
+
+ +
+ +
@@ -211,15 +207,15 @@ export default class SVGItemProperty extends BaseProperty { `; } - [CLICK('$motionBased')] () { - this.command('setAttribute', 'set motion base', { - 'motion-based': this.refs.$motionBased.checked() - }) - } - [EVENT('changeValue')] (key, value, params) { this.command('setAttribute', `change svg item property : ${key}`, { [key]: value - }, null, true) + }) + } + + [EVENT('changeSelect')] (key, value) { + this.command("setAttribute", `change attribute : ${key}`, { + [key]: value + }) } } diff --git a/src/ui/property/index.js b/src/ui/property/index.js index 32e65fdba..d05c4f2cd 100644 --- a/src/ui/property/index.js +++ b/src/ui/property/index.js @@ -1,4 +1,4 @@ -import BackgroundColorProperty from "./BackgroundColorProperty"; +import AppearanceProperty from "./AppearanceProperty"; import BorderRadiusProperty from "./BorderRadiusProperty"; import SizeProperty from "./SizeProperty"; import BoxShadowProperty from "./BoxShadowProperty"; @@ -109,5 +109,5 @@ export default { BoxShadowProperty, SizeProperty, BorderRadiusProperty, - BackgroundColorProperty, + AppearanceProperty, }; diff --git a/src/ui/view-items/GuideLineView.js b/src/ui/view-items/GuideLineView.js index a05a6e6ed..af9dbd186 100644 --- a/src/ui/view-items/GuideLineView.js +++ b/src/ui/view-items/GuideLineView.js @@ -102,4 +102,8 @@ export default class GuideLineView extends UIElement { [EVENT('refreshGuideLine')] (list) { this.setGuideLine(list); } + + [EVENT('updateViewport')] () { + this.refresh(); + } } \ No newline at end of file diff --git a/src/ui/view-items/PathEditorView.js b/src/ui/view-items/PathEditorView.js index 8815e9de3..c249a3202 100644 --- a/src/ui/view-items/PathEditorView.js +++ b/src/ui/view-items/PathEditorView.js @@ -194,30 +194,6 @@ const PathTransformEditor = class extends PathCutter { break; } } - - [POINTERSTART('$tool .transform-tool-item') + MOVE('moveTransformTool') + END('moveEndTransformTool')] (e) { - this.transformMoveType = e.$dt.attr('data-position') - - this.resetTransformZone() - this.pathGenerator.initTransform(this.state.transformZoneRect); - this.startXY = e.xy; - } - - moveTransformTool (dx, dy) { - - - this.pathGenerator.transform(this.transformMoveType, dx, dy); - - this.renderPath() - - this.refreshPathLayer(); - } - - moveEndTransformTool (dx, dy) { - this.transformMoveType = 'none' - - this.renderTransformTool(); - } } const FIELDS = ['fill', 'fill-opacity', 'stroke', 'stroke-width'] @@ -265,51 +241,10 @@ export default class PathEditorView extends PathTransformEditor {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
` } - [BIND('$tool')] () { - - // transform 이 아닐때는 업데이트 하지 않는다. - if (this.state.mode !== 'transform') return; - - this.resetTransformZone(); - var rect = this.state.transformZoneRect; - - return { - 'data-show': this.state.mode === 'transform', - 'data-position': this.transformMoveType, - style: { - left: Length.px(rect.x), - top: Length.px(rect.y), - width: Length.px(rect.width), - height: Length.px(rect.height) - } - - } - } - - renderTransformTool () { - this.bindData('$tool') - } - isShow () { return this.state.isShow } @@ -531,7 +466,6 @@ export default class PathEditorView extends PathTransformEditor { class: { 'path': this.state.mode === 'path', 'modify': this.state.mode === 'modify', - 'transform': this.state.mode === 'transform', 'box': this.state.box === 'box', 'segment-move': this.state.mode === 'segment-move', }, @@ -561,7 +495,6 @@ export default class PathEditorView extends PathTransformEditor { renderPath () { this.bindData('$view'); - this.renderTransformTool() } getPathRect () { @@ -586,7 +519,7 @@ export default class PathEditorView extends PathTransformEditor { this.state.transformZoneRect = rect; } - [POINTERMOVE('$view')] (e) { + [POINTERMOVE('$view') + PREVENT] (e) { this.initRect() if (this.isMode('path') && this.state.rect) { this.state.moveXY = { @@ -617,7 +550,7 @@ export default class PathEditorView extends PathTransformEditor { } - [POINTERSTART('$view :not(.split-path)') + MOVE() + END()] (e) { + [POINTERSTART('$view :not(.split-path)') + PREVENT + STOP + MOVE() + END()] (e) { this.initRect(); this.state.altKey = false; diff --git a/src/ui/view-items/PathManager.js b/src/ui/view-items/PathManager.js index f608f6548..aebde8ebc 100644 --- a/src/ui/view-items/PathManager.js +++ b/src/ui/view-items/PathManager.js @@ -8,7 +8,6 @@ const MODES = { 'segment-move': 'modify', 'modify': 'modify', 'path': 'path', - 'transform': 'transform', } @@ -51,7 +50,6 @@ export default class PathManager extends UIElement {
-