403 lines
1.5 MiB
JavaScript
403 lines
1.5 MiB
JavaScript
|
|
(()=>{var e={2569:(e,r,t)=>{"use strict";r.__esModule=true;r.presetEnvSilentDebugHeader=void 0;r.stringifyTargets=stringifyTargets;r.stringifyTargetsMultiline=stringifyTargetsMultiline;var s=t(8522);const a="#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets";r.presetEnvSilentDebugHeader=a;function stringifyTargetsMultiline(e){return JSON.stringify((0,s.prettifyTargets)(e),null,2)}function stringifyTargets(e){return JSON.stringify(e).replace(/,/g,", ").replace(/^\{"/,'{ "').replace(/"\}$/,'" }')}},6429:(e,r,t)=>{"use strict";r.__esModule=true;r["default"]=void 0;var s=_interopRequireWildcard(t(8304));function _getRequireWildcardCache(e){if(typeof WeakMap!=="function")return null;var r=new WeakMap;var t=new WeakMap;return(_getRequireWildcardCache=function(e){return e?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache(r);if(t&&t.has(e)){return t.get(e)}var s={};var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)){var o=a?Object.getOwnPropertyDescriptor(e,n):null;if(o&&(o.get||o.set)){Object.defineProperty(s,n,o)}else{s[n]=e[n]}}}s.default=e;if(t){t.set(e,s)}return s}const{types:a}=s.default||s;class ImportsCache{constructor(e){this._imports=new WeakMap;this._anonymousImports=new WeakMap;this._lastImports=new WeakMap;this._resolver=e}storeAnonymous(e,r,t){const s=this._normalizeKey(e,r);const n=this._ensure(this._anonymousImports,e,Set);if(n.has(s))return;const o=t(e.node.sourceType==="script",a.stringLiteral(this._resolver(r)));n.add(s);this._injectImport(e,o)}storeNamed(e,r,t,s){const n=this._normalizeKey(e,r,t);const o=this._ensure(this._imports,e,Map);if(!o.has(n)){const{node:i,name:l}=s(e.node.sourceType==="script",a.stringLiteral(this._resolver(r)),a.identifier(t));o.set(n,l);this._injectImport(e,i)}return a.identifier(o.get(n))}_injectImport(e,r){const t=this._lastImports.get(e);let s;if(t&&t.node&&t.parent===e.node&&t.container===e.node.body){s=t.insertAfter(r)}else{s=e.unshiftContainer("body",r)}const a=s[s.length-1];this._lastImports.set(e,a)}_ensure(e,r,t){let s=e.get(r);if(!s){s=new t;e.set(r,s)}return s}_normalizeKey(e,r,t=""){const{sourceType:s}=e.node;return`${t&&s}::${r}::${t}`}}r["default"]=ImportsCache},4992:(e,r,t)=>{"use strict";r.__esModule=true;r["default"]=definePolyfillProvider;var s=t(4091);var a=_interopRequireWildcard(t(8522));var n=t(3970);var o=_interopRequireDefault(t(6429));var i=t(2569);var l=t(9667);var c=_interopRequireWildcard(t(264));var d=_interopRequireWildcard(t(9275));var u=_interopRequireDefault(t(8926));const p=["method","targets","ignoreBrowserslistConfig","configPath","debug","shouldInjectPolyfill","absoluteImports"];function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(e){if(typeof WeakMap!=="function")return null;var r=new WeakMap;var t=new WeakMap;return(_getRequireWildcardCache=function(e){return e?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache(r);if(t&&t.has(e)){return t.get(e)}var s={};var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e){if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)){var o=a?Object.getOwnPropertyDescriptor(e,n):null;if(o&&(o.get||o.set)){Object.defineProperty(s,n,o)}else{s[n]=e[n]}}}s.default=e;if(t){t.set(e,s)}return s}function _objectWithoutPropertiesLoose(e,r){if(e==null)return{};var t={};var s=Object.keys(e);var a,n;for(n=0;n<s.length;n++){a=s[n];if(r.indexOf(a)>=0)continue;t[a]=e[a]}return t}const f=a.default.default||a.default;function resolveOptions(e,r){const{method:t,targets:s,ignoreBrowserslistConfig:a,configPath:n,debug:o,shouldInjectPolyfill:i,absoluteImports:l}=e,c=_objectWithoutPropertiesLoose(e,p);if(isEmpty(e)){throw new Error(`This plugin requires options, for example:\n
|
|||
|
|
var ${i} = require(${r}).${s}
|
|||
|
|
`):a.importDeclaration([a.importSpecifier(i,s)],r),name:i.name}}))},injectDefaultImport(r,s=r){return e.storeNamed(t,r,"default",((e,r)=>{const o=t.scope.generateUidIdentifier(s);return{node:e?hoist(n.statement.ast`var ${o} = require(${r})`):a.importDeclaration([a.importDefaultSpecifier(o)],r),name:o.name}}))}}}}},1919:(e,r,t)=>{"use strict";r.__esModule=true;r["default"]=void 0;var s=t(3970);var _default=e=>({ImportDeclaration(r){const t=(0,s.getImportSource)(r);if(!t)return;e({kind:"import",source:t},r)},Program(r){r.get("body").forEach((r=>{const t=(0,s.getRequireSource)(r);if(!t)return;e({kind:"import",source:t},r)}))}});r["default"]=_default},264:(e,r,t)=>{"use strict";r.__esModule=true;r.usage=r.entry=void 0;var s=_interopRequireDefault(t(8850));r.usage=s.default;var a=_interopRequireDefault(t(1919));r.entry=a.default;function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},8850:(e,r,t)=>{"use strict";r.__esModule=true;r["default"]=void 0;var s=t(3970);var _default=e=>{function property(r,t,s,a){return e({kind:"property",object:r,key:t,placement:s},a)}return{ReferencedIdentifier(r){const{node:{name:t},scope:s}=r;if(s.getBindingIdentifier(t))return;e({kind:"global",name:t},r)},MemberExpression(e){const r=(0,s.resolveKey)(e.get("property"),e.node.computed);if(!r||r==="prototype")return;const t=e.get("object");if(t.isIdentifier()){const e=t.scope.getBinding(t.node.name);if(e&&e.path.isImportNamespaceSpecifier())return}const a=(0,s.resolveSource)(t);return property(a.id,r,a.placement,e)},ObjectPattern(e){const{parentPath:r,parent:t}=e;let a;if(r.isVariableDeclarator()){a=r.get("init")}else if(r.isAssignmentExpression()){a=r.get("right")}else if(r.isFunction()){const s=r.parentPath;if(s.isCallExpression()||s.isNewExpression()){if(s.node.callee===t){a=s.get("arguments")[e.key]}}}let n=null;let o=null;if(a)({id:n,placement:o}=(0,s.resolveSource)(a));for(const r of e.get("properties")){if(r.isObjectProperty()){const e=(0,s.resolveKey)(r.get("key"));if(e)property(n,e,o,r)}}},BinaryExpression(r){if(r.node.operator!=="in")return;const t=(0,s.resolveSource)(r.get("right"));const a=(0,s.resolveKey)(r.get("left"),true);if(!a)return;e({kind:"in",object:t.id,key:a,placement:t.placement},r)}}};r["default"]=_default},3975:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-async-generators",manipulateOptions(e,r){r.plugins.push("asyncGenerators")}}}));r["default"]=a},799:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(6454);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-bigint",manipulateOptions(e,r){r.plugins.push("bigInt")}}}));r["default"]=a},3412:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-class-properties",manipulateOptions(e,r){r.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}}}));r["default"]=a},5491:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-class-static-block",manipulateOptions(e,r){r.plugins.push("classStaticBlock")}}}));r["default"]=a},7802:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(8863);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-dynamic-import",manipulateOptions(e,r){r.plugins.push("dynamicImport")}}}));r["default"]=a},301:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-export-namespace-from",manipulateOptions(e,r){r.plugins.push("exportNamespaceFrom")}}}));r["default"]=a},8845:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=(0,s.declare)((e=>{e.asser
|
|||
|
|
/*!
|
|||
|
|
* regjsgen 0.5.2
|
|||
|
|
* Copyright 2014-2020 Benjamin Tan <https://ofcr.se/>
|
|||
|
|
* Available under the MIT license <https://github.com/bnjmnt4n/regjsgen/blob/master/LICENSE-MIT.txt>
|
|||
|
|
*/(function(){"use strict";var t={function:true,object:true};var s=t[typeof window]&&window||this;var a=t[typeof r]&&r&&!r.nodeType&&r;var n=t["object"]&&e&&!e.nodeType;var o=a&&n&&typeof global=="object"&&global;if(o&&(o.global===o||o.window===o||o.self===o)){s=o}var i=Object.prototype.hasOwnProperty;function fromCodePoint(){var e=Number(arguments[0]);if(!isFinite(e)||e<0||e>1114111||Math.floor(e)!=e){throw RangeError("Invalid code point: "+e)}if(e<=65535){return String.fromCharCode(e)}else{e-=65536;var r=(e>>10)+55296;var t=e%1024+56320;return String.fromCharCode(r,t)}}var l={};function assertType(e,r){if(r.indexOf("|")==-1){if(e==r){return}throw Error("Invalid node type: "+e+"; expected type: "+r)}r=i.call(l,r)?l[r]:l[r]=RegExp("^(?:"+r+")$");if(r.test(e)){return}throw Error("Invalid node type: "+e+"; expected types: "+r)}function generate(e){var r=e.type;if(i.call(d,r)){return d[r](e)}throw Error("Invalid node type: "+r)}function generateSequence(e,r,t){var s=-1,a=r.length,n="",o;while(++s<a){o=r[s];if(t&&s>0)n+=t;if(s+1<a&&r[s].type=="value"&&r[s].kind=="null"&&r[s+1].type=="value"&&r[s+1].kind=="symbol"&&r[s+1].codePoint>=48&&r[s+1].codePoint<=57){n+="\\000";continue}n+=e(o)}return n}function generateAlternative(e){assertType(e.type,"alternative");return generateSequence(generateTerm,e.body)}function generateAnchor(e){assertType(e.type,"anchor");switch(e.kind){case"start":return"^";case"end":return"$";case"boundary":return"\\b";case"not-boundary":return"\\B";default:throw Error("Invalid assertion")}}var c="anchor|characterClass|characterClassEscape|dot|group|reference|unicodePropertyEscape|value";function generateAtom(e){assertType(e.type,c);return generate(e)}function generateCharacterClass(e){assertType(e.type,"characterClass");var r=e.kind;var t=r==="intersection"?"&&":r==="subtraction"?"--":"";return"["+(e.negative?"^":"")+generateSequence(generateClassAtom,e.body,t)+"]"}function generateCharacterClassEscape(e){assertType(e.type,"characterClassEscape");return"\\"+e.value}function generateCharacterClassRange(e){assertType(e.type,"characterClassRange");var r=e.min,t=e.max;if(r.type=="characterClassRange"||t.type=="characterClassRange"){throw Error("Invalid character class range")}return generateClassAtom(r)+"-"+generateClassAtom(t)}function generateClassAtom(e){assertType(e.type,"anchor|characterClass|characterClassEscape|characterClassRange|dot|value|unicodePropertyEscape|classStrings");return generate(e)}function generateClassStrings(e){assertType(e.type,"classStrings");return"\\q{"+generateSequence(generateClassString,e.strings,"|")+"}"}function generateClassString(e){assertType(e.type,"classString");return generateSequence(generate,e.characters)}function generateDisjunction(e){assertType(e.type,"disjunction");return generateSequence(generate,e.body,"|")}function generateDot(e){assertType(e.type,"dot");return"."}function generateGroup(e){assertType(e.type,"group");var r="";switch(e.behavior){case"normal":if(e.name){r+="?<"+generateIdentifier(e.name)+">"}break;case"ignore":if(e.modifierFlags){r+="?";if(e.modifierFlags.enabling)r+=e.modifierFlags.enabling;if(e.modifierFlags.disabling)r+="-"+e.modifierFlags.disabling;r+=":"}else{r+="?:"}break;case"lookahead":r+="?=";break;case"negativeLookahead":r+="?!";break;case"lookbehind":r+="?<=";break;case"negativeLookbehind":r+="?<!";break;default:throw Error("Invalid behaviour: "+e.behaviour)}r+=generateSequence(generate,e.body);return"("+r+")"}function generateIdentifier(e){assertType(e.type,"identifier");return e.value}function generateQuantifier(e){assertType(e.type,"quantifier");var r="",t=e.min,s=e.max;if(s==null){if(t==0){r="*"}else if(t==1){r="+"}else{r="{"+t+",}"}}else if(t==s){r="{"+t+"}"}else if(t==0&&s==1){r="?"}else{r="{"+t+","+s+"}"}if(!e.greedy){r+="?"}return generateAtom(e.body[0])+r}function generateReference(e){assertType(e.type,"reference");if(e.matchIndex){return"\\"+e.matchIndex}if(e.name){return"\\k<"+generateIdentifier(e.name)+">"}throw new Error("Unknown reference type")}function generateTerm(e){assertType(e.type,c+"|empty|quantifier");return gene
|
|||
|
|
/**
|
|||
|
|
* @license
|
|||
|
|
* Lodash <https://lodash.com/>
|
|||
|
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|||
|
|
* Released under MIT license <https://lodash.com/license>
|
|||
|
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|||
|
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|||
|
|
*/(function(){var t;var s="4.17.21";var a=200;var n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",i="Invalid `variable` option passed into `_.template`";var l="__lodash_hash_undefined__";var c=500;var d="__lodash_placeholder__";var u=1,p=2,f=4;var y=1,g=2;var h=1,b=2,x=4,v=8,j=16,w=32,E=64,_=128,S=256,k=512;var C=30,P="...";var D=800,I=16;var O=1,A=2,R=3;var M=1/0,F=9007199254740991,N=17976931348623157e292,B=0/0;var L=4294967295,W=L-1,U=L>>>1;var q=[["ary",_],["bind",h],["bindKey",b],["curry",v],["curryRight",j],["flip",k],["partial",w],["partialRight",E],["rearg",S]];var V="[object Arguments]",$="[object Array]",G="[object AsyncFunction]",H="[object Boolean]",z="[object Date]",K="[object DOMException]",Y="[object Error]",X="[object Function]",J="[object GeneratorFunction]",Z="[object Map]",Q="[object Number]",ee="[object Null]",re="[object Object]",te="[object Promise]",se="[object Proxy]",ae="[object RegExp]",ne="[object Set]",oe="[object String]",ie="[object Symbol]",le="[object Undefined]",ce="[object WeakMap]",de="[object WeakSet]";var ue="[object ArrayBuffer]",pe="[object DataView]",fe="[object Float32Array]",ye="[object Float64Array]",me="[object Int8Array]",ge="[object Int16Array]",he="[object Int32Array]",be="[object Uint8Array]",xe="[object Uint8ClampedArray]",ve="[object Uint16Array]",je="[object Uint32Array]";var we=/\b__p \+= '';/g,Ee=/\b(__p \+=) '' \+/g,_e=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var Se=/&(?:amp|lt|gt|quot|#39);/g,ke=/[&<>"']/g,Ce=RegExp(Se.source),Pe=RegExp(ke.source);var De=/<%-([\s\S]+?)%>/g,Ie=/<%([\s\S]+?)%>/g,Oe=/<%=([\s\S]+?)%>/g;var Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Re=/^\w*$/,Te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var Me=/[\\^$.*+?()[\]{}|]/g,Fe=RegExp(Me.source);var Ne=/^\s+/;var Be=/\s/;var Le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,We=/\{\n\/\* \[wrapped with (.+)\] \*/,Ue=/,? & /;var qe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Ve=/[()=,{}\[\]\/\s]/;var $e=/\\(\\)?/g;var Ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var He=/\w*$/;var ze=/^[-+]0x[0-9a-f]+$/i;var Ke=/^0b[01]+$/i;var Ye=/^\[object .+?Constructor\]$/;var Xe=/^0o[0-7]+$/i;var Je=/^(?:0|[1-9]\d*)$/;var Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;var Qe=/($^)/;var er=/['\n\r\u2028\u2029\\]/g;var rr="\\ud800-\\udfff",tr="\\u0300-\\u036f",sr="\\ufe20-\\ufe2f",ar="\\u20d0-\\u20ff",nr=tr+sr+ar,or="\\u2700-\\u27bf",ir="a-z\\xdf-\\xf6\\xf8-\\xff",lr="\\xac\\xb1\\xd7\\xf7",cr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",dr="\\u2000-\\u206f",ur=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pr="A-Z\\xc0-\\xd6\\xd8-\\xde",fr="\\ufe0e\\ufe0f",yr=lr+cr+dr+ur;var mr="['’]",gr="["+rr+"]",hr="["+yr+"]",br="["+nr+"]",xr="\\d+",vr="["+or+"]",jr="["+ir+"]",wr="[^"+rr+yr+xr+or+ir+pr+"]",Er="\\ud83c[\\udffb-\\udfff]",_r="(?:"+br+"|"+Er+")",Sr="[^"+rr+"]",kr="(?:\\ud83c[\\udde6-\\uddff]){2}",Cr="[\\ud800-\\udbff][\\udc00-\\udfff]",Pr="["+pr+"]",Dr="\\u200d";var Ir="(?:"+jr+"|"+wr+")",Or="(?:"+Pr+"|"+wr+")",Ar="(?:"+mr+"(?:d|ll|m|re|s|t|ve))?",Rr="(?:"+mr+"(?:D|LL|M|RE|S|T|VE))?",Tr=_r+"?",Mr="["+fr+"]?",Fr="(?:"+Dr+"(?:"+[Sr,kr,Cr].join("|")+")"+Mr+Tr+")*",Nr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Br="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Lr=Mr+Tr+Fr,Wr="(?:"+[vr,kr,Cr].join("|")+")"+Lr,Ur="(?:"+[Sr+br+"?",br,kr,Cr,gr].join("|")+")";var qr=RegExp(mr,"g");var Vr=RegExp(br,"g");var $r=RegExp(Er+"(?="+Er+")|"+Ur+Lr,"g");var Gr=RegExp([Pr+"?"+jr+"+"+Ar+"(?="+[hr,Pr,"$"].join("|")+")",Or+"+"+Rr+"(?="+[hr,Pr+Ir,"$"].join("|")+")",Pr+"?"+Ir+"+"+Ar,Pr+"+"+Rr,Br,Nr,xr,Wr].join("|"),"g");var Hr=RegExp("["+Dr+rr+nr+fr+"]");var zr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Kr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbo
|
|||
|
|
/*! https://mths.be/regenerate v1.4.2 by @mathias | MIT license */(function(t){var s=true&&r;var a=true&&e&&e.exports==s&&e;var n=typeof global=="object"&&global;if(n.global===n||n.window===n){t=n}var o={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var i=55296;var l=56319;var c=56320;var d=57343;var u=/\\x00([^0123456789]|$)/g;var p={};var f=p.hasOwnProperty;var extend=function(e,r){var t;for(t in r){if(f.call(r,t)){e[t]=r[t]}}return e};var forEach=function(e,r){var t=-1;var s=e.length;while(++t<s){r(e[t],t)}};var y=p.toString;var isArray=function(e){return y.call(e)=="[object Array]"};var isNumber=function(e){return typeof e=="number"||y.call(e)=="[object Number]"};var g="0000";var pad=function(e,r){var t=String(e);return t.length<r?(g+t).slice(-r):t};var hex=function(e){return Number(e).toString(16).toUpperCase()};var h=[].slice;var dataFromCodePoints=function(e){var r=-1;var t=e.length;var s=t-1;var a=[];var n=true;var o;var i=0;while(++r<t){o=e[r];if(n){a.push(o);i=o;n=false}else{if(o==i+1){if(r!=s){i=o;continue}else{n=true;a.push(o+1)}}else{a.push(i+1,o);i=o}}}if(!n){a.push(o+1)}return a};var dataRemove=function(e,r){var t=0;var s;var a;var n=e.length;while(t<n){s=e[t];a=e[t+1];if(r>=s&&r<a){if(r==s){if(a==s+1){e.splice(t,2);return e}else{e[t]=r+1;return e}}else if(r==a-1){e[t+1]=r;return e}else{e.splice(t,2,s,r,r+1,a);return e}}t+=2}return e};var dataRemoveRange=function(e,r,t){if(t<r){throw Error(o.rangeOrder)}var s=0;var a;var n;while(s<e.length){a=e[s];n=e[s+1]-1;if(a>t){return e}if(r<=a&&t>=n){e.splice(s,2);continue}if(r>=a&&t<n){if(r==a){e[s]=t+1;e[s+1]=n+1;return e}e.splice(s,2,a,r,t+1,n+1);return e}if(r>=a&&r<=n){e[s+1]=r}else if(t>=a&&t<=n){e[s]=t+1;return e}s+=2}return e};var dataAdd=function(e,r){var t=0;var s;var a;var n=null;var i=e.length;if(r<0||r>1114111){throw RangeError(o.codePointRange)}while(t<i){s=e[t];a=e[t+1];if(r>=s&&r<a){return e}if(r==s-1){e[t]=r;return e}if(s>r){e.splice(n!=null?n+2:0,0,r,r+1);return e}if(r==a){if(r+1==e[t+2]){e.splice(t,4,s,e[t+3]);return e}e[t+1]=r+1;return e}n=t;t+=2}e.push(r,r+1);return e};var dataAddData=function(e,r){var t=0;var s;var a;var n=e.slice();var o=r.length;while(t<o){s=r[t];a=r[t+1]-1;if(s==a){n=dataAdd(n,s)}else{n=dataAddRange(n,s,a)}t+=2}return n};var dataRemoveData=function(e,r){var t=0;var s;var a;var n=e.slice();var o=r.length;while(t<o){s=r[t];a=r[t+1]-1;if(s==a){n=dataRemove(n,s)}else{n=dataRemoveRange(n,s,a)}t+=2}return n};var dataAddRange=function(e,r,t){if(t<r){throw Error(o.rangeOrder)}if(r<0||r>1114111||t<0||t>1114111){throw RangeError(o.codePointRange)}var s=0;var a;var n;var i=false;var l=e.length;while(s<l){a=e[s];n=e[s+1];if(i){if(a==t+1){e.splice(s-1,2);return e}if(a>t){return e}if(a>=r&&a<=t){if(n>r&&n-1<=t){e.splice(s,2);s-=2}else{e.splice(s-1,2);s-=2}}}else if(a==t+1||a==t){e[s]=r;return e}else if(a>t){e.splice(s,0,r,t+1);return e}else if(r>=a&&r<n&&t+1<=n){return e}else if(r>=a&&r<n||n==r){e[s+1]=t+1;i=true}else if(r<=a&&t+1>=n){e[s]=r;e[s+1]=t+1;i=true}s+=2}if(!i){e.push(r,t+1)}return e};var dataContains=function(e,r){var t=0;var s=e.length;var a=e[t];var n=e[s-1];if(s>=2){if(r<a||r>n){return false}}while(t<s){a=e[t];n=e[t+1];if(r>=a&&r<n){return true}t+=2}return false};var dataIntersection=function(e,r){var t=0;var s=r.length;var a;var n=[];while(t<s){a=r[t];if(dataContains(e,a)){n.push(a)}++t}return dataFromCodePoints(n)};var dataIsEmpty=function(e){return!e.length};var dataIsSingleton=function(e){return e.length==2&&e[0]+1==e[1]};var dataToArray=function(e){var r=0;var t;var s;var a=[];var n=e.length;while(r<n){t=e[r];s=e[r+1];while(t<s){a.push(t);++t}r+=2}return a};var b=Math.floor;var highSurrogate=function(e){return parseInt(b((e-65536)/1024)+i,10)};var lowSurrogate=function(e){return parseInt((e-65536)%1024+c,10)};var x=String.fromCharCode;var codePointToString=function(e){var r;if(e==9){r="\\t"}else if(e==10){r="\\n"}else if(e==12){r="\\f"}else if(e==13){r="\\r"}else if(e==45){r="\\x2D"}e
|
|||
|
|
${addDecorateHelper(a)}(
|
|||
|
|
${p||s.types.nullLiteral()},
|
|||
|
|
function (${i}, ${d?s.types.cloneNode(u):null}) {
|
|||
|
|
${n}
|
|||
|
|
return { F: ${s.types.cloneNode(n.id)}, d: ${f} };
|
|||
|
|
},
|
|||
|
|
${d}
|
|||
|
|
)
|
|||
|
|
`;if(!c){y.arguments[1].body.directives.push(s.types.directive(s.types.directiveLiteral("use strict")))}let g=y;let h="arguments.1.body.body.0";if(l){g=s.template.statement.ast`let ${e} = ${y}`;h="declarations.0.init."+h}return{instanceNodes:[s.template.statement.ast`${s.types.cloneNode(i)}(this)`],wrapClass(e){e.replaceWith(g);return e.get(h)}}}},5929:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.FEATURES=void 0;r.enableFeature=enableFeature;r.isLoose=isLoose;r.shouldTransform=shouldTransform;var s=t(327);const a=Object.freeze({fields:1<<1,privateMethods:1<<2,decorators:1<<3,privateIn:1<<4,staticBlocks:1<<5});r.FEATURES=a;const n=new Map([[a.fields,"@babel/plugin-transform-class-properties"],[a.privateMethods,"@babel/plugin-transform-private-methods"],[a.privateIn,"@babel/plugin-transform-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,r,t){if(!hasFeature(e,r)||canIgnoreLoose(e,r)){e.set(o,e.get(o)|r);if(t==="#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"){setLoose(e,r,true);e.set(l,e.get(l)|r)}else if(t==="#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"){setLoose(e,r,false);e.set(l,e.get(l)|r)}else{setLoose(e,r,t)}}let s;let a;for(const[r,t]of n){if(!hasFeature(e,r))continue;const n=isLoose(e,r);if(canIgnoreLoose(e,r)){continue}else if(s===!n){throw new Error("'loose' mode configuration must be the same for @babel/plugin-transform-class-properties, "+"@babel/plugin-transform-private-methods and "+"@babel/plugin-transform-private-property-in-object (when they are enabled).")}else{s=n;a=t}}if(s!==undefined){for(const[r,t]of n){if(hasFeature(e,r)&&isLoose(e,r)!==s){setLoose(e,r,s);console.warn(`Though the "loose" option was set to "${!s}" in your @babel/preset-env `+`config, it will not be used for ${t} since the "loose" mode option was set to `+`"${s}" for ${a}.\nThe "loose" option must be the `+`same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods `+`and @babel/plugin-transform-private-property-in-object (when they are enabled): you can `+`silence this warning by explicitly adding\n`+`\t["${t}", { "loose": ${s} }]\n`+`to the "plugins" section of your Babel config.`)}}}}function hasFeature(e,r){return!!(e.get(o)&r)}function isLoose(e,r){return!!(e.get(i)&r)}function setLoose(e,r,t){if(t)e.set(i,e.get(i)|r);else e.set(i,e.get(i)&~r);e.set(l,e.get(l)&~r)}function canIgnoreLoose(e,r){return!!(e.get(l)&r)}function shouldTransform(e,r){let t=null;let n=null;let o=null;let i=null;let l=null;if((0,s.hasOwnDecorators)(e.node)){t=e.get("decorators.0")}for(const r of e.get("body.body")){if(!t&&(0,s.hasOwnDecorators)(r.node)){t=r.get("decorators.0")}if(!n&&r.isClassProperty()){n=r}if(!o&&r.isClassPrivateProperty()){o=r}if(!i&&r.isClassPrivateMethod!=null&&r.isClassPrivateMethod()){i=r}if(!l&&r.isStaticBlock!=null&&r.isStaticBlock()){l=r}}if(t&&o){throw o.buildCodeFrameError("Private fields in decorated classes are not supported yet.")}if(t&&i){throw i.buildCodeFrameError("Private methods in decorated classes are not supported yet.")}if(t&&!hasFeature(r,a.decorators)){throw e.buildCodeFrameError("Decorators are not enabled."+"\nIf you are using "+'["@babel/plugin-proposal-decorators", { "version": "legacy" }], '+'make sure it comes *before* "@babel/plugin-transform-class-properties" '+"and enable loose mode, like so:\n"+'\t["@babel/plugin-proposal-decorators", { "version": "legacy" }]\n'+'\t["@babel/plugin-transform-class-properties", { "loose": true }]')}if(i&&!hasFeature(r,a.privateMethods)){throw i.buildCodeFrameError("Class private methods are not enabled. "+"Please add `@babel/plugin-transform-private-methods` to your configuration.")}if((n||o)&&!hasFeature(r,a.fields)&&!hasFeature(r,a.privateMethods)){throw e.buildCodeFrameError("Class fields are
|
|||
|
|
Object.prototype.hasOwnProperty.call(${buildCheckInRHS(n,r)}, ${s.types.cloneNode(t)})
|
|||
|
|
`);return}const{id:d,static:u}=i.get(c);if(u){e.replaceWith(s.template.expression.ast`${buildCheckInRHS(n,r)} === ${s.types.cloneNode(this.classRef)}`);return}e.replaceWith(s.template.expression.ast`${s.types.cloneNode(d)}.has(${buildCheckInRHS(n,r)})`)}});const f={memoise(e,r){const{scope:t}=e;const{object:s}=e.node;const a=t.maybeGenerateMemoised(s);if(!a){return}this.memoiser.set(s,a,r)},receiver(e){const{object:r}=e.node;if(this.memoiser.has(r)){return s.types.cloneNode(this.memoiser.get(r))}return s.types.cloneNode(r)},get(e){const{classRef:r,privateNamesMap:t,file:a,innerBinding:n}=this;const{name:o}=e.node.property.id;const{id:i,static:l,method:c,methodId:d,getId:u,setId:p}=t.get(o);const f=u||p;if(l){const t=c&&!f?"classStaticPrivateMethodGet":"classStaticPrivateFieldSpecGet";unshadow(r.name,e.scope,n);return s.types.callExpression(a.addHelper(t),[this.receiver(e),s.types.cloneNode(r),s.types.cloneNode(i)])}if(c){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(`#${o}`)])])}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(i)])}return s.types.callExpression(a.addHelper("classPrivateMethodGet"),[this.receiver(e),s.types.cloneNode(i),s.types.cloneNode(d)])}return s.types.callExpression(a.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(i)])},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,r){const{classRef:t,privateNamesMap:a,file:n}=this;const{name:o}=e.node.property.id;const{id:i,static:l,method:c,setId:d,getId:u}=a.get(o);const p=u||d;if(l){const a=c&&!p?"classStaticPrivateMethodSet":"classStaticPrivateFieldSpecSet";return s.types.callExpression(n.addHelper(a),[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(i),r])}if(c){if(d){return s.types.callExpression(n.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(i),r])}return s.types.sequenceExpression([this.receiver(e),r,s.types.callExpression(n.addHelper("readOnlyError"),[s.types.stringLiteral(`#${o}`)])])}return s.types.callExpression(n.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(i),r])},destructureSet(e){const{classRef:r,privateNamesMap:t,file:a}=this;const{name:n}=e.node.property.id;const{id:o,static:i}=t.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(r),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,r){this.memoise(e,1);return(0,i.default)(this.get(e),this.receiver(e),r,false)},optionalCall(e,r){this.memoise(e,1);return(0,i.default)(this.get(e),this.receiver(e),r,true)},delete(){throw new Error("Internal Babel error: deleting private elements is a parsing error.")}};const y={get(e){const{privateNamesMap:r,file:t}=this;const{object:a}=e.node;const{name:n}=e.node.property.id;return s.template.expression`BASE(REF, PROP)[PROP]`({BASE:t.addHelper("classPrivateFieldLooseBase"),REF:s.types.cloneNode(a),PROP:s.types.cloneNode(r.get(n).id)})},set(){throw new Error("private name handler with loose = true don't need set()")},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,r){return s.types.callExpression(this.get(e),r)},optionalCall(e,r){return s.types.optionalCallExpression(this.get(e),r,true)},delete(){
|
|||
|
|
Object.defineProperty(${e}, ${s.types.cloneNode(a)}, {
|
|||
|
|
// configurable is false by default
|
|||
|
|
// enumerable is false by default
|
|||
|
|
writable: true,
|
|||
|
|
value: ${n}
|
|||
|
|
});
|
|||
|
|
`,r)}function buildPrivateInstanceFieldInitSpec(e,r,t,a){const{id:n}=t.get(r.node.key.id.name);const o=r.node.value||r.scope.buildUndefinedNode();{if(!a.availableHelper("classPrivateFieldInitSpec")){return inheritPropComments(s.template.statement.ast`${s.types.cloneNode(n)}.set(${e}, {
|
|||
|
|
// configurable is always false for private elements
|
|||
|
|
// enumerable is always false for private elements
|
|||
|
|
writable: true,
|
|||
|
|
value: ${o},
|
|||
|
|
})`,r)}}const i=a.addHelper("classPrivateFieldInitSpec");return inheritPropComments(s.template.statement.ast`${i}(
|
|||
|
|
${s.types.thisExpression()},
|
|||
|
|
${s.types.cloneNode(n)},
|
|||
|
|
{
|
|||
|
|
writable: true,
|
|||
|
|
value: ${o}
|
|||
|
|
},
|
|||
|
|
)`,r)}function buildPrivateStaticFieldInitSpec(e,r){const t=r.get(e.node.key.id.name);const{id:a,getId:n,setId:o,initAdded:i}=t;const l=n||o;if(!e.isProperty()&&(i||!l))return;if(l){r.set(e.node.key.id.name,Object.assign({},t,{initAdded:true}));return inheritPropComments(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: ${n?n.name:e.scope.buildUndefinedNode()},
|
|||
|
|
set: ${o?o.name:e.scope.buildUndefinedNode()}
|
|||
|
|
}
|
|||
|
|
`,e)}const c=e.node.value||e.scope.buildUndefinedNode();return inheritPropComments(s.template.statement.ast`
|
|||
|
|
var ${s.types.cloneNode(a)} = {
|
|||
|
|
// configurable is false by default
|
|||
|
|
// enumerable is false by default
|
|||
|
|
writable: true,
|
|||
|
|
value: ${c}
|
|||
|
|
};
|
|||
|
|
`,e)}function buildPrivateMethodInitLoose(e,r,t){const a=t.get(r.node.key.id.name);const{methodId:n,id:o,getId:i,setId:l,initAdded:c}=a;if(c)return;if(n){return inheritPropComments(s.template.statement.ast`
|
|||
|
|
Object.defineProperty(${e}, ${o}, {
|
|||
|
|
// configurable is false by default
|
|||
|
|
// enumerable is false by default
|
|||
|
|
// writable is false by default
|
|||
|
|
value: ${n.name}
|
|||
|
|
});
|
|||
|
|
`,r)}const d=i||l;if(d){t.set(r.node.key.id.name,Object.assign({},a,{initAdded:true}));return inheritPropComments(s.template.statement.ast`
|
|||
|
|
Object.defineProperty(${e}, ${o}, {
|
|||
|
|
// configurable is false by default
|
|||
|
|
// enumerable is false by default
|
|||
|
|
// writable is false by default
|
|||
|
|
get: ${i?i.name:r.scope.buildUndefinedNode()},
|
|||
|
|
set: ${l?l.name:r.scope.buildUndefinedNode()}
|
|||
|
|
});
|
|||
|
|
`,r)}}function buildPrivateInstanceMethodInitSpec(e,r,t,s){const a=t.get(r.node.key.id.name);const{getId:n,setId:o,initAdded:i}=a;if(i)return;const l=n||o;if(l){return buildPrivateAccessorInitialization(e,r,t,s)}return buildPrivateInstanceMethodInitialization(e,r,t,s)}function buildPrivateAccessorInitialization(e,r,t,a){const n=t.get(r.node.key.id.name);const{id:o,getId:i,setId:l}=n;t.set(r.node.key.id.name,Object.assign({},n,{initAdded:true}));{if(!a.availableHelper("classPrivateFieldInitSpec")){return inheritPropComments(s.template.statement.ast`
|
|||
|
|
${o}.set(${e}, {
|
|||
|
|
get: ${i?i.name:r.scope.buildUndefinedNode()},
|
|||
|
|
set: ${l?l.name:r.scope.buildUndefinedNode()}
|
|||
|
|
});
|
|||
|
|
`,r)}}const c=a.addHelper("classPrivateFieldInitSpec");return inheritPropComments(s.template.statement.ast`${c}(
|
|||
|
|
${s.types.thisExpression()},
|
|||
|
|
${s.types.cloneNode(o)},
|
|||
|
|
{
|
|||
|
|
get: ${i?i.name:r.scope.buildUndefinedNode()},
|
|||
|
|
set: ${l?l.name:r.scope.buildUndefinedNode()}
|
|||
|
|
},
|
|||
|
|
)`,r)}function buildPrivateInstanceMethodInitialization(e,r,t,a){const n=t.get(r.node.key.id.name);const{id:o}=n;{if(!a.availableHelper("classPrivateMethodInitSpec")){return inheritPropComments(s.template.statement.ast`${o}.add(${e})`,r)}}const i=a.addHelper("classPrivateMethodInitSpec");return inheritPropComments(s.template.statement.ast`${i}(
|
|||
|
|
${s.types.thisExpression()},
|
|||
|
|
${s.types.cloneNode(o)}
|
|||
|
|
)`,r)}function buildPublicFieldInitLoose(e,r){const{key:t,computed:a}=r.node;const n=r.node.value||r.scope.buildUndefinedNode();return inheritPropComments(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.memberExpression(e,t,a||s.types.isLiteral(t)),n)),r)}function buildPublicFieldInitSpec(e,r,t){const{key:a,computed:n}=r.node;const o=r.node.value||r.scope.buildUndefinedNode();return inheritPropComments(s.types.expressionStatement(s.types.callExpression(t.addHelper("defineProperty"),[e,n||s.types.isLiteral(a)?a:s.types.stringLiteral(a.name),o])),r)}function buildPrivateStaticMethodInitLoose(e,r,t,a){const n=a.get(r.node.key.id.name);const{id:o,methodId:i,getId:l,setId:c,initAdded:d}=n;if(d)return;const u=l||c;if(u){a.set(r.node.key.id.name,Object.assign({},n,{initAdded:true}));return inheritPropComments(s.template.statement.ast`
|
|||
|
|
Object.defineProperty(${e}, ${o}, {
|
|||
|
|
// configurable is false by default
|
|||
|
|
// enumerable is false by default
|
|||
|
|
// writable is false by default
|
|||
|
|
get: ${l?l.name:r.scope.buildUndefinedNode()},
|
|||
|
|
set: ${c?c.name:r.scope.buildUndefinedNode()}
|
|||
|
|
})
|
|||
|
|
`,r)}return inheritPropComments(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}
|
|||
|
|
});
|
|||
|
|
`,r)}function buildPrivateMethodDeclaration(e,r,t=false){const a=r.get(e.node.key.id.name);const{id:n,methodId:o,getId:i,setId:l,getterDeclared:c,setterDeclared:d,static:u}=a;const{params:p,body:f,generator:y,async:g}=e.node;const h=i&&!c&&p.length===0;const b=l&&!d&&p.length>0;let x=o;if(h){r.set(e.node.key.id.name,Object.assign({},a,{getterDeclared:true}));x=i}else if(b){r.set(e.node.key.id.name,Object.assign({},a,{setterDeclared:true}));x=l}else if(u&&!t){x=n}return inheritPropComments(s.types.functionDeclaration(s.types.cloneNode(x),p,f,y,g),e)}const g=s.traverse.visitors.merge([{UnaryExpression(e){const{node:r}=e;if(r.operator==="delete"){const t=(0,c.skipTransparentExprWrapperNodes)(r.argument);if(s.types.isThisExpression(t)){e.replaceWith(s.types.booleanLiteral(true))}}},ThisExpression(e,r){r.needsClassRef=true;e.replaceWith(s.types.cloneNode(r.classRef))},MetaProperty(e){const{node:r,scope:t}=e;if(r.meta.name==="new"&&r.property.name==="target"){e.replaceWith(t.buildUndefinedNode())}}},n.default]);const h={ReferencedIdentifier(e,r){if(e.scope.bindingIdentifierEquals(e.node.name,r.innerBinding)){r.needsClassRef=true;e.node.name=r.classRef.name}}};function replaceThisContext(e,r,t){var s;const a={classRef:r,needsClassRef:false,innerBinding:t};if(!e.isMethod()){e.traverse(g,a)}if(t!=null&&(s=a.classRef)!=null&&s.name&&a.classRef.name!==t.name){e.traverse(h,a)}return a.needsClassRef}function isNameOrLength({key:e,computed:r}){if(e.type==="Identifier"){return!r&&(e.name==="name"||e.name==="length")}if(e.type==="StringLiteral"){return e.value==="name"||e.value==="length"}return false}function inheritPropComments(e,r){s.types.inheritLeadingComments(e,r.node);s.types.inheritInnerComments(e,r.node);return e}function buildFieldsInitNodes(e,r,t,n,o,i,l,c,u){var p,f;let y=0;let g;const h=[];const b=[];const x=[];let v=null;const j=s.types.isIdentifier(r)?()=>r:()=>{var e;(e=g)!=null?e:g=t[0].scope.generateUidIdentifierBasedOnNode(r);return g};const w=(p=e)!=null?p:t[0].scope.generateUidIdentifier("class");(f=e)!=null?f:e=s.types.cloneNode(u);for(const r of t){r.isClassProperty()&&d.assertFieldTransformed(r);const t=!(s.types.isStaticBlock!=null&&s.types.isStaticBlock(r.node))&&r.node.static;const p=!t;const f=r.isPrivate();const g=!f;const v=r.isProperty();const E=!v;const _=r.isStaticBlock==null?void 0:r.isStaticBlock();if(t)y|=1;if(t||E&&f||_){new a.default({methodPath:r,constantSuper:c,file:o,refToPreserve:u,getSuperRef:j,getObjectRef(){y|=2;if(t||_){return w}else{return s.types.memberExpression(w,s.types.identifier("prototype"))}}}).replace();const e=replaceThisContext(r,w,u);if(e){y|=2}}switch(true){case _:{const e=r.node.body;if(e.length===1&&s.types.isExpressionStatement(e[0])){h.push(inheritPropComments(e[0],r))}else{h.push(s.types.inheritsComments(s.template.statement.ast`(() => { ${e} })()`,r.node))}break}case t&&f&&v&&l:h.push(buildPrivateFieldInitLoose(s.types.cloneNode(e),r,n));break;case t&&f&&v&&!l:h.push(buildPrivateStaticFieldInitSpec(r,n));break;case t&&g&&v&&i:if(!isNameOrLength(r.node)){h.push(buildPublicFieldInitLoose(s.types.cloneNode(e),r));break}case t&&g&&v&&!i:h.push(buildPublicFieldInitSpec(s.types.cloneNode(e),r,o));break;case p&&f&&v&&l:b.push(buildPrivateFieldInitLoose(s.types.thisExpression(),r,n));break;case p&&f&&v&&!l:b.push(buildPrivateInstanceFieldInitSpec(s.types.thisExpression(),r,n,o));break;case p&&f&&E&&l:b.unshift(buildPrivateMethodInitLoose(s.types.thisExpression(),r,n));x.push(buildPrivateMethodDeclaration(r,n,l));break;case p&&f&&E&&!l:b.unshift(buildPrivateInstanceMethodInitSpec(s.types.thisExpression(),r,n,o));x.push(buildPrivateMethodDeclaration(r,n,l));break;case t&&f&&E&&!l:h.unshift(buildPrivateStaticFieldInitSpec(r,n));x.push(buildPrivateMethodDeclaration(r,n,l));break;case t&&f&&E&&l:h.unshift(buildPrivateStaticMethodInitLoose(s.types.cloneNode(e),r,o,n));x.push(buildPrivateMethodDeclaration(r,n,l));break;case p&&g&&v&&i:b.push(buildPublicFieldInitLoose(s.types.thisExpression(),r));break;case p&&g&&v&&!i:b.push(buildPublicFieldInitSpec(s.types.thisExpression(),r,o));b
|
|||
|
|
${addDecorateHelper(a)}(
|
|||
|
|
${p||s.types.nullLiteral()},
|
|||
|
|
function (${i}, ${d?s.types.cloneNode(u):null}) {
|
|||
|
|
${n}
|
|||
|
|
return { F: ${s.types.cloneNode(n.id)}, d: ${f} };
|
|||
|
|
},
|
|||
|
|
${d}
|
|||
|
|
)
|
|||
|
|
`;if(!c){y.arguments[1].body.directives.push(s.types.directive(s.types.directiveLiteral("use strict")))}let g=y;let h="arguments.1.body.body.0";if(l){g=s.template.statement.ast`let ${e} = ${y}`;h="declarations.0.init."+h}return{instanceNodes:[s.template.statement.ast`${s.types.cloneNode(i)}(this)`],wrapClass(e){e.replaceWith(g);return e.get(h)}}}},2532:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.FEATURES=void 0;r.enableFeature=enableFeature;r.isLoose=isLoose;r.shouldTransform=shouldTransform;var s=t(7081);const a=Object.freeze({fields:1<<1,privateMethods:1<<2,decorators:1<<3,privateIn:1<<4,staticBlocks:1<<5});r.FEATURES=a;const n=new Map([[a.fields,"@babel/plugin-transform-class-properties"],[a.privateMethods,"@babel/plugin-transform-private-methods"],[a.privateIn,"@babel/plugin-transform-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,r,t){if(!hasFeature(e,r)||canIgnoreLoose(e,r)){e.set(o,e.get(o)|r);if(t==="#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"){setLoose(e,r,true);e.set(l,e.get(l)|r)}else if(t==="#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"){setLoose(e,r,false);e.set(l,e.get(l)|r)}else{setLoose(e,r,t)}}let s;let a;for(const[r,t]of n){if(!hasFeature(e,r))continue;const n=isLoose(e,r);if(canIgnoreLoose(e,r)){continue}else if(s===!n){throw new Error("'loose' mode configuration must be the same for @babel/plugin-transform-class-properties, "+"@babel/plugin-transform-private-methods and "+"@babel/plugin-transform-private-property-in-object (when they are enabled).")}else{s=n;a=t}}if(s!==undefined){for(const[r,t]of n){if(hasFeature(e,r)&&isLoose(e,r)!==s){setLoose(e,r,s);console.warn(`Though the "loose" option was set to "${!s}" in your @babel/preset-env `+`config, it will not be used for ${t} since the "loose" mode option was set to `+`"${s}" for ${a}.\nThe "loose" option must be the `+`same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods `+`and @babel/plugin-transform-private-property-in-object (when they are enabled): you can `+`silence this warning by explicitly adding\n`+`\t["${t}", { "loose": ${s} }]\n`+`to the "plugins" section of your Babel config.`)}}}}function hasFeature(e,r){return!!(e.get(o)&r)}function isLoose(e,r){return!!(e.get(i)&r)}function setLoose(e,r,t){if(t)e.set(i,e.get(i)|r);else e.set(i,e.get(i)&~r);e.set(l,e.get(l)&~r)}function canIgnoreLoose(e,r){return!!(e.get(l)&r)}function shouldTransform(e,r){let t=null;let n=null;let o=null;let i=null;let l=null;if((0,s.hasOwnDecorators)(e.node)){t=e.get("decorators.0")}for(const r of e.get("body.body")){if(!t&&(0,s.hasOwnDecorators)(r.node)){t=r.get("decorators.0")}if(!n&&r.isClassProperty()){n=r}if(!o&&r.isClassPrivateProperty()){o=r}if(!i&&r.isClassPrivateMethod!=null&&r.isClassPrivateMethod()){i=r}if(!l&&r.isStaticBlock!=null&&r.isStaticBlock()){l=r}}if(t&&o){throw o.buildCodeFrameError("Private fields in decorated classes are not supported yet.")}if(t&&i){throw i.buildCodeFrameError("Private methods in decorated classes are not supported yet.")}if(t&&!hasFeature(r,a.decorators)){throw e.buildCodeFrameError("Decorators are not enabled."+"\nIf you are using "+'["@babel/plugin-proposal-decorators", { "version": "legacy" }], '+'make sure it comes *before* "@babel/plugin-transform-class-properties" '+"and enable loose mode, like so:\n"+'\t["@babel/plugin-proposal-decorators", { "version": "legacy" }]\n'+'\t["@babel/plugin-transform-class-properties", { "loose": true }]')}if(i&&!hasFeature(r,a.privateMethods)){throw i.buildCodeFrameError("Class private methods are not enabled. "+"Please add `@babel/plugin-transform-private-methods` to your configuration.")}if((n||o)&&!hasFeature(r,a.fields)&&!hasFeature(r,a.privateMethods)){throw e.buildCodeFrameError("Class fields are
|
|||
|
|
Object.prototype.hasOwnProperty.call(${buildCheckInRHS(n,r)}, ${s.types.cloneNode(t)})
|
|||
|
|
`);return}const{id:d,static:u}=i.get(c);if(u){e.replaceWith(s.template.expression.ast`${buildCheckInRHS(n,r)} === ${s.types.cloneNode(this.classRef)}`);return}e.replaceWith(s.template.expression.ast`${s.types.cloneNode(d)}.has(${buildCheckInRHS(n,r)})`)}});const f={memoise(e,r){const{scope:t}=e;const{object:s}=e.node;const a=t.maybeGenerateMemoised(s);if(!a){return}this.memoiser.set(s,a,r)},receiver(e){const{object:r}=e.node;if(this.memoiser.has(r)){return s.types.cloneNode(this.memoiser.get(r))}return s.types.cloneNode(r)},get(e){const{classRef:r,privateNamesMap:t,file:a,innerBinding:n}=this;const{name:o}=e.node.property.id;const{id:i,static:l,method:c,methodId:d,getId:u,setId:p}=t.get(o);const f=u||p;if(l){const t=c&&!f?"classStaticPrivateMethodGet":"classStaticPrivateFieldSpecGet";unshadow(r.name,e.scope,n);return s.types.callExpression(a.addHelper(t),[this.receiver(e),s.types.cloneNode(r),s.types.cloneNode(i)])}if(c){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(`#${o}`)])])}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(i)])}return s.types.callExpression(a.addHelper("classPrivateMethodGet"),[this.receiver(e),s.types.cloneNode(i),s.types.cloneNode(d)])}return s.types.callExpression(a.addHelper("classPrivateFieldGet"),[this.receiver(e),s.types.cloneNode(i)])},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,r){const{classRef:t,privateNamesMap:a,file:n}=this;const{name:o}=e.node.property.id;const{id:i,static:l,method:c,setId:d,getId:u}=a.get(o);const p=u||d;if(l){const a=c&&!p?"classStaticPrivateMethodSet":"classStaticPrivateFieldSpecSet";return s.types.callExpression(n.addHelper(a),[this.receiver(e),s.types.cloneNode(t),s.types.cloneNode(i),r])}if(c){if(d){return s.types.callExpression(n.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(i),r])}return s.types.sequenceExpression([this.receiver(e),r,s.types.callExpression(n.addHelper("readOnlyError"),[s.types.stringLiteral(`#${o}`)])])}return s.types.callExpression(n.addHelper("classPrivateFieldSet"),[this.receiver(e),s.types.cloneNode(i),r])},destructureSet(e){const{classRef:r,privateNamesMap:t,file:a}=this;const{name:n}=e.node.property.id;const{id:o,static:i}=t.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(r),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,r){this.memoise(e,1);return(0,i.default)(this.get(e),this.receiver(e),r,false)},optionalCall(e,r){this.memoise(e,1);return(0,i.default)(this.get(e),this.receiver(e),r,true)},delete(){throw new Error("Internal Babel error: deleting private elements is a parsing error.")}};const y={get(e){const{privateNamesMap:r,file:t}=this;const{object:a}=e.node;const{name:n}=e.node.property.id;return s.template.expression`BASE(REF, PROP)[PROP]`({BASE:t.addHelper("classPrivateFieldLooseBase"),REF:s.types.cloneNode(a),PROP:s.types.cloneNode(r.get(n).id)})},set(){throw new Error("private name handler with loose = true don't need set()")},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,r){return s.types.callExpression(this.get(e),r)},optionalCall(e,r){return s.types.optionalCallExpression(this.get(e),r,true)},delete(){
|
|||
|
|
Object.defineProperty(${e}, ${s.types.cloneNode(a)}, {
|
|||
|
|
// configurable is false by default
|
|||
|
|
// enumerable is false by default
|
|||
|
|
writable: true,
|
|||
|
|
value: ${n}
|
|||
|
|
});
|
|||
|
|
`,r)}function buildPrivateInstanceFieldInitSpec(e,r,t,a){const{id:n}=t.get(r.node.key.id.name);const o=r.node.value||r.scope.buildUndefinedNode();{if(!a.availableHelper("classPrivateFieldInitSpec")){return inheritPropComments(s.template.statement.ast`${s.types.cloneNode(n)}.set(${e}, {
|
|||
|
|
// configurable is always false for private elements
|
|||
|
|
// enumerable is always false for private elements
|
|||
|
|
writable: true,
|
|||
|
|
value: ${o},
|
|||
|
|
})`,r)}}const i=a.addHelper("classPrivateFieldInitSpec");return inheritPropComments(s.template.statement.ast`${i}(
|
|||
|
|
${s.types.thisExpression()},
|
|||
|
|
${s.types.cloneNode(n)},
|
|||
|
|
{
|
|||
|
|
writable: true,
|
|||
|
|
value: ${o}
|
|||
|
|
},
|
|||
|
|
)`,r)}function buildPrivateStaticFieldInitSpec(e,r){const t=r.get(e.node.key.id.name);const{id:a,getId:n,setId:o,initAdded:i}=t;const l=n||o;if(!e.isProperty()&&(i||!l))return;if(l){r.set(e.node.key.id.name,Object.assign({},t,{initAdded:true}));return inheritPropComments(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: ${n?n.name:e.scope.buildUndefinedNode()},
|
|||
|
|
set: ${o?o.name:e.scope.buildUndefinedNode()}
|
|||
|
|
}
|
|||
|
|
`,e)}const c=e.node.value||e.scope.buildUndefinedNode();return inheritPropComments(s.template.statement.ast`
|
|||
|
|
var ${s.types.cloneNode(a)} = {
|
|||
|
|
// configurable is false by default
|
|||
|
|
// enumerable is false by default
|
|||
|
|
writable: true,
|
|||
|
|
value: ${c}
|
|||
|
|
};
|
|||
|
|
`,e)}function buildPrivateMethodInitLoose(e,r,t){const a=t.get(r.node.key.id.name);const{methodId:n,id:o,getId:i,setId:l,initAdded:c}=a;if(c)return;if(n){return inheritPropComments(s.template.statement.ast`
|
|||
|
|
Object.defineProperty(${e}, ${o}, {
|
|||
|
|
// configurable is false by default
|
|||
|
|
// enumerable is false by default
|
|||
|
|
// writable is false by default
|
|||
|
|
value: ${n.name}
|
|||
|
|
});
|
|||
|
|
`,r)}const d=i||l;if(d){t.set(r.node.key.id.name,Object.assign({},a,{initAdded:true}));return inheritPropComments(s.template.statement.ast`
|
|||
|
|
Object.defineProperty(${e}, ${o}, {
|
|||
|
|
// configurable is false by default
|
|||
|
|
// enumerable is false by default
|
|||
|
|
// writable is false by default
|
|||
|
|
get: ${i?i.name:r.scope.buildUndefinedNode()},
|
|||
|
|
set: ${l?l.name:r.scope.buildUndefinedNode()}
|
|||
|
|
});
|
|||
|
|
`,r)}}function buildPrivateInstanceMethodInitSpec(e,r,t,s){const a=t.get(r.node.key.id.name);const{getId:n,setId:o,initAdded:i}=a;if(i)return;const l=n||o;if(l){return buildPrivateAccessorInitialization(e,r,t,s)}return buildPrivateInstanceMethodInitialization(e,r,t,s)}function buildPrivateAccessorInitialization(e,r,t,a){const n=t.get(r.node.key.id.name);const{id:o,getId:i,setId:l}=n;t.set(r.node.key.id.name,Object.assign({},n,{initAdded:true}));{if(!a.availableHelper("classPrivateFieldInitSpec")){return inheritPropComments(s.template.statement.ast`
|
|||
|
|
${o}.set(${e}, {
|
|||
|
|
get: ${i?i.name:r.scope.buildUndefinedNode()},
|
|||
|
|
set: ${l?l.name:r.scope.buildUndefinedNode()}
|
|||
|
|
});
|
|||
|
|
`,r)}}const c=a.addHelper("classPrivateFieldInitSpec");return inheritPropComments(s.template.statement.ast`${c}(
|
|||
|
|
${s.types.thisExpression()},
|
|||
|
|
${s.types.cloneNode(o)},
|
|||
|
|
{
|
|||
|
|
get: ${i?i.name:r.scope.buildUndefinedNode()},
|
|||
|
|
set: ${l?l.name:r.scope.buildUndefinedNode()}
|
|||
|
|
},
|
|||
|
|
)`,r)}function buildPrivateInstanceMethodInitialization(e,r,t,a){const n=t.get(r.node.key.id.name);const{id:o}=n;{if(!a.availableHelper("classPrivateMethodInitSpec")){return inheritPropComments(s.template.statement.ast`${o}.add(${e})`,r)}}const i=a.addHelper("classPrivateMethodInitSpec");return inheritPropComments(s.template.statement.ast`${i}(
|
|||
|
|
${s.types.thisExpression()},
|
|||
|
|
${s.types.cloneNode(o)}
|
|||
|
|
)`,r)}function buildPublicFieldInitLoose(e,r){const{key:t,computed:a}=r.node;const n=r.node.value||r.scope.buildUndefinedNode();return inheritPropComments(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.memberExpression(e,t,a||s.types.isLiteral(t)),n)),r)}function buildPublicFieldInitSpec(e,r,t){const{key:a,computed:n}=r.node;const o=r.node.value||r.scope.buildUndefinedNode();return inheritPropComments(s.types.expressionStatement(s.types.callExpression(t.addHelper("defineProperty"),[e,n||s.types.isLiteral(a)?a:s.types.stringLiteral(a.name),o])),r)}function buildPrivateStaticMethodInitLoose(e,r,t,a){const n=a.get(r.node.key.id.name);const{id:o,methodId:i,getId:l,setId:c,initAdded:d}=n;if(d)return;const u=l||c;if(u){a.set(r.node.key.id.name,Object.assign({},n,{initAdded:true}));return inheritPropComments(s.template.statement.ast`
|
|||
|
|
Object.defineProperty(${e}, ${o}, {
|
|||
|
|
// configurable is false by default
|
|||
|
|
// enumerable is false by default
|
|||
|
|
// writable is false by default
|
|||
|
|
get: ${l?l.name:r.scope.buildUndefinedNode()},
|
|||
|
|
set: ${c?c.name:r.scope.buildUndefinedNode()}
|
|||
|
|
})
|
|||
|
|
`,r)}return inheritPropComments(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}
|
|||
|
|
});
|
|||
|
|
`,r)}function buildPrivateMethodDeclaration(e,r,t=false){const a=r.get(e.node.key.id.name);const{id:n,methodId:o,getId:i,setId:l,getterDeclared:c,setterDeclared:d,static:u}=a;const{params:p,body:f,generator:y,async:g}=e.node;const h=i&&!c&&p.length===0;const b=l&&!d&&p.length>0;let x=o;if(h){r.set(e.node.key.id.name,Object.assign({},a,{getterDeclared:true}));x=i}else if(b){r.set(e.node.key.id.name,Object.assign({},a,{setterDeclared:true}));x=l}else if(u&&!t){x=n}return inheritPropComments(s.types.functionDeclaration(s.types.cloneNode(x),p,f,y,g),e)}const g=s.traverse.visitors.merge([{ThisExpression(e,r){const t=e.findParent((e=>!(0,c.isTransparentExprWrapper)(e.node)));if(s.types.isUnaryExpression(t.node,{operator:"delete"})){e.parentPath.replaceWith(s.types.booleanLiteral(true));return}r.needsClassRef=true;e.replaceWith(s.types.cloneNode(r.classRef))},MetaProperty(e){const r=e.get("meta");const t=e.get("property");const{scope:s}=e;if(r.isIdentifier({name:"new"})&&t.isIdentifier({name:"target"})){e.replaceWith(s.buildUndefinedNode())}}},n.default]);const h={ReferencedIdentifier(e,r){if(e.scope.bindingIdentifierEquals(e.node.name,r.innerBinding)){r.needsClassRef=true;e.node.name=r.classRef.name}}};function replaceThisContext(e,r,t,n,o,i,l){var c;const d={classRef:r,needsClassRef:false,innerBinding:l};const u=new a.default({methodPath:e,constantSuper:i,file:n,refToPreserve:r,getSuperRef:t,getObjectRef(){d.needsClassRef=true;return s.types.isStaticBlock!=null&&s.types.isStaticBlock(e.node)||e.node.static?r:s.types.memberExpression(r,s.types.identifier("prototype"))}});u.replace();if(o||e.isProperty()){e.traverse(g,d)}if(l!=null&&(c=d.classRef)!=null&&c.name&&d.classRef.name!==(l==null?void 0:l.name)){e.traverse(h,d)}return d.needsClassRef}function isNameOrLength({key:e,computed:r}){if(e.type==="Identifier"){return!r&&(e.name==="name"||e.name==="length")}if(e.type==="StringLiteral"){return e.value==="name"||e.value==="length"}return false}function inheritPropComments(e,r){s.types.inheritLeadingComments(e,r.node);s.types.inheritInnerComments(e,r.node);return e}function buildFieldsInitNodes(e,r,t,a,n,o,i,l,c){let u=false;let p;const f=[];const y=[];const g=[];const h=s.types.isIdentifier(r)?()=>r:()=>{var e;(e=p)!=null?e:p=t[0].scope.generateUidIdentifierBasedOnNode(r);return p};for(const r of t){r.isClassProperty()&&d.assertFieldTransformed(r);const t=!(s.types.isStaticBlock!=null&&s.types.isStaticBlock(r.node))&&r.node.static;const p=!t;const b=r.isPrivate();const x=!b;const v=r.isProperty();const j=!v;const w=r.isStaticBlock==null?void 0:r.isStaticBlock();if(t||j&&b||w){const t=replaceThisContext(r,e,h,n,w,l,c);u=u||t}switch(true){case w:{const e=r.node.body;if(e.length===1&&s.types.isExpressionStatement(e[0])){f.push(inheritPropComments(e[0],r))}else{f.push(s.types.inheritsComments(s.template.statement.ast`(() => { ${e} })()`,r.node))}break}case t&&b&&v&&i:u=true;f.push(buildPrivateFieldInitLoose(s.types.cloneNode(e),r,a));break;case t&&b&&v&&!i:u=true;f.push(buildPrivateStaticFieldInitSpec(r,a));break;case t&&x&&v&&o:if(!isNameOrLength(r.node)){u=true;f.push(buildPublicFieldInitLoose(s.types.cloneNode(e),r));break}case t&&x&&v&&!o:u=true;f.push(buildPublicFieldInitSpec(s.types.cloneNode(e),r,n));break;case p&&b&&v&&i:y.push(buildPrivateFieldInitLoose(s.types.thisExpression(),r,a));break;case p&&b&&v&&!i:y.push(buildPrivateInstanceFieldInitSpec(s.types.thisExpression(),r,a,n));break;case p&&b&&j&&i:y.unshift(buildPrivateMethodInitLoose(s.types.thisExpression(),r,a));g.push(buildPrivateMethodDeclaration(r,a,i));break;case p&&b&&j&&!i:y.unshift(buildPrivateInstanceMethodInitSpec(s.types.thisExpression(),r,a,n));g.push(buildPrivateMethodDeclaration(r,a,i));break;case t&&b&&j&&!i:u=true;f.unshift(buildPrivateStaticFieldInitSpec(r,a));g.push(buildPrivateMethodDeclaration(r,a,i));break;case t&&b&&j&&i:u=true;f.unshift(buildPrivateStaticMethodInitLoose(s.types.cloneNode(e),r,n,a));g.push(buildPrivateMethodDeclaration(r,a,i));break;case p&&x&&v&&o:y.push(buildPublicFieldInitLoose(s.types.thisExpression(),r));break;case p&&x&&
|
|||
|
|
Promise.resolve().then(() => ${a(n)})
|
|||
|
|
`}else return a(n)}const o=s.types.isTemplateLiteral(n)?s.types.identifier("specifier"):s.types.templateLiteral([s.types.templateElement({raw:""}),s.types.templateElement({raw:""})],[s.types.identifier("specifier")]);if(r){return s.template.expression.ast`
|
|||
|
|
(specifier =>
|
|||
|
|
new Promise(r => r(${o}))
|
|||
|
|
.then(s => ${a(s.types.identifier("s"))})
|
|||
|
|
)(${n})
|
|||
|
|
`}else if(t){return s.template.expression.ast`
|
|||
|
|
(specifier =>
|
|||
|
|
new Promise(r => r(${a(o)}))
|
|||
|
|
)(${n})
|
|||
|
|
`}else{return s.template.expression.ast`
|
|||
|
|
(specifier => ${a(o)})(${n})
|
|||
|
|
`}}},7406:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=getModuleName;{const e=getModuleName;r["default"]=getModuleName=function getModuleName(r,t){var s,a,n,o;return e(r,{moduleId:(s=t.moduleId)!=null?s:r.moduleId,moduleIds:(a=t.moduleIds)!=null?a:r.moduleIds,getModuleId:(n=t.getModuleId)!=null?n:r.getModuleId,moduleRoot:(o=t.moduleRoot)!=null?o:r.moduleRoot})}}function getModuleName(e,r){const{filename:t,filenameRelative:s=t,sourceRoot:a=r.moduleRoot}=e;const{moduleId:n,moduleIds:o=!!n,getModuleId:i,moduleRoot:l=a}=r;if(!o)return null;if(n!=null&&!i){return n}let c=l!=null?l+"/":"";if(s){const e=a!=null?new RegExp("^"+a+"/?"):"";c+=s.replace(e,"").replace(/\.(\w*?)$/,"")}c=c.replace(/\\/g,"/");if(i){return i(c)||c}else{return c}}},6646:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});Object.defineProperty(r,"buildDynamicImport",{enumerable:true,get:function(){return d.buildDynamicImport}});r.buildNamespaceInitStatements=buildNamespaceInitStatements;r.ensureStatementsHoisted=ensureStatementsHoisted;Object.defineProperty(r,"getModuleName",{enumerable:true,get:function(){return u.default}});Object.defineProperty(r,"hasExports",{enumerable:true,get:function(){return l.hasExports}});Object.defineProperty(r,"isModule",{enumerable:true,get:function(){return n.isModule}});Object.defineProperty(r,"isSideEffectImport",{enumerable:true,get:function(){return l.isSideEffectImport}});r.rewriteModuleStatementsAndPrepareHeader=rewriteModuleStatementsAndPrepareHeader;Object.defineProperty(r,"rewriteThis",{enumerable:true,get:function(){return o.default}});r.wrapInterop=wrapInterop;var s=t(9491);var a=t(8304);var n=t(3380);var o=t(4585);var i=t(7258);var l=t(4042);var c=t(8652);var d=t(3664);var u=t(7406);const{booleanLiteral:p,callExpression:f,cloneNode:y,directive:g,directiveLiteral:h,expressionStatement:b,identifier:x,isIdentifier:v,memberExpression:j,stringLiteral:w,valueToNode:E,variableDeclaration:_,variableDeclarator:S}=a.types;{r.getDynamicImportSource=t(3664).getDynamicImportSource}function rewriteModuleStatementsAndPrepareHeader(e,{exportName:r,strict:t,allowTopLevelThis:a,strictMode:d,noInterop:u,importInterop:p=(u?"none":"babel"),lazy:f,getWrapperPayload:y=c.toGetWrapperPayload(f!=null?f:false),wrapReference:b=c.wrapReference,esNamespaceOnly:x,filename:v,constantReexports:j=arguments[1].loose,enumerableModuleMeta:w=arguments[1].loose,noIncompleteNsImportDetection:E}){(0,l.validateImportInteropOption)(p);s((0,n.isModule)(e),"Cannot process module statements in a script");e.node.sourceType="script";const _=(0,l.default)(e,r,{importInterop:p,initializeReexports:j,getWrapperPayload:y,esNamespaceOnly:x,filename:v});if(!a){(0,o.default)(e)}(0,i.default)(e,_,b);if(d!==false){const r=e.node.directives.some((e=>e.value.value==="use strict"));if(!r){e.unshiftContainer("directives",g(h("use strict")))}}const S=[];if((0,l.hasExports)(_)&&!t){S.push(buildESModuleHeader(_,w))}const k=buildExportNameListDeclaration(e,_);if(k){_.exportNameListName=k.name;S.push(k.statement)}S.push(...buildExportInitializationStatements(e,_,b,j,E));return{meta:_,headers:S}}function ensureStatementsHoisted(e){e.forEach((e=>{e._blockHoist=3}))}function wrapInterop(e,r,t){if(t==="none"){return null}if(t==="node-namespace"){return f(e.hub.addHelper("interopRequireWildcard"),[r,p(true)])}else if(t==="node-default"){return null}let s;if(t==="default"){s="interopRequireDefault"}else if(t==="namespace"){s="interopRequireWildcard"}else{throw new Error(`Unknown interop: ${t}`)}return f(e.hub.addHelper(s),[r])}function buildNamespaceInitStatements(e,r,t=false,s=c.wrapReference){var n;const o=[];const i=x(r.name);for(const e of r.importsNamespace){if(e===r.name)continue;o.push(a.template.statement`var NAME = SOURCE;`({NAME:e,SOURCE:y(i)}))}const l=(n=s(i,r.wrap))!=null?n:i;if(t){o.push(...buildReexportsFromMeta(e,r,true,s))}for(const t of r.reexportNamespace){o.push((!a.types.isIdentifier(l)?a.template.statement`
|
|||
|
|
Object.defineProperty(EXPORTS, "NAME", {
|
|||
|
|
enumerable: true,
|
|||
|
|
get: function() {
|
|||
|
|
return NAMESPACE;
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
`:a.template.statement`EXPORTS.NAME = NAMESPACE;`)({EXPORTS:e.exportName,NAME:t,NAMESPACE:y(l)}))}if(r.reexportAll){const s=buildNamespaceReexport(e,y(l),t);s.loc=r.reexportAll.loc;o.push(s)}return o}const k={constant:a.template.statement`EXPORTS.EXPORT_NAME = NAMESPACE_IMPORT;`,constantComputed:a.template.statement`EXPORTS["EXPORT_NAME"] = NAMESPACE_IMPORT;`,spec:a.template.statement`
|
|||
|
|
Object.defineProperty(EXPORTS, "EXPORT_NAME", {
|
|||
|
|
enumerable: true,
|
|||
|
|
get: function() {
|
|||
|
|
return NAMESPACE_IMPORT;
|
|||
|
|
},
|
|||
|
|
});
|
|||
|
|
`};function buildReexportsFromMeta(e,r,t,s){var a;let n=x(r.name);n=(a=s(n,r.wrap))!=null?a:n;const{stringSpecifiers:o}=e;return Array.from(r.reexports,(([s,a])=>{let i=y(n);if(a==="default"&&r.interop==="node-default"){}else if(o.has(a)){i=j(i,w(a),true)}else{i=j(i,x(a))}const l={EXPORTS:e.exportName,EXPORT_NAME:s,NAMESPACE_IMPORT:i};if(t||v(i)){if(o.has(s)){return k.constantComputed(l)}else{return k.constant(l)}}else{return k.spec(l)}}))}function buildESModuleHeader(e,r=false){return(r?a.template.statement`
|
|||
|
|
EXPORTS.__esModule = true;
|
|||
|
|
`:a.template.statement`
|
|||
|
|
Object.defineProperty(EXPORTS, "__esModule", {
|
|||
|
|
value: true,
|
|||
|
|
});
|
|||
|
|
`)({EXPORTS:e.exportName})}function buildNamespaceReexport(e,r,t){return(t?a.template.statement`
|
|||
|
|
Object.keys(NAMESPACE).forEach(function(key) {
|
|||
|
|
if (key === "default" || key === "__esModule") return;
|
|||
|
|
VERIFY_NAME_LIST;
|
|||
|
|
if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
|
|||
|
|
|
|||
|
|
EXPORTS[key] = NAMESPACE[key];
|
|||
|
|
});
|
|||
|
|
`:a.template.statement`
|
|||
|
|
Object.keys(NAMESPACE).forEach(function(key) {
|
|||
|
|
if (key === "default" || key === "__esModule") return;
|
|||
|
|
VERIFY_NAME_LIST;
|
|||
|
|
if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
|
|||
|
|
|
|||
|
|
Object.defineProperty(EXPORTS, key, {
|
|||
|
|
enumerable: true,
|
|||
|
|
get: function() {
|
|||
|
|
return NAMESPACE[key];
|
|||
|
|
},
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
`)({NAMESPACE:r,EXPORTS:e.exportName,VERIFY_NAME_LIST:e.exportNameListName?(0,a.template)`
|
|||
|
|
if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
|
|||
|
|
`({EXPORTS_LIST:e.exportNameListName}):null})}function buildExportNameListDeclaration(e,r){const t=Object.create(null);for(const e of r.local.values()){for(const r of e.names){t[r]=true}}let s=false;for(const e of r.source.values()){for(const r of e.reexports.keys()){t[r]=true}for(const r of e.reexportNamespace){t[r]=true}s=s||!!e.reexportAll}if(!s||Object.keys(t).length===0)return null;const a=e.scope.generateUidIdentifier("exportNames");delete t.default;return{name:a.name,statement:_("var",[S(a,E(t))])}}function buildExportInitializationStatements(e,r,t,s=false,a=false){const n=[];for(const[e,t]of r.local){if(t.kind==="import"){}else if(t.kind==="hoisted"){n.push([t.names[0],buildInitStatement(r,t.names,x(e))])}else if(!a){for(const e of t.names){n.push([e,null])}}}for(const e of r.source.values()){if(!s){const s=buildReexportsFromMeta(r,e,false,t);const a=[...e.reexports.keys()];for(let e=0;e<s.length;e++){n.push([a[e],s[e]])}}if(!a){for(const r of e.reexportNamespace){n.push([r,null])}}}n.sort((([e],[r])=>{if(e<r)return-1;if(r<e)return 1;return 0}));const o=[];if(a){for(const[,e]of n){o.push(e)}}else{const t=100;for(let s=0;s<n.length;s+=t){let a=[];for(let i=0;i<t&&s+i<n.length;i++){const[t,l]=n[s+i];if(l!==null){if(a.length>0){o.push(buildInitStatement(r,a,e.scope.buildUndefinedNode()));a=[]}o.push(l)}else{a.push(t)}}if(a.length>0){o.push(buildInitStatement(r,a,e.scope.buildUndefinedNode()))}}}return o}const C={computed:a.template.expression`EXPORTS["NAME"] = VALUE`,default:a.template.expression`EXPORTS.NAME = VALUE`};function buildInitStatement(e,r,t){const{stringSpecifiers:s,exportName:a}=e;return b(r.reduce(((e,r)=>{const t={EXPORTS:a,NAME:r,VALUE:e};if(s.has(r)){return C.computed(t)}else{return C.default(t)}}),t))}},8652:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.toGetWrapperPayload=toGetWrapperPayload;r.wrapReference=wrapReference;var s=t(8304);var a=t(4042);function toGetWrapperPayload(e){return(r,t)=>{if(e===false)return null;if((0,a.isSideEffectImport)(t)||t.reexportAll)return null;if(e===true){return/\./.test(r)?null:"lazy"}if(Array.isArray(e)){return e.indexOf(r)===-1?null:"lazy"}if(typeof e==="function"){return e(r)?"lazy":null}throw new Error(`.lazy must be a boolean, string array, or function`)}}function wrapReference(e,r){if(r==="lazy")return s.types.callExpression(e,[]);return null}},4042:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=normalizeModuleAndLoadMetadata;r.hasExports=hasExports;r.isSideEffectImport=isSideEffectImport;r.validateImportInteropOption=validateImportInteropOption;var s=t(1017);var a=t(4975);var n=t(4097);function hasExports(e){return e.hasExports}function isSideEffectImport(e){return e.imports.size===0&&e.importsNamespace.size===0&&e.reexports.size===0&&e.reexportNamespace.size===0&&!e.reexportAll}function validateImportInteropOption(e){if(typeof e!=="function"&&e!=="none"&&e!=="babel"&&e!=="node"){throw new Error(`.importInterop must be one of "none", "babel", "node", or a function returning one of those values (received ${e}).`)}return e}function resolveImportInterop(e,r,t){if(typeof e==="function"){return validateImportInteropOption(e(r,t))}return e}function normalizeModuleAndLoadMetadata(e,r,{importInterop:t,initializeReexports:s=false,getWrapperPayload:a,esNamespaceOnly:n=false,filename:o}){if(!r){r=e.scope.generateUidIdentifier("exports").name}const i=new Set;nameAnonymousExports(e);const{local:l,sources:c,hasExports:d}=getModuleMetadata(e,{initializeReexports:s,getWrapperPayload:a},i);removeImportExportDeclarations(e);for(const[e,r]of c){const{importsNamespace:s,imports:a}=r;if(s.size>0&&a.size===0){const[e]=s;r.name=e}const i=resolveImportInterop(t,e,o);if(i==="none"){r.interop="none"}else if(i==="node"&&r.interop==="namespace"){r.interop="node-namespace"}else if(i==="node"&&r.interop==="default"){r.interop="node-default"}else if(n&&r.interop==="namespace"){r.interop="default"}}return{exportName:r,exportNameListName:null,hasExports:d,local:l,source:c,stringSpecifiers:i}}function getExport
|
|||
|
|
(function() {
|
|||
|
|
throw new Error('"' + '${e}' + '" is read-only.');
|
|||
|
|
})()
|
|||
|
|
`;const C={ReferencedIdentifier(e){const{seen:r,buildImportReference:t,scope:s,imported:a,requeueInParent:n}=this;if(r.has(e.node))return;r.add(e.node);const o=e.node.name;const i=a.get(o);if(i){if(isInType(e)){throw e.buildCodeFrameError(`Cannot transform the imported binding "${o}" 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(o);const a=s.getBinding(o);if(a!==r)return;const l=t(i,e.node);l.loc=e.node.loc;if((e.parentPath.isCallExpression({callee:e.node})||e.parentPath.isOptionalCallExpression({callee:e.node})||e.parentPath.isTaggedTemplateExpression({tag:e.node}))&&g(l)){e.replaceWith(w([j(0),l]))}else if(e.isJSXIdentifier()&&g(l)){const{object:r,property:t}=l;e.replaceWith(x(b(r.name),b(t.name)))}else{e.replaceWith(l)}n(e);e.skip()}},UpdateExpression(e){const{scope:r,seen:t,imported:s,exported:a,requeueInParent:n,buildImportReference:l}=this;if(t.has(e.node))return;t.add(e.node);const c=e.get("argument");if(c.isMemberExpression())return;const u=e.node;if(c.isIdentifier()){const t=c.node.name;if(r.getBinding(t)!==e.scope.getBinding(t)){return}const n=a.get(t);const p=s.get(t);if((n==null?void 0:n.length)>0||p){if(p){e.replaceWith(o(u.operator[0]+"=",l(p,c.node),buildImportThrow(t)))}else if(u.prefix){e.replaceWith(buildBindingExportAssignmentExpression(this.metadata,n,i(u),e.scope))}else{const s=r.generateDeclaredUidIdentifier(t);e.replaceWith(w([o("=",i(s),i(u)),buildBindingExportAssignmentExpression(this.metadata,n,d(t),e.scope),i(s)]))}}}n(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 c=e.get("left");if(c.isMemberExpression())return;if(c.isIdentifier()){const t=c.node.name;if(r.getBinding(t)!==e.scope.getBinding(t)){return}const l=n.get(t);const d=a.get(t);if((l==null?void 0:l.length)>0||d){s(e.node.operator==="=","Path was not simplified");const r=e.node;if(d){r.left=i(d,c.node);r.right=w([r.right,buildImportThrow(t)])}e.replaceWith(buildBindingExportAssignmentExpression(this.metadata,l,r,e.scope));o(e)}}else{const t=c.getOuterBindingIdentifiers();const s=Object.keys(t).filter((t=>r.getBinding(t)===e.scope.getBinding(t)));const i=s.find((e=>a.has(e)));if(i){e.node.right=w([e.node.right,buildImportThrow(i)])}const u=[];s.forEach((r=>{const t=n.get(r)||[];if(t.length>0){u.push(buildBindingExportAssignmentExpression(this.metadata,t,d(r),e.scope))}}));if(u.length>0){let r=w(u);if(e.parentPath.isExpressionStatement()){r=l(r);r._blockHoist=e.parentPath.node._blockHoist}const t=e.insertAfter(r)[0];o(t)}}}},"ForOfStatement|ForInStatement"(e){const{scope:r,node:t}=e;const{left:s}=t;const{exported:a,imported:n,scope:d}=this;if(!h(s)){let t=false,u;const p=e.get("body").scope;for(const e of Object.keys(c(s))){if(d.getBinding(e)===r.getBinding(e)){if(a.has(e)){t=true;if(p.hasOwnBinding(e)){p.rename(e)}}if(n.has(e)&&!u){u=e}}}if(!t&&!u){return}e.ensureBlock();const f=e.get("body");const y=r.generateUidIdentifierBasedOnNode(s);e.get("left").replaceWith(_("let",[S(i(y))]));r.registerDeclaration(e.get("left"));if(t){f.unshiftContainer("body",l(o("=",s,y)))}if(u){f.unshiftContainer("body",l(buildImportThrow(u)))}}}}},4585:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=rewriteThis;var s=t(8552);var a=t(8304);const{numericLiteral:n,unaryExpression:o}=a.types;const i=a.traverse.visitors.merge([s.default,{ThisExpression(e){e.replaceWith(o("void",n(0),true))}}]);function rewriteThis(e){(0,a.traverse)(e.node,Object.assign({},i,{noScope:true}))}},6392:(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)
|
|||
|
|
function () { throw new ReferenceError("'delete super[expr]' is invalid"); }()
|
|||
|
|
`])}else{return o.default.expression.ast`
|
|||
|
|
function () { throw new ReferenceError("'delete super.prop' is invalid"); }()
|
|||
|
|
`}}};const w=Object.assign({},j,{prop(e){const{property:r}=e.node;if(this.memoiser.has(r)){return p(this.memoiser.get(r))}return p(r)},get(e){const{isStatic:r,getSuperRef:t}=this;const{computed:s}=e.node;const a=this.prop(e);let n;if(r){var o;n=(o=t())!=null?o:y(f("Function"),f("prototype"))}else{var i;n=y((i=t())!=null?i:f("Object"),f("prototype"))}return y(n,a,s)},set(e,r){const{computed:t}=e.node;const s=this.prop(e);return c("=",y(b(),s,t),r)},destructureSet(e){const{computed:r}=e.node;const t=this.prop(e);return y(b(),t,r)},call(e,r){return(0,n.default)(this.get(e),b(),r,false)},optionalCall(e,r){return(0,n.default)(this.get(e),b(),r,true)}});class ReplaceSupers{constructor(e){var r;const t=e.methodPath;this.methodPath=t;this.isDerivedConstructor=t.isClassMethod({kind:"constructor"})&&!!e.superRef;this.isStatic=t.isObjectMethod()||t.node.static||(t.isStaticBlock==null?void 0:t.isStaticBlock());this.isPrivateMethod=t.isPrivate()&&t.isMethod();this.file=e.file;this.constantSuper=(r=e.constantSuper)!=null?r:e.isLoose;this.opts=e}getObjectRef(){return p(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){if(this.opts.superRef)return p(this.opts.superRef);if(this.opts.getSuperRef){return p(this.opts.getSuperRef())}}replace(){if(this.opts.refToPreserve){this.methodPath.traverse(v,{refName:this.opts.refToPreserve.name})}const e=this.constantSuper?w:j;(0,a.default)(this.methodPath,x,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:e.get},e))}}r["default"]=ReplaceSupers},9775:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(3336);var a=t(6265);var n=t(970);var o=t(8304);const{assignmentExpression:i,booleanLiteral:l,callExpression:c,cloneNode:d,identifier:u,memberExpression:p,sequenceExpression:f,stringLiteral:y,thisExpression:g}=o.types;{const e=t(3336);r.environmentVisitor=e.default;r.skipAllButComputedKey=e.skipAllButComputedKey}function getPrototypeOfExpression(e,r,t,s){e=d(e);const a=r||s?e:p(e,u("prototype"));return c(t.addHelper("getPrototypeOf"),[a])}const h=o.traverse.visitors.merge([s.default,{Super(e,r){const{node:t,parentPath:s}=e;if(!s.isMemberExpression({object:t}))return;r.handle(s)}}]);const b=o.traverse.visitors.merge([s.default,{Scopable(e,{refName:r}){const t=e.scope.getOwnBinding(r);if(t&&t.identifier.name===r){e.scope.rename(r)}}}]);const x={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 d(this.memoiser.get(t))}if(r){return d(t)}return y(t.name)},get(e){return this._get(e,this._getThisRefs())},_get(e,r){const t=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return c(this.file.addHelper("get"),[r.memo?f([r.memo,t]):t,this.prop(e),r.this])},_getThisRefs(){if(!this.isDerivedConstructor){return{this:g()}}const e=this.scope.generateDeclaredUidIdentifier("thisSuper");return{memo:i("=",e,g()),this:d(e)}},set(e,r){const t=this._getThisRefs();const s=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return c(this.file.addHelper("set"),[t.memo?f([t.memo,s]):s,this.prop(e),r,t.this,l(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError(`Destructuring to a super field is not supported yet.`)},call(e,r){const t=this._getThisRefs();return(0,n.default)(this._get(e,t),d(t.this),r,false)},optionalCall(e,r){const t=this._getThisRefs();return(0,n.default)(this._get(e,t),d(t.this),r,true)},delete(e){if(e.node.computed){return f([c(this.file.addHelper("toPropertyKey"),[d(e.node.property)]),o.template.expression.ast`
|
|||
|
|
function () { throw new ReferenceError("'delete super[expr]' is invalid"); }()
|
|||
|
|
`])}else{return o.template.expression.ast`
|
|||
|
|
function () { throw new ReferenceError("'delete super.prop' is invalid"); }()
|
|||
|
|
`}}};const v=Object.assign({},x,{prop(e){const{property:r}=e.node;if(this.memoiser.has(r)){return d(this.memoiser.get(r))}return d(r)},get(e){const{isStatic:r,getSuperRef:t}=this;const{computed:s}=e.node;const a=this.prop(e);let n;if(r){var o;n=(o=t())!=null?o:p(u("Function"),u("prototype"))}else{var i;n=p((i=t())!=null?i:u("Object"),u("prototype"))}return p(n,a,s)},set(e,r){const{computed:t}=e.node;const s=this.prop(e);return i("=",p(g(),s,t),r)},destructureSet(e){const{computed:r}=e.node;const t=this.prop(e);return p(g(),t,r)},call(e,r){return(0,n.default)(this.get(e),g(),r,false)},optionalCall(e,r){return(0,n.default)(this.get(e),g(),r,true)}});class ReplaceSupers{constructor(e){var r;const t=e.methodPath;this.methodPath=t;this.isDerivedConstructor=t.isClassMethod({kind:"constructor"})&&!!e.superRef;this.isStatic=t.isObjectMethod()||t.node.static||(t.isStaticBlock==null?void 0:t.isStaticBlock());this.isPrivateMethod=t.isPrivate()&&t.isMethod();this.file=e.file;this.constantSuper=(r=e.constantSuper)!=null?r:e.isLoose;this.opts=e}getObjectRef(){return d(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){if(this.opts.superRef)return d(this.opts.superRef);if(this.opts.getSuperRef){return d(this.opts.getSuperRef())}}replace(){if(this.opts.refToPreserve){this.methodPath.traverse(b,{refName:this.opts.refToPreserve.name})}const e=this.constantSuper?v:x;(0,a.default)(this.methodPath,h,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:e.get},e))}}r["default"]=ReplaceSupers},4243:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(3336);var a=t(6265);var n=t(970);var o=t(8304);const{assignmentExpression:i,booleanLiteral:l,callExpression:c,cloneNode:d,identifier:u,memberExpression:p,sequenceExpression:f,stringLiteral:y,thisExpression:g}=o.types;{const e=t(3336);r.environmentVisitor=e.default;r.skipAllButComputedKey=e.skipAllButComputedKey}function getPrototypeOfExpression(e,r,t,s){e=d(e);const a=r||s?e:p(e,u("prototype"));return c(t.addHelper("getPrototypeOf"),[a])}const h=o.traverse.visitors.merge([s.default,{Super(e,r){const{node:t,parentPath:s}=e;if(!s.isMemberExpression({object:t}))return;r.handle(s)}}]);const b=o.traverse.visitors.merge([s.default,{Scopable(e,{refName:r}){const t=e.scope.getOwnBinding(r);if(t&&t.identifier.name===r){e.scope.rename(r)}}}]);const x={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 d(this.memoiser.get(t))}if(r){return d(t)}return y(t.name)},get(e){return this._get(e,this._getThisRefs())},_get(e,r){const t=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return c(this.file.addHelper("get"),[r.needAccessFirst?f([r.this,t]):t,this.prop(e),r.this])},_getThisRefs(){return{needAccessFirst:this.isDerivedConstructor,this:g()}},set(e,r){const t=this._getThisRefs();const s=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return c(this.file.addHelper("set"),[t.needAccessFirst?f([t.this,s]):s,this.prop(e),r,t.this,l(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError(`Destructuring to a super field is not supported yet.`)},call(e,r){const t=this._getThisRefs();return(0,n.default)(this._get(e,t),d(t.this),r,false)},optionalCall(e,r){const t=this._getThisRefs();return(0,n.default)(this._get(e,t),d(t.this),r,true)},delete(e){if(e.node.computed){return f([c(this.file.addHelper("toPropertyKey"),[d(e.node.property)]),o.template.expression.ast`
|
|||
|
|
function () { throw new ReferenceError("'delete super[expr]' is invalid"); }()
|
|||
|
|
`])}else{return o.template.expression.ast`
|
|||
|
|
function () { throw new ReferenceError("'delete super.prop' is invalid"); }()
|
|||
|
|
`}}};const v=Object.assign({},x,{prop(e){const{property:r}=e.node;if(this.memoiser.has(r)){return d(this.memoiser.get(r))}return d(r)},get(e){const{isStatic:r,getSuperRef:t}=this;const{computed:s}=e.node;const a=this.prop(e);let n;if(r){var o;n=(o=t())!=null?o:p(u("Function"),u("prototype"))}else{var i;n=p((i=t())!=null?i:u("Object"),u("prototype"))}return p(n,a,s)},set(e,r){const{computed:t}=e.node;const s=this.prop(e);return i("=",p(g(),s,t),r)},destructureSet(e){const{computed:r}=e.node;const t=this.prop(e);return p(g(),t,r)},call(e,r){return(0,n.default)(this.get(e),g(),r,false)},optionalCall(e,r){return(0,n.default)(this.get(e),g(),r,true)}});class ReplaceSupers{constructor(e){var r;const t=e.methodPath;this.methodPath=t;this.isDerivedConstructor=t.isClassMethod({kind:"constructor"})&&!!e.superRef;this.isStatic=t.isObjectMethod()||t.node.static||(t.isStaticBlock==null?void 0:t.isStaticBlock());this.isPrivateMethod=t.isPrivate()&&t.isMethod();this.file=e.file;this.constantSuper=(r=e.constantSuper)!=null?r:e.isLoose;this.opts=e}getObjectRef(){return d(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){if(this.opts.superRef)return d(this.opts.superRef);if(this.opts.getSuperRef){return d(this.opts.getSuperRef())}}replace(){const{methodPath:e}=this;if(this.opts.refToPreserve){e.traverse(b,{refName:this.opts.refToPreserve.name})}const r=this.constantSuper?v:x;h.shouldSkip=r=>{if(r.parentPath===e){if(r.parentKey==="decorators"||r.parentKey==="key"){return true}}};(0,a.default)(e,h,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:r.get},r))}}r["default"]=ReplaceSupers},6118:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=simplifyAccess;var s=t(8622);const{LOGICAL_OPERATORS:a,assignmentExpression:n,binaryExpression:o,cloneNode:i,identifier:l,logicalExpression:c,numericLiteral:d,sequenceExpression:u,unaryExpression:p}=s;const f={AssignmentExpression:{exit(e){const{scope:r,seen:t,bindingNames:s}=this;if(e.node.operator==="=")return;if(t.has(e.node))return;t.add(e.node);const l=e.get("left");if(!l.isIdentifier())return;const d=l.node.name;if(!s.has(d))return;if(r.getBinding(d)!==e.scope.getBinding(d)){return}const u=e.node.operator.slice(0,-1);if(a.includes(u)){e.replaceWith(c(u,e.node.left,n("=",i(e.node.left),e.node.right)))}else{e.node.right=o(u,i(e.node.left),e.node.right);e.node.operator="="}}}};{f.UpdateExpression={exit(e){if(!this.includeUpdateExpression)return;const{scope:r,bindingNames:t}=this;const s=e.get("argument");if(!s.isIdentifier())return;const a=s.node.name;if(!t.has(a))return;if(r.getBinding(a)!==e.scope.getBinding(a)){return}if(e.parentPath.isExpressionStatement()&&!e.isCompletionRecord()){const r=e.node.operator=="++"?"+=":"-=";e.replaceWith(n(r,s.node,d(1)))}else if(e.node.prefix){e.replaceWith(n("=",l(a),o(e.node.operator[0],p("+",s.node),d(1))))}else{const r=e.scope.generateUidIdentifierBasedOnNode(s.node,"old");const t=r.name;e.scope.push({id:r});const a=o(e.node.operator[0],l(t),d(1));e.replaceWith(u([n("=",l(t),p("+",s.node)),n("=",i(s.node),a),l(t)]))}}}}function simplifyAccess(e,r){{var t;e.traverse(f,{scope:e.scope,bindingNames:r,seen:new WeakSet,includeUpdateExpression:(t=arguments[2])!=null?t:true})}}},5385:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isTransparentExprWrapper=isTransparentExprWrapper;r.skipTransparentExprWrapperNodes=skipTransparentExprWrapperNodes;r.skipTransparentExprWrappers=skipTransparentExprWrappers;var s=t(8622);const{isParenthesizedExpression:a,isTSAsExpression:n,isTSNonNullExpression:o,isTSSatisfiesExpression:i,isTSTypeAssertion:l,isTypeCastExpression:c}=s;function isTransparentExprWrapper(e){return n(e)||i(e)||l(e)||o(e)||c(e)||a(e)}function skipTransparentExprWrappers(e){while(isTransparentExprWrapper(e.node)){e=e.get("expression")}return e}function skipTransparentExprWrapperNodes
|
|||
|
|
if (${p}) ${r}
|
|||
|
|
`)}}else{const r=e.scope.generateUid("ret");if(g.isVariableDeclaration()){g.pushContainer("declarations",[s.types.variableDeclarator(s.types.identifier(r))]);h.push(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.identifier(r),p)))}else{h.push(s.types.variableDeclaration("var",[s.types.variableDeclarator(s.types.identifier(r),p)]))}const t=[];for(const e of o.breaksContinues){const{node:a}=e;const{type:n,label:o}=a;let i=n==="BreakStatement"?"break":"continue";if(o)i+=" "+o.name;let l=t.indexOf(i);const c=l!==-1;if(!c){t.push(i);l=t.length-1}e.replaceWith(s.types.addComment(s.types.returnStatement(s.types.numericLiteral(l)),"trailing"," "+i,true));if(y)e.insertBefore(s.types.cloneNode(y));if(c)continue;h.push(s.template.statement.ast`
|
|||
|
|
if (${s.types.identifier(r)} === ${s.types.numericLiteral(l)}) ${a}
|
|||
|
|
`)}if(v){for(const e of o.returns){const r=e.node.argument||e.scope.buildUndefinedNode();e.replaceWith(s.template.statement.ast`
|
|||
|
|
return { v: ${r} };
|
|||
|
|
`)}h.push(s.template.statement.ast`
|
|||
|
|
if (${s.types.identifier(r)}) return ${s.types.identifier(r)}.v;
|
|||
|
|
`)}}a.body=s.types.blockStatement(h);return g}function isVarInLoopHead(e){if(s.types.isForStatement(e.parent))return e.key==="init";if(s.types.isForXStatement(e.parent))return e.key==="left";return false}function filterMap(e,r){const t=[];for(const s of e){const e=r(s);if(e)t.push(e)}return t}},8643:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateUsage=validateUsage;var s=t(8304);function validateUsage(e,r,t){const s=[];for(const a of Object.keys(e.getBindingIdentifiers())){const n=e.scope.getBinding(a);if(!n)continue;if(t){if(injectTDZChecks(n,r))s.push(a)}if(e.node.kind==="const"){disallowConstantViolations(a,n,r)}}return s}function disallowConstantViolations(e,r,t){for(const a of r.constantViolations){const r=t.addHelper("readOnlyError");const n=s.types.callExpression(r,[s.types.stringLiteral(e)]);if(a.isAssignmentExpression()){const{operator:e,left:r,right:t}=a.node;if(e==="="){const e=[t];e.push(n);a.replaceWith(s.types.sequenceExpression(e))}else if(["&&=","||=","??="].includes(e)){a.replaceWith(s.types.logicalExpression(e.slice(0,-1),r,s.types.sequenceExpression([t,n])))}else{a.replaceWith(s.types.sequenceExpression([s.types.binaryExpression(e.slice(0,-1),r,t),n]))}}else if(a.isUpdateExpression()){a.replaceWith(s.types.sequenceExpression([s.types.unaryExpression("+",a.get("argument").node),n]))}else if(a.isForXStatement()){a.ensureBlock();a.get("left").replaceWith(s.types.variableDeclaration("var",[s.types.variableDeclarator(a.scope.generateUidIdentifier(e))]));a.node.body.body.unshift(s.types.expressionStatement(n))}}}function getTDZStatus(e,r){const t=r._guessExecutionStatusRelativeTo(e);if(t==="before"){return"outside"}else if(t==="after"){return"inside"}else{return"maybe"}}const a=new WeakSet;function buildTDZAssert(e,r,t){if(e==="maybe"){const e=s.types.cloneNode(r);a.add(e);return s.types.callExpression(t.addHelper("temporalRef"),[e,s.types.stringLiteral(r.name)])}else{return s.types.callExpression(t.addHelper("tdz"),[s.types.stringLiteral(r.name)])}}function getTDZReplacement(e,r,t=e.node){var s;if(a.has(t))return;a.add(t);const n=(s=e.scope.getBinding(t.name))==null?void 0:s.path;if(!n||n.isFunctionDeclaration())return;const o=getTDZStatus(e,n);if(o==="outside")return;if(o==="maybe"){n.parent._tdzThis=true}return{status:o,node:buildTDZAssert(o,t,r)}}function injectTDZChecks(e,r){const t=new Set(e.referencePaths);e.constantViolations.forEach(t.add,t);let n=false;for(const t of e.constantViolations){const{node:e}=t;if(a.has(e))continue;a.add(e);if(t.isUpdateExpression()){const e=t.get("argument");const s=getTDZReplacement(t,r,e.node);if(!s)continue;if(s.status==="maybe"){n=true;t.insertBefore(s.node)}else{t.replaceWith(s.node)}}else if(t.isAssignmentExpression()){const e=[];const a=t.getBindingIdentifiers();for(const o of Object.keys(a)){const i=getTDZReplacement(t,r,a[o]);if(i){e.push(s.types.expressionStatement(i.node));if(i.status==="inside")break;if(i.status==="maybe")n=true}}if(e.length>0)t.insertBefore(e)}}for(const t of e.referencePaths){if(t.parentPath.isUpdateExpression())continue;if(t.parentPath.isFor({left:t.node}))continue;const e=getTDZReplacement(t,r);if(!e)continue;if(e.status==="maybe")n=true;t.replaceWith(e.node)}return n}},9394:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=t(269);var n=(0,s.declare)(((e,r)=>{e.assertVersion(7);return(0,a.createClassFeaturePlugin)({name:"transform-class-properties",api:e,feature:a.FEATURES.fields,loose:r.loose,manipulateOptions(e,r){r.plugins.push("classProperties","classPrivateProperties")}})}));r["default"]=n},4927:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=t(269);function generateUid(e,r){const t="";let s;let a=1;do{s=e._generateUid(t,a);a++}while(r.has(s));return s}var n=(0,s.declare)((({types:e,template:r,assertVersion:s})=>{s("^7.12.0");return{name:"transform-class-static-block",inherits:t(5491)["default"],pre(){(0,a.enableFeature)(this.file,a.FEATURES.staticBlocks,false)
|
|||
|
|
function CREATE_SUPER(Derived) {
|
|||
|
|
function isNativeReflectConstruct() {
|
|||
|
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|||
|
|
|
|||
|
|
// core-js@3
|
|||
|
|
if (Reflect.construct.sham) return false;
|
|||
|
|
|
|||
|
|
// Proxy can't be polyfilled. Every browser implemented
|
|||
|
|
// proxies before or at the same time as Reflect.construct,
|
|||
|
|
// so if they support Proxy they also support Reflect.construct.
|
|||
|
|
if (typeof Proxy === "function") return true;
|
|||
|
|
|
|||
|
|
// Since Reflect.construct can't be properly polyfilled, some
|
|||
|
|
// implementations (e.g. core-js@2) don't set the correct internal slots.
|
|||
|
|
// Those polyfills don't allow us to subclass built-ins, so we need to
|
|||
|
|
// use our fallback implementation.
|
|||
|
|
try {
|
|||
|
|
// If the internal slots aren't set, this throws an error similar to
|
|||
|
|
// TypeError: this is not a Date object.
|
|||
|
|
Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
|
|||
|
|
return true;
|
|||
|
|
} catch (e) {
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return function () {
|
|||
|
|
var Super = GET_PROTOTYPE_OF(Derived), result;
|
|||
|
|
if (isNativeReflectConstruct()) {
|
|||
|
|
// NOTE: This doesn't work if this.__proto__.constructor has been modified.
|
|||
|
|
var NewTarget = GET_PROTOTYPE_OF(this).constructor;
|
|||
|
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|||
|
|
} else {
|
|||
|
|
result = Super.apply(this, arguments);
|
|||
|
|
}
|
|||
|
|
return POSSIBLE_CONSTRUCTOR_RETURN(this, result);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
`;const n=new WeakMap;function addCreateSuperHelper(e){if(n.has(e)){return(s.types.cloneNode||s.types.clone)(n.get(e))}try{return e.addHelper("createSuper")}catch(e){}const r=e.scope.generateUidIdentifier("createSuper");n.set(e,r);const t=a({CREATE_SUPER:r,GET_PROTOTYPE_OF:e.addHelper("getPrototypeOf"),POSSIBLE_CONSTRUCTOR_RETURN:e.addHelper("possibleConstructorReturn")});e.path.unshiftContainer("body",[t]);e.scope.registerDeclaration(e.path.get("body.0"));return s.types.cloneNode(r)}},1643:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=transformClass;var s=t(4940);var a=t(9775);var n=t(8552);var o=t(1475);var i=t(8304);var l=t(365);var c=t(85);function buildConstructor(e,r,t){const s=i.types.functionDeclaration(i.types.cloneNode(e),[],r);i.types.inherits(s,t);return s}function transformClass(e,r,t,d,u,p){const f={parent:undefined,scope:undefined,node:undefined,path:undefined,file:undefined,classId:undefined,classRef:undefined,superFnId:undefined,superName:null,superReturns:[],isDerived:false,extendsNative:false,construct:undefined,constructorBody:undefined,userConstructor:undefined,userConstructorPath:undefined,hasConstructor:false,body:[],superThises:[],pushedConstructor:false,pushedInherits:false,pushedCreateClass:false,protoAlias:null,isLoose:false,dynamicKeys:new Map,methods:{instance:{hasComputed:false,list:[],map:new Map},static:{hasComputed:false,list:[],map:new Map}}};const setState=e=>{Object.assign(f,e)};const y=i.traverse.visitors.merge([n.default,{ThisExpression(e){f.superThises.push(e)}}]);function createClassHelper(e){return i.types.callExpression(f.file.addHelper("createClass"),e)}function maybeCreateConstructor(){const e=f.path.get("body");for(const r of e.get("body")){if(r.isClassMethod({kind:"constructor"}))return}let r,t;if(f.isDerived){const e=i.template.expression.ast`
|
|||
|
|
(function () {
|
|||
|
|
super(...arguments);
|
|||
|
|
})
|
|||
|
|
`;r=e.params;t=e.body}else{r=[];t=i.types.blockStatement([])}e.unshiftContainer("body",i.types.classMethod("constructor",i.types.identifier("constructor"),r,t))}function buildBody(){maybeCreateConstructor();pushBody();verifyConstructor();if(f.userConstructor){const{constructorBody:e,userConstructor:r,construct:t}=f;e.body.push(...r.body.body);i.types.inherits(t,r);i.types.inherits(e,r.body)}pushDescriptors()}function pushBody(){const e=f.path.get("body.body");for(const r of e){const e=r.node;if(r.isClassProperty()){throw r.buildCodeFrameError("Missing class properties transform.")}if(e.decorators){throw r.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.")}if(i.types.isClassMethod(e)){const t=e.kind==="constructor";const s=new a.default({methodPath:r,objectRef:f.classRef,superRef:f.superName,constantSuper:u.constantSuper,file:f.file,refToPreserve:f.classRef});s.replace();const o=[];r.traverse(i.traverse.visitors.merge([n.default,{ReturnStatement(e){if(!e.getFunctionParent().isArrowFunctionExpression()){o.push(e)}}}]));if(t){pushConstructor(o,e,r)}else{pushMethod(e,r)}}}}function pushDescriptors(){pushInheritsToBody();const{body:e}=f;const r={instance:null,static:null};for(const e of["static","instance"]){if(f.methods[e].list.length){r[e]=f.methods[e].list.map((e=>{const r=i.types.objectExpression([i.types.objectProperty(i.types.identifier("key"),e.key)]);for(const t of["get","set","value"]){if(e[t]!=null){r.properties.push(i.types.objectProperty(i.types.identifier(t),e[t]))}}return r}))}}if(r.instance||r.static){let t=[i.types.cloneNode(f.classRef),r.instance?i.types.arrayExpression(r.instance):i.types.nullLiteral(),r.static?i.types.arrayExpression(r.static):i.types.nullLiteral()];let s=0;for(let e=0;e<t.length;e++){if(!i.types.isNullLiteral(t[e]))s=e}t=t.slice(0,s+1);e.push(i.types.expressionStatement(createClassHelper(t)));f.pushedCreateClass=true}}function wrapSuperCall(e,r,t,s){const a=e.node;let n;if(u.superIsCallableConstructor){a.arguments.unshift(i.types.thisExpression());if(a.arguments.length===2&&i.types.isSpreadElement(a.arguments[1])&&i.types.isIdentifier(a.arguments[1].argument,{name:"arguments"})){a.arguments[1]=a.arguments[1].argument;a.callee=i.types.memberExpression(i.types.cloneNode(r),i.types.identifier("apply"))}else{a.callee=i.types.memberExpression(i.types.cloneNode(r),i.types.identifier("call"))}n=i.types.logicalExpression("||",a,i.types.thisExpression())}else{n=(0,o.default)(i.types.cloneNode(f.superFnId),i.types.thisExpression(),a.arguments,false)}if(e.parentPath.isExpressionStatement()&&e.parentPath.container===s.node.body&&s.node.body.length-1===e.parentPath.key){if(f.superThises.length){n=i.types.assignmentExpression("=",t(),n)}e.parentPath.replaceWith(i.types.returnStatement(n))}else{e.replaceWith(i.types.assignmentExpression("=",t(),n))}}function verifyConstructor(){if(!f.isDerived)return;const e=f.userConstructorPath;const r=e.get("body");e.traverse(y);let thisRef=function(){const r=e.scope.generateDeclaredUidIdentifier("this");thisRef=()=>i.types.cloneNode(r);return r};for(const e of f.superThises){const{node:r,parentPath:t}=e;if(t.isMemberExpression({object:r})){e.replaceWith(thisRef());continue}e.replaceWith(i.types.callExpression(f.file.addHelper("assertThisInitialized"),[thisRef()]))}const t=[];e.traverse(i.traverse.visitors.merge([n.default,{Super(e){const{node:r,parentPath:s}=e;if(s.isCallExpression({callee:r})){t.unshift(s)}}}]));let s=!!t.length;for(const a of t){wrapSuperCall(a,f.superName,thisRef,r);if(s){a.find((function(r){if(r===e){return true}if(r.isLoop()||r.isConditional()||r.isArrowFunctionExpression()){s=false;return true}}))}}let a;if(f.isLoose){a=e=>{const r=i.types.callExpression(f.file.addHelper("assertThisInitialized"),[thisRef()]);return e?i.types.logicalExpression("||",e,r):r}}else{a=e=>{const r=[thisRef()];if(e!=null){r.push(e)}return i.types.callExpression(f.file.addHelper("possibleConstructorReturn"),r)}}const o=r.get("body");if(!o.length||!o.pop().isReturnStatement()){r.pushContainer("body",i.types.returnStateme
|
|||
|
|
function (type, obj, key, fn) {
|
|||
|
|
var desc = { configurable: true, enumerable: true };
|
|||
|
|
desc[type] = fn;
|
|||
|
|
return Object.defineProperty(obj, key, desc);
|
|||
|
|
}
|
|||
|
|
`;o._compact=true}var i=(0,a.declare)(((e,r)=>{var t;e.assertVersion(7);const a=(t=e.assumption("setComputedProperties"))!=null?t:r.loose;const n=a?pushComputedPropsLoose:pushComputedPropsSpec;function buildDefineAccessor(e,r,t,a,n){{let i;if(e.availableHelper("defineAccessor")){i=e.addHelper("defineAccessor")}else{const r=e.file;i=r.get("fallbackDefineAccessorHelper");if(!i){const e=r.scope.generateUidIdentifier("defineAccessor");r.scope.push({id:e,init:o});r.set("fallbackDefineAccessorHelper",i=e)}i=s.types.cloneNode(i)}return s.types.callExpression(i,[s.types.stringLiteral(r),t,a,n])}}function getValue(e){if(s.types.isObjectProperty(e)){return e.value}else if(s.types.isObjectMethod(e)){return s.types.functionExpression(null,e.params,e.body,e.generator,e.async)}}function pushAssign(e,r,t){t.push(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.memberExpression(s.types.cloneNode(e),r.key,r.computed||s.types.isLiteral(r.key)),getValue(r))))}function pushAccessorDefine({body:e,computedProps:r,initPropExpression:t,objId:a,state:n},o){const i=o.kind;const l=!o.computed&&s.types.isIdentifier(o.key)?s.types.stringLiteral(o.key.name):o.key;const c=getValue(o);if(r.length===1){return buildDefineAccessor(n,i,t,l,c)}else{e.push(s.types.expressionStatement(buildDefineAccessor(n,i,s.types.cloneNode(a),l,c)))}}function pushComputedPropsLoose(e){for(const r of e.computedProps){if(s.types.isObjectMethod(r)&&(r.kind==="get"||r.kind==="set")){const t=pushAccessorDefine(e,r);if(t)return t}else{pushAssign(s.types.cloneNode(e.objId),r,e.body)}}}function pushComputedPropsSpec(e){const{objId:r,body:t,computedProps:a,state:n}=e;for(const o of a){const i=s.types.toComputedKey(o);if(s.types.isObjectMethod(o)&&(o.kind==="get"||o.kind==="set")){const r=pushAccessorDefine(e,o);if(r)return r}else{const l=getValue(o);if(a.length===1){return s.types.callExpression(n.addHelper("defineProperty"),[e.initPropExpression,i,l])}else{t.push(s.types.expressionStatement(s.types.callExpression(n.addHelper("defineProperty"),[s.types.cloneNode(r),i,l])))}}}}return{name:"transform-computed-properties",visitor:{ObjectExpression:{exit(e,r){const{node:t,parent:a,scope:o}=e;let i=false;for(const e of t.properties){i=e.computed===true;if(i)break}if(!i)return;const l=[];const c=[];let d=false;for(const e of t.properties){if(s.types.isSpreadElement(e)){continue}if(e.computed){d=true}if(d){c.push(e)}else{l.push(e)}}const u=o.generateUidIdentifierBasedOnNode(a);const p=s.types.objectExpression(l);const f=[];f.push(s.types.variableDeclaration("var",[s.types.variableDeclarator(u,p)]));const y=n({scope:o,objId:u,body:f,computedProps:c,initPropExpression:p,state:r});if(y){e.replaceWith(y)}else{f.push(s.types.expressionStatement(s.types.cloneNode(u)));e.replaceWithMultiple(f)}}}}}}));r["default"]=i},3675:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var s=t(4091);var a=t(8304);function isPureVoid(e){return a.types.isUnaryExpression(e)&&e.operator==="void"&&a.types.isPureish(e.argument)}function unshiftForXStatementBody(e,r){e.ensureBlock();const{scope:t,node:s}=e;const n=e.get("body").scope.bindings;const o=Object.keys(n).some((e=>t.hasBinding(e)));if(o){s.body=a.types.blockStatement([...r,s.body])}else{s.body.body.unshift(...r)}}function hasArrayRest(e){return e.elements.some((e=>a.types.isRestElement(e)))}function hasObjectRest(e){return e.properties.some((e=>a.types.isRestElement(e)))}const n={};const arrayUnpackVisitor=(e,r,t)=>{if(!r.length){return}if(a.types.isIdentifier(e)&&a.types.isReferenced(e,r[r.length-1].node)&&t.bindings[e.name]){t.deopt=true;throw n}};class DestructuringTransformer{constructor(e){this.blockHoist=void 0;this.operator=void 0;this.arrayRefSet=void 0;this.nodes=void 0;this.scope=void 0;this.kind=void 0;this.iterableIsArray=void 0;this.arrayLikeIsIterable=void 0;this.objectRestNoSymbols=void 0;this.useBuiltIns=void 0;this.addHelper=void 0;this.blockHoist=e.blockHoist;this.operator=e.operator;this.arrayRefSet=new Set;this.nodes=e.nodes||[];this.scope=e.scope;this.kind=e.kind;this.iterableIsArray=e.iter
|
|||
|
|
for (var KEY = 0, NAME = ARR; KEY < NAME.length; KEY++) BODY;
|
|||
|
|
`;const u=a.template.statements`
|
|||
|
|
for (var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT, ARRAY_LIKE_IS_ITERABLE), STEP_KEY;
|
|||
|
|
!(STEP_KEY = ITERATOR_HELPER()).done;) BODY;
|
|||
|
|
`;const p=a.template.statements`
|
|||
|
|
var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT, ARRAY_LIKE_IS_ITERABLE), STEP_KEY;
|
|||
|
|
try {
|
|||
|
|
for (ITERATOR_HELPER.s(); !(STEP_KEY = ITERATOR_HELPER.n()).done;) BODY;
|
|||
|
|
} catch (err) {
|
|||
|
|
ITERATOR_HELPER.e(err);
|
|||
|
|
} finally {
|
|||
|
|
ITERATOR_HELPER.f();
|
|||
|
|
}
|
|||
|
|
`;const f=c?{build:u,helper:"createForOfIteratorHelperLoose",getContainer:e=>e}:{build:p,helper:"createForOfIteratorHelper",getContainer:e=>e[1].block.body};function _ForOfStatementArray(e){const{node:r,scope:t}=e;const s=t.generateUidIdentifierBasedOnNode(r.right,"arr");const n=t.generateUidIdentifier("i");const o=d({BODY:r.body,KEY:n,NAME:s,ARR:r.right});a.types.inherits(o,r);const i=a.types.memberExpression(a.types.cloneNode(s),a.types.cloneNode(n),true);let l;const c=r.left;if(a.types.isVariableDeclaration(c)){c.declarations[0].init=i;l=c}else{l=a.types.expressionStatement(a.types.assignmentExpression("=",c,i))}o.body=buildLoopBody(e,l,o.body);return o}return{name:"transform-for-of",visitor:{ForOfStatement(e,r){const t=e.get("right");if(t.isArrayExpression()||t.isGenericType("Array")||a.types.isArrayTypeAnnotation(t.getTypeAnnotation())){e.replaceWith(_ForOfStatementArray(e));return}{if(!r.availableHelper(f.helper)){(0,n.default)(c,e,r);return}}const{node:s,parent:o,scope:i}=e;const d=s.left;let u;const p=i.generateUid("step");const y=a.types.memberExpression(a.types.identifier(p),a.types.identifier("value"));if(a.types.isVariableDeclaration(d)){u=a.types.variableDeclaration(d.kind,[a.types.variableDeclarator(d.declarations[0].id,y)])}else{u=a.types.expressionStatement(a.types.assignmentExpression("=",d,y))}const g=f.build({CREATE_ITERATOR_HELPER:r.addHelper(f.helper),ITERATOR_HELPER:i.generateUidIdentifier("iterator"),ARRAY_LIKE_IS_ITERABLE:l?a.types.booleanLiteral(true):null,STEP_KEY:a.types.identifier(p),OBJECT:s.right,BODY:buildLoopBody(e,u)});const h=f.getContainer(g);a.types.inherits(h[0],s);a.types.inherits(h[0].body,s.body);if(a.types.isLabeledStatement(o)){h[0]=a.types.labeledStatement(o.label,h[0]);e.parentPath.replaceWithMultiple(g);e.skip()}else{e.replaceWithMultiple(g)}}}}}));r["default"]=o},7286:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=transformWithoutHelper;var s=t(8304);function transformWithoutHelper(e,r,t){const a=e?pushComputedPropsLoose:pushComputedPropsSpec;const{node:n}=r;const o=a(r,t);const i=o.declar;const l=o.loop;const c=l.body;r.ensureBlock();if(i){c.body.push(i)}c.body.push(...n.body.body);s.types.inherits(l,n);s.types.inherits(l.body,n.body);if(o.replaceParent){r.parentPath.replaceWithMultiple(o.node);r.remove()}else{r.replaceWithMultiple(o.node)}}const a=s.template.statement(`\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n INTERMEDIATE;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n`);const n=s.template.statements(`\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (\n var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY;\n !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done);\n ITERATOR_COMPLETION = true\n ) {}\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return != null) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n`);function pushComputedPropsLoose(e,r){const{node:t,scope:n,parent:o}=e;const{left:i}=t;let l,c,d;if(s.types.isIdentifier(i)||s.types.isPattern(i)||s.types.isMemberExpression(i)){c=i;d=null}else if(s.types.isVariableDeclaration(i)){c=n.generateUidIdentifier("ref");l=s.types.variableDeclaration(i.kind,[s.types.variableDeclarator(i.declarations[0].id,s.types.identifier(c.name))]);d=s.types.variableDeclaration("var",[s.types.variableDeclarator(s.types.identifier(c.name))])}else{throw r.buildCodeFrameError(i,`Unknown node type ${i.type} in ForStatement`)}const u=n.generateUidIdentifie
|
|||
|
|
new Promise((${s}, ${o}) =>
|
|||
|
|
${t}(
|
|||
|
|
[${e}],
|
|||
|
|
imported => ${n.types.cloneNode(s)}(${i}),
|
|||
|
|
${n.types.cloneNode(o)}
|
|||
|
|
)
|
|||
|
|
)
|
|||
|
|
`)))},Program:{exit(e,{requireId:t}){if(!(0,a.isModule)(e)){if(t){injectWrapper(e,i({REQUIRE:n.types.cloneNode(t)}))}return}const s=[];const g=[];if(t){s.push(n.types.stringLiteral("require"));g.push(n.types.cloneNode(t))}let h=(0,a.getModuleName)(this.file.opts,r);if(h)h=n.types.stringLiteral(h);const{meta:b,headers:x}=(0,a.rewriteModuleStatementsAndPrepareHeader)(e,{enumerableModuleMeta:y,constantReexports:f,strict:c,strictMode:d,allowTopLevelThis:l,importInterop:u,noInterop:p,filename:this.file.opts.filename});if((0,a.hasExports)(b)){s.push(n.types.stringLiteral("exports"));g.push(n.types.identifier(b.exportName))}for(const[r,t]of b.source){s.push(n.types.stringLiteral(r));g.push(n.types.identifier(t.name));if(!(0,a.isSideEffectImport)(t)){const r=(0,a.wrapInterop)(e,n.types.identifier(t.name),t.interop);if(r){const e=n.types.expressionStatement(n.types.assignmentExpression("=",n.types.identifier(t.name),r));e.loc=t.loc;x.push(e)}}x.push(...(0,a.buildNamespaceInitStatements)(b,t,f))}(0,a.ensureStatementsHoisted)(x);e.unshiftContainer("body",x);injectWrapper(e,o({MODULE_NAME:h,AMD_ARGUMENTS:n.types.arrayExpression(s),IMPORT_NAMES:g}))}}}}}));r["default"]=l},9511:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.transformDynamicImport=transformDynamicImport;var s=t(8304);var a=t(6646);const requireNoInterop=e=>s.template.expression.ast`require(${e})`;const requireInterop=(e,r)=>s.types.callExpression(r.addHelper("interopRequireWildcard"),[requireNoInterop(e)]);function transformDynamicImport(e,r,t){const s=r?requireNoInterop:requireInterop;e.replaceWith((0,a.buildDynamicImport)(e.node,true,false,(e=>s(e,t))))}},8417:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(5389);var a=t(6646);var n=t(6118);var o=t(8304);var i=t(9511);var l=(0,s.declare)(((e,r)=>{var t,s,l;e.assertVersion(7);const{strictNamespace:c=false,mjsStrictNamespace:d=c,allowTopLevelThis:u,strict:p,strictMode:f,noInterop:y,importInterop:g,lazy:h=false,allowCommonJSExports:b=true,loose:x=false}=r;const v=(t=e.assumption("constantReexports"))!=null?t:x;const j=(s=e.assumption("enumerableModuleMeta"))!=null?s:x;const w=(l=e.assumption("noIncompleteNsImportDetection"))!=null?l:false;if(typeof h!=="boolean"&&typeof h!=="function"&&(!Array.isArray(h)||!h.every((e=>typeof e==="string")))){throw new Error(`.lazy must be a boolean, array of strings, or a function`)}if(typeof c!=="boolean"){throw new Error(`.strictNamespace must be a boolean, or undefined`)}if(typeof d!=="boolean"){throw new Error(`.mjsStrictNamespace must be a boolean, or undefined`)}const getAssertion=e=>o.template.expression.ast`
|
|||
|
|
(function(){
|
|||
|
|
throw new Error(
|
|||
|
|
"The CommonJS '" + "${e}" + "' variable is not available in ES6 modules." +
|
|||
|
|
"Consider setting setting sourceType:script or sourceType:unambiguous in your " +
|
|||
|
|
"Babel config for this file.");
|
|||
|
|
})()
|
|||
|
|
`;const E={ReferencedIdentifier(e){const r=e.node.name;if(r!=="module"&&r!=="exports")return;const t=e.scope.getBinding(r);const s=this.scope.getBinding(r);if(s!==t||e.parentPath.isObjectProperty({value:e.node})&&e.parentPath.parentPath.isObjectPattern()||e.parentPath.isAssignmentExpression({left:e.node})||e.isAssignmentExpression({left:e.node})){return}e.replaceWith(getAssertion(r))},UpdateExpression(e){const r=e.get("argument");if(!r.isIdentifier())return;const t=r.node.name;if(t!=="module"&&t!=="exports")return;const s=e.scope.getBinding(t);const a=this.scope.getBinding(t);if(a!==s)return;e.replaceWith(o.types.assignmentExpression(e.node.operator[0]+"=",r.node,getAssertion(t)))},AssignmentExpression(e){const r=e.get("left");if(r.isIdentifier()){const t=r.node.name;if(t!=="module"&&t!=="exports")return;const s=e.scope.getBinding(t);const a=this.scope.getBinding(t);if(a!==s)return;const n=e.get("right");n.replaceWith(o.types.sequenceExpression([n.node,getAssertion(t)]))}else if(r.isPattern()){const t=r.getOuterBindingIdentifiers();const s=Object.keys(t).filter((r=>{if(r!=="module"&&r!=="exports")return false;return this.scope.getBinding(r)===e.scope.getBinding(r)}))[0];if(s){const r=e.get("right");r.replaceWith(o.types.sequenceExpression([r.node,getAssertion(s)]))}}}};return{name:"transform-modules-commonjs",pre(){this.file.set("@babel/plugin-transform-modules-*","commonjs")},visitor:{CallExpression(e){if(!this.file.has("@babel/plugin-proposal-dynamic-import"))return;if(!o.types.isImport(e.node.callee))return;let{scope:r}=e;do{r.rename("require")}while(r=r.parent);(0,i.transformDynamicImport)(e,y,this.file)},Program:{exit(e,t){if(!(0,a.isModule)(e))return;e.scope.rename("exports");e.scope.rename("module");e.scope.rename("require");e.scope.rename("__filename");e.scope.rename("__dirname");if(!b){{(0,n.default)(e,new Set(["module","exports"]),false)}e.traverse(E,{scope:e.scope})}let s=(0,a.getModuleName)(this.file.opts,r);if(s)s=o.types.stringLiteral(s);const{meta:i,headers:l}=(0,a.rewriteModuleStatementsAndPrepareHeader)(e,{exportName:"exports",constantReexports:v,enumerableModuleMeta:j,strict:p,strictMode:f,allowTopLevelThis:u,noInterop:y,importInterop:g,lazy:h,esNamespaceOnly:typeof t.filename==="string"&&/\.mjs$/.test(t.filename)?d:c,noIncompleteNsImportDetection:w,filename:this.file.opts.filename});for(const[r,t]of i.source){const s=o.types.callExpression(o.types.identifier("require"),[o.types.stringLiteral(r)]);let n;if((0,a.isSideEffectImport)(t)){if(t.lazy)throw new Error("Assertion failure");n=o.types.expressionStatement(s)}else{if(t.lazy&&!t.referenced){continue}const r=(0,a.wrapInterop)(e,s,t.interop)||s;if(t.lazy){n=o.template.statement.ast`
|
|||
|
|
function ${t.name}() {
|
|||
|
|
const data = ${r};
|
|||
|
|
${t.name} = function(){ return data; };
|
|||
|
|
return data;
|
|||
|
|
}
|
|||
|
|
`}else{n=o.template.statement.ast`
|
|||
|
|
var ${t.name} = ${r};
|
|||
|
|
`}}n.loc=t.loc;l.push(n);l.push(...(0,a.buildNamespaceInitStatements)(i,t,v))}(0,a.ensureStatementsHoisted)(l);e.unshiftContainer("body",l);e.get("body").forEach((e=>{if(l.indexOf(e.node)===-1)return;if(e.isVariableDeclaration()){e.scope.registerDeclaration(e)}}))}}}}}));r["default"]=l},7346:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;r.getExportSpecifierName=getExportSpecifierName;var s=t(4091);var a=t(405);var n=t(8304);var o=t(6646);var i=t(4975);const l=n.template.statement(`\n SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n "use strict";\n BEFORE_BODY;\n return {\n setters: SETTERS,\n execute: EXECUTE,\n };\n });\n`);const c=n.template.statement(`\n for (var KEY in TARGET) {\n if (KEY !== "default" && KEY !== "__esModule") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n`);const d=`WARNING: Dynamic import() transformation must be enabled using the\n @babel/plugin-transform-dynamic-import plugin. Babel 8 will\n no longer transform import() without using that plugin.\n`;const u=`ERROR: Dynamic import() transformation must be enabled using the\n @babel/plugin-transform-dynamic-import plugin. Babel 8\n no longer transforms import() without using that plugin.\n`;function getExportSpecifierName(e,r){if(e.type==="Identifier"){return e.name}else if(e.type==="StringLiteral"){const t=e.value;if(!(0,i.isIdentifierName)(t)){r.add(t)}return t}else{throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${e.type}`)}}function constructExportCall(e,r,t,s,a,o){const i=[];if(!a){if(t.length===1){i.push(n.types.expressionStatement(n.types.callExpression(r,[n.types.stringLiteral(t[0]),s[0]])))}else{const e=[];for(let r=0;r<t.length;r++){const a=t[r];const i=s[r];e.push(n.types.objectProperty(o.has(a)?n.types.stringLiteral(a):n.types.identifier(a),i))}i.push(n.types.expressionStatement(n.types.callExpression(r,[n.types.objectExpression(e)])))}}else{const o=e.scope.generateUid("exportObj");i.push(n.types.variableDeclaration("var",[n.types.variableDeclarator(n.types.identifier(o),n.types.objectExpression([]))]));i.push(c({KEY:e.scope.generateUidIdentifier("key"),EXPORT_OBJ:n.types.identifier(o),TARGET:a}));for(let e=0;e<t.length;e++){const r=t[e];const a=s[e];i.push(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.memberExpression(n.types.identifier(o),n.types.identifier(r)),a)))}i.push(n.types.expressionStatement(n.types.callExpression(r,[n.types.identifier(o)])))}return i}var p=(0,s.declare)(((e,r)=>{e.assertVersion(7);const{systemGlobal:t="System",allowTopLevelThis:s=false}=r;const i=new WeakSet;const c={"AssignmentExpression|UpdateExpression"(e){if(i.has(e.node))return;i.add(e.node);const r=e.isAssignmentExpression()?e.get("left"):e.get("argument");if(r.isObjectPattern()||r.isArrayPattern()){const t=[e.node];for(const s of Object.keys(r.getBindingIdentifiers())){if(this.scope.getBinding(s)!==e.scope.getBinding(s)){return}const r=this.exports[s];if(!r)continue;for(const e of r){t.push(this.buildCall(e,n.types.identifier(s)).expression)}}e.replaceWith(n.types.sequenceExpression(t));return}if(!r.isIdentifier())return;const t=r.node.name;if(this.scope.getBinding(t)!==e.scope.getBinding(t))return;const s=this.exports[t];if(!s)return;let a=e.node;const o=n.types.isUpdateExpression(a,{prefix:false});if(o){a=n.types.binaryExpression(a.operator[0],n.types.unaryExpression("+",n.types.cloneNode(a.argument)),n.types.numericLiteral(1))}for(const e of s){a=this.buildCall(e,a).expression}if(o){a=n.types.sequenceExpression([a,e.node])}e.replaceWith(a)}};return{name:"transform-modules-systemjs",pre(){this.file.set("@babel/plugin-transform-modules-*","systemjs")},visitor:{["CallExpression"+(e.types.importExpression?"|ImportExpression":"")](e,r){if(e.isCallExpression()&&!n.types.isImport(e.node.callee))return;if(e.isCallExpression()){if(!this.file.has("@babel/plugin-proposal-dynamic-import")){{console.warn(d)}}}else{if(!this.file.has("@babel/plugin-
|
|||
|
|
try {
|
|||
|
|
${e.node.body.body}
|
|||
|
|
} catch (e) {
|
|||
|
|
return Promise.reject(e);
|
|||
|
|
}
|
|||
|
|
}`}}else{e.get("body").unshiftContainer("body",y)}return true}},5852:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=convertFunctionRest;var s=t(8304);var a=t(5705);const n=s.template.statement(`\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n`);const o=s.template.expression(`\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n`);const i=s.template.expression(`\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n`);const l=s.template.expression(`\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n`);function referencesRest(e,r){if(e.node.name===r.name){return e.scope.bindingIdentifierEquals(r.name,r.outerBinding)}return false}const c={Scope(e,r){if(!e.scope.bindingIdentifierEquals(r.name,r.outerBinding)){e.skip()}},Flow(e){if(e.isTypeCastExpression())return;e.skip()},Function(e,r){const t=r.noOptimise;r.noOptimise=true;e.traverse(c,r);r.noOptimise=t;e.skip()},ReferencedIdentifier(e,r){const{node:t}=e;if(t.name==="arguments"){r.deopted=true}if(!referencesRest(e,r))return;if(r.noOptimise){r.deopted=true}else{const{parentPath:s}=e;if(s.listKey==="params"&&s.key<r.offset){return}if(s.isMemberExpression({object:t})){const t=s.parentPath;const a=!r.deopted&&!(t.isAssignmentExpression()&&s.node===t.node.left||t.isLVal()||t.isForXStatement()||t.isUpdateExpression()||t.isUnaryExpression({operator:"delete"})||(t.isCallExpression()||t.isNewExpression())&&s.node===t.node.callee);if(a){if(s.node.computed){if(s.get("property").isBaseType("number")){r.candidates.push({cause:"indexGetter",path:e});return}}else if(s.node.property.name==="length"){r.candidates.push({cause:"lengthGetter",path:e});return}}}if(r.offset===0&&s.isSpreadElement()){const t=s.parentPath;if(t.isCallExpression()&&t.node.arguments.length===1){r.candidates.push({cause:"argSpread",path:e});return}}r.references.push(e)}},BindingIdentifier(e,r){if(referencesRest(e,r)){r.deopted=true}}};function getParamsCount(e){let r=e.params.length;if(r>0&&s.types.isIdentifier(e.params[0],{name:"this"})){r-=1}return r}function hasRest(e){const r=e.params.length;return r>0&&s.types.isRestElement(e.params[r-1])}function optimiseIndexGetter(e,r,t){const a=s.types.numericLiteral(t);let n;const l=e.parent;if(s.types.isNumericLiteral(l.property)){n=s.types.numericLiteral(l.property.value+t)}else if(t===0){n=l.property}else{n=s.types.binaryExpression("+",l.property,s.types.cloneNode(a))}const{scope:c,parentPath:d}=e;if(!c.isPure(n)){const e=c.generateUidIdentifierBasedOnNode(n);c.push({id:e,kind:"var"});d.replaceWith(i({ARGUMENTS:r,OFFSET:a,INDEX:n,REF:s.types.cloneNode(e)}))}else{d.replaceWith(o({ARGUMENTS:r,OFFSET:a,INDEX:n}));const e=d;const t=e.get("test");const s=t.get("left").evaluate();if(s.confident){if(s.value===true){e.replaceWith(c.buildUndefinedNode())}else{t.replaceWith(t.get("right"))}}}}function optimiseLengthGetter(e,r,t){if(t){e.parentPath.replaceWith(l({ARGUMENTS:r,OFFSET:s.types.numericLiteral(t)}))}else{e.replaceWith(r)}}function convertFunctionRest(e){const{node:r,scope:t}=e;if(!hasRest(r))return false;const o=e.get(`params.${r.params.length-1}.argument`);if(!o.isIdentifier()){const r=new Set;(0,a.collectShadowedParamsNames)(o,e.scope,r);let n=r.size>0;if(!n){const e={needsOuterBinding:false,scope:t};o.traverse(a.iifeVisitor,e);n=e.needsOuterBinding}if(n){e.ensureBlock();e.set("body",s.types.blockStatement([(0,a.buildScopeIIFE)(r,e.node.body)]))}}let i=o.node;r.params.pop();if(s.types.isPattern(i)){const a=i;i=t.generateUidIdentifier("ref");const n=s.types.variableDeclaration("let",[s.types.variableDeclarator(a,i)]);e.ensureBlock();r.body.body.unshift(n)}else if(i.name==="arguments"){t.rename(i.name)}const l=s.types.identifier("arguments");const d=getParamsCount(r);const u={references:[],offset:d,argumentsNode:l,outerBinding:t.getBindingIdentifier(i.name),candidates:[],name:i.name,deopted:false};e.traverse(c,u);if
|
|||
|
|
try {
|
|||
|
|
${e.node.body.body}
|
|||
|
|
} catch (e) {
|
|||
|
|
return Promise.reject(e);
|
|||
|
|
}
|
|||
|
|
}`}}else{e.get("body").unshiftContainer("body",y)}return true}},3962:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=convertFunctionRest;var s=t(8304);var a=t(897);const n=s.template.statement(`\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n`);const o=s.template.expression(`\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n`);const i=s.template.expression(`\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n`);const l=s.template.expression(`\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n`);function referencesRest(e,r){if(e.node.name===r.name){return e.scope.bindingIdentifierEquals(r.name,r.outerBinding)}return false}const c={Scope(e,r){if(!e.scope.bindingIdentifierEquals(r.name,r.outerBinding)){e.skip()}},Flow(e){if(e.isTypeCastExpression())return;e.skip()},Function(e,r){const t=r.noOptimise;r.noOptimise=true;e.traverse(c,r);r.noOptimise=t;e.skip()},ReferencedIdentifier(e,r){const{node:t}=e;if(t.name==="arguments"){r.deopted=true}if(!referencesRest(e,r))return;if(r.noOptimise){r.deopted=true}else{const{parentPath:s}=e;if(s.listKey==="params"&&s.key<r.offset){return}if(s.isMemberExpression({object:t})){const t=s.parentPath;const a=!r.deopted&&!(t.isAssignmentExpression()&&s.node===t.node.left||t.isLVal()||t.isForXStatement()||t.isUpdateExpression()||t.isUnaryExpression({operator:"delete"})||(t.isCallExpression()||t.isNewExpression())&&s.node===t.node.callee);if(a){if(s.node.computed){if(s.get("property").isBaseType("number")){r.candidates.push({cause:"indexGetter",path:e});return}}else if(s.node.property.name==="length"){r.candidates.push({cause:"lengthGetter",path:e});return}}}if(r.offset===0&&s.isSpreadElement()){const t=s.parentPath;if(t.isCallExpression()&&t.node.arguments.length===1){r.candidates.push({cause:"argSpread",path:e});return}}r.references.push(e)}},BindingIdentifier(e,r){if(referencesRest(e,r)){r.deopted=true}}};function getParamsCount(e){let r=e.params.length;if(r>0&&s.types.isIdentifier(e.params[0],{name:"this"})){r-=1}return r}function hasRest(e){const r=e.params.length;return r>0&&s.types.isRestElement(e.params[r-1])}function optimiseIndexGetter(e,r,t){const a=s.types.numericLiteral(t);let n;const l=e.parent;if(s.types.isNumericLiteral(l.property)){n=s.types.numericLiteral(l.property.value+t)}else if(t===0){n=l.property}else{n=s.types.binaryExpression("+",l.property,s.types.cloneNode(a))}const{scope:c,parentPath:d}=e;if(!c.isPure(n)){const e=c.generateUidIdentifierBasedOnNode(n);c.push({id:e,kind:"var"});d.replaceWith(i({ARGUMENTS:r,OFFSET:a,INDEX:n,REF:s.types.cloneNode(e)}))}else{d.replaceWith(o({ARGUMENTS:r,OFFSET:a,INDEX:n}));const e=d;const t=e.get("test");const s=t.get("left").evaluate();if(s.confident){if(s.value===true){e.replaceWith(c.buildUndefinedNode())}else{t.replaceWith(t.get("right"))}}}}function optimiseLengthGetter(e,r,t){if(t){e.parentPath.replaceWith(l({ARGUMENTS:r,OFFSET:s.types.numericLiteral(t)}))}else{e.replaceWith(r)}}function convertFunctionRest(e){const{node:r,scope:t}=e;if(!hasRest(r))return false;const o=e.get(`params.${r.params.length-1}.argument`);if(!o.isIdentifier()){const r=new Set;(0,a.collectShadowedParamsNames)(o,e.scope,r);let n=r.size>0;if(!n){const e={needsOuterBinding:false,scope:t};o.traverse(a.iifeVisitor,e);n=e.needsOuterBinding}if(n){e.ensureBlock();e.set("body",s.types.blockStatement([(0,a.buildScopeIIFE)(r,e.node.body)]))}}let i=o.node;r.params.pop();if(s.types.isPattern(i)){const a=i;i=t.generateUidIdentifier("ref");const n=s.types.variableDeclaration("let",[s.types.variableDeclarator(a,i)]);e.ensureBlock();r.body.body.unshift(n)}else if(i.name==="arguments"){t.rename(i.name)}const l=s.types.identifier("arguments");const d=getParamsCount(r);const u={references:[],offset:d,argumentsNode:l,outerBinding:t.getBindingIdentifier(i.name),candidates:[],name:i.name,deopted:false};e.traverse(c,u);if(
|
|||
|
|
${s.cloneNode(u.node.id)} === ${(0,a.buildCheckInRHS)(t.right,n)}
|
|||
|
|
`)}else{var p;const r=getWeakSetId(l,u,u,(p=u.node.id)==null?void 0:p.name,injectInitialization);e.replaceWith(o.expression.ast`${r}.has(${(0,a.buildCheckInRHS)(t.right,n)})`)}}else{const r=getWeakSetId(c,u,d,d.node.key.id.name,injectToFieldInit);e.replaceWith(o.expression.ast`${r}.has(${(0,a.buildCheckInRHS)(t.right,n)})`)}}}}}));r["default"]=o},2914:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=t(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-property-literals",visitor:{ObjectProperty:{exit({node:e}){const r=e.key;if(!e.computed&&a.types.isIdentifier(r)&&!a.types.isValidES3Identifier(r.name)){e.key=a.types.stringLiteral(r.name)}}}}}}));r["default"]=n},2523:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(5389);var a=t(1017);var n=t(8304);var o=(0,s.declare)((e=>{e.assertVersion(7);function addDisplayName(e,r){const t=r.arguments[0].properties;let s=true;for(let e=0;e<t.length;e++){const r=t[e];if(n.types.isSpreadElement(r)){continue}const a=n.types.toComputedKey(r);if(n.types.isStringLiteral(a,{value:"displayName"})){s=false;break}}if(s){t.unshift(n.types.objectProperty(n.types.identifier("displayName"),n.types.stringLiteral(e)))}}const r=n.types.buildMatchMemberExpression("React.createClass");const isCreateClassAddon=e=>n.types.isIdentifier(e,{name:"createReactClass"});function isCreateClass(e){if(!e||!n.types.isCallExpression(e))return false;if(!r(e.callee)&&!isCreateClassAddon(e.callee)){return false}const t=e.arguments;if(t.length!==1)return false;const s=t[0];if(!n.types.isObjectExpression(s))return false;return true}return{name:"transform-react-display-name",visitor:{ExportDefaultDeclaration({node:e},r){if(isCreateClass(e.declaration)){const t=r.filename||"unknown";let s=a.basename(t,a.extname(t));if(s==="index"){s=a.basename(a.dirname(t))}addDisplayName(s,e.declaration)}},CallExpression(e){const{node:r}=e;if(!isCreateClass(r))return;let t;e.find((function(e){if(e.isAssignmentExpression()){t=e.node.left}else if(e.isObjectProperty()){t=e.node.key}else if(e.isVariableDeclarator()){t=e.node.id}else if(e.isStatement()){return true}if(t)return true}));if(!t)return;if(n.types.isMemberExpression(t)){t=t.property}if(n.types.isIdentifier(t)){addDisplayName(t.name,r)}}}}}));r["default"]=o},3019:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});Object.defineProperty(r,"default",{enumerable:true,get:function(){return s.default}});var s=t(3898)},5447:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=createPlugin;var s=t(6085);var a=t(5389);var n=t(8304);var o=t(3380);var i=t(365);const l={importSource:"react",runtime:"automatic",pragma:"React.createElement",pragmaFrag:"React.Fragment"};const c=/^\s*\*?\s*@jsxImportSource\s+([^\s]+)\s*$/m;const d=/^\s*\*?\s*@jsxRuntime\s+([^\s]+)\s*$/m;const u=/^\s*\*?\s*@jsx\s+([^\s]+)\s*$/m;const p=/^\s*\*?\s*@jsxFrag\s+([^\s]+)\s*$/m;const get=(e,r)=>e.get(`@babel/plugin-react-jsx/${r}`);const set=(e,r,t)=>e.set(`@babel/plugin-react-jsx/${r}`,t);function hasProto(e){return e.properties.some((e=>n.types.isObjectProperty(e,{computed:false,shorthand:false})&&(n.types.isIdentifier(e.key,{name:"__proto__"})||n.types.isStringLiteral(e.key,{value:"__proto__"}))))}function createPlugin({name:e,development:r}){return(0,a.declare)(((t,a)=>{const{pure:o,throwIfNamespace:f=true,filter:y,runtime:g=(r?"automatic":"classic"),importSource:h=l.importSource,pragma:b=l.pragma,pragmaFrag:x=l.pragmaFrag}=a;{var{useSpread:v=false,useBuiltIns:j=false}=a;if(g==="classic"){if(typeof v!=="boolean"){throw new Error("transform-react-jsx currently only accepts a boolean option for "+"useSpread (defaults to false)")}if(typeof j!=="boolean"){throw new Error("transform-react-jsx currently only accepts a boolean option for "+"useBuiltIns (defaults to false)")}if(v&&j){throw new Error("transform-react-jsx currently only accepts useBuiltIns or useSpread "+"but not both")}}}const w={JSXOpeningElement(e,r){c
|
|||
|
|
fileName: ${e},
|
|||
|
|
lineNumber: ${s},
|
|||
|
|
columnNumber: ${a},
|
|||
|
|
}`}function sourceSelfError(e,r){const t=`transform-react-jsx-${r.slice(2)}`;return e.buildCodeFrameError(`Duplicate ${r} prop found. You are most likely using the deprecated ${t} Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.`)}},3898:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(5447);var a=(0,s.default)({name:"transform-react-jsx/development",development:true});r["default"]=a},3985:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(5447);var a=(0,s.default)({name:"transform-react-jsx",development:false});r["default"]=a},2146:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(5389);var a=t(365);var n=t(8304);const o=[["react",new Set(["cloneElement","createContext","createElement","createFactory","createRef","forwardRef","isValidElement","memo","lazy"])],["react-dom",new Set(["createPortal"])]];var i=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-react-pure-annotations",visitor:{CallExpression(e){if(isReactCall(e)){(0,a.default)(e)}}}}}));r["default"]=i;function isReactCall(e){const r=e.get("callee");if(!r.isMemberExpression()){for(const[e,t]of o){for(const s of t){if(r.referencesImport(e,s)){return true}}}return false}const t=r.get("object");const s=r.node;if(!s.computed&&n.types.isIdentifier(s.property)){const e=s.property.name;for(const[r,s]of o){if(t.referencesImport(r,"default")||t.referencesImport(r,"*")){return s.has(e)}}}return false}},4057:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=t(9982);var n=(0,s.declare)((({types:e,assertVersion:r})=>{r(7);return{name:"transform-regenerator",inherits:a.default,visitor:{MemberExpression(r){{var t;if(!((t=this.availableHelper)!=null&&t.call(this,"regeneratorRuntime"))){return}}const s=r.get("object");if(s.isIdentifier({name:"regeneratorRuntime"})){const r=this.addHelper("regeneratorRuntime");{if(e.isArrowFunctionExpression(r)){s.replaceWith(r.body);return}}s.replaceWith(e.callExpression(r,[]))}}}}}));r["default"]=n},418:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=t(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-reserved-words",visitor:{"BindingIdentifier|ReferencedIdentifier"(e){if(!a.types.isValidES3Identifier(e.node.name)){e.scope.rename(e.node.name)}}}}}));r["default"]=n},6043:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=_default;r.resolveFSPath=resolveFSPath;var s=t(1017);var a=t(8188);function _default(e,r,t){if(t===false)return e;return resolveAbsoluteRuntime(e,s.resolve(r,t===true?".":t))}function resolveAbsoluteRuntime(e,r){try{return s.dirname((((e,r)=>(e=e.split("."),r=r.split("."),+e[0]>+r[0]||e[0]==r[0]&&+e[1]>=+r[1]))(process.versions.node,"8.9")?require.resolve:(e,{paths:[r]},s=t(8188))=>{let a=s._findPath(e,s._nodeModulePaths(r).concat(r));if(a)return a;a=new Error(`Cannot resolve module '${e}'`);a.code="MODULE_NOT_FOUND";throw a})(`${e}/package.json`,{paths:[r]})).replace(/\\/g,"/")}catch(t){if(t.code!=="MODULE_NOT_FOUND")throw t;throw Object.assign(new Error(`Failed to resolve "${e}" relative to "${r}"`),{code:"BABEL_RUNTIME_NOT_FOUND",runtime:e,dirname:r})}}function resolveFSPath(e){return require.resolve(e).replace(/\\/g,"/")}},9257:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.hasMinVersion=hasMinVersion;var s=t(7849);function hasMinVersion(e,r){if(!r)return true;if(s.valid(r))r=`^${r}`;return!s.intersects(`<${e}`,r)&&!s.intersects(`>=8.0.0`,r)}},1390:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(5389);var a=t(3380);var n=t(8304);var o=t(9257);var i=t(6043);var l=t(3555);function supportsStaticESM(e){return!!(e!=null&&e.supportsStaticESM)}var c=(0,s.decl
|
|||
|
|
${a.types.cloneNode(c)} || (
|
|||
|
|
${c} = ${this.addHelper(i)}(${l})
|
|||
|
|
)
|
|||
|
|
`,...t.expressions]))},TemplateLiteral(e){if(e.parent.type==="TSLiteralType"){return}const r=[];const t=e.get("expressions");let s=0;for(const n of e.node.quasis){if(n.value.cooked){r.push(a.types.stringLiteral(n.value.cooked))}if(s<t.length){const e=t[s++];const n=e.node;if(!a.types.isStringLiteral(n,{value:""})){r.push(n)}}}if(!a.types.isStringLiteral(r[0])&&!(n&&a.types.isStringLiteral(r[1]))){r.unshift(a.types.stringLiteral(""))}let o=r[0];if(n){for(let e=1;e<r.length;e++){o=a.types.binaryExpression("+",o,r[e])}}else if(r.length>1){o=buildConcatCallExpressions(r)}e.replaceWith(o)}}}}));r["default"]=n},6182:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=t(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-typeof-symbol",visitor:{Scope({scope:e}){if(!e.getBinding("Symbol")){return}e.rename("Symbol")},UnaryExpression(e){const{node:r,parent:t}=e;if(r.operator!=="typeof")return;if(e.parentPath.isBinaryExpression()&&a.types.EQUALITY_BINARY_OPERATORS.indexOf(t.operator)>=0){const r=e.getOpposite();if(r.isStringLiteral()&&r.node.value!=="symbol"&&r.node.value!=="object"){return}}let s=e.findParent((e=>{if(e.isFunction()){var r;return((r=e.get("body.directives.0"))==null?void 0:r.node.value.value)==="@babel/helpers - typeof"}}));if(s)return;const n=this.addHelper("typeof");s=e.findParent((e=>e.isVariableDeclarator()&&e.node.id===n||e.isFunctionDeclaration()&&e.node.id&&e.node.id.name===n.name));if(s){return}const o=a.types.callExpression(n,[r.argument]);const i=e.get("argument");if(i.isIdentifier()&&!e.scope.hasBinding(i.node.name,true)){const t=a.types.unaryExpression("typeof",a.types.cloneNode(r.argument));e.replaceWith(a.types.conditionalExpression(a.types.binaryExpression("===",t,a.types.stringLiteral("undefined")),a.types.stringLiteral("undefined"),o))}else{e.replaceWith(o)}}}}}));r["default"]=n},6969:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=transpileConstEnum;var s=t(7812);function transpileConstEnum(e,r){const{name:t}=e.node.id;const a=e.parentPath.isExportNamedDeclaration();let n=a;if(!n&&r.isProgram(e.parent)){n=e.parent.body.some((e=>r.isExportNamedDeclaration(e)&&e.exportKind!=="type"&&!e.source&&e.specifiers.some((e=>r.isExportSpecifier(e)&&e.exportKind!=="type"&&e.local.name===t))))}const{enumValues:o}=(0,s.translateEnumValues)(e,r);if(n){const s=r.objectExpression(o.map((([e,t])=>r.objectProperty(r.isValidIdentifier(e)?r.identifier(e):r.stringLiteral(e),t))));if(e.scope.hasOwnBinding(t)){(a?e.parentPath:e).replaceWith(r.expressionStatement(r.callExpression(r.memberExpression(r.identifier("Object"),r.identifier("assign")),[e.node.id,s])))}else{e.replaceWith(r.variableDeclaration("var",[r.variableDeclarator(e.node.id,s)]));e.scope.registerDeclaration(e)}return}const i=new Map(o);e.scope.path.traverse({Scope(e){if(e.scope.hasOwnBinding(t))e.skip()},MemberExpression(e){if(!r.isIdentifier(e.node.object,{name:t}))return;let s;if(e.node.computed){if(r.isStringLiteral(e.node.property)){s=e.node.property.value}else{return}}else if(r.isIdentifier(e.node.property)){s=e.node.property.name}else{return}if(!i.has(s))return;e.replaceWith(r.cloneNode(i.get(s)))}});e.remove()}},7812:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=transpileEnum;r.translateEnumValues=translateEnumValues;var s=t(8304);var a=t(9491);var n=t(365);const o=new WeakMap;const i=s.template.expression(`\n (function (ID) {\n ASSIGNMENTS;\n return ID;\n })(INIT)\n `);function transpileEnum(e,r){const{node:t,parentPath:s}=e;if(t.declare){e.remove();return}const a=t.id.name;const{fill:l,data:c,isPure:d}=enumFill(e,r,t.id);switch(s.type){case"BlockStatement":case"ExportNamedDeclaration":case"Program":{const u=r.isProgram(e.parent);const p=seen(s);let f=r.objectExpression([]);if(p||u){f=r.logicalExpression("||",r.cloneNode(l.ID),f)}const y=i(Object.assign({},l,{INIT:f}));if(d)(0,n.default)(y);if(p){const a=s.isExportDeclaration()?s:e;a.replaceWith(r.expressionSta
|
|||
|
|
this.${t.cloneNode(i)} = ${t.cloneNode(i)}`);r.replaceWith(r.get("parameter"));o.registerBinding("param",r)}}(0,n.injectInitialization)(r,e,a)}};return{name:"transform-typescript",inherits:a.default,visitor:{Pattern:visitPattern,Identifier:visitPattern,RestElement:visitPattern,Program:{enter(e,r){const{file:t}=r;let s=null;let a=null;const n=e.scope;if(!c.has(n)){c.set(n,new Set)}if(t.ast.comments){for(const e of t.ast.comments){const r=p.exec(e.value);if(r){if(r[1]){a=r[2]}else{s=r[2]}}}}let o=s||y;if(o){[o]=o.split(".")}let i=a||g;if(i){[i]=i.split(".")}for(let t of e.get("body")){if(t.isImportDeclaration()){if(!d.has(r.file.ast.program)){d.set(r.file.ast.program,true)}if(t.node.importKind==="type"){for(const e of t.node.specifiers){registerGlobalType(n,e.local.name)}t.remove();continue}const s=new Set;const a=t.node.specifiers.length;const isAllSpecifiersElided=()=>a>0&&a===s.size;for(const e of t.node.specifiers){if(e.type==="ImportSpecifier"&&e.importKind==="type"){registerGlobalType(n,e.local.name);const r=t.scope.getBinding(e.local.name);if(r){s.add(r.path)}}}if(h){d.set(e.node,false)}else{if(t.node.specifiers.length===0){d.set(e.node,false);continue}for(const r of t.node.specifiers){const a=t.scope.getBinding(r.local.name);if(a&&!s.has(a.path)){if(isImportTypeOnly({binding:a,programPath:e,pragmaImportName:o,pragmaFragImportName:i})){s.add(a.path)}else{d.set(e.node,false)}}}}if(isAllSpecifiersElided()&&!h){t.remove()}else{for(const e of s){e.remove()}}continue}if(t.isExportDeclaration()){t=t.get("declaration")}if(t.isVariableDeclaration({declare:true})){for(const e of Object.keys(t.getBindingIdentifiers())){registerGlobalType(n,e)}}else if(t.isTSTypeAliasDeclaration()||t.isTSDeclareFunction()&&t.get("id").isIdentifier()||t.isTSInterfaceDeclaration()||t.isClassDeclaration({declare:true})||t.isTSEnumDeclaration({declare:true})||t.isTSModuleDeclaration({declare:true})&&t.get("id").isIdentifier()){registerGlobalType(n,t.node.id.name)}}},exit(e){if(e.node.sourceType==="module"&&d.get(e.node)){e.pushContainer("body",t.exportNamedDeclaration())}}},ExportNamedDeclaration(e,r){if(!d.has(r.file.ast.program)){d.set(r.file.ast.program,true)}if(e.node.exportKind==="type"){e.remove();return}if(e.node.source&&e.node.specifiers.length>0&&e.node.specifiers.every((e=>e.type==="ExportSpecifier"&&e.exportKind==="type"))){e.remove();return}if(!e.node.source&&e.node.specifiers.length>0&&e.node.specifiers.every((r=>t.isExportSpecifier(r)&&isGlobalType(e,r.local.name)))){e.remove();return}if(t.isTSModuleDeclaration(e.node.declaration)){const r=e.node.declaration;const{id:s}=r;if(t.isIdentifier(s)){if(e.scope.hasOwnBinding(s.name)){e.replaceWith(r)}else{const[a]=e.replaceWithMultiple([t.exportNamedDeclaration(t.variableDeclaration("let",[t.variableDeclarator(t.cloneNode(s))])),r]);e.scope.registerDeclaration(a)}}}d.set(r.file.ast.program,false)},ExportAllDeclaration(e){if(e.node.exportKind==="type")e.remove()},ExportSpecifier(e){const r=e.parent;if(!r.source&&isGlobalType(e,e.node.local.name)||e.node.exportKind==="type"){e.remove()}},ExportDefaultDeclaration(e,r){if(!d.has(r.file.ast.program)){d.set(r.file.ast.program,true)}if(t.isIdentifier(e.node.declaration)&&isGlobalType(e,e.node.declaration.name)){e.remove();return}d.set(r.file.ast.program,false)},TSDeclareFunction(e){safeRemove(e)},TSDeclareMethod(e){safeRemove(e)},VariableDeclaration(e){if(e.node.declare){safeRemove(e)}},VariableDeclarator({node:e}){if(e.definite)e.definite=null},TSIndexSignature(e){e.remove()},ClassDeclaration(e){const{node:r}=e;if(r.declare){safeRemove(e)}},Class(e){const{node:r}=e;if(r.typeParameters)r.typeParameters=null;if(r.superTypeParameters)r.superTypeParameters=null;if(r.implements)r.implements=null;if(r.abstract)r.abstract=null;e.get("body.body").forEach((r=>{if(r.isClassMethod()||r.isClassPrivateMethod()){if(r.node.kind==="constructor"){v.constructor(r,e)}else{v.method(r)}}else if(r.isClassProperty()||r.isClassPrivateProperty()||r.isClassAccessorProperty()){v.field(r)}}))},Function(e){const{node:r}=e;if(r.typeParameters)r.typeParameters=null;
|
|||
|
|
${s.types.cloneNode(e)} ||
|
|||
|
|
(${s.types.cloneNode(e)} = ${c})
|
|||
|
|
`}return s.template.statement.ast`
|
|||
|
|
(function (${s.types.identifier(o)}) {
|
|||
|
|
${i}
|
|||
|
|
})(${n} || (${s.types.cloneNode(n)} = ${c}));
|
|||
|
|
`}},8892:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(4091);var a=t(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);const r=/[\ud800-\udfff]/g;const t=/(\\+)u\{([0-9a-fA-F]+)\}/g;function escape(e){{let r=e.toString(16);while(r.length<4)r="0"+r;return"\\u"+r}}function replacer(e,r,t){if(r.length%2===0){return e}const s=String.fromCodePoint(parseInt(t,16));const a=r.slice(0,-1)+escape(s.charCodeAt(0));return s.length===1?a:a+escape(s.charCodeAt(1))}function replaceUnicodeEscapes(e){return e.replace(t,replacer)}function getUnicodeEscape(e){let r;while(r=t.exec(e)){if(r[1].length%2===0)continue;t.lastIndex=0;return r[0]}return null}return{name:"transform-unicode-escapes",manipulateOptions({generatorOpts:e}){var r,t;if(!e.jsescOption){e.jsescOption={}}(t=(r=e.jsescOption).minimal)!=null?t:r.minimal=false},visitor:{Identifier(e){const{node:t,key:s}=e;const{name:n}=t;const o=n.replace(r,(e=>`_u${e.charCodeAt(0).toString(16)}`));if(n===o)return;const i=a.types.inherits(a.types.stringLiteral(n),t);if(s==="key"){e.replaceWith(i);return}const{parentPath:l,scope:c}=e;if(l.isMemberExpression({property:t})||l.isOptionalMemberExpression({property:t})){l.node.computed=true;e.replaceWith(i);return}const d=c.getBinding(n);if(d){c.rename(n,c.generateUid(o));return}throw e.buildCodeFrameError(`Can't reference '${n}' as a bare identifier`)},"StringLiteral|DirectiveLiteral"(e){const{node:r}=e;const{extra:t}=r;if(t!=null&&t.raw)t.raw=replaceUnicodeEscapes(t.raw)},TemplateElement(e){const{node:r,parentPath:t}=e;const{value:s}=r;const a=getUnicodeEscape(s.raw);if(!a)return;const n=t.parentPath;if(n.isTaggedTemplateExpression()){throw e.buildCodeFrameError(`Can't replace Unicode escape '${a}' inside tagged template literals. You can enable '@babel/plugin-transform-template-literals' to compile them to classic strings.`)}s.raw=replaceUnicodeEscapes(s.raw)}}}}));r["default"]=n},2020:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9626);var a=t(4091);var n=(0,a.declare)(((e,r)=>{e.assertVersion(7);const{useUnicodeFlag:t=true}=r;if(typeof t!=="boolean"){throw new Error(".useUnicodeFlag must be a boolean, or undefined")}return(0,s.createRegExpFeaturePlugin)({name:"transform-unicode-property-regex",feature:"unicodePropertyEscape",options:{useUnicodeFlag:t}})}));r["default"]=n},938:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9626);var a=t(4091);var n=(0,a.declare)((e=>{e.assertVersion(7);return(0,s.createRegExpFeaturePlugin)({name:"transform-unicode-regex",feature:"unicodeFlag"})}));r["default"]=n},1834:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=void 0;var s=t(9626);var a=t(4091);var n=(0,a.declare)((e=>{e.assertVersion(7);return(0,s.createRegExpFeaturePlugin)({name:"transform-unicode-sets-regex",feature:"unicodeSetsFlag",manipulateOptions(e,r){r.plugins.push("regexpUnicodeSets")}})}));r["default"]=n},8161:(e,r,t)=>{e.exports=t(7618)},458:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.minVersions=r["default"]=void 0;var s=t(3975);var a=t(3412);var n=t(5491);var o=t(7802);var i=t(301);var l=t(5579);var c=t(4810);var d=t(8845);var u=t(915);var p=t(647);var f=t(7779);var y=t(4100);var g=t(3322);var h=t(3720);var b=t(9430);var x=t(6775);var v=t(1712);var j=t(4766);var w=t(9394);var E=t(4927);var _=t(7422);var S=t(9962);var k=t(1997);var C=t(5953);var P=t(9325);var D=t(3613);var I=t(143);var O=t(5549);var A=t(3107);var R=t(7818);var M=t(1472);var F=t(2020);var N=t(3055);var B=t(3628);var L=t(1242);var W=t(6383);var U=t(0);var q=t(3051);var V=t(3675);var $=t(1985);var G=t(99);var H=t(5427);var z=t(8644);var K=t(3105);var Y=t(4284);var X=t(8597);var J=t(7868);var Z=t(8417);var Q=t(7346);var ee=t(1110);var re=t(584);var te=t(5669);var se=t(538);var ae=t(3892);var ne=t(2914);var oe=t(4057);var ie=t(418);var le=t(5316);var ce=t(1743);var de=t(7584);var ue=t(1005);var pe=t(6182);var fe=t(8892);var ye=t(938);var me=t(1834
|
|||
|
|
import "core-js";
|
|||
|
|
import "regenerator-runtime/runtime.js";
|
|||
|
|
`)}else{i.replaceWith(e.ast`
|
|||
|
|
import "core-js";
|
|||
|
|
`)}}},Program(i){i.get("body").forEach((i=>{const l=(0,s.getRequireSource)(i);if(o&&(0,s.isPolyfillSource)(l)){console.warn(n.replace("SPECIFIER",l));if(!t)i.remove()}else if(l==="@babel/polyfill"){if(t){console.warn(a)}else if(r){i.replaceWithMultiple(e.ast`
|
|||
|
|
require("core-js");
|
|||
|
|
require("regenerator-runtime/runtime.js");
|
|||
|
|
`)}else{i.replaceWith(e.ast`
|
|||
|
|
require("core-js");
|
|||
|
|
`)}}}))}}}}},1282:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r["default"]=_default;var s=t(9218);function isRegeneratorSource(e){return e==="regenerator-runtime/runtime"||e==="regenerator-runtime/runtime.js"}function _default(){const e={ImportDeclaration(e){if(isRegeneratorSource((0,s.getImportSource)(e))){this.regeneratorImportExcluded=true;e.remove()}},Program(e){e.get("body").forEach((e=>{if(isRegeneratorSource((0,s.getRequireSource)(e))){this.regeneratorImportExcluded=true;e.remove()}}))}};return{name:"preset-env/remove-regenerator",visitor:e,pre(){this.regeneratorImportExcluded=false},post(){if(this.opts.debug&&this.regeneratorImportExcluded){let e=this.file.opts.filename;if(process.env.BABEL_ENV==="test"){e=e.replace(/\\/g,"/")}console.log(`\n[${e}] Based on your targets, regenerator-runtime import excluded.`)}}}}},9218:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getImportSource=getImportSource;r.getRequireSource=getRequireSource;r.isPolyfillSource=isPolyfillSource;var s=t(8622);const{isCallExpression:a,isExpressionStatement:n,isIdentifier:o,isStringLiteral:i}=s;function getImportSource({node:e}){if(e.specifiers.length===0)return e.source.value}function getRequireSource({node:e}){if(!n(e))return;const{expression:r}=e;if(a(r)&&o(r.callee)&&r.callee.name==="require"&&r.arguments.length===1&&i(r.arguments[0])){return r.arguments[0].value}}function isPolyfillSource(e){return e==="@babel/polyfill"||e==="core-js"}},9583:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.proposalSyntaxPlugins=r.proposalPlugins=r.pluginSyntaxMap=void 0;const t=new Set;r.proposalPlugins=t;const s=["syntax-import-assertions","syntax-import-attributes"];r.proposalSyntaxPlugins=s;const a={"transform-async-generator-functions":"syntax-async-generators","transform-class-properties":"syntax-class-properties","transform-class-static-block":"syntax-class-static-block","transform-json-strings":"syntax-json-strings","transform-nullish-coalescing-operator":"syntax-nullish-coalescing-operator","transform-numeric-separator":"syntax-numeric-separator","transform-object-rest-spread":"syntax-object-rest-spread","transform-optional-catch-binding":"syntax-optional-catch-binding","transform-optional-chaining":"syntax-optional-chaining","transform-private-methods":"syntax-class-properties","transform-private-property-in-object":"syntax-private-property-in-object","transform-unicode-property-regex":null};const n=Object.keys(a).map((function(e){return[e,a[e]]}));const o=new Map(n);r.pluginSyntaxMap=o},6780:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var s=t(5389);var a=t(3985);var n=t(3019);var o=t(2523);var i=t(2146);var l=t(4716);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var c=_interopDefaultLegacy(a);var d=_interopDefaultLegacy(n);var u=_interopDefaultLegacy(o);var p=_interopDefaultLegacy(i);new l.OptionValidator("@babel/preset-react");function normalizeOptions(e={}){{let{pragma:r,pragmaFrag:t}=e;const{pure:s,throwIfNamespace:a=true,runtime:n="classic",importSource:o,useBuiltIns:i,useSpread:l}=e;if(n==="classic"){r=r||"React.createElement";t=t||"React.Fragment"}const c=!!e.development;return{development:c,importSource:o,pragma:r,pragmaFrag:t,pure:s,runtime:n,throwIfNamespace:a,useBuiltIns:i,useSpread:l}}}var f=s.declarePreset(((e,r)=>{e.assertVersion(7);const{development:t,importSource:s,pragma:a,pragmaFrag:n,pure:o,runtime:i,throwIfNamespace:l}=normalizeOptions(r);return{plugins:[[t?d["default"]:c["default"],{importSource:s,pragma:a,pragmaFrag:n,runtime:i,throwIfNamespace:l,pure:o,useBuiltIns:!!r.useBuiltIns,useSpread:r.useSpread}],u["default"],o!==false&&p["default"]].filter(Boolean)}}));r["default"]=f},645:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});var s=t(5389);var a=t(7167);t(6085);var n=t(8417);var o=t(4716);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var i=_interopDefaultLegacy(a);var l=_interop
|