| 189 | `;const n={ReferencedIdentifier(e){const{seen:r,buildImportReference:t,scope:a,imported:n,requeueInParent:o}=this;if(r.has(e.node))return;r.add(e.node);const i=e.node.name;const l=n.get(i);if(l){if(isInType(e)){throw e.buildCodeFrameError(`Cannot transform the imported binding "${i}" since it's also used in a type annotation. `+`Please strip type annotations using @babel/preset-typescript or @babel/preset-flow.`)}const r=e.scope.getBinding(i);const n=a.getBinding(i);if(n!==r)return;const c=t(l,e.node);c.loc=e.node.loc;if((e.parentPath.isCallExpression({callee:e.node})||e.parentPath.isOptionalCallExpression({callee:e.node})||e.parentPath.isTaggedTemplateExpression({tag:e.node}))&&s.types.isMemberExpression(c)){e.replaceWith(s.types.sequenceExpression([s.types.numericLiteral(0),c]))}else if(e.isJSXIdentifier()&&s.types.isMemberExpression(c)){const{object:r,property:t}=c;e.replaceWith(s.types.jsxMemberExpression(s.types.jsxIdentifier(r.name),s.types.jsxIdentifier(t.name)))}else{e.replaceWith(c)}o(e);e.skip()}},UpdateExpression(e){const{scope:r,seen:t,imported:a,exported:n,requeueInParent:o,buildImportReference:i}=this;if(t.has(e.node))return;t.add(e.node);const l=e.get("argument");if(l.isMemberExpression())return;const c=e.node;if(l.isIdentifier()){const t=l.node.name;if(r.getBinding(t)!==e.scope.getBinding(t)){return}const o=n.get(t);const d=a.get(t);if((o==null?void 0:o.length)>0||d){if(d){e.replaceWith(s.types.assignmentExpression(c.operator[0]+"=",i(d,l.node),buildImportThrow(t)))}else if(c.prefix){e.replaceWith(buildBindingExportAssignmentExpression(this.metadata,o,s.types.cloneNode(c),e.scope))}else{const a=r.generateDeclaredUidIdentifier(t);e.replaceWith(s.types.sequenceExpression([s.types.assignmentExpression("=",s.types.cloneNode(a),s.types.cloneNode(c)),buildBindingExportAssignmentExpression(this.metadata,o,s.types.identifier(t),e.scope),s.types.cloneNode(a)]))}}}o(e);e.skip()},AssignmentExpression:{exit(e){const{scope:r,seen:t,imported:a,exported:n,requeueInParent:o,buildImportReference:i}=this;if(t.has(e.node))return;t.add(e.node);const l=e.get("left");if(l.isMemberExpression())return;if(l.isIdentifier()){const t=l.node.name;if(r.getBinding(t)!==e.scope.getBinding(t)){return}const c=n.get(t);const d=a.get(t);if((c==null?void 0:c.length)>0||d){const r=e.node;if(d){r.left=i(d,l.node);r.right=s.types.sequenceExpression([r.right,buildImportThrow(t)])}const{operator:a}=r;let n;if(a==="="){n=r}else if(a==="&&="||a==="||="||a==="??="){n=s.types.assignmentExpression("=",r.left,s.types.logicalExpression(a.slice(0,-1),s.types.cloneNode(r.left),r.right))}else{n=s.types.assignmentExpression("=",r.left,s.types.binaryExpression(a.slice(0,-1),s.types.cloneNode(r.left),r.right))}e.replaceWith(buildBindingExportAssignmentExpression(this.metadata,c,n,e.scope));o(e);e.skip()}}else{const t=l.getOuterBindingIdentifiers();const i=Object.keys(t).filter((t=>r.getBinding(t)===e.scope.getBinding(t)));const c=i.find((e=>a.has(e)));if(c){e.node.right=s.types.sequenceExpression([e.node.right,buildImportThrow(c)])}const d=[];i.forEach((r=>{const t=n.get(r)||[];if(t.length>0){d.push(buildBindingExportAssignmentExpression(this.metadata,t,s.types.identifier(r),e.scope))}}));if(d.length>0){let r=s.types.sequenceExpression(d);if(e.parentPath.isExpressionStatement()){r=s.types.expressionStatement(r);r._blockHoist=e.parentPath.node._blockHoist}const t=e.insertAfter(r)[0];o(t)}}}},ForXStatement(e){const{scope:r,node:t}=e;const{left:a}=t;const{exported:n,imported:o,scope:i}=this;if(!s.types.isVariableDeclaration(a)){let t=false,l;const c=e.get("body").scope;for(const e of Object.keys(s.types.getOuterBindingIdentifiers(a))){if(i.getBinding(e)===r.getBinding(e)){if(n.has(e)){t=true;if(c.hasOwnBinding(e)){c.rename(e)}}if(o.has(e)&&!l){l=e}}}if(!t&&!l){return}e.ensureBlock();const d=e.get("body");const u=r.generateUidIdentifierBasedOnNode(a);e.get("left").replaceWith(s.types.variableDeclaration("let",[s.types.variableDeclarator(s.types.cloneNode(u))]));r.registerDeclaration(e.get("left"));if(t){d.unshiftContainer("body",s.types.expressionStatement(s.types.assignmentExpression("=",a,u)))}if(l){d.unshiftContainer("body",s.types.expressionStatement(buildImportThrow(l)))}}}}},6348:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=rewriteThis;var s=t(8304);var a=t(7369);let n;function rewriteThis(e){if(!n){n=a.visitors.environmentVisitor({ThisExpression(e){e.replaceWith(s.types.unaryExpression("void",s.types.numericLiteral(0),true))}});n.noScope=true}(0,a.default)(e.node,n)}},582:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=optimiseCallExpression;var s=t(8622);const{callExpression:a,identifier:n,isIdentifier:o,isSpreadElement:i,memberExpression:l,optionalCallExpression:c,optionalMemberExpression:d}=s;function optimiseCallExpression(e,r,t,s){if(t.length===1&&i(t[0])&&o(t[0].argument,{name:"arguments"})){if(s){return c(d(e,n("apply"),false,true),[r,t[0].argument],false)}return a(l(e,n("apply")),[r,t[0].argument])}else{if(s){return c(d(e,n("call"),false,true),[r,...t],false)}return a(l(e,n("call")),[r,...t])}}},6454:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.declare=declare;r.declarePreset=void 0;function declare(e){return(r,t,a)=>{var n;let o;for(const e of Object.keys(s)){var i;if(r[e])continue;o=(i=o)!=null?i:copyApiObject(r);o[e]=s[e](o)}return e((n=o)!=null?n:r,t||{},a)}}const t=declare;r.declarePreset=t;const s={assertVersion:e=>r=>{throwVersionError(r,e.version)},targets:()=>()=>({}),assumption:()=>()=>undefined};function copyApiObject(e){let r=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){r=Object.getPrototypeOf(e);if(r&&(!has(r,"version")||!has(r,"transform")||!has(r,"template")||!has(r,"types"))){r=null}}return Object.assign({},r,e)}function has(e,r){return Object.prototype.hasOwnProperty.call(e,r)}function throwVersionError(e,r){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const t=Error.stackTraceLimit;if(typeof t==="number"&&t<25){Error.stackTraceLimit=25}let s;if(r.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${r}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${r}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof t==="number"){Error.stackTraceLimit=t}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:r,range:e})}},8863:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.declare=declare;r.declarePreset=void 0;const t={assertVersion:e=>r=>{throwVersionError(r,e.version)}};{Object.assign(t,{targets:()=>()=>({}),assumption:()=>()=>undefined})}function declare(e){return(r,s,a)=>{var n;let o;for(const e of Object.keys(t)){var i;if(r[e])continue;(i=o)!=null?i:o=copyApiObject(r);o[e]=t[e](o)}return e((n=o)!=null?n:r,s||{},a)}}const s=r.declarePreset=declare;function copyApiObject(e){let r=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){r=Object.getPrototypeOf(e);if(r&&(!hasOwnProperty.call(r,"version")||!hasOwnProperty.call(r,"transform")||!hasOwnProperty.call(r,"template")||!hasOwnProperty.call(r,"types"))){r=null}}return Object.assign({},r,e)}function throwVersionError(e,r){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const t=Error.stackTraceLimit;if(typeof t==="number"&&t<25){Error.stackTraceLimit=25}let s;if(r.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${r}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${r}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof t==="number"){Error.stackTraceLimit=t}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:r,range:e})}},9045:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.declare=declare;r.declarePreset=void 0;const t={assertVersion:e=>r=>{throwVersionError(r,e.version)}};{Object.assign(t,{targets:()=>()=>({}),assumption:()=>()=>undefined,addExternalDependency:()=>()=>{}})}function declare(e){return(r,s,a)=>{var n;let o;for(const e of Object.keys(t)){var i;if(r[e])continue;(i=o)!=null?i:o=copyApiObject(r);o[e]=t[e](o)}return e((n=o)!=null?n:r,s||{},a)}}const s=r.declarePreset=declare;function copyApiObject(e){let r=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){r=Object.getPrototypeOf(e);if(r&&(!hasOwnProperty.call(r,"version")||!hasOwnProperty.call(r,"transform")||!hasOwnProperty.call(r,"template")||!hasOwnProperty.call(r,"types"))){r=null}}return Object.assign({},r,e)}function throwVersionError(e,r){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const t=Error.stackTraceLimit;if(typeof t==="number"&&t<25){Error.stackTraceLimit=25}let s;if(r.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${r}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${r}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof t==="number"){Error.stackTraceLimit=t}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:r,range:e})}},9255:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=_default;var s=t(6583);var a=t(344);var n=t(8304);var o=t(7369);const{callExpression:i,cloneNode:l,isIdentifier:c,isThisExpression:d,yieldExpression:u}=n.types;const p=o.visitors.environmentVisitor({ArrowFunctionExpression(e){e.skip()},AwaitExpression(e,{wrapAwait:r}){const t=e.get("argument");e.replaceWith(u(r?i(l(r),[t.node]):t.node))}});function _default(e,r,t,n){e.traverse(p,{wrapAwait:r.wrapAwait});const o=checkIsIIFE(e);e.node.async=false;e.node.generator=true;(0,s.default)(e,l(r.wrapAsync),t,n);const i=e.isObjectMethod()||e.isClassMethod()||e.parentPath.isObjectProperty()||e.parentPath.isClassProperty();if(!i&&!o&&e.isExpression()){(0,a.default)(e)}function checkIsIIFE(e){if(e.parentPath.isCallExpression({callee:e.node})){return true}const{parentPath:r}=e;if(r.isMemberExpression()&&c(r.node.property,{name:"bind"})){const{parentPath:e}=r;return e.isCallExpression()&&e.node.arguments.length===1&&d(e.node.arguments[0])&&e.parentPath.isCallExpression({callee:e.node})}return false}}},6721:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(3034);var a=t(582);var n=t(8304);var o=t(7369);const{assignmentExpression:i,callExpression:l,cloneNode:c,identifier:d,memberExpression:u,sequenceExpression:p,stringLiteral:f,thisExpression:y}=n.types;{r.environmentVisitor=o.visitors.environmentVisitor({});r.skipAllButComputedKey=function skipAllButComputedKey(e){e.skip();if(e.node.computed){e.context.maybeQueue(e.get("key"))}}}const g=o.visitors.environmentVisitor({Super(e,r){const{node:t,parentPath:s}=e;if(!s.isMemberExpression({object:t}))return;r.handle(s)}});const h=o.visitors.environmentVisitor({Scopable(e,{refName:r}){const t=e.scope.getOwnBinding(r);if(t&&t.identifier.name===r){e.scope.rename(r)}}});const b={memoise(e,r){const{scope:t,node:s}=e;const{computed:a,property:n}=s;if(!a){return}const o=t.maybeGenerateMemoised(n);if(!o){return}this.memoiser.set(n,o,r)},prop(e){const{computed:r,property:t}=e.node;if(this.memoiser.has(t)){return c(this.memoiser.get(t))}if(r){return c(t)}return f(t.name)},_getPrototypeOfExpression(){const e=c(this.getObjectRef());const r=this.isStatic||this.isPrivateMethod?e:u(e,d("prototype"));return l(this.file.addHelper("getPrototypeOf"),[r])},get(e){const r=c(this.getObjectRef());return l(this.file.addHelper("superPropGet"),[this.isDerivedConstructor?p([y(),r]):r,this.prop(e),y(),...this.isStatic||this.isPrivateMethod?[]:[n.types.numericLiteral(1)]])},_call(e,r,t){const s=c(this.getObjectRef());let a;if(r.length===1&&n.types.isSpreadElement(r[0])&&(n.types.isIdentifier(r[0].argument)||n.types.isArrayExpression(r[0].argument))){a=r[0].argument}else{a=n.types.arrayExpression(r)}const o=n.types.callExpression(this.file.addHelper("superPropGet"),[this.isDerivedConstructor?p([y(),s]):s,this.prop(e),y(),n.types.numericLiteral(2|(this.isStatic||this.isPrivateMethod?0:1))]);if(t){return n.types.optionalCallExpression(o,[a],true)}return l(o,[a])},set(e,r){const t=c(this.getObjectRef());return l(this.file.addHelper("superPropSet"),[this.isDerivedConstructor?p([y(),t]):t,this.prop(e),r,y(),n.types.numericLiteral(e.isInStrictMode()?1:0),...this.isStatic||this.isPrivateMethod?[]:[n.types.numericLiteral(1)]])},destructureSet(e){throw e.buildCodeFrameError(`Destructuring to a super field is not supported yet.`)},call(e,r){return this._call(e,r,false)},optionalCall(e,r){return this._call(e,r,true)},delete(e){if(e.node.computed){return p([l(this.file.addHelper("toPropertyKey"),[c(e.node.property)]),n.template.expression.ast` |