diff --git a/packages/next/bundles/babel/bundle.js b/packages/next/bundles/babel/bundle.js index 1533fbface8a..774fb8e1e636 100644 --- a/packages/next/bundles/babel/bundle.js +++ b/packages/next/bundles/babel/bundle.js @@ -40,6 +40,10 @@ function generator() { return require('@babel/generator') } +function parser() { + return require('@babel/parser') +} + function eslintParser() { return require('next/dist/compiled/babel-packages').eslintParser() } @@ -116,6 +120,7 @@ module.exports = { generator, traverse, eslintParser, + parser, pluginProposalClassProperties, pluginProposalExportNamespaceFrom, pluginProposalNumericSeparator, diff --git a/packages/next/compiled/babel-packages/packages-bundle.js b/packages/next/compiled/babel-packages/packages-bundle.js index 830a22e194f8..a8fc6013b2f4 100644 --- a/packages/next/compiled/babel-packages/packages-bundle.js +++ b/packages/next/compiled/babel-packages/packages-bundle.js @@ -1,33 +1,33 @@ -(()=>{var e={7043:(e,t,r)=>{e.exports=r(5619)},2119:(e,t,r)=>{e.exports=r(7286)},1498:(e,t,r)=>{"use strict";const s=r(3654);const a=Object.freeze(Object.keys(s));for(const e of a){Object.freeze(s[e])}Object.freeze(s);const i=new Set(["parent","leadingComments","trailingComments"]);function filterKey(e){return!i.has(e)&&e[0]!=="_"}e.exports=Object.freeze({KEYS:s,getKeys(e){return Object.keys(e).filter(filterKey)},unionWith(e){const t=Object.assign({},s);for(const r of Object.keys(e)){if(t.hasOwnProperty(r)){const s=new Set(e[r]);for(const e of t[r]){s.add(e)}t[r]=Object.freeze(Array.from(s))}else{t[r]=Object.freeze(Array.from(e[r]))}}return Object.freeze(t)}})},2155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=annotateAsPure;var s=r(8622);const a="#__PURE__";const isPureAnnotated=({leadingComments:e})=>!!e&&e.some((e=>/[@#]__PURE__/.test(e.value)));function annotateAsPure(e){const t=e["node"]||e;if(isPureAnnotated(t)){return}s.addComment(t,"leading",a)}},6951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(3223);var a=r(8622);function _default(e){const{build:t,operator:r}=e;return{AssignmentExpression(e){const{node:i,scope:n}=e;if(i.operator!==r+"=")return;const o=[];const l=(0,s.default)(i.left,o,this,n);o.push(a.assignmentExpression("=",l.ref,t(l.uid,i.right)));e.replaceWith(a.sequenceExpression(o))},BinaryExpression(e){const{node:s}=e;if(s.operator===r){e.replaceWith(t(s.left,s.right))}}}}},9750:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getInclusionReasons=getInclusionReasons;var s=r(7849);var a=r(4794);var i=r(3406);function getInclusionReasons(e,t,r){const n=r[e]||{};return Object.keys(t).reduce(((e,r)=>{const o=(0,i.getLowestImplementedVersion)(n,r);const l=t[r];if(!o){e[r]=(0,a.prettifyVersion)(l)}else{const t=(0,i.isUnreleasedVersion)(o,r);const n=(0,i.isUnreleasedVersion)(l,r);if(!n&&(t||s.lt(l.toString(),(0,i.semverify)(o)))){e[r]=(0,a.prettifyVersion)(l)}}return e}),{})}},9578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.targetsSupported=targetsSupported;t.isRequired=isRequired;t["default"]=filterItems;var s=r(7849);var a=r(2119);var i=r(3406);function targetsSupported(e,t){const r=Object.keys(e);if(r.length===0){return false}const a=r.filter((r=>{const a=(0,i.getLowestImplementedVersion)(t,r);if(!a){return true}const n=e[r];if((0,i.isUnreleasedVersion)(n,r)){return false}if((0,i.isUnreleasedVersion)(a,r)){return true}if(!s.valid(n.toString())){throw new Error(`Invalid version passed for target "${r}": "${n}". `+"Versions must be in semver format (major.minor.patch)")}return s.gt((0,i.semverify)(a),n.toString())}));return a.length===0}function isRequired(e,t,{compatData:r=a,includes:s,excludes:i}={}){if(i!=null&&i.has(e))return false;if(s!=null&&s.has(e))return true;return!targetsSupported(t,r[e])}function filterItems(e,t,r,s,a,i,n){const o=new Set;const l={compatData:e,includes:t,excludes:r};for(const t in e){if(isRequired(t,s,l)){o.add(t)}else if(n){const e=n.get(t);if(e){o.add(e)}}}if(a){a.forEach((e=>!r.has(e)&&o.add(e)))}if(i){i.forEach((e=>!t.has(e)&&o.delete(e)))}return o}},797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isBrowsersQueryValid=isBrowsersQueryValid;t["default"]=getTargets;Object.defineProperty(t,"unreleasedLabels",{enumerable:true,get:function(){return o.unreleasedLabels}});Object.defineProperty(t,"TargetNames",{enumerable:true,get:function(){return l.TargetNames}});Object.defineProperty(t,"prettifyTargets",{enumerable:true,get:function(){return c.prettifyTargets}});Object.defineProperty(t,"getInclusionReasons",{enumerable:true,get:function(){return p.getInclusionReasons}});Object.defineProperty(t,"filterItems",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"isRequired",{enumerable:true,get:function(){return u.isRequired}});var s=r(4907);var a=r(7347);var i=r(7043);var n=r(3406);var o=r(6555);var l=r(5748);var c=r(4794);var p=r(9750);var u=r(9578);const d=i["es6.module"];const f=new a.OptionValidator("@babel/helper-compilation-targets");function validateTargetNames(e){const t=Object.keys(l.TargetNames);for(const r of Object.keys(e)){if(!(r in l.TargetNames)){throw new Error(f.formatMessage(`'${r}' is not a valid target\n- Did you mean '${(0,a.findSuggestion)(r,t)}'?`))}}return e}function isBrowsersQueryValid(e){return typeof e==="string"||Array.isArray(e)&&e.every((e=>typeof e==="string"))}function validateBrowsers(e){f.invariant(e===undefined||isBrowsersQueryValid(e),`'${String(e)}' is not a valid browserslist query`);return e}function getLowestVersions(e){return e.reduce(((e,t)=>{const[r,s]=t.split(" ");const a=o.browserNameMap[r];if(!a){return e}try{const t=s.split("-")[0].toLowerCase();const i=(0,n.isUnreleasedVersion)(t,r);if(!e[a]){e[a]=i?t:(0,n.semverify)(t);return e}const o=e[a];const l=(0,n.isUnreleasedVersion)(o,r);if(l&&i){e[a]=(0,n.getLowestUnreleased)(o,t,r)}else if(l){e[a]=(0,n.semverify)(t)}else if(!l&&!i){const r=(0,n.semverify)(t);e[a]=(0,n.semverMin)(o,r)}}catch(e){}return e}),{})}function outputDecimalWarning(e){if(!e.length){return}console.warn("Warning, the following targets are using a decimal version:\n");e.forEach((({target:e,value:t})=>console.warn(` ${e}: ${t}`)));console.warn(`\nWe recommend using a string for minor/patch versions to avoid numbers like 6.10\ngetting parsed as 6.1, which can lead to unexpected behavior.\n`)}function semverifyTarget(e,t){try{return(0,n.semverify)(t)}catch(r){throw new Error(f.formatMessage(`'${t}' is not a valid value for 'targets.${e}'.`))}}const h={__default(e,t){const r=(0,n.isUnreleasedVersion)(t,e)?t.toLowerCase():semverifyTarget(e,t);return[e,r]},node(e,t){const r=t===true||t==="current"?process.versions.node:semverifyTarget(e,t);return[e,r]}};function generateTargets(e){const t=Object.assign({},e);delete t.esmodules;delete t.browsers;return t}function resolveTargets(e){const t=s(e,{mobileToDesktop:true});return getLowestVersions(t)}function getTargets(e={},t={}){var r;let{browsers:a,esmodules:i}=e;const{configPath:o="."}=t;validateBrowsers(a);const l=generateTargets(e);let c=validateTargetNames(l);const p=!!a;const u=p||Object.keys(c).length>0;const f=!t.ignoreBrowserslistConfig&&!u;if(!a&&f){a=s.loadConfig({config:t.configFile,path:o,env:t.browserslistEnv});if(a==null){{a=[]}}}if(i&&(i!=="intersect"||!((r=a)!=null&&r.length))){a=Object.keys(d).map((e=>`${e} >= ${d[e]}`)).join(", ");i=false}if(a){const e=resolveTargets(a);if(i==="intersect"){for(const t of Object.keys(e)){const r=e[t];if(d[t]){e[t]=(0,n.getHighestUnreleased)(r,(0,n.semverify)(d[t]),t)}else{delete e[t]}}}c=Object.assign(e,c)}const m={};const y=[];for(const e of Object.keys(c).sort()){var g;const t=c[e];if(typeof t==="number"&&t%1!==0){y.push({target:e,value:t})}const r=(g=h[e])!=null?g:h.__default;const[s,a]=r(e,t);if(a){m[s]=a}}outputDecimalWarning(y);return m}},5748:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TargetNames=void 0;const r={node:"node",chrome:"chrome",opera:"opera",edge:"edge",firefox:"firefox",safari:"safari",ie:"ie",ios:"ios",android:"android",electron:"electron",samsung:"samsung"};t.TargetNames=r},4794:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.prettifyVersion=prettifyVersion;t.prettifyTargets=prettifyTargets;var s=r(7849);var a=r(6555);function prettifyVersion(e){if(typeof e!=="string"){return e}const t=[s.major(e)];const r=s.minor(e);const a=s.patch(e);if(r||a){t.push(r)}if(a){t.push(a)}return t.join(".")}function prettifyTargets(e){return Object.keys(e).reduce(((t,r)=>{let s=e[r];const i=a.unreleasedLabels[r];if(typeof s==="string"&&i!==s){s=prettifyVersion(s)}t[r]=s;return t}),{})}},6555:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.browserNameMap=t.unreleasedLabels=void 0;const r={safari:"tp"};t.unreleasedLabels=r;const s={and_chr:"chrome",and_ff:"firefox",android:"android",chrome:"chrome",edge:"edge",firefox:"firefox",ie:"ie",ie_mob:"ie",ios_saf:"ios",node:"node",op_mob:"opera",opera:"opera",safari:"safari",samsung:"samsung"};t.browserNameMap=s},3406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.semverMin=semverMin;t.semverify=semverify;t.isUnreleasedVersion=isUnreleasedVersion;t.getLowestUnreleased=getLowestUnreleased;t.getHighestUnreleased=getHighestUnreleased;t.getLowestImplementedVersion=getLowestImplementedVersion;var s=r(7849);var a=r(7347);var i=r(6555);const n=/^(\d+|\d+.\d+)$/;const o=new a.OptionValidator("@babel/helper-compilation-targets");function semverMin(e,t){return e&&s.lt(e,t)?e:t}function semverify(e){if(typeof e==="string"&&s.valid(e)){return e}o.invariant(typeof e==="number"||typeof e==="string"&&n.test(e),`'${e}' is not a valid version`);const t=e.toString().split(".");while(t.length<3){t.push("0")}return t.join(".")}function isUnreleasedVersion(e,t){const r=i.unreleasedLabels[t];return!!r&&r===e.toString().toLowerCase()}function getLowestUnreleased(e,t,r){const s=i.unreleasedLabels[r];const a=[e,t].some((e=>e===s));if(a){return e===a?t:e||t}return semverMin(e,t)}function getHighestUnreleased(e,t,r){return getLowestUnreleased(e,t,r)===e?t:e}function getLowestImplementedVersion(e,t){const r=e[t];if(!r&&t==="android"){return e.chrome}return r}},6429:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hasOwnDecorators=hasOwnDecorators;t.hasDecorators=hasDecorators;t.buildDecoratedClass=buildDecoratedClass;var s=r(8304);var a=r(6833);var i=r(550);function hasOwnDecorators(e){return!!(e.decorators&&e.decorators.length)}function hasDecorators(e){return hasOwnDecorators(e)||e.body.body.some(hasOwnDecorators)}function prop(e,t){if(!t)return null;return s.types.objectProperty(s.types.identifier(e),t)}function method(e,t){return s.types.objectMethod("method",s.types.identifier(e),[],s.types.blockStatement(t))}function takeDecorators(e){let t;if(e.decorators&&e.decorators.length>0){t=s.types.arrayExpression(e.decorators.map((e=>e.expression)))}e.decorators=undefined;return t}function getKey(e){if(e.computed){return e.key}else if(s.types.isIdentifier(e.key)){return s.types.stringLiteral(e.key.name)}else{return s.types.stringLiteral(String(e.key.value))}}function extractElementDescriptor(e,t,r){const{node:n,scope:o}=r;const l=r.isClassMethod();if(r.isPrivate()){throw r.buildCodeFrameError(`Private ${l?"methods":"fields"} in decorated classes are not supported yet.`)}new a.default({methodPath:r,objectRef:e,superRef:t,file:this,refToPreserve:e}).replace();const c=[prop("kind",s.types.stringLiteral(l?n.kind:"field")),prop("decorators",takeDecorators(n)),prop("static",n.static&&s.types.booleanLiteral(true)),prop("key",getKey(n))].filter(Boolean);if(l){const e=n.computed?null:n.key;s.types.toExpression(n);c.push(prop("value",(0,i.default)({node:n,id:e,scope:o})||n))}else if(n.value){c.push(method("value",s.template.statements.ast`return ${n.value}`))}else{c.push(prop("value",o.buildUndefinedNode()))}r.remove();return s.types.objectExpression(c)}function addDecorateHelper(e){try{return e.addHelper("decorate")}catch(e){if(e.code==="BABEL_HELPER_UNKNOWN"){e.message+="\n '@babel/plugin-transform-decorators' in non-legacy mode"+" requires '@babel/core' version ^7.0.2 and you appear to be using"+" an older version."}throw e}}function buildDecoratedClass(e,t,r,a){const{node:i,scope:n}=t;const o=n.generateUidIdentifier("initialize");const l=i.id&&t.isDeclaration();const c=t.isInStrictMode();const{superClass:p}=i;i.type="ClassDeclaration";if(!i.id)i.id=s.types.cloneNode(e);let u;if(p){u=n.generateUidIdentifierBasedOnNode(i.superClass,"super");i.superClass=u}const d=takeDecorators(i);const f=s.types.arrayExpression(r.filter((e=>!e.node.abstract)).map(extractElementDescriptor.bind(a,i.id,u)));const h=s.template.expression.ast` +(()=>{var e={7043:(e,t,r)=>{e.exports=r(5619)},2119:(e,t,r)=>{e.exports=r(7286)},1498:(e,t,r)=>{"use strict";const s=r(3654);const a=Object.freeze(Object.keys(s));for(const e of a){Object.freeze(s[e])}Object.freeze(s);const n=new Set(["parent","leadingComments","trailingComments"]);function filterKey(e){return!n.has(e)&&e[0]!=="_"}e.exports=Object.freeze({KEYS:s,getKeys(e){return Object.keys(e).filter(filterKey)},unionWith(e){const t=Object.assign({},s);for(const r of Object.keys(e)){if(t.hasOwnProperty(r)){const s=new Set(e[r]);for(const e of t[r]){s.add(e)}t[r]=Object.freeze(Array.from(s))}else{t[r]=Object.freeze(Array.from(e[r]))}}return Object.freeze(t)}})},2155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=annotateAsPure;var s=r(8622);const a="#__PURE__";const isPureAnnotated=({leadingComments:e})=>!!e&&e.some((e=>/[@#]__PURE__/.test(e.value)));function annotateAsPure(e){const t=e["node"]||e;if(isPureAnnotated(t)){return}s.addComment(t,"leading",a)}},6951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(3223);var a=r(8622);function _default(e){const{build:t,operator:r}=e;return{AssignmentExpression(e){const{node:n,scope:o}=e;if(n.operator!==r+"=")return;const i=[];const l=(0,s.default)(n.left,i,this,o);i.push(a.assignmentExpression("=",l.ref,t(l.uid,n.right)));e.replaceWith(a.sequenceExpression(i))},BinaryExpression(e){const{node:s}=e;if(s.operator===r){e.replaceWith(t(s.left,s.right))}}}}},9750:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getInclusionReasons=getInclusionReasons;var s=r(7849);var a=r(4794);var n=r(3406);function getInclusionReasons(e,t,r){const o=r[e]||{};return Object.keys(t).reduce(((e,r)=>{const i=(0,n.getLowestImplementedVersion)(o,r);const l=t[r];if(!i){e[r]=(0,a.prettifyVersion)(l)}else{const t=(0,n.isUnreleasedVersion)(i,r);const o=(0,n.isUnreleasedVersion)(l,r);if(!o&&(t||s.lt(l.toString(),(0,n.semverify)(i)))){e[r]=(0,a.prettifyVersion)(l)}}return e}),{})}},9578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.targetsSupported=targetsSupported;t.isRequired=isRequired;t["default"]=filterItems;var s=r(7849);var a=r(2119);var n=r(3406);function targetsSupported(e,t){const r=Object.keys(e);if(r.length===0){return false}const a=r.filter((r=>{const a=(0,n.getLowestImplementedVersion)(t,r);if(!a){return true}const o=e[r];if((0,n.isUnreleasedVersion)(o,r)){return false}if((0,n.isUnreleasedVersion)(a,r)){return true}if(!s.valid(o.toString())){throw new Error(`Invalid version passed for target "${r}": "${o}". `+"Versions must be in semver format (major.minor.patch)")}return s.gt((0,n.semverify)(a),o.toString())}));return a.length===0}function isRequired(e,t,{compatData:r=a,includes:s,excludes:n}={}){if(n!=null&&n.has(e))return false;if(s!=null&&s.has(e))return true;return!targetsSupported(t,r[e])}function filterItems(e,t,r,s,a,n,o){const i=new Set;const l={compatData:e,includes:t,excludes:r};for(const t in e){if(isRequired(t,s,l)){i.add(t)}else if(o){const e=o.get(t);if(e){i.add(e)}}}if(a){a.forEach((e=>!r.has(e)&&i.add(e)))}if(n){n.forEach((e=>!t.has(e)&&i.delete(e)))}return i}},797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isBrowsersQueryValid=isBrowsersQueryValid;t["default"]=getTargets;Object.defineProperty(t,"unreleasedLabels",{enumerable:true,get:function(){return i.unreleasedLabels}});Object.defineProperty(t,"TargetNames",{enumerable:true,get:function(){return l.TargetNames}});Object.defineProperty(t,"prettifyTargets",{enumerable:true,get:function(){return c.prettifyTargets}});Object.defineProperty(t,"getInclusionReasons",{enumerable:true,get:function(){return u.getInclusionReasons}});Object.defineProperty(t,"filterItems",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"isRequired",{enumerable:true,get:function(){return p.isRequired}});var s=r(4907);var a=r(7347);var n=r(7043);var o=r(3406);var i=r(6555);var l=r(5748);var c=r(4794);var u=r(9750);var p=r(9578);const f=n["es6.module"];const d=new a.OptionValidator("@babel/helper-compilation-targets");function validateTargetNames(e){const t=Object.keys(l.TargetNames);for(const r of Object.keys(e)){if(!(r in l.TargetNames)){throw new Error(d.formatMessage(`'${r}' is not a valid target\n- Did you mean '${(0,a.findSuggestion)(r,t)}'?`))}}return e}function isBrowsersQueryValid(e){return typeof e==="string"||Array.isArray(e)&&e.every((e=>typeof e==="string"))}function validateBrowsers(e){d.invariant(e===undefined||isBrowsersQueryValid(e),`'${String(e)}' is not a valid browserslist query`);return e}function getLowestVersions(e){return e.reduce(((e,t)=>{const[r,s]=t.split(" ");const a=i.browserNameMap[r];if(!a){return e}try{const t=s.split("-")[0].toLowerCase();const n=(0,o.isUnreleasedVersion)(t,r);if(!e[a]){e[a]=n?t:(0,o.semverify)(t);return e}const i=e[a];const l=(0,o.isUnreleasedVersion)(i,r);if(l&&n){e[a]=(0,o.getLowestUnreleased)(i,t,r)}else if(l){e[a]=(0,o.semverify)(t)}else if(!l&&!n){const r=(0,o.semverify)(t);e[a]=(0,o.semverMin)(i,r)}}catch(e){}return e}),{})}function outputDecimalWarning(e){if(!e.length){return}console.warn("Warning, the following targets are using a decimal version:\n");e.forEach((({target:e,value:t})=>console.warn(` ${e}: ${t}`)));console.warn(`\nWe recommend using a string for minor/patch versions to avoid numbers like 6.10\ngetting parsed as 6.1, which can lead to unexpected behavior.\n`)}function semverifyTarget(e,t){try{return(0,o.semverify)(t)}catch(r){throw new Error(d.formatMessage(`'${t}' is not a valid value for 'targets.${e}'.`))}}const m={__default(e,t){const r=(0,o.isUnreleasedVersion)(t,e)?t.toLowerCase():semverifyTarget(e,t);return[e,r]},node(e,t){const r=t===true||t==="current"?process.versions.node:semverifyTarget(e,t);return[e,r]}};function generateTargets(e){const t=Object.assign({},e);delete t.esmodules;delete t.browsers;return t}function resolveTargets(e){const t=s(e,{mobileToDesktop:true});return getLowestVersions(t)}function getTargets(e={},t={}){var r;let{browsers:a,esmodules:n}=e;const{configPath:i="."}=t;validateBrowsers(a);const l=generateTargets(e);let c=validateTargetNames(l);const u=!!a;const p=u||Object.keys(c).length>0;const d=!t.ignoreBrowserslistConfig&&!p;if(!a&&d){a=s.loadConfig({config:t.configFile,path:i,env:t.browserslistEnv});if(a==null){{a=[]}}}if(n&&(n!=="intersect"||!((r=a)!=null&&r.length))){a=Object.keys(f).map((e=>`${e} >= ${f[e]}`)).join(", ");n=false}if(a){const e=resolveTargets(a);if(n==="intersect"){for(const t of Object.keys(e)){const r=e[t];if(f[t]){e[t]=(0,o.getHighestUnreleased)(r,(0,o.semverify)(f[t]),t)}else{delete e[t]}}}c=Object.assign(e,c)}const y={};const g=[];for(const e of Object.keys(c).sort()){var h;const t=c[e];if(typeof t==="number"&&t%1!==0){g.push({target:e,value:t})}const r=(h=m[e])!=null?h:m.__default;const[s,a]=r(e,t);if(a){y[s]=a}}outputDecimalWarning(g);return y}},5748:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TargetNames=void 0;const r={node:"node",chrome:"chrome",opera:"opera",edge:"edge",firefox:"firefox",safari:"safari",ie:"ie",ios:"ios",android:"android",electron:"electron",samsung:"samsung"};t.TargetNames=r},4794:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.prettifyVersion=prettifyVersion;t.prettifyTargets=prettifyTargets;var s=r(7849);var a=r(6555);function prettifyVersion(e){if(typeof e!=="string"){return e}const t=[s.major(e)];const r=s.minor(e);const a=s.patch(e);if(r||a){t.push(r)}if(a){t.push(a)}return t.join(".")}function prettifyTargets(e){return Object.keys(e).reduce(((t,r)=>{let s=e[r];const n=a.unreleasedLabels[r];if(typeof s==="string"&&n!==s){s=prettifyVersion(s)}t[r]=s;return t}),{})}},6555:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.browserNameMap=t.unreleasedLabels=void 0;const r={safari:"tp"};t.unreleasedLabels=r;const s={and_chr:"chrome",and_ff:"firefox",android:"android",chrome:"chrome",edge:"edge",firefox:"firefox",ie:"ie",ie_mob:"ie",ios_saf:"ios",node:"node",op_mob:"opera",opera:"opera",safari:"safari",samsung:"samsung"};t.browserNameMap=s},3406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.semverMin=semverMin;t.semverify=semverify;t.isUnreleasedVersion=isUnreleasedVersion;t.getLowestUnreleased=getLowestUnreleased;t.getHighestUnreleased=getHighestUnreleased;t.getLowestImplementedVersion=getLowestImplementedVersion;var s=r(7849);var a=r(7347);var n=r(6555);const o=/^(\d+|\d+.\d+)$/;const i=new a.OptionValidator("@babel/helper-compilation-targets");function semverMin(e,t){return e&&s.lt(e,t)?e:t}function semverify(e){if(typeof e==="string"&&s.valid(e)){return e}i.invariant(typeof e==="number"||typeof e==="string"&&o.test(e),`'${e}' is not a valid version`);const t=e.toString().split(".");while(t.length<3){t.push("0")}return t.join(".")}function isUnreleasedVersion(e,t){const r=n.unreleasedLabels[t];return!!r&&r===e.toString().toLowerCase()}function getLowestUnreleased(e,t,r){const s=n.unreleasedLabels[r];const a=[e,t].some((e=>e===s));if(a){return e===a?t:e||t}return semverMin(e,t)}function getHighestUnreleased(e,t,r){return getLowestUnreleased(e,t,r)===e?t:e}function getLowestImplementedVersion(e,t){const r=e[t];if(!r&&t==="android"){return e.chrome}return r}},6429:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hasOwnDecorators=hasOwnDecorators;t.hasDecorators=hasDecorators;t.buildDecoratedClass=buildDecoratedClass;var s=r(8304);var a=r(6833);var n=r(550);function hasOwnDecorators(e){return!!(e.decorators&&e.decorators.length)}function hasDecorators(e){return hasOwnDecorators(e)||e.body.body.some(hasOwnDecorators)}function prop(e,t){if(!t)return null;return s.types.objectProperty(s.types.identifier(e),t)}function method(e,t){return s.types.objectMethod("method",s.types.identifier(e),[],s.types.blockStatement(t))}function takeDecorators(e){let t;if(e.decorators&&e.decorators.length>0){t=s.types.arrayExpression(e.decorators.map((e=>e.expression)))}e.decorators=undefined;return t}function getKey(e){if(e.computed){return e.key}else if(s.types.isIdentifier(e.key)){return s.types.stringLiteral(e.key.name)}else{return s.types.stringLiteral(String(e.key.value))}}function extractElementDescriptor(e,t,r){const{node:o,scope:i}=r;const l=r.isClassMethod();if(r.isPrivate()){throw r.buildCodeFrameError(`Private ${l?"methods":"fields"} in decorated classes are not supported yet.`)}new a.default({methodPath:r,objectRef:e,superRef:t,file:this,refToPreserve:e}).replace();const c=[prop("kind",s.types.stringLiteral(l?o.kind:"field")),prop("decorators",takeDecorators(o)),prop("static",o.static&&s.types.booleanLiteral(true)),prop("key",getKey(o))].filter(Boolean);if(l){const e=o.computed?null:o.key;s.types.toExpression(o);c.push(prop("value",(0,n.default)({node:o,id:e,scope:i})||o))}else if(o.value){c.push(method("value",s.template.statements.ast`return ${o.value}`))}else{c.push(prop("value",i.buildUndefinedNode()))}r.remove();return s.types.objectExpression(c)}function addDecorateHelper(e){try{return e.addHelper("decorate")}catch(e){if(e.code==="BABEL_HELPER_UNKNOWN"){e.message+="\n '@babel/plugin-transform-decorators' in non-legacy mode"+" requires '@babel/core' version ^7.0.2 and you appear to be using"+" an older version."}throw e}}function buildDecoratedClass(e,t,r,a){const{node:n,scope:o}=t;const i=o.generateUidIdentifier("initialize");const l=n.id&&t.isDeclaration();const c=t.isInStrictMode();const{superClass:u}=n;n.type="ClassDeclaration";if(!n.id)n.id=s.types.cloneNode(e);let p;if(u){p=o.generateUidIdentifierBasedOnNode(n.superClass,"super");n.superClass=p}const f=takeDecorators(n);const d=s.types.arrayExpression(r.filter((e=>!e.node.abstract)).map(extractElementDescriptor.bind(a,n.id,p)));const m=s.template.expression.ast` ${addDecorateHelper(a)}( - ${d||s.types.nullLiteral()}, - function (${o}, ${p?s.types.cloneNode(u):null}) { - ${i} - return { F: ${s.types.cloneNode(i.id)}, d: ${f} }; + ${f||s.types.nullLiteral()}, + function (${i}, ${u?s.types.cloneNode(p):null}) { + ${n} + return { F: ${s.types.cloneNode(n.id)}, d: ${d} }; }, - ${p} + ${u} ) - `;if(!c){h.arguments[1].body.directives.push(s.types.directive(s.types.directiveLiteral("use strict")))}let m=h;let y="arguments.1.body.body.0";if(l){m=s.template.statement.ast`let ${e} = ${h}`;y="declarations.0.init."+y}return{instanceNodes:[s.template.statement.ast`${s.types.cloneNode(o)}(this)`],wrapClass(e){e.replaceWith(m);return e.get(y)}}}},7497:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.enableFeature=enableFeature;t.isLoose=isLoose;t.verifyUsedFeatures=verifyUsedFeatures;t.FEATURES=void 0;var s=r(6429);const a=Object.freeze({fields:1<<1,privateMethods:1<<2,decorators:1<<3,privateIn:1<<4,staticBlocks:1<<5});t.FEATURES=a;const i=new Map([[a.fields,"@babel/plugin-proposal-class-properties"],[a.privateMethods,"@babel/plugin-proposal-private-methods"],[a.privateIn,"@babel/plugin-proposal-private-property-in-object"]]);const n="@babel/plugin-class-features/featuresKey";const o="@babel/plugin-class-features/looseKey";const l="@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing";function enableFeature(e,t,r){if(!hasFeature(e,t)||canIgnoreLoose(e,t)){e.set(n,e.get(n)|t);if(r==="#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"){setLoose(e,t,true);e.set(l,e.get(l)|t)}else if(r==="#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"){setLoose(e,t,false);e.set(l,e.get(l)|t)}else{setLoose(e,t,r)}}let s;let a;for(const[t,r]of i){if(!hasFeature(e,t))continue;const i=isLoose(e,t);if(canIgnoreLoose(e,t)){continue}else if(s===!i){throw new Error("'loose' mode configuration must be the same for @babel/plugin-proposal-class-properties, "+"@babel/plugin-proposal-private-methods and "+"@babel/plugin-proposal-private-property-in-object (when they are enabled).")}else{s=i;a=r}}if(s!==undefined){for(const[t,r]of i){if(hasFeature(e,t)&&isLoose(e,t)!==s){setLoose(e,t,s);console.warn(`Though the "loose" option was set to "${!s}" in your @babel/preset-env `+`config, it will not be used for ${r} since the "loose" mode option was set to `+`"${s}" for ${a}.\nThe "loose" option must be the `+`same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods `+`and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can `+`silence this warning by explicitly adding\n`+`\t["${r}", { "loose": ${s} }]\n`+`to the "plugins" section of your Babel config.`)}}}}function hasFeature(e,t){return!!(e.get(n)&t)}function isLoose(e,t){return!!(e.get(o)&t)}function setLoose(e,t,r){if(r)e.set(o,e.get(o)|t);else e.set(o,e.get(o)&~t);e.set(l,e.get(l)&~t)}function canIgnoreLoose(e,t){return!!(e.get(l)&t)}function verifyUsedFeatures(e,t){if((0,s.hasOwnDecorators)(e.node)){if(!hasFeature(t,a.decorators)){throw e.buildCodeFrameError("Decorators are not enabled."+"\nIf you are using "+'["@babel/plugin-proposal-decorators", { "legacy": true }], '+'make sure it comes *before* "@babel/plugin-proposal-class-properties" '+"and enable loose mode, like so:\n"+'\t["@babel/plugin-proposal-decorators", { "legacy": true }]\n'+'\t["@babel/plugin-proposal-class-properties", { "loose": true }]')}if(e.isPrivate()){throw e.buildCodeFrameError(`Private ${e.isClassMethod()?"methods":"fields"} in decorated classes are not supported yet.`)}}if(e.isPrivateMethod!=null&&e.isPrivateMethod()){if(!hasFeature(t,a.privateMethods)){throw e.buildCodeFrameError("Class private methods are not enabled.")}}if(e.isPrivateName()&&e.parentPath.isBinaryExpression({operator:"in",left:e.node})){if(!hasFeature(t,a.privateIn)){throw e.buildCodeFrameError("Private property in checks are not enabled.")}}if(e.isProperty()){if(!hasFeature(t,a.fields)){throw e.buildCodeFrameError("Class fields are not enabled.")}}if(e.isStaticBlock!=null&&e.isStaticBlock()){if(!hasFeature(t,a.staticBlocks)){throw e.buildCodeFrameError("Static class blocks are not enabled. "+"Please add `@babel/plugin-proposal-class-static-block` to your configuration.")}}}},3647:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.buildPrivateNamesMap=buildPrivateNamesMap;t.buildPrivateNamesNodes=buildPrivateNamesNodes;t.transformPrivateNamesUsage=transformPrivateNamesUsage;t.buildFieldsInitNodes=buildFieldsInitNodes;var s=r(8304);var a=r(6833);var i=r(3316);var n=r(6721);var o=r(2155);var l=r(6339);function buildPrivateNamesMap(e){const t=new Map;for(const r of e){const e=r.isPrivate();const s=!r.isProperty();const a=!r.node.static;if(e){const{name:e}=r.node.key.id;const i=t.has(e)?t.get(e):{id:r.scope.generateUidIdentifier(e),static:!a,method:s};if(r.node.kind==="get"){i.getId=r.scope.generateUidIdentifier(`get_${e}`)}else if(r.node.kind==="set"){i.setId=r.scope.generateUidIdentifier(`set_${e}`)}else if(r.node.kind==="method"){i.methodId=r.scope.generateUidIdentifier(e)}t.set(e,i)}}return t}function buildPrivateNamesNodes(e,t,r){const a=[];for(const[i,n]of e){const{static:e,method:l,getId:c,setId:p}=n;const u=c||p;const d=s.types.cloneNode(n.id);let f;if(t){f=s.types.callExpression(r.addHelper("classPrivateFieldLooseKey"),[s.types.stringLiteral(i)])}else if(!e){f=s.types.newExpression(s.types.identifier(!l||u?"WeakMap":"WeakSet"),[])}if(f){(0,o.default)(f);a.push(s.template.statement.ast`var ${d} = ${f}`)}}return a}function privateNameVisitorFactory(e){const t=Object.assign({},e,{Class(e){const{privateNamesMap:s}=this;const a=e.get("body.body");const i=new Map(s);const n=[];for(const e of a){if(!e.isPrivate())continue;const{name:t}=e.node.key.id;i.delete(t);n.push(t)}if(!n.length){return}e.get("body").traverse(r,Object.assign({},this,{redeclared:n}));e.traverse(t,Object.assign({},this,{privateNamesMap:i}));e.skipKey("body")}});const r=s.traverse.visitors.merge([Object.assign({},e),a.environmentVisitor]);return t}const c=privateNameVisitorFactory({PrivateName(e,{noDocumentAll:t}){const{privateNamesMap:r,redeclared:s}=this;const{node:a,parentPath:i}=e;if(!i.isMemberExpression({property:a})&&!i.isOptionalMemberExpression({property:a})){return}const{name:n}=a.id;if(!r.has(n))return;if(s&&s.includes(n))return;this.handle(i,t)}});const p=privateNameVisitorFactory({BinaryExpression(e){const{operator:t,left:r,right:a}=e.node;if(t!=="in")return;if(!e.get("left").isPrivateName())return;const{privateFieldsAsProperties:i,privateNamesMap:n,redeclared:o}=this;const{name:l}=r.id;if(!n.has(l))return;if(o&&o.includes(l))return;if(i){const{id:t}=n.get(l);e.replaceWith(s.template.expression.ast` + `;if(!c){m.arguments[1].body.directives.push(s.types.directive(s.types.directiveLiteral("use strict")))}let y=m;let g="arguments.1.body.body.0";if(l){y=s.template.statement.ast`let ${e} = ${m}`;g="declarations.0.init."+g}return{instanceNodes:[s.template.statement.ast`${s.types.cloneNode(i)}(this)`],wrapClass(e){e.replaceWith(y);return e.get(g)}}}},7497:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.enableFeature=enableFeature;t.isLoose=isLoose;t.verifyUsedFeatures=verifyUsedFeatures;t.FEATURES=void 0;var s=r(6429);const a=Object.freeze({fields:1<<1,privateMethods:1<<2,decorators:1<<3,privateIn:1<<4,staticBlocks:1<<5});t.FEATURES=a;const n=new Map([[a.fields,"@babel/plugin-proposal-class-properties"],[a.privateMethods,"@babel/plugin-proposal-private-methods"],[a.privateIn,"@babel/plugin-proposal-private-property-in-object"]]);const o="@babel/plugin-class-features/featuresKey";const i="@babel/plugin-class-features/looseKey";const l="@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing";function enableFeature(e,t,r){if(!hasFeature(e,t)||canIgnoreLoose(e,t)){e.set(o,e.get(o)|t);if(r==="#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"){setLoose(e,t,true);e.set(l,e.get(l)|t)}else if(r==="#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"){setLoose(e,t,false);e.set(l,e.get(l)|t)}else{setLoose(e,t,r)}}let s;let a;for(const[t,r]of n){if(!hasFeature(e,t))continue;const n=isLoose(e,t);if(canIgnoreLoose(e,t)){continue}else if(s===!n){throw new Error("'loose' mode configuration must be the same for @babel/plugin-proposal-class-properties, "+"@babel/plugin-proposal-private-methods and "+"@babel/plugin-proposal-private-property-in-object (when they are enabled).")}else{s=n;a=r}}if(s!==undefined){for(const[t,r]of n){if(hasFeature(e,t)&&isLoose(e,t)!==s){setLoose(e,t,s);console.warn(`Though the "loose" option was set to "${!s}" in your @babel/preset-env `+`config, it will not be used for ${r} since the "loose" mode option was set to `+`"${s}" for ${a}.\nThe "loose" option must be the `+`same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods `+`and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can `+`silence this warning by explicitly adding\n`+`\t["${r}", { "loose": ${s} }]\n`+`to the "plugins" section of your Babel config.`)}}}}function hasFeature(e,t){return!!(e.get(o)&t)}function isLoose(e,t){return!!(e.get(i)&t)}function setLoose(e,t,r){if(r)e.set(i,e.get(i)|t);else e.set(i,e.get(i)&~t);e.set(l,e.get(l)&~t)}function canIgnoreLoose(e,t){return!!(e.get(l)&t)}function verifyUsedFeatures(e,t){if((0,s.hasOwnDecorators)(e.node)){if(!hasFeature(t,a.decorators)){throw e.buildCodeFrameError("Decorators are not enabled."+"\nIf you are using "+'["@babel/plugin-proposal-decorators", { "legacy": true }], '+'make sure it comes *before* "@babel/plugin-proposal-class-properties" '+"and enable loose mode, like so:\n"+'\t["@babel/plugin-proposal-decorators", { "legacy": true }]\n'+'\t["@babel/plugin-proposal-class-properties", { "loose": true }]')}if(e.isPrivate()){throw e.buildCodeFrameError(`Private ${e.isClassMethod()?"methods":"fields"} in decorated classes are not supported yet.`)}}if(e.isPrivateMethod!=null&&e.isPrivateMethod()){if(!hasFeature(t,a.privateMethods)){throw e.buildCodeFrameError("Class private methods are not enabled.")}}if(e.isPrivateName()&&e.parentPath.isBinaryExpression({operator:"in",left:e.node})){if(!hasFeature(t,a.privateIn)){throw e.buildCodeFrameError("Private property in checks are not enabled.")}}if(e.isProperty()){if(!hasFeature(t,a.fields)){throw e.buildCodeFrameError("Class fields are not enabled.")}}if(e.isStaticBlock!=null&&e.isStaticBlock()){if(!hasFeature(t,a.staticBlocks)){throw e.buildCodeFrameError("Static class blocks are not enabled. "+"Please add `@babel/plugin-proposal-class-static-block` to your configuration.")}}}},3647:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.buildPrivateNamesMap=buildPrivateNamesMap;t.buildPrivateNamesNodes=buildPrivateNamesNodes;t.transformPrivateNamesUsage=transformPrivateNamesUsage;t.buildFieldsInitNodes=buildFieldsInitNodes;var s=r(8304);var a=r(6833);var n=r(3316);var o=r(6721);var i=r(2155);var l=r(6339);function buildPrivateNamesMap(e){const t=new Map;for(const r of e){const e=r.isPrivate();const s=!r.isProperty();const a=!r.node.static;if(e){const{name:e}=r.node.key.id;const n=t.has(e)?t.get(e):{id:r.scope.generateUidIdentifier(e),static:!a,method:s};if(r.node.kind==="get"){n.getId=r.scope.generateUidIdentifier(`get_${e}`)}else if(r.node.kind==="set"){n.setId=r.scope.generateUidIdentifier(`set_${e}`)}else if(r.node.kind==="method"){n.methodId=r.scope.generateUidIdentifier(e)}t.set(e,n)}}return t}function buildPrivateNamesNodes(e,t,r){const a=[];for(const[n,o]of e){const{static:e,method:l,getId:c,setId:u}=o;const p=c||u;const f=s.types.cloneNode(o.id);let d;if(t){d=s.types.callExpression(r.addHelper("classPrivateFieldLooseKey"),[s.types.stringLiteral(n)])}else if(!e){d=s.types.newExpression(s.types.identifier(!l||p?"WeakMap":"WeakSet"),[])}if(d){(0,i.default)(d);a.push(s.template.statement.ast`var ${f} = ${d}`)}}return a}function privateNameVisitorFactory(e){const t=Object.assign({},e,{Class(e){const{privateNamesMap:s}=this;const a=e.get("body.body");const n=new Map(s);const o=[];for(const e of a){if(!e.isPrivate())continue;const{name:t}=e.node.key.id;n.delete(t);o.push(t)}if(!o.length){return}e.get("body").traverse(r,Object.assign({},this,{redeclared:o}));e.traverse(t,Object.assign({},this,{privateNamesMap:n}));e.skipKey("body")}});const r=s.traverse.visitors.merge([Object.assign({},e),a.environmentVisitor]);return t}const c=privateNameVisitorFactory({PrivateName(e,{noDocumentAll:t}){const{privateNamesMap:r,redeclared:s}=this;const{node:a,parentPath:n}=e;if(!n.isMemberExpression({property:a})&&!n.isOptionalMemberExpression({property:a})){return}const{name:o}=a.id;if(!r.has(o))return;if(s&&s.includes(o))return;this.handle(n,t)}});const u=privateNameVisitorFactory({BinaryExpression(e){const{operator:t,left:r,right:a}=e.node;if(t!=="in")return;if(!e.get("left").isPrivateName())return;const{privateFieldsAsProperties:n,privateNamesMap:o,redeclared:i}=this;const{name:l}=r.id;if(!o.has(l))return;if(i&&i.includes(l))return;if(n){const{id:t}=o.get(l);e.replaceWith(s.template.expression.ast` Object.prototype.hasOwnProperty.call(${a}, ${s.types.cloneNode(t)}) - `);return}const{id:c,static:p}=n.get(l);if(p){e.replaceWith(s.template.expression.ast`${a} === ${this.classRef}`);return}e.replaceWith(s.template.expression.ast`${s.types.cloneNode(c)}.has(${a})`)}});const u={memoise(e,t){const{scope:r}=e;const{object:s}=e.node;const a=r.maybeGenerateMemoised(s);if(!a){return}this.memoiser.set(s,a,t)},receiver(e){const{object:t}=e.node;if(this.memoiser.has(t)){return s.types.cloneNode(this.memoiser.get(t))}return s.types.cloneNode(t)},get(e){const{classRef:t,privateNamesMap:r,file:a}=this;const{name:i}=e.node.property.id;const{id:n,static:o,method:l,methodId:c,getId:p,setId:u}=r.get(i);const d=p||u;if(o){const r=l&&!d?"classStaticPrivateMethodGet":"classStaticPrivateFieldSpecGet";return s.types.callExpression(a.addHelper(r),[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(n)])}if(l){if(d){if(!p&&u){if(a.availableHelper("writeOnlyError")){return s.types.sequenceExpression([this.receiver(e),s.types.callExpression(a.addHelper("writeOnlyError"),[s.types.stringLiteral(`#${i}`)])])}console.warn(`@babel/helpers is outdated, update it to silence this warning.`)}return s.types.callExpression(a.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(n)])}return s.types.callExpression(a.addHelper("classPrivateMethodGet"),[this.receiver(e),s.types.cloneNode(n),s.types.cloneNode(c)])}return s.types.callExpression(a.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(n)])},boundGet(e){this.memoise(e,1);return s.types.callExpression(s.types.memberExpression(this.get(e),s.types.identifier("bind")),[this.receiver(e)])},set(e,t){const{classRef:r,privateNamesMap:a,file:i}=this;const{name:n}=e.node.property.id;const{id:o,static:l,method:c,setId:p,getId:u}=a.get(n);const d=u||p;if(l){const a=c&&!d?"classStaticPrivateMethodSet":"classStaticPrivateFieldSpecSet";return s.types.callExpression(i.addHelper(a),[this.receiver(e),s.types.cloneNode(r),s.types.cloneNode(o),t])}if(c){if(p){return s.types.callExpression(i.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(o),t])}return s.types.sequenceExpression([this.receiver(e),t,s.types.callExpression(i.addHelper("readOnlyError"),[s.types.stringLiteral(`#${n}`)])])}return s.types.callExpression(i.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(o),t])},destructureSet(e){const{classRef:t,privateNamesMap:r,file:a}=this;const{name:i}=e.node.property.id;const{id:n,static:o}=r.get(i);if(o){try{var l=a.addHelper("classStaticPrivateFieldDestructureSet")}catch(e){throw new Error("Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \n"+"please update @babel/helpers to the latest version.")}return s.types.memberExpression(s.types.callExpression(l,[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(n)]),s.types.identifier("value"))}return s.types.memberExpression(s.types.callExpression(a.addHelper("classPrivateFieldDestructureSet"),[this.receiver(e),s.types.cloneNode(n)]),s.types.identifier("value"))},call(e,t){this.memoise(e,1);return(0,n.default)(this.get(e),this.receiver(e),t,false)},optionalCall(e,t){this.memoise(e,1);return(0,n.default)(this.get(e),this.receiver(e),t,true)}};const d={get(e){const{privateNamesMap:t,file:r}=this;const{object:a}=e.node;const{name:i}=e.node.property.id;return s.template.expression`BASE(REF, PROP)[PROP]`({BASE:r.addHelper("classPrivateFieldLooseBase"),REF:s.types.cloneNode(a),PROP:s.types.cloneNode(t.get(i).id)})},boundGet(e){return s.types.callExpression(s.types.memberExpression(this.get(e),s.types.identifier("bind")),[s.types.cloneNode(e.node.object)])},simpleSet(e){return this.get(e)},destructureSet(e){return this.get(e)},call(e,t){return s.types.callExpression(this.get(e),t)},optionalCall(e,t){return s.types.optionalCallExpression(this.get(e),t,true)}};function transformPrivateNamesUsage(e,t,r,{privateFieldsAsProperties:s,noDocumentAll:a},n){if(!r.size)return;const o=t.get("body");const l=s?d:u;(0,i.default)(o,c,Object.assign({privateNamesMap:r,classRef:e,file:n},l,{noDocumentAll:a}));o.traverse(p,{privateNamesMap:r,classRef:e,file:n,privateFieldsAsProperties:s})}function buildPrivateFieldInitLoose(e,t,r){const{id:a}=r.get(t.node.key.id.name);const i=t.node.value||t.scope.buildUndefinedNode();return s.template.statement.ast` + `);return}const{id:c,static:u}=o.get(l);if(u){e.replaceWith(s.template.expression.ast`${a} === ${this.classRef}`);return}e.replaceWith(s.template.expression.ast`${s.types.cloneNode(c)}.has(${a})`)}});const p={memoise(e,t){const{scope:r}=e;const{object:s}=e.node;const a=r.maybeGenerateMemoised(s);if(!a){return}this.memoiser.set(s,a,t)},receiver(e){const{object:t}=e.node;if(this.memoiser.has(t)){return s.types.cloneNode(this.memoiser.get(t))}return s.types.cloneNode(t)},get(e){const{classRef:t,privateNamesMap:r,file:a}=this;const{name:n}=e.node.property.id;const{id:o,static:i,method:l,methodId:c,getId:u,setId:p}=r.get(n);const f=u||p;if(i){const r=l&&!f?"classStaticPrivateMethodGet":"classStaticPrivateFieldSpecGet";return s.types.callExpression(a.addHelper(r),[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(o)])}if(l){if(f){if(!u&&p){if(a.availableHelper("writeOnlyError")){return s.types.sequenceExpression([this.receiver(e),s.types.callExpression(a.addHelper("writeOnlyError"),[s.types.stringLiteral(`#${n}`)])])}console.warn(`@babel/helpers is outdated, update it to silence this warning.`)}return s.types.callExpression(a.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(o)])}return s.types.callExpression(a.addHelper("classPrivateMethodGet"),[this.receiver(e),s.types.cloneNode(o),s.types.cloneNode(c)])}return s.types.callExpression(a.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(o)])},boundGet(e){this.memoise(e,1);return s.types.callExpression(s.types.memberExpression(this.get(e),s.types.identifier("bind")),[this.receiver(e)])},set(e,t){const{classRef:r,privateNamesMap:a,file:n}=this;const{name:o}=e.node.property.id;const{id:i,static:l,method:c,setId:u,getId:p}=a.get(o);const f=p||u;if(l){const a=c&&!f?"classStaticPrivateMethodSet":"classStaticPrivateFieldSpecSet";return s.types.callExpression(n.addHelper(a),[this.receiver(e),s.types.cloneNode(r),s.types.cloneNode(i),t])}if(c){if(u){return s.types.callExpression(n.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(i),t])}return s.types.sequenceExpression([this.receiver(e),t,s.types.callExpression(n.addHelper("readOnlyError"),[s.types.stringLiteral(`#${o}`)])])}return s.types.callExpression(n.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(i),t])},destructureSet(e){const{classRef:t,privateNamesMap:r,file:a}=this;const{name:n}=e.node.property.id;const{id:o,static:i}=r.get(n);if(i){try{var l=a.addHelper("classStaticPrivateFieldDestructureSet")}catch(e){throw new Error("Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \n"+"please update @babel/helpers to the latest version.")}return s.types.memberExpression(s.types.callExpression(l,[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(o)]),s.types.identifier("value"))}return s.types.memberExpression(s.types.callExpression(a.addHelper("classPrivateFieldDestructureSet"),[this.receiver(e),s.types.cloneNode(o)]),s.types.identifier("value"))},call(e,t){this.memoise(e,1);return(0,o.default)(this.get(e),this.receiver(e),t,false)},optionalCall(e,t){this.memoise(e,1);return(0,o.default)(this.get(e),this.receiver(e),t,true)}};const f={get(e){const{privateNamesMap:t,file:r}=this;const{object:a}=e.node;const{name:n}=e.node.property.id;return s.template.expression`BASE(REF, PROP)[PROP]`({BASE:r.addHelper("classPrivateFieldLooseBase"),REF:s.types.cloneNode(a),PROP:s.types.cloneNode(t.get(n).id)})},boundGet(e){return s.types.callExpression(s.types.memberExpression(this.get(e),s.types.identifier("bind")),[s.types.cloneNode(e.node.object)])},simpleSet(e){return this.get(e)},destructureSet(e){return this.get(e)},call(e,t){return s.types.callExpression(this.get(e),t)},optionalCall(e,t){return s.types.optionalCallExpression(this.get(e),t,true)}};function transformPrivateNamesUsage(e,t,r,{privateFieldsAsProperties:s,noDocumentAll:a},o){if(!r.size)return;const i=t.get("body");const l=s?f:p;(0,n.default)(i,c,Object.assign({privateNamesMap:r,classRef:e,file:o},l,{noDocumentAll:a}));i.traverse(u,{privateNamesMap:r,classRef:e,file:o,privateFieldsAsProperties:s})}function buildPrivateFieldInitLoose(e,t,r){const{id:a}=r.get(t.node.key.id.name);const n=t.node.value||t.scope.buildUndefinedNode();return s.template.statement.ast` Object.defineProperty(${e}, ${s.types.cloneNode(a)}, { // configurable is false by default // enumerable is false by default writable: true, - value: ${i} + value: ${n} }); - `}function buildPrivateInstanceFieldInitSpec(e,t,r){const{id:a}=r.get(t.node.key.id.name);const i=t.node.value||t.scope.buildUndefinedNode();return s.template.statement.ast`${s.types.cloneNode(a)}.set(${e}, { + `}function buildPrivateInstanceFieldInitSpec(e,t,r){const{id:a}=r.get(t.node.key.id.name);const n=t.node.value||t.scope.buildUndefinedNode();return s.template.statement.ast`${s.types.cloneNode(a)}.set(${e}, { // configurable is always false for private elements // enumerable is always false for private elements writable: true, - value: ${i}, - })`}function buildPrivateStaticFieldInitSpec(e,t){const r=t.get(e.node.key.id.name);const{id:a,getId:i,setId:n,initAdded:o}=r;const l=i||n;if(!e.isProperty()&&(o||!l))return;if(l){t.set(e.node.key.id.name,Object.assign({},r,{initAdded:true}));return s.template.statement.ast` + value: ${n}, + })`}function buildPrivateStaticFieldInitSpec(e,t){const r=t.get(e.node.key.id.name);const{id:a,getId:n,setId:o,initAdded:i}=r;const l=n||o;if(!e.isProperty()&&(i||!l))return;if(l){t.set(e.node.key.id.name,Object.assign({},r,{initAdded:true}));return s.template.statement.ast` var ${s.types.cloneNode(a)} = { // configurable is false by default // enumerable is false by default // writable is false by default - get: ${i?i.name:e.scope.buildUndefinedNode()}, - set: ${n?n.name:e.scope.buildUndefinedNode()} + get: ${n?n.name:e.scope.buildUndefinedNode()}, + set: ${o?o.name:e.scope.buildUndefinedNode()} } `}const c=e.node.value||e.scope.buildUndefinedNode();return s.template.statement.ast` var ${s.types.cloneNode(a)} = { @@ -36,28 +36,28 @@ writable: true, value: ${c} }; - `}function buildPrivateMethodInitLoose(e,t,r){const a=r.get(t.node.key.id.name);const{methodId:i,id:n,getId:o,setId:l,initAdded:c}=a;if(c)return;if(i){return s.template.statement.ast` - Object.defineProperty(${e}, ${n}, { + `}function buildPrivateMethodInitLoose(e,t,r){const a=r.get(t.node.key.id.name);const{methodId:n,id:o,getId:i,setId:l,initAdded:c}=a;if(c)return;if(n){return s.template.statement.ast` + Object.defineProperty(${e}, ${o}, { // configurable is false by default // enumerable is false by default // writable is false by default - value: ${i.name} + value: ${n.name} }); - `}const p=o||l;if(p){r.set(t.node.key.id.name,Object.assign({},a,{initAdded:true}));return s.template.statement.ast` - Object.defineProperty(${e}, ${n}, { + `}const u=i||l;if(u){r.set(t.node.key.id.name,Object.assign({},a,{initAdded:true}));return s.template.statement.ast` + Object.defineProperty(${e}, ${o}, { // configurable is false by default // enumerable is false by default // writable is false by default - get: ${o?o.name:t.scope.buildUndefinedNode()}, + get: ${i?i.name:t.scope.buildUndefinedNode()}, set: ${l?l.name:t.scope.buildUndefinedNode()} }); - `}}function buildPrivateInstanceMethodInitSpec(e,t,r){const a=r.get(t.node.key.id.name);const{id:i,getId:n,setId:o,initAdded:l}=a;if(l)return;const c=n||o;if(c){r.set(t.node.key.id.name,Object.assign({},a,{initAdded:true}));return s.template.statement.ast` - ${i}.set(${e}, { - get: ${n?n.name:t.scope.buildUndefinedNode()}, - set: ${o?o.name:t.scope.buildUndefinedNode()} + `}}function buildPrivateInstanceMethodInitSpec(e,t,r){const a=r.get(t.node.key.id.name);const{id:n,getId:o,setId:i,initAdded:l}=a;if(l)return;const c=o||i;if(c){r.set(t.node.key.id.name,Object.assign({},a,{initAdded:true}));return s.template.statement.ast` + ${n}.set(${e}, { + get: ${o?o.name:t.scope.buildUndefinedNode()}, + set: ${i?i.name:t.scope.buildUndefinedNode()} }); - `}return s.template.statement.ast`${i}.add(${e})`}function buildPublicFieldInitLoose(e,t){const{key:r,computed:a}=t.node;const i=t.node.value||t.scope.buildUndefinedNode();return s.types.expressionStatement(s.types.assignmentExpression("=",s.types.memberExpression(e,r,a||s.types.isLiteral(r)),i))}function buildPublicFieldInitSpec(e,t,r){const{key:a,computed:i}=t.node;const n=t.node.value||t.scope.buildUndefinedNode();return s.types.expressionStatement(s.types.callExpression(r.addHelper("defineProperty"),[e,i||s.types.isLiteral(a)?a:s.types.stringLiteral(a.name),n]))}function buildPrivateStaticMethodInitLoose(e,t,r,a){const i=a.get(t.node.key.id.name);const{id:n,methodId:o,getId:l,setId:c,initAdded:p}=i;if(p)return;const u=l||c;if(u){a.set(t.node.key.id.name,Object.assign({},i,{initAdded:true}));return s.template.statement.ast` - Object.defineProperty(${e}, ${n}, { + `}return s.template.statement.ast`${n}.add(${e})`}function buildPublicFieldInitLoose(e,t){const{key:r,computed:a}=t.node;const n=t.node.value||t.scope.buildUndefinedNode();return s.types.expressionStatement(s.types.assignmentExpression("=",s.types.memberExpression(e,r,a||s.types.isLiteral(r)),n))}function buildPublicFieldInitSpec(e,t,r){const{key:a,computed:n}=t.node;const o=t.node.value||t.scope.buildUndefinedNode();return s.types.expressionStatement(s.types.callExpression(r.addHelper("defineProperty"),[e,n||s.types.isLiteral(a)?a:s.types.stringLiteral(a.name),o]))}function buildPrivateStaticMethodInitLoose(e,t,r,a){const n=a.get(t.node.key.id.name);const{id:o,methodId:i,getId:l,setId:c,initAdded:u}=n;if(u)return;const p=l||c;if(p){a.set(t.node.key.id.name,Object.assign({},n,{initAdded:true}));return s.template.statement.ast` + Object.defineProperty(${e}, ${o}, { // configurable is false by default // enumerable is false by default // writable is false by default @@ -65,22 +65,22 @@ set: ${c?c.name:t.scope.buildUndefinedNode()} }) `}return s.template.statement.ast` - Object.defineProperty(${e}, ${n}, { + Object.defineProperty(${e}, ${o}, { // configurable is false by default // enumerable is false by default // writable is false by default - value: ${o.name} + value: ${i.name} }); - `}function buildPrivateMethodDeclaration(e,t,r=false){const a=t.get(e.node.key.id.name);const{id:i,methodId:n,getId:o,setId:l,getterDeclared:c,setterDeclared:p,static:u}=a;const{params:d,body:f,generator:h,async:m}=e.node;const y=o&&!c&&d.length===0;const g=l&&!p&&d.length>0;let b=n;if(y){t.set(e.node.key.id.name,Object.assign({},a,{getterDeclared:true}));b=o}else if(g){t.set(e.node.key.id.name,Object.assign({},a,{setterDeclared:true}));b=l}else if(u&&!r){b=i}return s.types.functionDeclaration(s.types.cloneNode(b),d,f,h,m)}const f=s.traverse.visitors.merge([{ThisExpression(e,t){t.needsClassRef=true;e.replaceWith(s.types.cloneNode(t.classRef))}},a.environmentVisitor]);const h={ReferencedIdentifier(e,t){if(e.scope.bindingIdentifierEquals(e.node.name,t.innerBinding)){t.needsClassRef=true;e.node.name=t.classRef.name}}};function replaceThisContext(e,t,r,i,n,o,l){var c;const p={classRef:t,needsClassRef:false,innerBinding:l};const u=new a.default({methodPath:e,constantSuper:o,file:i,refToPreserve:t,getSuperRef:r,getObjectRef(){p.needsClassRef=true;return n||e.node.static?t:s.types.memberExpression(t,s.types.identifier("prototype"))}});u.replace();if(n||e.isProperty()){e.traverse(f,p)}if((c=p.classRef)!=null&&c.name&&p.classRef.name!==(l==null?void 0:l.name)){e.traverse(h,p)}return p.needsClassRef}function buildFieldsInitNodes(e,t,r,a,i,n,o,c,p){let u=false;let d;const f=[];const h=[];const m=[];const y=s.types.isIdentifier(t)?()=>t:()=>{var e;(e=d)!=null?e:d=r[0].scope.generateUidIdentifierBasedOnNode(t);return d};for(const t of r){l.assertFieldTransformed(t);const r=t.node.static;const d=!r;const g=t.isPrivate();const b=!g;const x=t.isProperty();const v=!x;const E=t.isStaticBlock==null?void 0:t.isStaticBlock();if(r||v&&g||E){const r=replaceThisContext(t,e,y,i,E,c,p);u=u||r}switch(true){case E:f.push(s.template.statement.ast`(() => ${s.types.blockStatement(t.node.body)})()`);break;case r&&g&&x&&o:u=true;f.push(buildPrivateFieldInitLoose(s.types.cloneNode(e),t,a));break;case r&&g&&x&&!o:u=true;f.push(buildPrivateStaticFieldInitSpec(t,a));break;case r&&b&&x&&n:u=true;f.push(buildPublicFieldInitLoose(s.types.cloneNode(e),t));break;case r&&b&&x&&!n:u=true;f.push(buildPublicFieldInitSpec(s.types.cloneNode(e),t,i));break;case d&&g&&x&&o:h.push(buildPrivateFieldInitLoose(s.types.thisExpression(),t,a));break;case d&&g&&x&&!o:h.push(buildPrivateInstanceFieldInitSpec(s.types.thisExpression(),t,a));break;case d&&g&&v&&o:h.unshift(buildPrivateMethodInitLoose(s.types.thisExpression(),t,a));m.push(buildPrivateMethodDeclaration(t,a,o));break;case d&&g&&v&&!o:h.unshift(buildPrivateInstanceMethodInitSpec(s.types.thisExpression(),t,a));m.push(buildPrivateMethodDeclaration(t,a,o));break;case r&&g&&v&&!o:u=true;f.unshift(buildPrivateStaticFieldInitSpec(t,a));m.push(buildPrivateMethodDeclaration(t,a,o));break;case r&&g&&v&&o:u=true;f.unshift(buildPrivateStaticMethodInitLoose(s.types.cloneNode(e),t,i,a));m.push(buildPrivateMethodDeclaration(t,a,o));break;case d&&b&&x&&n:h.push(buildPublicFieldInitLoose(s.types.thisExpression(),t));break;case d&&b&&x&&!n:h.push(buildPublicFieldInitSpec(s.types.thisExpression(),t,i));break;default:throw new Error("Unreachable.")}}return{staticNodes:f.filter(Boolean),instanceNodes:h.filter(Boolean),pureStaticNodes:m.filter(Boolean),wrapClass(t){for(const e of r){e.remove()}if(d){t.scope.push({id:s.types.cloneNode(d)});t.set("superClass",s.types.assignmentExpression("=",d,t.node.superClass))}if(!u)return t;if(t.isClassExpression()){t.scope.push({id:e});t.replaceWith(s.types.assignmentExpression("=",s.types.cloneNode(e),t.node))}else if(!t.node.id){t.node.id=e}return t}}}},6758:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createClassFeaturePlugin=createClassFeaturePlugin;Object.defineProperty(t,"injectInitialization",{enumerable:true,get:function(){return l.injectInitialization}});Object.defineProperty(t,"enableFeature",{enumerable:true,get:function(){return c.enableFeature}});Object.defineProperty(t,"FEATURES",{enumerable:true,get:function(){return c.FEATURES}});var s=r(8304);var a=r(550);var i=r(7058);var n=r(3647);var o=r(6429);var l=r(5617);var c=r(7497);const p="7.14.6".split(".").reduce(((e,t)=>e*1e5+ +t),0);const u="@babel/plugin-class-features/version";function createClassFeaturePlugin({name:e,feature:t,loose:r,manipulateOptions:d,api:f={assumption:()=>{}}}){const h=f.assumption("setPublicClassFields");const m=f.assumption("privateFieldsAsProperties");const y=f.assumption("constantSuper");const g=f.assumption("noDocumentAll");if(r===true){const t=[];if(h!==undefined){t.push(`"setPublicClassFields"`)}if(m!==undefined){t.push(`"privateFieldsAsProperties"`)}if(t.length!==0){console.warn(`[${e}]: You are using the "loose: true" option and you are`+` explicitly setting a value for the ${t.join(" and ")}`+` assumption${t.length>1?"s":""}. The "loose" option`+` can cause incompatibilities with the other class features`+` plugins, so it's recommended that you replace it with the`+` following top-level option:\n`+`\t"assumptions": {\n`+`\t\t"setPublicClassFields": true,\n`+`\t\t"privateFieldsAsProperties": true\n`+`\t}`)}}return{name:e,manipulateOptions:d,pre(){(0,c.enableFeature)(this.file,t,r);if(!this.file.get(u)||this.file.get(u)
0){(0,l.injectInitialization)(e,d,C,((e,t)=>{if(f)return;for(const r of b){if(r.node.static)continue;r.traverse(e,t)}}))}e=N(e);e.insertBefore([...A,...k]);if(_.length>0){e.insertAfter(_)}if(I.length>0){e.find((e=>e.isStatement()||e.isDeclaration())).insertAfter(I)}},PrivateName(e){if(this.file.get(u)!==p||e.parentPath.isPrivate({key:e.node})){return}throw e.buildCodeFrameError(`Unknown PrivateName "${e}"`)},ExportDefaultDeclaration(e){if(this.file.get(u)!==p)return;const t=e.get("declaration");if(t.isClassDeclaration()&&(0,o.hasDecorators)(t.node)){if(t.node.id){(0,i.default)(e)}else{t.node.type="ClassExpression"}}}}}}},5617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.injectInitialization=injectInitialization;t.extractComputedKeys=extractComputedKeys;var s=r(8304);var a=r(6833);const i=s.traverse.visitors.merge([{Super(e){const{node:t,parentPath:r}=e;if(r.isCallExpression({callee:t})){this.push(r)}}},a.environmentVisitor]);const n={"TSTypeAnnotation|TypeAnnotation"(e){e.skip()},ReferencedIdentifier(e){if(this.scope.hasOwnBinding(e.node.name)){this.scope.rename(e.node.name);e.skip()}}};function handleClassTDZ(e,t){if(t.classBinding&&t.classBinding===e.scope.getBinding(e.node.name)){const r=t.file.addHelper("classNameTDZError");const a=s.types.callExpression(r,[s.types.stringLiteral(e.node.name)]);e.replaceWith(s.types.sequenceExpression([a,e.node]));e.skip()}}const o={ReferencedIdentifier:handleClassTDZ};function injectInitialization(e,t,r,a){if(!r.length)return;const o=!!e.node.superClass;if(!t){const r=s.types.classMethod("constructor",s.types.identifier("constructor"),[],s.types.blockStatement([]));if(o){r.params=[s.types.restElement(s.types.identifier("args"))];r.body.body.push(s.template.statement.ast`super(...args)`)}[t]=e.get("body").unshiftContainer("body",r)}if(a){a(n,{scope:t.scope})}if(o){const e=[];t.traverse(i,e);let a=true;for(const t of e){if(a){t.insertAfter(r);a=false}else{t.insertAfter(r.map((e=>s.types.cloneNode(e))))}}}else{t.get("body").unshiftContainer("body",r)}}function extractComputedKeys(e,t,r,a){const i=[];const n={classBinding:t.node.id&&t.scope.getBinding(t.node.id.name),file:a};for(const e of r){const r=e.get("key");if(r.isReferencedIdentifier()){handleClassTDZ(r,n)}else{r.traverse(o,n)}const a=e.node;if(!r.isConstantExpression()){const e=t.scope.generateUidIdentifierBasedOnNode(a.key);t.scope.push({id:e,kind:"let"});i.push(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.cloneNode(e),a.key)));a.key=s.types.cloneNode(e)}}return i}},6339:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertFieldTransformed=assertFieldTransformed;function assertFieldTransformed(e){if(e.node.declare){throw e.buildCodeFrameError(`TypeScript 'declare' fields must first be transformed by `+`@babel/plugin-transform-typescript.\n`+`If you have already enabled that plugin (or '@babel/preset-typescript'), make sure `+`that it runs before any plugin related to additional class features:\n`+` - @babel/plugin-proposal-class-properties\n`+` - @babel/plugin-proposal-private-methods\n`+` - @babel/plugin-proposal-decorators`)}}},3316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(8622);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var a=_interopNamespace(s);function willPathCastToBoolean(e){const t=e;const{node:r,parentPath:s}=t;if(s.isLogicalExpression()){const{operator:e,right:t}=s.node;if(e==="&&"||e==="||"||e==="??"&&r===t){return willPathCastToBoolean(s)}}if(s.isSequenceExpression()){const{expressions:e}=s.node;if(e[e.length-1]===r){return willPathCastToBoolean(s)}else{return true}}return s.isConditional({test:r})||s.isUnaryExpression({operator:"!"})||s.isLoop({test:r})}class AssignmentMemoiser{constructor(){this._map=void 0;this._map=new WeakMap}has(e){return this._map.has(e)}get(e){if(!this.has(e))return;const t=this._map.get(e);const{value:r}=t;t.count--;if(t.count===0){return a.assignmentExpression("=",r,e)}return r}set(e,t,r){return this._map.set(e,{count:r,value:t})}}function toNonOptional(e,t){const{node:r}=e;if(e.isOptionalMemberExpression()){return a.memberExpression(t,r.property,r.computed)}if(e.isOptionalCallExpression()){const s=e.get("callee");if(e.node.optional&&s.isOptionalMemberExpression()){const{object:i}=s.node;const n=e.scope.maybeGenerateMemoised(i)||i;s.get("object").replaceWith(a.assignmentExpression("=",n,i));return a.callExpression(a.memberExpression(t,a.identifier("call")),[n,...r.arguments])}return a.callExpression(t,r.arguments)}return e.node}function isInDetachedTree(e){while(e){if(e.isProgram())break;const{parentPath:t,container:r,listKey:s}=e;const a=t.node;if(s){if(r!==a[s])return true}else{if(r!==a)return true}e=t}return false}const i={memoise(){},handle(e,t){const{node:r,parent:s,parentPath:i,scope:n}=e;if(e.isOptionalMemberExpression()){if(isInDetachedTree(e))return;const o=e.find((({node:t,parent:r,parentPath:s})=>{if(s.isOptionalMemberExpression()){return r.optional||r.object!==t}if(s.isOptionalCallExpression()){return t!==e.node&&r.optional||r.callee!==t}return true}));if(n.path.isPattern()){o.replaceWith(a.callExpression(a.arrowFunctionExpression([],o.node),[]));return}const l=willPathCastToBoolean(o);const c=o.parentPath;if(c.isUpdateExpression({argument:r})||c.isAssignmentExpression({left:r})){throw e.buildCodeFrameError(`can't handle assignment`)}const p=c.isUnaryExpression({operator:"delete"});if(p&&o.isOptionalMemberExpression()&&o.get("property").isPrivateName()){throw e.buildCodeFrameError(`can't delete a private class element`)}let u=e;for(;;){if(u.isOptionalMemberExpression()){if(u.node.optional)break;u=u.get("object");continue}else if(u.isOptionalCallExpression()){if(u.node.optional)break;u=u.get("callee");continue}throw new Error(`Internal error: unexpected ${u.node.type}`)}const d=u.isOptionalMemberExpression()?"object":"callee";const f=u.node[d];const h=n.maybeGenerateMemoised(f);const m=h!=null?h:f;const y=i.isOptionalCallExpression({callee:r});const g=i.isCallExpression({callee:r});u.replaceWith(toNonOptional(u,m));if(y){if(s.optional){i.replaceWith(this.optionalCall(e,s.arguments))}else{i.replaceWith(this.call(e,s.arguments))}}else if(g){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}let b=e.node;for(let t=e;t!==o;){const{parentPath:e}=t;if(e===o&&y&&s.optional){b=e.node;break}b=toNonOptional(e,b);t=e}let x;const v=o.parentPath;if(a.isMemberExpression(b)&&v.isOptionalCallExpression({callee:o.node,optional:true})){const{object:t}=b;x=e.scope.maybeGenerateMemoised(t);if(x){b.object=a.assignmentExpression("=",x,t)}}let E=o;if(p){E=v;b=v.node}const w=h?a.assignmentExpression("=",a.cloneNode(m),a.cloneNode(f)):a.cloneNode(m);if(l){let e;if(t){e=a.binaryExpression("!=",w,a.nullLiteral())}else{e=a.logicalExpression("&&",a.binaryExpression("!==",w,a.nullLiteral()),a.binaryExpression("!==",a.cloneNode(m),n.buildUndefinedNode()))}E.replaceWith(a.logicalExpression("&&",e,b))}else{let e;if(t){e=a.binaryExpression("==",w,a.nullLiteral())}else{e=a.logicalExpression("||",a.binaryExpression("===",w,a.nullLiteral()),a.binaryExpression("===",a.cloneNode(m),n.buildUndefinedNode()))}E.replaceWith(a.conditionalExpression(e,p?a.booleanLiteral(true):n.buildUndefinedNode(),b))}if(x){const e=v.node;v.replaceWith(a.optionalCallExpression(a.optionalMemberExpression(e.callee,a.identifier("call"),false,true),[a.cloneNode(x),...e.arguments],false))}return}if(i.isUpdateExpression({argument:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,prefix:n}=s;this.memoise(e,2);const o=a.binaryExpression(t[0],a.unaryExpression("+",this.get(e)),a.numericLiteral(1));if(n){i.replaceWith(this.set(e,o))}else{const{scope:t}=e;const s=t.generateUidIdentifierBasedOnNode(r);t.push({id:s});o.left=a.assignmentExpression("=",a.cloneNode(s),o.left);i.replaceWith(a.sequenceExpression([this.set(e,o),a.cloneNode(s)]))}return}if(i.isAssignmentExpression({left:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,right:r}=s;if(t==="="){i.replaceWith(this.set(e,r))}else{const s=t.slice(0,-1);if(a.LOGICAL_OPERATORS.includes(s)){this.memoise(e,1);i.replaceWith(a.logicalExpression(s,this.get(e),this.set(e,r)))}else{this.memoise(e,2);i.replaceWith(this.set(e,a.binaryExpression(s,this.get(e),r)))}}return}if(i.isCallExpression({callee:r})){i.replaceWith(this.call(e,s.arguments));return}if(i.isOptionalCallExpression({callee:r})){if(n.path.isPattern()){i.replaceWith(a.callExpression(a.arrowFunctionExpression([],i.node),[]));return}i.replaceWith(this.optionalCall(e,s.arguments));return}if(i.isForXStatement({left:r})||i.isObjectProperty({value:r})&&i.parentPath.isObjectPattern()||i.isAssignmentPattern({left:r})&&i.parentPath.isObjectProperty({value:s})&&i.parentPath.parentPath.isObjectPattern()||i.isArrayPattern()||i.isAssignmentPattern({left:r})&&i.parentPath.isArrayPattern()||i.isRestElement()){e.replaceWith(this.destructureSet(e));return}e.replaceWith(this.get(e))}};function memberExpressionToFunctions(e,t,r){e.traverse(t,Object.assign({},i,r,{memoiser:new AssignmentMemoiser}))}t["default"]=memberExpressionToFunctions},3852:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.enableFeature=enableFeature;t.hasFeature=hasFeature;t.runtimeKey=t.featuresKey=t.FEATURES=void 0;const r=Object.freeze({unicodeFlag:1<<0,dotAllFlag:1<<1,unicodePropertyEscape:1<<2,namedCaptureGroups:1<<3});t.FEATURES=r;const s="@babel/plugin-regexp-features/featuresKey";t.featuresKey=s;const a="@babel/plugin-regexp-features/runtimeKey";t.runtimeKey=a;function enableFeature(e,t){return e|t}function hasFeature(e,t){return!!(e&t)}},6550:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRegExpFeaturePlugin=createRegExpFeaturePlugin;var s=r(5756);var a=r(3852);var i=r(3889);var n=r(8304);var o=r(2155);function pullFlag(e,t){e.flags=e.flags.replace(t,"")}const l="7.14.5".split(".").reduce(((e,t)=>e*1e5+ +t),0);const c="@babel/plugin-regexp-features/version";function createRegExpFeaturePlugin({name:e,feature:t,options:r={}}){return{name:e,pre(){var e;const{file:s}=this;const i=(e=s.get(a.featuresKey))!=null?e:0;let n=(0,a.enableFeature)(i,a.FEATURES[t]);const{useUnicodeFlag:o,runtime:p=true}=r;if(o===false){n=(0,a.enableFeature)(n,a.FEATURES.unicodeFlag)}if(n!==i){s.set(a.featuresKey,n)}if(!p){s.set(a.runtimeKey,false)}if(!s.has(c)||s.get(c)e.type==="ParenthesizedExpression"?unwrapParenthesizedExpression(e.expression):e;class LValParser extends NodeUtils{toAssignable(e,t=false){var r,s;let a=undefined;if(e.type==="ParenthesizedExpression"||((r=e.extra)==null?void 0:r.parenthesized)){a=unwrapParenthesizedExpression(e);if(t){if(a.type==="Identifier"){this.expressionScope.recordParenthesizedIdentifierError(e.start,f.InvalidParenthesizedAssignment)}else if(a.type!=="MemberExpression"){this.raise(e.start,f.InvalidParenthesizedAssignment)}}else{this.raise(e.start,f.InvalidParenthesizedAssignment)}}switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(let r=0,s=e.properties.length,a=s-1;r{this.raise(r,t);let s=e.length-2;let a=e[s];while(a.canBeArrowParameterDeclaration()){a.clearDeclarationError(r);a=e[--s]}}))}}function newParameterDeclarationScope(){return new ExpressionScope(Ue)}function newArrowHeadScope(){return new ArrowHeadParsingScope(Fe)}function newAsyncArrowScope(){return new ArrowHeadParsingScope(Be)}function newExpressionScope(){return new ExpressionScope}class ExpressionParser extends LValParser{checkProto(e,t,r,s){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand){return}const a=e.key;const i=a.type==="Identifier"?a.name:a.value;if(i==="__proto__"){if(t){this.raise(a.start,f.RecordNoProto);return}if(r.used){if(s){if(s.doubleProto===-1){s.doubleProto=a.start}}else{this.raise(a.start,f.DuplicateProto)}}r.used=true}}shouldExitDescending(e,t){return e.type==="ArrowFunctionExpression"&&e.start===t}getExpression(){let e=we;if(this.hasPlugin("topLevelAwait")&&this.inModule){e|=Se}this.scope.enter(k);this.prodParam.enter(e);this.nextToken();const t=this.parseExpression();if(!this.match(c.eof)){this.unexpected()}t.comments=this.state.comments;t.errors=this.state.errors;return t}parseExpression(e,t){if(e){return this.disallowInAnd((()=>this.parseExpressionBase(t)))}return this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){const t=this.state.start;const r=this.state.startLoc;const s=this.parseMaybeAssign(e);if(this.match(c.comma)){const a=this.startNodeAt(t,r);a.expressions=[s];while(this.eat(c.comma)){a.expressions.push(this.parseMaybeAssign(e))}this.toReferencedList(a.expressions);return this.finishNode(a,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(e,t,r){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t,r)))}parseMaybeAssignAllowIn(e,t,r){return this.allowInAnd((()=>this.parseMaybeAssign(e,t,r)))}parseMaybeAssign(e,t,r){const s=this.state.start;const a=this.state.startLoc;if(this.isContextual("yield")){if(this.prodParam.hasYield){this.state.exprAllowed=true;let e=this.parseYield();if(t){e=t.call(this,e,s,a)}return e}}let i;if(e){i=false}else{e=new ExpressionErrors;i=true}if(this.match(c.parenL)||this.match(c.name)){this.state.potentialArrowAt=this.state.start}let n=this.parseMaybeConditional(e,r);if(t){n=t.call(this,n,s,a)}if(this.state.type.isAssign){const t=this.startNodeAt(s,a);const r=this.state.value;t.operator=r;if(this.match(c.eq)){t.left=this.toAssignable(n,true);e.doubleProto=-1}else{t.left=n}if(e.shorthandAssign>=t.left.start){e.shorthandAssign=-1}this.checkLVal(n,"assignment expression");this.next();t.right=this.parseMaybeAssign();return this.finishNode(t,"AssignmentExpression")}else if(i){this.checkExpressionErrors(e,true)}return n}parseMaybeConditional(e,t){const r=this.state.start;const s=this.state.startLoc;const a=this.state.potentialArrowAt;const i=this.parseExprOps(e);if(this.shouldExitDescending(i,a)){return i}return this.parseConditional(i,r,s,t)}parseConditional(e,t,r,s){if(this.eat(c.question)){const s=this.startNodeAt(t,r);s.test=e;s.consequent=this.parseMaybeAssignAllowIn();this.expect(c.colon);s.alternate=this.parseMaybeAssign();return this.finishNode(s,"ConditionalExpression")}return e}parseExprOps(e){const t=this.state.start;const r=this.state.startLoc;const s=this.state.potentialArrowAt;const a=this.parseMaybeUnary(e);if(this.shouldExitDescending(a,s)){return a}return this.parseExprOp(a,t,r,-1)}parseExprOp(e,t,r,s){let a=this.state.type.binop;if(a!=null&&(this.prodParam.hasIn||!this.match(c._in))){if(a>s){const i=this.state.type;if(i===c.pipeline){this.expectPlugin("pipelineOperator");if(this.state.inFSharpPipelineDirectBody){return e}this.state.inPipeline=true;this.checkPipelineAtInfixOperator(e,t)}const n=this.startNodeAt(t,r);n.left=e;n.operator=this.state.value;if(i===c.exponent&&e.type==="UnaryExpression"&&(this.options.createParenthesizedExpressions||!(e.extra&&e.extra.parenthesized))){this.raise(e.argument.start,f.UnexpectedTokenUnaryExponentiation)}const o=i===c.logicalOR||i===c.logicalAND;const l=i===c.nullishCoalescing;if(l){a=c.logicalAND.binop}this.next();if(i===c.pipeline&&this.getPluginOption("pipelineOperator","proposal")==="minimal"){if(this.match(c.name)&&this.state.value==="await"&&this.prodParam.hasAwait){throw this.raise(this.state.start,f.UnexpectedAwaitAfterPipelineBody)}}n.right=this.parseExprOpRightExpr(i,a);this.finishNode(n,o||l?"LogicalExpression":"BinaryExpression");const p=this.state.type;if(l&&(p===c.logicalOR||p===c.logicalAND)||o&&p===c.nullishCoalescing){throw this.raise(this.state.start,f.MixingCoalesceWithLogical)}return this.parseExprOp(n,t,r,s)}}return e}parseExprOpRightExpr(e,t){const r=this.state.start;const s=this.state.startLoc;switch(e){case c.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext((()=>this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(e,t),r,s)));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){const r=this.state.start;const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),r,s,e.rightAssociative?t-1:t)}parseMaybeUnary(e){if(this.isContextual("await")&&this.isAwaitAllowed()){return this.parseAwait()}const t=this.match(c.incDec);const r=this.startNode();if(this.state.type.prefix){r.operator=this.state.value;r.prefix=true;if(this.match(c._throw)){this.expectPlugin("throwExpressions")}const s=this.match(c._delete);this.next();r.argument=this.parseMaybeUnary();this.checkExpressionErrors(e,true);if(this.state.strict&&s){const e=r.argument;if(e.type==="Identifier"){this.raise(r.start,f.StrictDelete)}else if(this.hasPropertyAsPrivateName(e)){this.raise(r.start,f.DeletePrivateField)}}if(!t){return this.finishNode(r,"UnaryExpression")}}return this.parseUpdate(r,t,e)}parseUpdate(e,t,r){if(t){this.checkLVal(e.argument,"prefix operation");return this.finishNode(e,"UpdateExpression")}const s=this.state.start;const a=this.state.startLoc;let i=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,false))return i;while(this.state.type.postfix&&!this.canInsertSemicolon()){const e=this.startNodeAt(s,a);e.operator=this.state.value;e.prefix=false;e.argument=i;this.checkLVal(i,"postfix operation");this.next();i=this.finishNode(e,"UpdateExpression")}return i}parseExprSubscripts(e){const t=this.state.start;const r=this.state.startLoc;const s=this.state.potentialArrowAt;const a=this.parseExprAtom(e);if(this.shouldExitDescending(a,s)){return a}return this.parseSubscripts(a,t,r)}parseSubscripts(e,t,r,s){const a={optionalChainMember:false,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:false};do{e=this.parseSubscript(e,t,r,s,a);a.maybeAsyncArrow=false}while(!a.stop);return e}parseSubscript(e,t,r,s,a){if(!s&&this.eat(c.doubleColon)){return this.parseBind(e,t,r,s,a)}else if(this.match(c.backQuote)){return this.parseTaggedTemplateExpression(e,t,r,a)}let i=false;if(this.match(c.questionDot)){if(s&&this.lookaheadCharCode()===40){a.stop=true;return e}a.optionalChainMember=i=true;this.next()}if(!s&&this.match(c.parenL)){return this.parseCoverCallAndAsyncArrowHead(e,t,r,a,i)}else if(i||this.match(c.bracketL)||this.eat(c.dot)){return this.parseMember(e,t,r,a,i)}else{a.stop=true;return e}}parseMember(e,t,r,s,a){const i=this.startNodeAt(t,r);const n=this.eat(c.bracketL);i.object=e;i.computed=n;const o=n?this.parseExpression():this.parseMaybePrivateName(true);if(this.isPrivateName(o)){if(i.object.type==="Super"){this.raise(t,f.SuperPrivateField)}this.classScope.usePrivateName(this.getPrivateNameSV(o),o.start)}i.property=o;if(n){this.expect(c.bracketR)}if(s.optionalChainMember){i.optional=a;return this.finishNode(i,"OptionalMemberExpression")}else{return this.finishNode(i,"MemberExpression")}}parseBind(e,t,r,s,a){const i=this.startNodeAt(t,r);i.object=e;i.callee=this.parseNoCallExpr();a.stop=true;return this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,s)}parseCoverCallAndAsyncArrowHead(e,t,r,s,a){const i=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=true;this.next();let n=this.startNodeAt(t,r);n.callee=e;if(s.maybeAsyncArrow){this.expressionScope.enter(newAsyncArrowScope())}if(s.optionalChainMember){n.optional=a}if(a){n.arguments=this.parseCallExpressionArguments(c.parenR,false)}else{n.arguments=this.parseCallExpressionArguments(c.parenR,s.maybeAsyncArrow,e.type==="Import",e.type!=="Super",n)}this.finishCallExpression(n,s.optionalChainMember);if(s.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!a){s.stop=true;this.expressionScope.validateAsPattern();this.expressionScope.exit();n=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),n)}else{if(s.maybeAsyncArrow){this.expressionScope.exit()}this.toReferencedArguments(n)}this.state.maybeInArrowParameters=i;return n}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r,s){const a=this.startNodeAt(t,r);a.tag=e;a.quasi=this.parseTemplate(true);if(s.optionalChainMember){this.raise(t,f.OptionalChainingNoTemplate)}return this.finishNode(a,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&e.start===this.state.potentialArrowAt}finishCallExpression(e,t){if(e.callee.type==="Import"){if(e.arguments.length===2){if(!this.hasPlugin("moduleAttributes")){this.expectPlugin("importAssertions")}}if(e.arguments.length===0||e.arguments.length>2){this.raise(e.start,f.ImportCallArity,this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?"one or two arguments":"one argument")}else{for(let t=0,r=e.arguments;te.type==="ParenthesizedExpression"?unwrapParenthesizedExpression(e.expression):e;class LValParser extends NodeUtils{toAssignable(e,t=false){var r,s;let a=undefined;if(e.type==="ParenthesizedExpression"||(r=e.extra)!=null&&r.parenthesized){a=unwrapParenthesizedExpression(e);if(t){if(a.type==="Identifier"){this.expressionScope.recordParenthesizedIdentifierError(e.start,h.InvalidParenthesizedAssignment)}else if(a.type!=="MemberExpression"){this.raise(e.start,h.InvalidParenthesizedAssignment)}}else{this.raise(e.start,h.InvalidParenthesizedAssignment)}}switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(let r=0,s=e.properties.length,a=s-1;rthis.parseExpressionBase(t)))}return this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){const t=this.state.start;const r=this.state.startLoc;const s=this.parseMaybeAssign(e);if(this.match(c.comma)){const a=this.startNodeAt(t,r);a.expressions=[s];while(this.eat(c.comma)){a.expressions.push(this.parseMaybeAssign(e))}this.toReferencedList(a.expressions);return this.finishNode(a,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(e,t,r){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t,r)))}parseMaybeAssignAllowIn(e,t,r){return this.allowInAnd((()=>this.parseMaybeAssign(e,t,r)))}parseMaybeAssign(e,t,r){const s=this.state.start;const a=this.state.startLoc;if(this.isContextual("yield")){if(this.prodParam.hasYield){let e=this.parseYield();if(t){e=t.call(this,e,s,a)}return e}}let i;if(e){i=false}else{e=new ExpressionErrors;i=true}if(this.match(c.parenL)||this.match(c.name)){this.state.potentialArrowAt=this.state.start}let n=this.parseMaybeConditional(e,r);if(t){n=t.call(this,n,s,a)}if(this.state.type.isAssign){const t=this.startNodeAt(s,a);const r=this.state.value;t.operator=r;if(this.match(c.eq)){t.left=this.toAssignable(n,true);e.doubleProto=-1}else{t.left=n}if(e.shorthandAssign>=t.left.start){e.shorthandAssign=-1}this.checkLVal(n,"assignment expression");this.next();t.right=this.parseMaybeAssign();return this.finishNode(t,"AssignmentExpression")}else if(i){this.checkExpressionErrors(e,true)}return n}parseMaybeConditional(e,t){const r=this.state.start;const s=this.state.startLoc;const a=this.state.potentialArrowAt;const i=this.parseExprOps(e);if(this.shouldExitDescending(i,a)){return i}return this.parseConditional(i,r,s,t)}parseConditional(e,t,r,s){if(this.eat(c.question)){const s=this.startNodeAt(t,r);s.test=e;s.consequent=this.parseMaybeAssignAllowIn();this.expect(c.colon);s.alternate=this.parseMaybeAssign();return this.finishNode(s,"ConditionalExpression")}return e}parseExprOps(e){const t=this.state.start;const r=this.state.startLoc;const s=this.state.potentialArrowAt;const a=this.parseMaybeUnary(e);if(this.shouldExitDescending(a,s)){return a}return this.parseExprOp(a,t,r,-1)}parseExprOp(e,t,r,s){let a=this.state.type.binop;if(a!=null&&(this.prodParam.hasIn||!this.match(c._in))){if(a>s){const i=this.state.type;if(i===c.pipeline){this.expectPlugin("pipelineOperator");if(this.state.inFSharpPipelineDirectBody){return e}this.state.inPipeline=true;this.checkPipelineAtInfixOperator(e,t)}const n=this.startNodeAt(t,r);n.left=e;n.operator=this.state.value;const o=i===c.logicalOR||i===c.logicalAND;const l=i===c.nullishCoalescing;if(l){a=c.logicalAND.binop}this.next();if(i===c.pipeline&&this.getPluginOption("pipelineOperator","proposal")==="minimal"){if(this.match(c.name)&&this.state.value==="await"&&this.prodParam.hasAwait){throw this.raise(this.state.start,h.UnexpectedAwaitAfterPipelineBody)}}n.right=this.parseExprOpRightExpr(i,a);this.finishNode(n,o||l?"LogicalExpression":"BinaryExpression");const p=this.state.type;if(l&&(p===c.logicalOR||p===c.logicalAND)||o&&p===c.nullishCoalescing){throw this.raise(this.state.start,h.MixingCoalesceWithLogical)}return this.parseExprOp(n,t,r,s)}}return e}parseExprOpRightExpr(e,t){const r=this.state.start;const s=this.state.startLoc;switch(e){case c.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext((()=>this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(e,t),r,s)));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){const r=this.state.start;const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),r,s,e.rightAssociative?t-1:t)}checkExponentialAfterUnary(e){if(this.match(c.exponent)){this.raise(e.argument.start,h.UnexpectedTokenUnaryExponentiation)}}parseMaybeUnary(e,t){const r=this.state.start;const s=this.state.startLoc;const a=this.isContextual("await");if(a&&this.isAwaitAllowed()){this.next();const e=this.parseAwait(r,s);if(!t)this.checkExponentialAfterUnary(e);return e}if(this.isContextual("module")&&this.lookaheadCharCode()===123&&!this.hasFollowingLineBreak()){return this.parseModuleExpression()}const i=this.match(c.incDec);const n=this.startNode();if(this.state.type.prefix){n.operator=this.state.value;n.prefix=true;if(this.match(c._throw)){this.expectPlugin("throwExpressions")}const r=this.match(c._delete);this.next();n.argument=this.parseMaybeUnary(null,true);this.checkExpressionErrors(e,true);if(this.state.strict&&r){const e=n.argument;if(e.type==="Identifier"){this.raise(n.start,h.StrictDelete)}else if(this.hasPropertyAsPrivateName(e)){this.raise(n.start,h.DeletePrivateField)}}if(!i){if(!t)this.checkExponentialAfterUnary(n);return this.finishNode(n,"UnaryExpression")}}const o=this.parseUpdate(n,i,e);if(a){const e=this.hasPlugin("v8intrinsic")?this.state.type.startsExpr:this.state.type.startsExpr&&!this.match(c.modulo);if(e&&!this.isAmbiguousAwait()){this.raiseOverwrite(r,this.hasPlugin("topLevelAwait")?h.AwaitNotInAsyncContext:h.AwaitNotInAsyncFunction);return this.parseAwait(r,s)}}return o}parseUpdate(e,t,r){if(t){this.checkLVal(e.argument,"prefix operation");return this.finishNode(e,"UpdateExpression")}const s=this.state.start;const a=this.state.startLoc;let i=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,false))return i;while(this.state.type.postfix&&!this.canInsertSemicolon()){const e=this.startNodeAt(s,a);e.operator=this.state.value;e.prefix=false;e.argument=i;this.checkLVal(i,"postfix operation");this.next();i=this.finishNode(e,"UpdateExpression")}return i}parseExprSubscripts(e){const t=this.state.start;const r=this.state.startLoc;const s=this.state.potentialArrowAt;const a=this.parseExprAtom(e);if(this.shouldExitDescending(a,s)){return a}return this.parseSubscripts(a,t,r)}parseSubscripts(e,t,r,s){const a={optionalChainMember:false,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:false};do{e=this.parseSubscript(e,t,r,s,a);a.maybeAsyncArrow=false}while(!a.stop);return e}parseSubscript(e,t,r,s,a){if(!s&&this.eat(c.doubleColon)){return this.parseBind(e,t,r,s,a)}else if(this.match(c.backQuote)){return this.parseTaggedTemplateExpression(e,t,r,a)}let i=false;if(this.match(c.questionDot)){if(s&&this.lookaheadCharCode()===40){a.stop=true;return e}a.optionalChainMember=i=true;this.next()}if(!s&&this.match(c.parenL)){return this.parseCoverCallAndAsyncArrowHead(e,t,r,a,i)}else if(i||this.match(c.bracketL)||this.eat(c.dot)){return this.parseMember(e,t,r,a,i)}else{a.stop=true;return e}}parseMember(e,t,r,s,a){const i=this.startNodeAt(t,r);const n=this.eat(c.bracketL);i.object=e;i.computed=n;const o=!n&&this.match(c.privateName)&&this.state.value;const l=n?this.parseExpression():o?this.parsePrivateName():this.parseIdentifier(true);if(o!==false){if(i.object.type==="Super"){this.raise(t,h.SuperPrivateField)}this.classScope.usePrivateName(o,l.start)}i.property=l;if(n){this.expect(c.bracketR)}if(s.optionalChainMember){i.optional=a;return this.finishNode(i,"OptionalMemberExpression")}else{return this.finishNode(i,"MemberExpression")}}parseBind(e,t,r,s,a){const i=this.startNodeAt(t,r);i.object=e;i.callee=this.parseNoCallExpr();a.stop=true;return this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,s)}parseCoverCallAndAsyncArrowHead(e,t,r,s,a){const i=this.state.maybeInArrowParameters;let n=null;this.state.maybeInArrowParameters=true;this.next();let o=this.startNodeAt(t,r);o.callee=e;if(s.maybeAsyncArrow){this.expressionScope.enter(newAsyncArrowScope());n=new ExpressionErrors}if(s.optionalChainMember){o.optional=a}if(a){o.arguments=this.parseCallExpressionArguments(c.parenR)}else{o.arguments=this.parseCallExpressionArguments(c.parenR,e.type==="Import",e.type!=="Super",o,n)}this.finishCallExpression(o,s.optionalChainMember);if(s.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!a){s.stop=true;this.expressionScope.validateAsPattern();this.expressionScope.exit();o=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),o)}else{if(s.maybeAsyncArrow){this.checkExpressionErrors(n,true);this.expressionScope.exit()}this.toReferencedArguments(o)}this.state.maybeInArrowParameters=i;return o}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r,s){const a=this.startNodeAt(t,r);a.tag=e;a.quasi=this.parseTemplate(true);if(s.optionalChainMember){this.raise(t,h.OptionalChainingNoTemplate)}return this.finishNode(a,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&e.start===this.state.potentialArrowAt}finishCallExpression(e,t){if(e.callee.type==="Import"){if(e.arguments.length===2){{if(!this.hasPlugin("moduleAttributes")){this.expectPlugin("importAssertions")}}}if(e.arguments.length===0||e.arguments.length>2){this.raise(e.start,h.ImportCallArity,this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?"one or two arguments":"one argument")}else{for(const t of e.arguments){if(t.type==="SpreadElement"){this.raise(t.start,h.ImportCallSpreadArgument)}}}}return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,r,s,a){const i=[];let n=true;const o=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=false;while(!this.eat(e)){if(n){n=false}else{this.expect(c.comma);if(this.match(e)){if(t&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")){this.raise(this.state.lastTokStart,h.ImportCallArgumentTrailingComma)}if(s){this.addExtra(s,"trailingComma",this.state.lastTokStart)}this.next();break}}i.push(this.parseExprListItem(false,a,{start:0},r))}this.state.inFSharpPipelineDirectBody=o;return i}shouldParseAsyncArrow(){return this.match(c.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var r;this.expect(c.arrow);this.parseArrowExpression(e,t.arguments,true,(r=t.extra)==null?void 0:r.trailingComma);return e}parseNoCallExpr(){const e=this.state.start;const t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,true)}parseExprAtom(e){let t;switch(this.state.type){case c._super:return this.parseSuper();case c._import:t=this.startNode();this.next();if(this.match(c.dot)){return this.parseImportMetaProperty(t)}if(!this.match(c.parenL)){this.raise(this.state.lastTokStart,h.UnsupportedImport)}return this.finishNode(t,"Import");case c._this:t=this.startNode();this.next();return this.finishNode(t,"ThisExpression");case c.name:{const e=this.state.potentialArrowAt===this.state.start;const t=this.state.containsEsc;const r=this.parseIdentifier();if(!t&&r.name==="async"&&!this.canInsertSemicolon()){if(this.match(c._function)){this.next();return this.parseFunction(this.startNodeAtNode(r),undefined,true)}else if(this.match(c.name)){if(this.lookaheadCharCode()===61){return this.parseAsyncArrowUnaryFunction(r)}else{return r}}else if(this.match(c._do)){return this.parseDo(true)}}if(e&&this.match(c.arrow)&&!this.canInsertSemicolon()){this.next();return this.parseArrowExpression(this.startNodeAtNode(r),[r],false)}return r}case c._do:{return this.parseDo(false)}case c.slash:case c.slashAssign:{this.readRegexp();return this.parseRegExpLiteral(this.state.value)}case c.num:return this.parseNumericLiteral(this.state.value);case c.bigint:return this.parseBigIntLiteral(this.state.value);case c.decimal:return this.parseDecimalLiteral(this.state.value);case c.string:return this.parseStringLiteral(this.state.value);case c._null:return this.parseNullLiteral();case c._true:return this.parseBooleanLiteral(true);case c._false:return this.parseBooleanLiteral(false);case c.parenL:{const e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case c.bracketBarL:case c.bracketHashL:{return this.parseArrayLike(this.state.type===c.bracketBarL?c.bracketBarR:c.bracketR,false,true,e)}case c.bracketL:{return this.parseArrayLike(c.bracketR,true,false,e)}case c.braceBarL:case c.braceHashL:{return this.parseObjectLike(this.state.type===c.braceBarL?c.braceBarR:c.braceR,false,true,e)}case c.braceL:{return this.parseObjectLike(c.braceR,false,false,e)}case c._function:return this.parseFunctionOrFunctionSent();case c.at:this.parseDecorators();case c._class:t=this.startNode();this.takeDecorators(t);return this.parseClass(t,false);case c._new:return this.parseNewOrNewTarget();case c.backQuote:return this.parseTemplate(false);case c.doubleColon:{t=this.startNode();this.next();t.object=null;const e=t.callee=this.parseNoCallExpr();if(e.type==="MemberExpression"){return this.finishNode(t,"BindExpression")}else{throw this.raise(e.start,h.UnsupportedBind)}}case c.privateName:{const e=this.state.start;const r=this.state.value;t=this.parsePrivateName();if(this.match(c._in)){this.expectPlugin("privateIn");this.classScope.usePrivateName(r,t.start)}else if(this.hasPlugin("privateIn")){this.raise(this.state.start,h.PrivateInExpectedIn,r)}else{throw this.unexpected(e)}return t}case c.hash:{if(this.state.inPipeline){t=this.startNode();if(this.getPluginOption("pipelineOperator","proposal")!=="smart"){this.raise(t.start,h.PrimaryTopicRequiresSmartPipeline)}this.next();if(!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()){this.raise(t.start,h.PrimaryTopicNotAllowed)}this.registerTopicReference();return this.finishNode(t,"PipelinePrimaryTopicReference")}}case c.relational:{if(this.state.value==="<"){const e=this.input.codePointAt(this.nextTokenStart());if(isIdentifierStart(e)||e===62){this.expectOnePlugin(["jsx","flow","typescript"])}}}default:throw this.unexpected()}}parseAsyncArrowUnaryFunction(e){const t=this.startNodeAtNode(e);this.prodParam.enter(functionFlags(true,this.prodParam.hasYield));const r=[this.parseIdentifier()];this.prodParam.exit();if(this.hasPrecedingLineBreak()){this.raise(this.state.pos,h.LineTerminatorBeforeArrow)}this.expect(c.arrow);this.parseArrowExpression(t,r,true);return t}parseDo(e){this.expectPlugin("doExpressions");if(e){this.expectPlugin("asyncDoExpressions")}const t=this.startNode();t.async=e;this.next();const r=this.state.labels;this.state.labels=[];if(e){this.prodParam.enter(_e);t.body=this.parseBlock();this.prodParam.exit()}else{t.body=this.parseBlock()}this.state.labels=r;return this.finishNode(t,"DoExpression")}parseSuper(){const e=this.startNode();this.next();if(this.match(c.parenL)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod){this.raise(e.start,h.SuperNotAllowed)}else if(!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod){this.raise(e.start,h.UnexpectedSuper)}if(!this.match(c.parenL)&&!this.match(c.bracketL)&&!this.match(c.dot)){this.raise(e.start,h.UnsupportedSuper)}return this.finishNode(e,"Super")}parseMaybePrivateName(e){const t=this.match(c.privateName);if(t){if(!e){this.raise(this.state.start+1,h.UnexpectedPrivateField)}return this.parsePrivateName()}else{return this.parseIdentifier(true)}}parsePrivateName(){const e=this.startNode();const t=this.startNodeAt(this.state.start+1,new Position(this.state.curLine,this.state.start+1-this.state.lineStart));const r=this.state.value;this.next();e.id=this.createIdentifier(t,r);return this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();this.next();if(this.prodParam.hasYield&&this.match(c.dot)){const t=this.createIdentifier(this.startNodeAtNode(e),"function");this.next();return this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t;if(t.name==="function"&&r==="sent"){if(this.isContextual(r)){this.expectPlugin("functionSent")}else if(!this.hasPlugin("functionSent")){this.unexpected()}}const s=this.state.containsEsc;e.property=this.parseIdentifier(true);if(e.property.name!==r||s){this.raise(e.property.start,h.UnsupportedMetaProperty,t.name,r)}return this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){const t=this.createIdentifier(this.startNodeAtNode(e),"import");this.next();if(this.isContextual("meta")){if(!this.inModule){this.raise(t.start,m.ImportMetaOutsideModule)}this.sawUnambiguousESM=true}return this.parseMetaProperty(e,t,"meta")}parseLiteralAtNode(e,t,r){this.addExtra(r,"rawValue",e);this.addExtra(r,"raw",this.input.slice(r.start,this.state.end));r.value=e;this.next();return this.finishNode(r,t)}parseLiteral(e,t){const r=this.startNode();return this.parseLiteralAtNode(e,t,r)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){const t=this.parseLiteral(e.value,"RegExpLiteral");t.pattern=e.pattern;t.flags=e.flags;return t}parseBooleanLiteral(e){const t=this.startNode();t.value=e;this.next();return this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();this.next();return this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const t=this.state.start;const r=this.state.startLoc;let s;this.next();this.expressionScope.enter(newArrowHeadScope());const a=this.state.maybeInArrowParameters;const i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=true;this.state.inFSharpPipelineDirectBody=false;const n=this.state.start;const o=this.state.startLoc;const l=[];const p=new ExpressionErrors;const u={start:0};let d=true;let f;let h;while(!this.match(c.parenR)){if(d){d=false}else{this.expect(c.comma,u.start||null);if(this.match(c.parenR)){h=this.state.start;break}}if(this.match(c.ellipsis)){const e=this.state.start;const t=this.state.startLoc;f=this.state.start;l.push(this.parseParenItem(this.parseRestBinding(),e,t));this.checkCommaAfterRest(41);break}else{l.push(this.parseMaybeAssignAllowIn(p,this.parseParenItem,u))}}const m=this.state.lastTokEnd;const y=this.state.lastTokEndLoc;this.expect(c.parenR);this.state.maybeInArrowParameters=a;this.state.inFSharpPipelineDirectBody=i;let g=this.startNodeAt(t,r);if(e&&this.shouldParseArrow()&&(g=this.parseArrow(g))){this.expressionScope.validateAsPattern();this.expressionScope.exit();this.parseArrowExpression(g,l,false);return g}this.expressionScope.exit();if(!l.length){this.unexpected(this.state.lastTokStart)}if(h)this.unexpected(h);if(f)this.unexpected(f);this.checkExpressionErrors(p,true);if(u.start)this.unexpected(u.start);this.toReferencedListDeep(l,true);if(l.length>1){s=this.startNodeAt(n,o);s.expressions=l;this.finishNodeAt(s,"SequenceExpression",m,y)}else{s=l[0]}if(!this.options.createParenthesizedExpressions){this.addExtra(s,"parenthesized",true);this.addExtra(s,"parenStart",t);return s}const b=this.startNodeAt(t,r);b.expression=s;this.finishNode(b,"ParenthesizedExpression");return b}shouldParseArrow(){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(c.arrow)){return e}}parseParenItem(e,t,r){return e}parseNewOrNewTarget(){const e=this.startNode();this.next();if(this.match(c.dot)){const t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const r=this.parseMetaProperty(e,t,"target");if(!this.scope.inNonArrowFunction&&!this.scope.inClass){this.raise(r.start,h.UnexpectedNewTarget)}return r}return this.parseNew(e)}parseNew(e){e.callee=this.parseNoCallExpr();if(e.callee.type==="Import"){this.raise(e.callee.start,h.ImportCallNotNewExpression)}else if(this.isOptionalChain(e.callee)){this.raise(this.state.lastTokEnd,h.OptionalChainingNoNew)}else if(this.eat(c.questionDot)){this.raise(this.state.start,h.OptionalChainingNoNew)}this.parseNewArguments(e);return this.finishNode(e,"NewExpression")}parseNewArguments(e){if(this.eat(c.parenL)){const t=this.parseExprList(c.parenR);this.toReferencedList(t);e.arguments=t}else{e.arguments=[]}}parseTemplateElement(e){const t=this.startNode();if(this.state.value===null){if(!e){this.raise(this.state.start+1,h.InvalidEscapeSequenceTemplate)}}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(c.backQuote);return this.finishNode(t,"TemplateElement")}parseTemplate(e){const t=this.startNode();this.next();t.expressions=[];let r=this.parseTemplateElement(e);t.quasis=[r];while(!r.tail){this.expect(c.dollarBraceL);t.expressions.push(this.parseTemplateSubstitution());this.expect(c.braceR);t.quasis.push(r=this.parseTemplateElement(e))}this.next();return this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,s){if(r){this.expectPlugin("recordAndTuple")}const a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=false;const i=Object.create(null);let n=true;const o=this.startNode();o.properties=[];this.next();while(!this.match(e)){if(n){n=false}else{this.expect(c.comma);if(this.match(e)){this.addExtra(o,"trailingComma",this.state.lastTokStart);break}}const a=this.parsePropertyDefinition(t,s);if(!t){this.checkProto(a,r,i,s)}if(r&&!this.isObjectProperty(a)&&a.type!=="SpreadElement"){this.raise(a.start,h.InvalidRecordProperty)}if(a.shorthand){this.addExtra(a,"shorthand",true)}o.properties.push(a)}this.next();this.state.inFSharpPipelineDirectBody=a;let l="ObjectExpression";if(t){l="ObjectPattern"}else if(r){l="RecordExpression"}return this.finishNode(o,l)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(c.bracketL)||this.match(c.star))}parsePropertyDefinition(e,t){let r=[];if(this.match(c.at)){if(this.hasPlugin("decorators")){this.raise(this.state.start,h.UnsupportedPropertyDecorator)}while(this.match(c.at)){r.push(this.parseDecorator())}}const s=this.startNode();let a=false;let i=false;let n=false;let o;let l;if(this.match(c.ellipsis)){if(r.length)this.unexpected();if(e){this.next();s.argument=this.parseIdentifier();this.checkCommaAfterRest(125);return this.finishNode(s,"RestElement")}return this.parseSpread()}if(r.length){s.decorators=r;r=[]}s.method=false;if(e||t){o=this.state.start;l=this.state.startLoc}if(!e){a=this.eat(c.star)}const p=this.state.containsEsc;const u=this.parsePropertyName(s,false);if(!e&&!a&&!p&&this.maybeAsyncOrAccessorProp(s)){const e=u.name;if(e==="async"&&!this.hasPrecedingLineBreak()){i=true;a=this.eat(c.star);this.parsePropertyName(s,false)}if(e==="get"||e==="set"){n=true;s.kind=e;if(this.match(c.star)){a=true;this.raise(this.state.pos,h.AccessorIsGenerator,e);this.next()}this.parsePropertyName(s,false)}}this.parseObjPropValue(s,o,l,a,i,e,n,t);return s}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;const r=this.getGetterSetterExpectedParamCount(e);const s=this.getObjectOrClassMethodParams(e);const a=e.start;if(s.length!==r){if(e.kind==="get"){this.raise(a,h.BadGetterArity)}else{this.raise(a,h.BadSetterArity)}}if(e.kind==="set"&&((t=s[s.length-1])==null?void 0:t.type)==="RestElement"){this.raise(a,h.BadSetterRestParameter)}}parseObjectMethod(e,t,r,s,a){if(a){this.parseMethod(e,t,false,false,false,"ObjectMethod");this.checkGetterSetterParams(e);return e}if(r||t||this.match(c.parenL)){if(s)this.unexpected();e.kind="method";e.method=true;return this.parseMethod(e,t,r,false,false,"ObjectMethod")}}parseObjectProperty(e,t,r,s,a){e.shorthand=false;if(this.eat(c.colon)){e.value=s?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(a);return this.finishNode(e,"ObjectProperty")}if(!e.computed&&e.key.type==="Identifier"){this.checkReservedWord(e.key.name,e.key.start,true,false);if(s){e.value=this.parseMaybeDefault(t,r,e.key.__clone())}else if(this.match(c.eq)&&a){if(a.shorthandAssign===-1){a.shorthandAssign=this.state.start}e.value=this.parseMaybeDefault(t,r,e.key.__clone())}else{e.value=e.key.__clone()}e.shorthand=true;return this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,t,r,s,a,i,n,o){const l=this.parseObjectMethod(e,s,a,i,n)||this.parseObjectProperty(e,t,r,i,o);if(!l)this.unexpected();return l}parsePropertyName(e,t){if(this.eat(c.bracketL)){e.computed=true;e.key=this.parseMaybeAssignAllowIn();this.expect(c.bracketR)}else{const r=this.state.inPropertyName;this.state.inPropertyName=true;const s=this.state.type;e.key=s===c.num||s===c.string||s===c.bigint||s===c.decimal?this.parseExprAtom():this.parseMaybePrivateName(t);if(s!==c.privateName){e.computed=false}this.state.inPropertyName=r}return e.key}initFunction(e,t){e.id=null;e.generator=false;e.async=!!t}parseMethod(e,t,r,s,a,i,n=false){this.initFunction(e,r);e.generator=!!t;const o=s;this.scope.enter(C|D|(n?M:0)|(a?R:0));this.prodParam.enter(functionFlags(r,e.generator));this.parseFunctionParams(e,o);this.parseFunctionBodyAndFinish(e,i,true);this.prodParam.exit();this.scope.exit();return e}parseArrayLike(e,t,r,s){if(r){this.expectPlugin("recordAndTuple")}const a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=false;const i=this.startNode();this.next();i.elements=this.parseExprList(e,!r,s,i);this.state.inFSharpPipelineDirectBody=a;return this.finishNode(i,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,r,s){this.scope.enter(C|N);let a=functionFlags(r,false);if(!this.match(c.bracketL)&&this.prodParam.hasIn){a|=Ce}this.prodParam.enter(a);this.initFunction(e,r);const i=this.state.maybeInArrowParameters;if(t){this.state.maybeInArrowParameters=true;this.setArrowFunctionParameters(e,t,s)}this.state.maybeInArrowParameters=false;this.parseFunctionBody(e,true);this.prodParam.exit();this.scope.exit();this.state.maybeInArrowParameters=i;return this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,r){e.params=this.toAssignableList(t,r,false)}parseFunctionBodyAndFinish(e,t,r=false){this.parseFunctionBody(e,false,r);this.finishNode(e,t)}parseFunctionBody(e,t,r=false){const s=t&&!this.match(c.braceL);this.expressionScope.enter(newExpressionScope());if(s){e.body=this.parseMaybeAssign();this.checkParams(e,false,t,false)}else{const s=this.state.strict;const a=this.state.labels;this.state.labels=[];this.prodParam.enter(this.prodParam.currentFlags()|Ie);e.body=this.parseBlock(true,false,(a=>{const i=!this.isSimpleParamList(e.params);if(a&&i){const t=(e.kind==="method"||e.kind==="constructor")&&!!e.key?e.key.end:e.start;this.raise(t,h.IllegalLanguageModeDirective)}const n=!s&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!r&&!i,t,n);if(this.state.strict&&e.id){this.checkLVal(e.id,"function name",ne,undefined,undefined,n)}}));this.prodParam.exit();this.expressionScope.exit();this.state.labels=a}}isSimpleParamList(e){for(let t=0,r=e.length;t{"use strict";const s=r(6313);const a=r(9491);const i=s.GlobalScope;const n=s.CatchScope;const o=s.WithScope;const l=s.ModuleScope;const c=s.ClassScope;const p=s.SwitchScope;const u=s.FunctionScope;const d=s.ForScope;const f=s.FunctionExpressionNameScope;const h=s.BlockScope;class ScopeManager{constructor(e){this.scopes=[];this.globalScope=null;this.__nodeToScope=new WeakMap;this.__currentScope=null;this.__options=e;this.__declaredVariables=new WeakMap}__useDirective(){return this.__options.directive}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}__isNodejsScope(){return this.__options.nodejsScope}isModule(){return this.__options.sourceType==="module"}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(e){return this.__nodeToScope.get(e)}getDeclaredVariables(e){return this.__declaredVariables.get(e)||[]}acquire(e,t){function predicate(e){if(e.type==="function"&&e.functionExpressionScope){return false}return true}const r=this.__get(e);if(!r||r.length===0){return null}if(r.length===1){return r[0]}if(t){for(let e=r.length-1;e>=0;--e){const t=r[e];if(predicate(t)){return t}}}else{for(let e=0,t=r.length;e=0;--r){if(e[r].node===t){return true}}return false}Controller.prototype.traverse=function traverse(e,t){var r,s,n,o,l,c,p,u,d,f,h,m;this.__initialize(e,t);m={};r=this.__worklist;s=this.__leavelist;r.push(new Element(e,null,null,null));s.push(new Element(null,null,null,null));while(r.length){n=r.pop();if(n===m){n=s.pop();c=this.__execute(t.leave,n);if(this.__state===a||c===a){return}continue}if(n.node){c=this.__execute(t.enter,n);if(this.__state===a||c===a){return}r.push(m);s.push(n);if(this.__state===i||c===i){continue}o=n.node;l=o.type||n.wrap;f=this.__keys[l];if(!f){if(this.__fallback){f=this.__fallback(o)}else{throw new Error("Unknown node type "+l+".")}}u=f.length;while((u-=1)>=0){p=f[u];h=o[p];if(!h){continue}if(Array.isArray(h)){d=h.length;while((d-=1)>=0){if(!h[d]){continue}if(candidateExistsInLeaveList(s,h[d])){continue}if(isProperty(l,f[u])){n=new Element(h[d],[p,d],"Property",null)}else if(isNode(h[d])){n=new Element(h[d],[p,d],null,null)}else{continue}r.push(n)}}else if(isNode(h)){if(candidateExistsInLeaveList(s,h)){continue}r.push(new Element(h,p,null,null))}}}}};Controller.prototype.replace=function replace(e,t){var r,s,o,l,c,p,u,d,f,h,m,y,g;function removeElem(e){var t,s,a,i;if(e.ref.remove()){s=e.ref.key;i=e.ref.parent;t=r.length;while(t--){a=r[t];if(a.ref&&a.ref.parent===i){if(a.ref.key=0){g=f[u];h=o[g];if(!h){continue}if(Array.isArray(h)){d=h.length;while((d-=1)>=0){if(!h[d]){continue}if(isProperty(l,f[u])){p=new Element(h[d],[g,d],"Property",new Reference(h,d))}else if(isNode(h[d])){p=new Element(h[d],[g,d],null,new Reference(h,d))}else{continue}r.push(p)}}else if(isNode(h)){r.push(new Element(h,g,null,new Reference(o,g)))}}}return y.root};function traverse(e,t){var r=new Controller;return r.traverse(e,t)}function replace(e,t){var r=new Controller;return r.replace(e,t)}function extendCommentRange(e,t){var r;r=upperBound(t,(function search(t){return t.range[0]>e.range[0]}));e.extendedRange=[e.range[0],e.range[1]];if(r!==t.length){e.extendedRange[1]=t[r].range[0]}r-=1;if(r>=0){e.extendedRange[0]=t[r].range[1]}return e}function attachComments(e,t,s){var a=[],i,n,o,l;if(!e.range){throw new Error("attachComments needs range information")}if(!s.length){if(t.length){for(o=0,n=t.length;o=0){p=f[u];h=o[p];if(!h){continue}if(Array.isArray(h)){d=h.length;while((d-=1)>=0){if(!h[d]){continue}if(isProperty(l,f[u])){a=new Element(h[d],[p,d],"Property",null)}else if(isNode(h[d])){a=new Element(h[d],[p,d],null,null)}else{continue}r.push(a)}}else if(isNode(h)){r.push(new Element(h,p,null,null))}}}}};Controller.prototype.replace=function replace(e,t){var r,s,a,l,c,p,u,d,f,h,m,y,g;function removeElem(e){var t,s,a,i;if(e.ref.remove()){s=e.ref.key;i=e.ref.parent;t=r.length;while(t--){a=r[t];if(a.ref&&a.ref.parent===i){if(a.ref.key=0){g=f[u];h=a[g];if(!h){continue}if(Array.isArray(h)){d=h.length;while((d-=1)>=0){if(!h[d]){continue}if(isProperty(l,f[u])){p=new Element(h[d],[g,d],"Property",new Reference(h,d))}else if(isNode(h[d])){p=new Element(h[d],[g,d],null,new Reference(h,d))}else{continue}r.push(p)}}else if(isNode(h)){r.push(new Element(h,g,null,new Reference(a,g)))}}}return y.root};function traverse(e,t){var r=new Controller;return r.traverse(e,t)}function replace(e,t){var r=new Controller;return r.replace(e,t)}function extendCommentRange(e,t){var r;r=upperBound(t,(function search(t){return t.range[0]>e.range[0]}));e.extendedRange=[e.range[0],e.range[1]];if(r!==t.length){e.extendedRange[1]=t[r].range[0]}r-=1;if(r>=0){e.extendedRange[0]=t[r].range[1]}return e}function attachComments(e,t,r){var a=[],i,n,o,l;if(!e.range){throw new Error("attachComments needs range information")}if(!r.length){if(t.length){for(o=0,n=t.length;o{"use strict";const s=r(6313);const a=r(9491);const n=s.GlobalScope;const o=s.CatchScope;const i=s.WithScope;const l=s.ModuleScope;const c=s.ClassScope;const u=s.SwitchScope;const p=s.FunctionScope;const f=s.ForScope;const d=s.FunctionExpressionNameScope;const m=s.BlockScope;class ScopeManager{constructor(e){this.scopes=[];this.globalScope=null;this.__nodeToScope=new WeakMap;this.__currentScope=null;this.__options=e;this.__declaredVariables=new WeakMap}__useDirective(){return this.__options.directive}__isOptimistic(){return this.__options.optimistic}__ignoreEval(){return this.__options.ignoreEval}__isNodejsScope(){return this.__options.nodejsScope}isModule(){return this.__options.sourceType==="module"}isImpliedStrict(){return this.__options.impliedStrict}isStrictModeSupported(){return this.__options.ecmaVersion>=5}__get(e){return this.__nodeToScope.get(e)}getDeclaredVariables(e){return this.__declaredVariables.get(e)||[]}acquire(e,t){function predicate(e){if(e.type==="function"&&e.functionExpressionScope){return false}return true}const r=this.__get(e);if(!r||r.length===0){return null}if(r.length===1){return r[0]}if(t){for(let e=r.length-1;e>=0;--e){const t=r[e];if(predicate(t)){return t}}}else{for(let e=0,t=r.length;e=0;--r){if(e[r].node===t){return true}}return false}Controller.prototype.traverse=function traverse(e,t){var r,s,o,i,l,c,u,p,f,d,m,y;this.__initialize(e,t);y={};r=this.__worklist;s=this.__leavelist;r.push(new Element(e,null,null,null));s.push(new Element(null,null,null,null));while(r.length){o=r.pop();if(o===y){o=s.pop();c=this.__execute(t.leave,o);if(this.__state===a||c===a){return}continue}if(o.node){c=this.__execute(t.enter,o);if(this.__state===a||c===a){return}r.push(y);s.push(o);if(this.__state===n||c===n){continue}i=o.node;l=i.type||o.wrap;d=this.__keys[l];if(!d){if(this.__fallback){d=this.__fallback(i)}else{throw new Error("Unknown node type "+l+".")}}p=d.length;while((p-=1)>=0){u=d[p];m=i[u];if(!m){continue}if(Array.isArray(m)){f=m.length;while((f-=1)>=0){if(!m[f]){continue}if(candidateExistsInLeaveList(s,m[f])){continue}if(isProperty(l,d[p])){o=new Element(m[f],[u,f],"Property",null)}else if(isNode(m[f])){o=new Element(m[f],[u,f],null,null)}else{continue}r.push(o)}}else if(isNode(m)){if(candidateExistsInLeaveList(s,m)){continue}r.push(new Element(m,u,null,null))}}}}};Controller.prototype.replace=function replace(e,t){var r,s,i,l,c,u,p,f,d,m,y,g,h;function removeElem(e){var t,s,a,n;if(e.ref.remove()){s=e.ref.key;n=e.ref.parent;t=r.length;while(t--){a=r[t];if(a.ref&&a.ref.parent===n){if(a.ref.key=0){h=d[p];m=i[h];if(!m){continue}if(Array.isArray(m)){f=m.length;while((f-=1)>=0){if(!m[f]){continue}if(isProperty(l,d[p])){u=new Element(m[f],[h,f],"Property",new Reference(m,f))}else if(isNode(m[f])){u=new Element(m[f],[h,f],null,new Reference(m,f))}else{continue}r.push(u)}}else if(isNode(m)){r.push(new Element(m,h,null,new Reference(i,h)))}}}return g.root};function traverse(e,t){var r=new Controller;return r.traverse(e,t)}function replace(e,t){var r=new Controller;return r.replace(e,t)}function extendCommentRange(e,t){var r;r=upperBound(t,(function search(t){return t.range[0]>e.range[0]}));e.extendedRange=[e.range[0],e.range[1]];if(r!==t.length){e.extendedRange[1]=t[r].range[0]}r-=1;if(r>=0){e.extendedRange[0]=t[r].range[1]}return e}function attachComments(e,t,s){var a=[],n,o,i,l;if(!e.range){throw new Error("attachComments needs range information")}if(!s.length){if(t.length){for(i=0,o=t.length;i=0){u=d[p];m=i[u];if(!m){continue}if(Array.isArray(m)){f=m.length;while((f-=1)>=0){if(!m[f]){continue}if(isProperty(l,d[p])){a=new Element(m[f],[u,f],"Property",null)}else if(isNode(m[f])){a=new Element(m[f],[u,f],null,null)}else{continue}r.push(a)}}else if(isNode(m)){r.push(new Element(m,u,null,null))}}}}};Controller.prototype.replace=function replace(e,t){var r,s,a,l,c,u,p,f,d,m,y,g,h;function removeElem(e){var t,s,a,n;if(e.ref.remove()){s=e.ref.key;n=e.ref.parent;t=r.length;while(t--){a=r[t];if(a.ref&&a.ref.parent===n){if(a.ref.key=0){h=d[p];m=a[h];if(!m){continue}if(Array.isArray(m)){f=m.length;while((f-=1)>=0){if(!m[f]){continue}if(isProperty(l,d[p])){u=new Element(m[f],[h,f],"Property",new Reference(m,f))}else if(isNode(m[f])){u=new Element(m[f],[h,f],null,new Reference(m,f))}else{continue}r.push(u)}}else if(isNode(m)){r.push(new Element(m,h,null,new Reference(a,h)))}}}return g.root};function traverse(e,t){var r=new Controller;return r.traverse(e,t)}function replace(e,t){var r=new Controller;return r.replace(e,t)}function extendCommentRange(e,t){var r;r=upperBound(t,(function search(t){return t.range[0]>e.range[0]}));e.extendedRange=[e.range[0],e.range[1]];if(r!==t.length){e.extendedRange[1]=t[r].range[0]}r-=1;if(r>=0){e.extendedRange[0]=t[r].range[1]}return e}function attachComments(e,t,r){var a=[],n,o,i,l;if(!e.range){throw new Error("attachComments needs range information")}if(!r.length){if(t.length){for(i=0,o=t.length;i-1}function listCacheSet(e,t){var r=this.__data__,s=assocIndexOf(r,e);if(s<0){++this.size;r.push([e,t])}else{r[s][1]=t}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t1){m.reverse()}if(d&&p=s&&tr){return e}if(t<=a&&r>=i){e.splice(s,2);continue}if(t>=a&&r=a&&t<=i){e[s+1]=t}else if(r>=a&&r<=i){e[s]=r+1;return e}s+=2}return e};var dataAdd=function(e,t){var r=0;var s;var a;var i=null;var o=e.length;if(t<0||t>1114111){throw RangeError(n.codePointRange)}while(r=a&&t=40&&e<=43||e==46||e==47||e==63||e>=91&&e<=94||e>=123&&e<=125){t="\\"+b(e)}else if(e>=32&&e<=126){t=b(e)}else if(e<=255){t="\\x"+pad(hex(e),2)}else{t="\\u"+pad(hex(e),4)}return t};var codePointToStringUnicode=function(e){if(e<=65535){return codePointToString(e)}return"\\u{"+e.toString(16).toUpperCase()+"}"};var symbolToCodePoint=function(e){var t=e.length;var r=e.charCodeAt(0);var s;if(r>=o&&r<=l&&t>1){s=e.charCodeAt(1);return(r-o)*1024+s-c+65536}return r};var createBMPCharacterClasses=function(e){var t="";var r=0;var s;var a;var i=e.length;if(dataIsSingleton(e)){return codePointToString(e[0])}while(r=o&&u<=l){s.push(n,o);t.push(o,u+1)}if(u>=c&&u<=p){s.push(n,o);t.push(o,l+1);r.push(c,u+1)}if(u>p){s.push(n,o);t.push(o,l+1);r.push(c,p+1);if(u<=65535){s.push(p+1,u+1)}else{s.push(p+1,65535+1);a.push(65535+1,u+1)}}}else if(n>=o&&n<=l){if(u>=o&&u<=l){t.push(n,u+1)}if(u>=c&&u<=p){t.push(n,l+1);r.push(c,u+1)}if(u>p){t.push(n,l+1);r.push(c,p+1);if(u<=65535){s.push(p+1,u+1)}else{s.push(p+1,65535+1);a.push(65535+1,u+1)}}}else if(n>=c&&n<=p){if(u>=c&&u<=p){r.push(n,u+1)}if(u>p){r.push(n,p+1);if(u<=65535){s.push(p+1,u+1)}else{s.push(p+1,65535+1);a.push(65535+1,u+1)}}}else if(n>p&&n<=65535){if(u<=65535){s.push(n,u+1)}else{s.push(n,65535+1);a.push(65535+1,u+1)}}else{a.push(n,u+1)}i+=2}return{loneHighSurrogates:t,loneLowSurrogates:r,bmp:s,astral:a}};var optimizeSurrogateMappings=function(e){var t=[];var r=[];var s=false;var a;var i;var n;var o;var l;var c;var p=-1;var u=e.length;while(++p1){e=y.call(arguments)}if(this instanceof regenerate){this.data=[];return e?this.add(e):this}return(new regenerate).add(e)};regenerate.version="1.3.3";var x=regenerate.prototype;extend(x,{add:function(e){var t=this;if(e==null){return t}if(e instanceof regenerate){t.data=dataAddData(t.data,e.data);return t}if(arguments.length>1){e=y.call(arguments)}if(isArray(e)){forEach(e,(function(e){t.add(e)}));return t}t.data=dataAdd(t.data,isNumber(e)?e:symbolToCodePoint(e));return t},remove:function(e){var t=this;if(e==null){return t}if(e instanceof regenerate){t.data=dataRemoveData(t.data,e.data);return t}if(arguments.length>1){e=y.call(arguments)}if(isArray(e)){forEach(e,(function(e){t.remove(e)}));return t}t.data=dataRemove(t.data,isNumber(e)?e:symbolToCodePoint(e));return t},addRange:function(e,t){var r=this;r.data=dataAddRange(r.data,isNumber(e)?e:symbolToCodePoint(e),isNumber(t)?t:symbolToCodePoint(t));return r},removeRange:function(e,t){var r=this;var s=isNumber(e)?e:symbolToCodePoint(e);var a=isNumber(t)?t:symbolToCodePoint(t);r.data=dataRemoveRange(r.data,s,a);return r},intersection:function(e){var t=this;var r=e instanceof regenerate?dataToArray(e.data):e;t.data=dataIntersection(t.data,r);return t},contains:function(e){return dataContains(this.data,isNumber(e)?e:symbolToCodePoint(e))},clone:function(){var e=new regenerate;e.data=this.data.slice(0);return e},toString:function(e){var t=createCharacterClassesFromData(this.data,e?e.bmpOnly:false,e?e.hasUnicodeFlag:false);if(!t){return"[]"}return t.replace(u,"\\0$1")},toRegExp:function(e){var t=this.toString(e&&e.indexOf("u")!=-1?{hasUnicodeFlag:true}:null);return RegExp(t,e||"")},valueOf:function(){return dataToArray(this.data)}});x.toArray=x.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define((function(){return regenerate}))}else if(s&&!s.nodeType){if(a){a.exports=regenerate}else{s.regenerate=regenerate}}else{r.regenerate=regenerate}})(this)},6419:(e,t,r)=>{"use strict";var s=r(449);var a=r(6919);var i=a(r(9491));var n=s(r(9048));var o=s(r(3085));var l=s(r(6401));var c=Object.prototype.hasOwnProperty;function Emitter(e){i["default"].ok(this instanceof Emitter);l.getTypes().assertIdentifier(e);this.nextTempId=0;this.contextId=e;this.listing=[];this.marked=[true];this.insertedLocs=new Set;this.finalLoc=this.loc();this.tryEntries=[];this.leapManager=new n.LeapManager(this)}var p=Emitter.prototype;t.Emitter=Emitter;p.loc=function(){var e=l.getTypes().numericLiteral(-1);this.insertedLocs.add(e);return e};p.getInsertedLocs=function(){return this.insertedLocs};p.getContextId=function(){return l.getTypes().clone(this.contextId)};p.mark=function(e){l.getTypes().assertLiteral(e);var t=this.listing.length;if(e.value===-1){e.value=t}else{i["default"].strictEqual(e.value,t)}this.marked[t]=true;return e};p.emit=function(e){var t=l.getTypes();if(t.isExpression(e)){e=t.expressionStatement(e)}t.assertStatement(e);this.listing.push(e)};p.emitAssign=function(e,t){this.emit(this.assign(e,t));return e};p.assign=function(e,t){var r=l.getTypes();return r.expressionStatement(r.assignmentExpression("=",r.cloneDeep(e),t))};p.contextProperty=function(e,t){var r=l.getTypes();return r.memberExpression(this.getContextId(),t?r.stringLiteral(e):r.identifier(e),!!t)};p.stop=function(e){if(e){this.setReturnValue(e)}this.jump(this.finalLoc)};p.setReturnValue=function(e){l.getTypes().assertExpression(e.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))};p.clearPendingException=function(e,t){var r=l.getTypes();r.assertLiteral(e);var s=r.callExpression(this.contextProperty("catch",true),[r.clone(e)]);if(t){this.emitAssign(t,s)}else{this.emit(s)}};p.jump=function(e){this.emitAssign(this.contextProperty("next"),e);this.emit(l.getTypes().breakStatement())};p.jumpIf=function(e,t){var r=l.getTypes();r.assertExpression(e);r.assertLiteral(t);this.emit(r.ifStatement(e,r.blockStatement([this.assign(this.contextProperty("next"),t),r.breakStatement()])))};p.jumpIfNot=function(e,t){var r=l.getTypes();r.assertExpression(e);r.assertLiteral(t);var s;if(r.isUnaryExpression(e)&&e.operator==="!"){s=e.argument}else{s=r.unaryExpression("!",e)}this.emit(r.ifStatement(s,r.blockStatement([this.assign(this.contextProperty("next"),t),r.breakStatement()])))};p.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)};p.getContextFunction=function(e){var t=l.getTypes();return t.functionExpression(e||null,[this.getContextId()],t.blockStatement([this.getDispatchLoop()]),false,false)};p.getDispatchLoop=function(){var e=this;var t=l.getTypes();var r=[];var s;var a=false;e.listing.forEach((function(i,n){if(e.marked.hasOwnProperty(n)){r.push(t.switchCase(t.numericLiteral(n),s=[]));a=false}if(!a){s.push(i);if(t.isCompletionStatement(i))a=true}}));this.finalLoc.value=this.listing.length;r.push(t.switchCase(this.finalLoc,[]),t.switchCase(t.stringLiteral("end"),[t.returnStatement(t.callExpression(this.contextProperty("stop"),[]))]));return t.whileStatement(t.numericLiteral(1),t.switchStatement(t.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),r))};p.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var e=l.getTypes();var t=0;return e.arrayExpression(this.tryEntries.map((function(r){var s=r.firstLoc.value;i["default"].ok(s>=t,"try entries out of order");t=s;var a=r.catchEntry;var n=r.finallyEntry;var o=[r.firstLoc,a?a.firstLoc:null];if(n){o[2]=n.firstLoc;o[3]=n.afterLoc}return e.arrayExpression(o.map((function(t){return t&&e.clone(t)})))})))};p.explode=function(e,t){var r=l.getTypes();var s=e.node;var a=this;r.assertNode(s);if(r.isDeclaration(s))throw getDeclError(s);if(r.isStatement(s))return a.explodeStatement(e);if(r.isExpression(s))return a.explodeExpression(e,t);switch(s.type){case"Program":return e.get("body").map(a.explodeStatement,a);case"VariableDeclarator":throw getDeclError(s);case"Property":case"SwitchCase":case"CatchClause":throw new Error(s.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(s.type))}};function getDeclError(e){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(e))}p.explodeStatement=function(e,t){var r=l.getTypes();var s=e.node;var a=this;var c,p,d;r.assertStatement(s);if(t){r.assertIdentifier(t)}else{t=null}if(r.isBlockStatement(s)){e.get("body").forEach((function(e){a.explodeStatement(e)}));return}if(!o.containsLeap(s)){a.emit(s);return}switch(s.type){case"ExpressionStatement":a.explodeExpression(e.get("expression"),true);break;case"LabeledStatement":p=this.loc();a.leapManager.withEntry(new n.LabeledEntry(p,s.label),(function(){a.explodeStatement(e.get("body"),s.label)}));a.mark(p);break;case"WhileStatement":c=this.loc();p=this.loc();a.mark(c);a.jumpIfNot(a.explodeExpression(e.get("test")),p);a.leapManager.withEntry(new n.LoopEntry(p,c,t),(function(){a.explodeStatement(e.get("body"))}));a.jump(c);a.mark(p);break;case"DoWhileStatement":var f=this.loc();var h=this.loc();p=this.loc();a.mark(f);a.leapManager.withEntry(new n.LoopEntry(p,h,t),(function(){a.explode(e.get("body"))}));a.mark(h);a.jumpIf(a.explodeExpression(e.get("test")),f);a.mark(p);break;case"ForStatement":d=this.loc();var m=this.loc();p=this.loc();if(s.init){a.explode(e.get("init"),true)}a.mark(d);if(s.test){a.jumpIfNot(a.explodeExpression(e.get("test")),p)}else{}a.leapManager.withEntry(new n.LoopEntry(p,m,t),(function(){a.explodeStatement(e.get("body"))}));a.mark(m);if(s.update){a.explode(e.get("update"),true)}a.jump(d);a.mark(p);break;case"TypeCastExpression":return a.explodeExpression(e.get("expression"));case"ForInStatement":d=this.loc();p=this.loc();var y=a.makeTempVar();a.emitAssign(y,r.callExpression(l.runtimeProperty("keys"),[a.explodeExpression(e.get("right"))]));a.mark(d);var g=a.makeTempVar();a.jumpIf(r.memberExpression(r.assignmentExpression("=",g,r.callExpression(r.cloneDeep(y),[])),r.identifier("done"),false),p);a.emitAssign(s.left,r.memberExpression(r.cloneDeep(g),r.identifier("value"),false));a.leapManager.withEntry(new n.LoopEntry(p,d,t),(function(){a.explodeStatement(e.get("body"))}));a.jump(d);a.mark(p);break;case"BreakStatement":a.emitAbruptCompletion({type:"break",target:a.leapManager.getBreakLoc(s.label)});break;case"ContinueStatement":a.emitAbruptCompletion({type:"continue",target:a.leapManager.getContinueLoc(s.label)});break;case"SwitchStatement":var b=a.emitAssign(a.makeTempVar(),a.explodeExpression(e.get("discriminant")));p=this.loc();var x=this.loc();var v=x;var E=[];var w=s.cases||[];for(var P=w.length-1;P>=0;--P){var S=w[P];r.assertSwitchCase(S);if(S.test){v=r.conditionalExpression(r.binaryExpression("===",r.cloneDeep(b),S.test),E[P]=this.loc(),v)}else{E[P]=x}}var j=e.get("discriminant");l.replaceWithOrRemove(j,v);a.jump(a.explodeExpression(j));a.leapManager.withEntry(new n.SwitchEntry(p),(function(){e.get("cases").forEach((function(e){var t=e.key;a.mark(E[t]);e.get("consequent").forEach((function(e){a.explodeStatement(e)}))}))}));a.mark(p);if(x.value===-1){a.mark(x);i["default"].strictEqual(p.value,x.value)}break;case"IfStatement":var A=s.alternate&&this.loc();p=this.loc();a.jumpIfNot(a.explodeExpression(e.get("test")),A||p);a.explodeStatement(e.get("consequent"));if(A){a.jump(p);a.mark(A);a.explodeStatement(e.get("alternate"))}a.mark(p);break;case"ReturnStatement":a.emitAbruptCompletion({type:"return",value:a.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":p=this.loc();var k=s.handler;var _=k&&this.loc();var I=_&&new n.CatchEntry(_,k.param);var C=s.finalizer&&this.loc();var N=C&&new n.FinallyEntry(C,p);var O=new n.TryEntry(a.getUnmarkedCurrentLoc(),I,N);a.tryEntries.push(O);a.updateContextPrevLoc(O.firstLoc);a.leapManager.withEntry(O,(function(){a.explodeStatement(e.get("block"));if(_){if(C){a.jump(C)}else{a.jump(p)}a.updateContextPrevLoc(a.mark(_));var t=e.get("handler.body");var s=a.makeTempVar();a.clearPendingException(O.firstLoc,s);t.traverse(u,{getSafeParam:function getSafeParam(){return r.cloneDeep(s)},catchParamName:k.param.name});a.leapManager.withEntry(I,(function(){a.explodeStatement(t)}))}if(C){a.updateContextPrevLoc(a.mark(C));a.leapManager.withEntry(N,(function(){a.explodeStatement(e.get("finalizer"))}));a.emit(r.returnStatement(r.callExpression(a.contextProperty("finish"),[N.firstLoc])))}}));a.mark(p);break;case"ThrowStatement":a.emit(r.throwStatement(a.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(s.type))}};var u={Identifier:function Identifier(e,t){if(e.node.name===t.catchParamName&&l.isReference(e)){l.replaceWithOrRemove(e,t.getSafeParam())}},Scope:function Scope(e,t){if(e.scope.hasOwnBinding(t.catchParamName)){e.skip()}}};p.emitAbruptCompletion=function(e){if(!isValidCompletion(e)){i["default"].ok(false,"invalid completion record: "+JSON.stringify(e))}i["default"].notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=l.getTypes();var r=[t.stringLiteral(e.type)];if(e.type==="break"||e.type==="continue"){t.assertLiteral(e.target);r[1]=this.insertedLocs.has(e.target)?e.target:t.cloneDeep(e.target)}else if(e.type==="return"||e.type==="throw"){if(e.value){t.assertExpression(e.value);r[1]=this.insertedLocs.has(e.value)?e.value:t.cloneDeep(e.value)}}this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"),r)))};function isValidCompletion(e){var t=e.type;if(t==="normal"){return!c.call(e,"target")}if(t==="break"||t==="continue"){return!c.call(e,"value")&&l.getTypes().isLiteral(e.target)}if(t==="return"||t==="throw"){return c.call(e,"value")&&!c.call(e,"target")}return false}p.getUnmarkedCurrentLoc=function(){return l.getTypes().numericLiteral(this.listing.length)};p.updateContextPrevLoc=function(e){var t=l.getTypes();if(e){t.assertLiteral(e);if(e.value===-1){e.value=this.listing.length}else{i["default"].strictEqual(e.value,this.listing.length)}}else{e=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),e)};p.explodeExpression=function(e,t){var r=l.getTypes();var s=e.node;if(s){r.assertExpression(s)}else{return s}var a=this;var n;var c;function finish(e){r.assertExpression(e);if(t){a.emit(e)}else{return e}}if(!o.containsLeap(s)){return finish(s)}var p=o.containsLeap.onlyChildren(s);function explodeViaTempVar(e,t,s){i["default"].ok(!s||!e,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var n=a.explodeExpression(t,s);if(s){}else if(e||p&&!r.isLiteral(n)){n=a.emitAssign(e||a.makeTempVar(),n)}return n}switch(s.type){case"MemberExpression":return finish(r.memberExpression(a.explodeExpression(e.get("object")),s.computed?explodeViaTempVar(null,e.get("property")):s.property,s.computed));case"CallExpression":var u=e.get("callee");var d=e.get("arguments");var f;var h;var m=d.some((function(e){return o.containsLeap(e.node)}));var y=null;if(r.isMemberExpression(u.node)){if(m){var g=explodeViaTempVar(a.makeTempVar(),u.get("object"));var b=u.node.computed?explodeViaTempVar(null,u.get("property")):u.node.property;y=g;f=r.memberExpression(r.memberExpression(r.cloneDeep(g),b,u.node.computed),r.identifier("call"),false)}else{f=a.explodeExpression(u)}}else{f=explodeViaTempVar(null,u);if(r.isMemberExpression(f)){f=r.sequenceExpression([r.numericLiteral(0),r.cloneDeep(f)])}}if(m){h=d.map((function(e){return explodeViaTempVar(null,e)}));if(y)h.unshift(y);h=h.map((function(e){return r.cloneDeep(e)}))}else{h=e.node.arguments}return finish(r.callExpression(f,h));case"NewExpression":return finish(r.newExpression(explodeViaTempVar(null,e.get("callee")),e.get("arguments").map((function(e){return explodeViaTempVar(null,e)}))));case"ObjectExpression":return finish(r.objectExpression(e.get("properties").map((function(e){if(e.isObjectProperty()){return r.objectProperty(e.node.key,explodeViaTempVar(null,e.get("value")),e.node.computed)}else{return e.node}}))));case"ArrayExpression":return finish(r.arrayExpression(e.get("elements").map((function(e){if(e.isSpreadElement()){return r.spreadElement(explodeViaTempVar(null,e.get("argument")))}else{return explodeViaTempVar(null,e)}}))));case"SequenceExpression":var x=s.expressions.length-1;e.get("expressions").forEach((function(e){if(e.key===x){n=a.explodeExpression(e,t)}else{a.explodeExpression(e,true)}}));return n;case"LogicalExpression":c=this.loc();if(!t){n=a.makeTempVar()}var v=explodeViaTempVar(n,e.get("left"));if(s.operator==="&&"){a.jumpIfNot(v,c)}else{i["default"].strictEqual(s.operator,"||");a.jumpIf(v,c)}explodeViaTempVar(n,e.get("right"),t);a.mark(c);return n;case"ConditionalExpression":var E=this.loc();c=this.loc();var w=a.explodeExpression(e.get("test"));a.jumpIfNot(w,E);if(!t){n=a.makeTempVar()}explodeViaTempVar(n,e.get("consequent"),t);a.jump(c);a.mark(E);explodeViaTempVar(n,e.get("alternate"),t);a.mark(c);return n;case"UnaryExpression":return finish(r.unaryExpression(s.operator,a.explodeExpression(e.get("argument")),!!s.prefix));case"BinaryExpression":return finish(r.binaryExpression(s.operator,explodeViaTempVar(null,e.get("left")),explodeViaTempVar(null,e.get("right"))));case"AssignmentExpression":if(s.operator==="="){return finish(r.assignmentExpression(s.operator,a.explodeExpression(e.get("left")),a.explodeExpression(e.get("right"))))}var P=a.explodeExpression(e.get("left"));var S=a.emitAssign(a.makeTempVar(),P);return finish(r.assignmentExpression("=",r.cloneDeep(P),r.assignmentExpression(s.operator,r.cloneDeep(S),a.explodeExpression(e.get("right")))));case"UpdateExpression":return finish(r.updateExpression(s.operator,a.explodeExpression(e.get("argument")),s.prefix));case"YieldExpression":c=this.loc();var j=s.argument&&a.explodeExpression(e.get("argument"));if(j&&s.delegate){var A=a.makeTempVar();var k=r.returnStatement(r.callExpression(a.contextProperty("delegateYield"),[j,r.stringLiteral(A.property.name),c]));k.loc=s.loc;a.emit(k);a.mark(c);return A}a.emitAssign(a.contextProperty("next"),c);var _=r.returnStatement(r.cloneDeep(j)||null);_.loc=s.loc;a.emit(_);a.mark(c);return a.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(s.type))}}},5604:(e,t,r)=>{"use strict";var s=r(449);var a=s(r(6401));var i=Object.prototype.hasOwnProperty;t.hoist=function(e){var t=a.getTypes();t.assertFunction(e.node);var r={};function varDeclToExpr(e,s){var a=e.node,i=e.scope;t.assertVariableDeclaration(a);var n=[];a.declarations.forEach((function(e){r[e.id.name]=t.identifier(e.id.name);i.removeBinding(e.id.name);if(e.init){n.push(t.assignmentExpression("=",e.id,e.init))}else if(s){n.push(e.id)}}));if(n.length===0)return null;if(n.length===1)return n[0];return t.sequenceExpression(n)}e.get("body").traverse({VariableDeclaration:{exit:function exit(e){var r=varDeclToExpr(e,false);if(r===null){e.remove()}else{a.replaceWithOrRemove(e,t.expressionStatement(r))}e.skip()}},ForStatement:function ForStatement(e){var t=e.get("init");if(t.isVariableDeclaration()){a.replaceWithOrRemove(t,varDeclToExpr(t,false))}},ForXStatement:function ForXStatement(e){var t=e.get("left");if(t.isVariableDeclaration()){a.replaceWithOrRemove(t,varDeclToExpr(t,true))}},FunctionDeclaration:function FunctionDeclaration(e){var s=e.node;r[s.id.name]=s.id;var i=t.expressionStatement(t.assignmentExpression("=",t.clone(s.id),t.functionExpression(e.scope.generateUidIdentifierBasedOnNode(s),s.params,s.body,s.generator,s.expression)));if(e.parentPath.isBlockStatement()){e.parentPath.unshiftContainer("body",i);e.remove()}else{a.replaceWithOrRemove(e,i)}e.scope.removeBinding(s.id.name);e.skip()},FunctionExpression:function FunctionExpression(e){e.skip()},ArrowFunctionExpression:function ArrowFunctionExpression(e){e.skip()}});var s={};e.get("params").forEach((function(e){var r=e.node;if(t.isIdentifier(r)){s[r.name]=r}else{}}));var n=[];Object.keys(r).forEach((function(e){if(!i.call(s,e)){n.push(t.variableDeclarator(r[e],null))}}));if(n.length===0){return null}return t.variableDeclaration("var",n)}},9522:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=_default;var s=r(5490);function _default(e){var t={visitor:(0,s.getVisitor)(e)};var r=e&&e.version;if(r&&parseInt(r,10)>=7){t.name="regenerator-transform"}return t}},9048:(e,t,r)=>{"use strict";var s=r(6919);var a=s(r(9491));var i=r(6419);var n=r(3837);var o=r(6401);function Entry(){a["default"].ok(this instanceof Entry)}function FunctionEntry(e){Entry.call(this);(0,o.getTypes)().assertLiteral(e);this.returnLoc=e}(0,n.inherits)(FunctionEntry,Entry);t.FunctionEntry=FunctionEntry;function LoopEntry(e,t,r){Entry.call(this);var s=(0,o.getTypes)();s.assertLiteral(e);s.assertLiteral(t);if(r){s.assertIdentifier(r)}else{r=null}this.breakLoc=e;this.continueLoc=t;this.label=r}(0,n.inherits)(LoopEntry,Entry);t.LoopEntry=LoopEntry;function SwitchEntry(e){Entry.call(this);(0,o.getTypes)().assertLiteral(e);this.breakLoc=e}(0,n.inherits)(SwitchEntry,Entry);t.SwitchEntry=SwitchEntry;function TryEntry(e,t,r){Entry.call(this);var s=(0,o.getTypes)();s.assertLiteral(e);if(t){a["default"].ok(t instanceof CatchEntry)}else{t=null}if(r){a["default"].ok(r instanceof FinallyEntry)}else{r=null}a["default"].ok(t||r);this.firstLoc=e;this.catchEntry=t;this.finallyEntry=r}(0,n.inherits)(TryEntry,Entry);t.TryEntry=TryEntry;function CatchEntry(e,t){Entry.call(this);var r=(0,o.getTypes)();r.assertLiteral(e);r.assertIdentifier(t);this.firstLoc=e;this.paramId=t}(0,n.inherits)(CatchEntry,Entry);t.CatchEntry=CatchEntry;function FinallyEntry(e,t){Entry.call(this);var r=(0,o.getTypes)();r.assertLiteral(e);r.assertLiteral(t);this.firstLoc=e;this.afterLoc=t}(0,n.inherits)(FinallyEntry,Entry);t.FinallyEntry=FinallyEntry;function LabeledEntry(e,t){Entry.call(this);var r=(0,o.getTypes)();r.assertLiteral(e);r.assertIdentifier(t);this.breakLoc=e;this.label=t}(0,n.inherits)(LabeledEntry,Entry);t.LabeledEntry=LabeledEntry;function LeapManager(e){a["default"].ok(this instanceof LeapManager);a["default"].ok(e instanceof i.Emitter);this.emitter=e;this.entryStack=[new FunctionEntry(e.finalLoc)]}var l=LeapManager.prototype;t.LeapManager=LeapManager;l.withEntry=function(e,t){a["default"].ok(e instanceof Entry);this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();a["default"].strictEqual(r,e)}};l._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var s=this.entryStack[r];var a=s[e];if(a){if(t){if(s.label&&s.label.name===t.name){return a}}else if(s instanceof LabeledEntry){}else{return a}}}return null};l.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)};l.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},3085:(e,t,r)=>{"use strict";var s=r(6919);var a=s(r(9491));var i=r(6401);var n=r(1782);var o=(0,n.makeAccessor)();var l=Object.prototype.hasOwnProperty;function makePredicate(e,t){function onlyChildren(e){var t=(0,i.getTypes)();t.assertNode(e);var r=false;function check(e){if(r){}else if(Array.isArray(e)){e.some(check)}else if(t.isNode(e)){a["default"].strictEqual(r,false);r=predicate(e)}return r}var s=t.VISITOR_KEYS[e.type];if(s){for(var n=0;n-1}function listCacheSet(e,t){var r=this.__data__,s=assocIndexOf(r,e);if(s<0){++this.size;r.push([e,t])}else{r[s][1]=t}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t1){y.reverse()}if(f&&u=s&&tr){return e}if(t<=a&&r>=n){e.splice(s,2);continue}if(t>=a&&r