Files

Return to Package Diff Home.
Brought to you by Intrinsic.

Package Diff: rollup @ 1.12.2 .. 1.12.3

bin/rollup

@@ -223,7 +223,7 @@
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
}
-var version = "1.12.2";
+var version = "1.12.3";
const createGetOption = (config, command) => (name, defaultValue) => command[name] !== undefined
? command[name]
@@ -264,7 +264,11 @@
const configExternal = config.external;
return typeof configExternal === 'function'
? (id, ...rest) => configExternal(id, ...rest) || command.external.indexOf(id) !== -1
- : (configExternal || []).concat(command.external);
+ : (typeof config.external === 'string'
+ ? [configExternal]
+ : Array.isArray(configExternal)
+ ? configExternal
+ : []).concat(command.external);
};
const commandAliases = {
c: 'config',
@@ -310,22 +314,21 @@
errors.push(`Unknown ${optionType}: ${unknownOptions.join(', ')}. Allowed options: ${validOptions.sort().join(', ')}`);
}
function getCommandOptions(rawCommandOptions) {
- const command = Object.assign({}, rawCommandOptions);
- command.external = rawCommandOptions.external ? rawCommandOptions.external.split(',') : [];
- if (rawCommandOptions.globals) {
- command.globals = Object.create(null);
- rawCommandOptions.globals.split(',').forEach((str) => {
- const names = str.split(':');
- command.globals[names[0]] = names[1];
- // Add missing Module IDs to external.
- if (command.external.indexOf(names[0]) === -1) {
- command.external.push(names[0]);
- }
- });
- }
- return command;
+ const external = rawCommandOptions.external && typeof rawCommandOptions.external === 'string'
+ ? rawCommandOptions.external.split(',')
+ : [];
+ return Object.assign({}, rawCommandOptions, { external, globals: typeof rawCommandOptions.globals === 'string'
+ ? rawCommandOptions.globals.split(',').reduce((globals, globalDefinition) => {
+ const [id, variableName] = globalDefinition.split(':');
+ globals[id] = variableName;
+ if (external.indexOf(id) === -1) {
+ external.push(id);
+ }
+ return globals;
+ }, Object.create(null))
+ : undefined });
}
-function getInputOptions(config, command = {}, defaultOnWarnHandler) {
+function getInputOptions(config, command = { external: [], globals: undefined }, defaultOnWarnHandler) {
const getOption = createGetOption(config, command);
const inputOptions = {
acorn: config.acorn,
@@ -516,7 +519,7 @@
stderr(turbocolor.cyan(err.url));
}
if (err.loc) {
- stderr(`${relativeId(err.loc.file || err.id)} (${err.loc.line}:${err.loc.column})`);
+ stderr(`${relativeId((err.loc.file || err.id))} (${err.loc.line}:${err.loc.column})`);
}
else if (err.id) {
stderr(relativeId(err.id));
@@ -563,7 +566,8 @@
return -1;
if (deferredHandlers[b])
return 1;
- return allWarnings.get(b).length - allWarnings.get(a).length;
+ return (allWarnings.get(b).length -
+ allWarnings.get(a).length);
});
codes.forEach(code => {
const handler = deferredHandlers[code];
@@ -939,9 +943,11 @@
function build(inputOptions, outputOptions, warnings, silent = false) {
const useStdout = !outputOptions[0].file && !outputOptions[0].dir;
const start = Date.now();
- const files = useStdout ? ['stdout'] : outputOptions.map(t => relativeId(t.file || t.dir));
+ const files = useStdout
+ ? ['stdout']
+ : outputOptions.map(t => relativeId(t.file || t.dir));
if (!silent) {
- let inputFiles;
+ let inputFiles = undefined;
if (typeof inputOptions.input === 'string') {
inputFiles = inputOptions.input;
}
@@ -974,7 +980,8 @@
else {
source = file.code;
if (output.sourcemap === 'inline') {
- source += `\n//# ${SOURCEMAPPING_URL$1}=${file.map.toUrl()}\n`;
+ source += `\n//# ${SOURCEMAPPING_URL$1}=${file
+ .map.toUrl()}\n`;
}
}
if (outputs.length > 1)

CHANGELOG.md

@@ -1,5 +1,15 @@
# rollup changelog
+## 1.12.3
+*2019-05-19*
+
+### Bug Fixes
+* Prevent duplicate imports when exports are reexported as default exports (#2866)
+
+### Pull Requests
+* [#2755](https://github.com/rollup/rollup/pull/2755): Enable TypeScript strictNullChecks (@edsrzf)
+* [#2866](https://github.com/rollup/rollup/pull/2866): Properly deduplicate reexported default exports (@lukastaegert)
+
## 1.12.2
*2019-05-17*

dist/rollup.browser.es.js

@@ -1,11 +1,11 @@
/*
@license
- Rollup.js v1.12.2
- Fri, 17 May 2019 12:41:59 GMT - commit a4fbc5374cb5fe43a2070855cea74cf7c0789543
+ Rollup.js v1.12.3
+ Sun, 19 May 2019 09:38:58 GMT - commit 455e99473173da50a6e3b30ed8bc9997f3f55afc
https://github.com/rollup/rollup
Released under the MIT License.
*/
-var e,t="1.12.2",n=r;function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var h={inherits:(function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}(e={exports:{}},e.exports),e.exports),toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),s=0;s<e.length;s+=2)n.push(parseInt(e[s]+e[s+1],16))}else for(var r=0,s=0;s<e.length;s++){var o=e.charCodeAt(s);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):i(e,s)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++s)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(s=0;s<e.length;s++)n[s]=0|e[s];return n},toHex:function(e){for(var t="",n=0;n<e.length;n++)t+=o(e[n].toString(16));return t},htonl:s,toHex32:function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=s(i)),n+=a(i.toString(16))}return n},zero2:o,zero8:a,join32:function(e,t,r,i){var s=r-t;n(s%4==0);for(var o=new Array(s/4),a=0,h=t;a<o.length;a++,h+=4){var u;u="big"===i?e[h]<<24|e[h+1]<<16|e[h+2]<<8|e[h+3]:e[h+3]<<24|e[h+2]<<16|e[h+1]<<8|e[h],o[a]=u>>>0}return o},split32:function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var s=e[r];"big"===t?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=255&s):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=255&s)}return n},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<<t|e>>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,n){return e+t+n>>>0},sum32_4:function(e,t,n,r){return e+t+n+r>>>0},sum32_5:function(e,t,n,r,i){return e+t+n+r+i>>>0},sum64:function(e,t,n,r){var i=e[t],s=r+e[t+1]>>>0,o=(s<r?1:0)+n+i;e[t]=o>>>0,e[t+1]=s},sum64_hi:function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},sum64_lo:function(e,t,n,r){return t+r>>>0},sum64_4_hi:function(e,t,n,r,i,s,o,a){var h=0,u=t;return h+=(u=u+r>>>0)<t?1:0,h+=(u=u+s>>>0)<s?1:0,e+n+i+o+(h+=(u=u+a>>>0)<a?1:0)>>>0},sum64_4_lo:function(e,t,n,r,i,s,o,a){return t+r+s+a>>>0},sum64_5_hi:function(e,t,n,r,i,s,o,a,h,u){var c=0,l=t;return c+=(l=l+r>>>0)<t?1:0,c+=(l=l+s>>>0)<s?1:0,c+=(l=l+a>>>0)<a?1:0,e+n+i+o+h+(c+=(l=l+u>>>0)<u?1:0)>>>0},sum64_5_lo:function(e,t,n,r,i,s,o,a,h,u){return t+r+s+a+u>>>0},rotr64_hi:function(e,t,n){return(t<<32-n|e>>>n)>>>0},rotr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0},shr64_hi:function(e,t,n){return e>>>n},shr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0}};function u(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var c=u;u.prototype.update=function(e,t){if(e=h.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=h.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},u.prototype.digest=function(e){return this.update(this._pad()),n(null===this.pending),this._digest(e)},u.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,s=8;s<this.padLength;s++)r[i++]=0;return r};var l={BlockHash:c},p=h.rotr32;function d(e,t,n){return e&t^~e&n}function f(e,t,n){return e&t^e&n^t&n}function m(e,t,n){return e^t^n}var g={ft_1:function(e,t,n,r){return 0===e?d(t,n,r):1===e||3===e?m(t,n,r):2===e?f(t,n,r):void 0},ch32:d,maj32:f,p32:m,s0_256:function(e){return p(e,2)^p(e,13)^p(e,22)},s1_256:function(e){return p(e,6)^p(e,11)^p(e,25)},g0_256:function(e){return p(e,7)^p(e,18)^e>>>3},g1_256:function(e){return p(e,17)^p(e,19)^e>>>10}},y=h.sum32,x=h.sum32_4,v=h.sum32_5,E=g.ch32,_=g.maj32,b=g.s0_256,A=g.s1_256,S=g.g0_256,I=g.g1_256,w=l.BlockHash,P=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function k(){if(!(this instanceof k))return new k;w.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=P,this.W=new Array(64)}h.inherits(k,w);var C=k;k.blockSize=512,k.outSize=256,k.hmacStrength=192,k.padLength=64,k.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=x(I(r[i-2]),r[i-7],S(r[i-15]),r[i-16]);var s=this.h[0],o=this.h[1],a=this.h[2],h=this.h[3],u=this.h[4],c=this.h[5],l=this.h[6],p=this.h[7];for(n(this.k.length===r.length),i=0;i<r.length;i++){var d=v(p,A(u),E(u,c,l),this.k[i],r[i]),f=y(b(s),_(s,o,a));p=l,l=c,c=u,u=y(h,d),h=a,a=o,o=s,s=y(d,f)}this.h[0]=y(this.h[0],s),this.h[1]=y(this.h[1],o),this.h[2]=y(this.h[2],a),this.h[3]=y(this.h[3],h),this.h[4]=y(this.h[4],u),this.h[5]=y(this.h[5],c),this.h[6]=y(this.h[6],l),this.h[7]=y(this.h[7],p)},k.prototype._digest=function(e){return"hex"===e?h.toHex32(this.h,"big"):h.split32(this.h,"big")};for(var N={},$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",R=0;R<$.length;R++)N[$.charCodeAt(R)]=R;function O(e){for(var t=0,n=0,r=0,i=0,s=0,o=[],a=[],h=[],u=0,c=0,l=0,p=0,d=e.length;u<d;u++){var f=e.charCodeAt(u);if(44===f)h.length&&a.push(new Int32Array(h)),h=[],c=0;else if(59===f)h.length&&a.push(new Int32Array(h)),h=[],c=0,o.push(a),a=[],t=0;else{var m=N[f];if(void 0===m)throw new Error("Invalid character ("+String.fromCharCode(f)+")");var g=32&m;if(p+=(m&=31)<<l,g)l+=5;else{var y=1&p;p>>=1;var x=y?-p:p;0==c?(t+=x,h.push(t)):1===c?(n+=x,h.push(n)):2===c?(r+=x,h.push(r)):3===c?(i+=x,h.push(i)):4===c&&(s+=x,h.push(s)),c++,p=l=0}}}return h.length&&a.push(new Int32Array(h)),o.push(a),o}function M(e){var t="";e=e<0?-e<<1|1:e<<1;do{var n=31&e;(e>>=5)>0&&(n|=32),t+=$[n]}while(e>0);return t}var T=function(e,t,n){this.start=e,this.end=t,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,Object.defineProperties(this,{previous:{writable:!0,value:null},next:{writable:!0,value:null}})};T.prototype.appendLeft=function(e){this.outro+=e},T.prototype.appendRight=function(e){this.intro=this.intro+e},T.prototype.clone=function(){var e=new T(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e},T.prototype.contains=function(e){return this.start<e&&e<this.end},T.prototype.eachNext=function(e){for(var t=this;t;)e(t),t=t.next},T.prototype.eachPrevious=function(e){for(var t=this;t;)e(t),t=t.previous},T.prototype.edit=function(e,t,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this},T.prototype.prependLeft=function(e){this.outro=e+this.outro},T.prototype.prependRight=function(e){this.intro=e+this.intro},T.prototype.split=function(e){var t=e-this.start,n=this.original.slice(0,t),r=this.original.slice(t);this.original=n;var i=new T(e,this.end,r);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i},T.prototype.toString=function(){return this.intro+this.content+this.outro},T.prototype.trimEnd=function(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;var t=this.content.replace(e,"");return t.length?(t!==this.content&&this.split(this.start+t.length).edit("",void 0,!0),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)},T.prototype.trimStart=function(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;var t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.end-t.length),this.edit("",void 0,!0)),!0):(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0)};var D=function(){throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};"undefined"!=typeof window&&"function"==typeof window.btoa?D=function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"function"==typeof Buffer&&(D=function(e){return Buffer.from(e,"utf-8").toString("base64")});var L=function(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=function(e){for(var t=0,n=0,r=0,i=0,s="",o=0;o<e.length;o++){var a=e[o];if(o>0&&(s+=";"),0!==a.length){for(var h=0,u=[],c=0,l=a;c<l.length;c++){var p=l[c],d=M(p[0]-h);h=p[0],p.length>1&&(d+=M(p[1]-t)+M(p[2]-n)+M(p[3]-r),t=p[1],n=p[2],r=p[3]),5===p.length&&(d+=M(p[4]-i),i=p[4]),u.push(d)}s+=u.join(",")}}return s}(e.mappings)};function V(e){var t=e.split("\n"),n=t.filter(function(e){return/^\t+/.test(e)}),r=t.filter(function(e){return/^ {2,}/.test(e)});if(0===n.length&&0===r.length)return null;if(n.length>=r.length)return"\t";var i=r.reduce(function(e,t){var n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(" ")}function B(e,t){var n=e.split(/[\/\\]/),r=t.split(/[\/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length)for(var i=n.length;i--;)n[i]="..";return n.concat(r).join("/")}L.prototype.toString=function(){return JSON.stringify(this)},L.prototype.toUrl=function(){return"data:application/json;charset=utf-8;base64,"+D(this.toString())};var z=Object.prototype.toString;function j(e){return"[object Object]"===z.call(e)}function W(e){for(var t=e.split("\n"),n=[],r=0,i=0;r<t.length;r++)n.push(i),i+=t[r].length+1;return function(e){for(var t=0,r=n.length;t<r;){var i=t+r>>1;e<n[i]?r=i:t=i+1}var s=t-1;return{line:s,column:e-n[s]}}}var U=function(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null};U.prototype.addEdit=function(e,t,n,r){if(t.length){var i=[this.generatedCodeColumn,e,n.line,n.column];r>=0&&i.push(r),this.rawSegments.push(i)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null},U.prototype.addUneditedChunk=function(e,t,n,r,i){for(var s=t.start,o=!0;s<t.end;)(this.hires||o||i[s])&&this.rawSegments.push([this.generatedCodeColumn,e,r.line,r.column]),"\n"===n[s]?(r.line+=1,r.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0):(r.column+=1,this.generatedCodeColumn+=1),s+=1,o=!1;this.pending=[this.generatedCodeColumn,e,r.line,r.column]},U.prototype.advance=function(e){if(e){var t=e.split("\n");if(t.length>1){for(var n=0;n<t.length-1;n++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}};var F="\n",q={insertLeft:!1,insertRight:!1,storeName:!1},G=function(e,t){void 0===t&&(t={});var n=new T(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:{}},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:V(e)}}),this.byStart[0]=n,this.byEnd[e.length]=n};G.prototype.addSourcemapLocation=function(e){this.sourcemapLocations[e]=!0},G.prototype.append=function(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this},G.prototype.appendLeft=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this},G.prototype.appendRight=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this},G.prototype.clone=function(){for(var e=new G(this.original,{filename:this.filename}),t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;var r=t.next,i=r&&r.clone();i&&(n.next=i,i.previous=n,n=i),t=r}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),Object.keys(this.sourcemapLocations).forEach(function(t){e.sourcemapLocations[t]=!0}),e},G.prototype.generateDecodedMap=function(e){var t=this;e=e||{};var n=Object.keys(this.storedNames),r=new U(e.hires),i=W(this.original);return this.intro&&r.advance(this.intro),this.firstChunk.eachNext(function(e){var s=i(e.start);e.intro.length&&r.advance(e.intro),e.edited?r.addEdit(0,e.content,s,e.storeName?n.indexOf(e.original):-1):r.addUneditedChunk(0,e,t.original,s,t.sourcemapLocations),e.outro.length&&r.advance(e.outro)}),{file:e.file?e.file.split(/[\/\\]/).pop():null,sources:[e.source?B(e.file||"",e.source):null],sourcesContent:e.includeContent?[this.original]:[null],names:n,mappings:r.raw}},G.prototype.generateMap=function(e){return new L(this.generateDecodedMap(e))},G.prototype.getIndentString=function(){return null===this.indentStr?"\t":this.indentStr},G.prototype.indent=function(e,t){var n=/^[^\r\n]/gm;if(j(e)&&(t=e,e=void 0),""===(e=void 0!==e?e:this.indentStr||"\t"))return this;var r={};(t=t||{}).exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(function(e){for(var t=e[0];t<e[1];t+=1)r[t]=!0});var i=!1!==t.indentStart,s=function(t){return i?""+e+t:(i=!0,t)};this.intro=this.intro.replace(n,s);for(var o=0,a=this.firstChunk;a;){var h=a.end;if(a.edited)r[o]||(a.content=a.content.replace(n,s),a.content.length&&(i="\n"===a.content[a.content.length-1]));else for(o=a.start;o<h;){if(!r[o]){var u=this.original[o];"\n"===u?i=!0:"\r"!==u&&i&&(i=!1,o===a.start?a.prependRight(e):(this._splitChunk(a,o),(a=a.next).prependRight(e)))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(n,s),this},G.prototype.insert=function(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")},G.prototype.insertLeft=function(e,t){return q.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),q.insertLeft=!0),this.appendLeft(e,t)},G.prototype.insertRight=function(e,t){return q.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),q.insertRight=!0),this.prependRight(e,t)},G.prototype.move=function(e,t,n){if(n>=e&&n<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);var r=this.byStart[e],i=this.byEnd[t],s=r.previous,o=i.next,a=this.byStart[n];if(!a&&i===this.lastChunk)return this;var h=a?a.previous:this.lastChunk;return s&&(s.next=o),o&&(o.previous=s),h&&(h.next=r),a&&(a.previous=i),r.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=r.previous,this.lastChunk.next=null),r.previous=h,i.next=a||null,h||(this.firstChunk=r),a||(this.lastChunk=i),this},G.prototype.overwrite=function(e,t,n,r){if("string"!=typeof n)throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===r&&(q.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),q.storeName=!0),r={storeName:!0});var i=void 0!==r&&r.storeName,s=void 0!==r&&r.contentOnly;if(i){var o=this.original.slice(e,t);this.storedNames[o]=!0}var a=this.byStart[e],h=this.byEnd[t];if(a){if(t>a.end&&a.next!==this.byStart[a.end])throw new Error("Cannot overwrite across a split point");if(a.edit(n,i,s),a!==h){for(var u=a.next;u!==h;)u.edit("",!1),u=u.next;u.edit("",!1)}}else{var c=new T(e,t,"").edit(n,i);h.next=c,c.previous=h}return this},G.prototype.prepend=function(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this},G.prototype.prependLeft=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this},G.prototype.prependRight=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this},G.prototype.remove=function(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);for(var n=this.byStart[e];n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this},G.prototype.lastChar=function(){if(this.outro.length)return this.outro[this.outro.length-1];var e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""},G.prototype.lastLine=function(){var e=this.outro.lastIndexOf(F);if(-1!==e)return this.outro.substr(e+1);var t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(-1!==(e=n.outro.lastIndexOf(F)))return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(-1!==(e=n.content.lastIndexOf(F)))return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(-1!==(e=n.intro.lastIndexOf(F)))return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return-1!==(e=this.intro.lastIndexOf(F))?this.intro.substr(e+1)+t:this.intro+t},G.prototype.slice=function(e,t){for(void 0===e&&(e=0),void 0===t&&(t=this.original.length);e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;for(var n="",r=this.firstChunk;r&&(r.start>e||r.end<=e);){if(r.start<t&&r.end>=t)return n;r=r.next}if(r&&r.edited&&r.start!==e)throw new Error("Cannot use replaced character "+e+" as slice start anchor.");for(var i=r;r;){!r.intro||i===r&&r.start!==e||(n+=r.intro);var s=r.start<t&&r.end>=t;if(s&&r.edited&&r.end!==t)throw new Error("Cannot use replaced character "+t+" as slice end anchor.");var o=i===r?e-r.start:0,a=s?r.content.length+t-r.end:r.content.length;if(n+=r.content.slice(o,a),!r.outro||s&&r.end!==t||(n+=r.outro),s)break;r=r.next}return n},G.prototype.snip=function(e,t){var n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n},G.prototype._split=function(e){if(!this.byStart[e]&&!this.byEnd[e])for(var t=this.lastSearchedChunk,n=e>t.end;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}},G.prototype._splitChunk=function(e,t){if(e.edited&&e.content.length){var n=W(this.original)(t);throw new Error("Cannot split a chunk that has already been edited ("+n.line+":"+n.column+' – "'+e.original+'")')}var r=e.split(t);return this.byEnd[t]=e,this.byStart[t]=r,this.byEnd[r.end]=r,e===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=e,!0},G.prototype.toString=function(){for(var e=this.intro,t=this.firstChunk;t;)e+=t.toString(),t=t.next;return e+this.outro},G.prototype.isEmpty=function(){var e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0},G.prototype.length=function(){var e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t},G.prototype.trimLines=function(){return this.trim("[\\r\\n]")},G.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},G.prototype.trimEndAborted=function(e){var t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;var n=this.lastChunk;do{var r=n.end,i=n.trimEnd(t);if(n.end!==r&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),i)return!0;n=n.previous}while(n);return!1},G.prototype.trimEnd=function(e){return this.trimEndAborted(e),this},G.prototype.trimStartAborted=function(e){var t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;var n=this.firstChunk;do{var r=n.end,i=n.trimStart(t);if(n.end!==r&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),i)return!0;n=n.next}while(n);return!1},G.prototype.trimStart=function(e){return this.trimStartAborted(e),this};var H=Object.prototype.hasOwnProperty,K=function(e){void 0===e&&(e={}),this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}};K.prototype.addSource=function(e){if(e instanceof G)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!j(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","indentExclusionRanges","separator"].forEach(function(t){H.call(e,t)||(e[t]=e.content[t])}),void 0===e.separator&&(e.separator=this.separator),e.filename)if(H.call(this.uniqueSourceIndexByFilename,e.filename)){var t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error("Illegal source: same filename ("+e.filename+"), different contents")}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this},K.prototype.append=function(e,t){return this.addSource({content:new G(e),separator:t&&t.separator||""}),this},K.prototype.clone=function(){var e=new K({intro:this.intro,separator:this.separator});return this.sources.forEach(function(t){e.addSource({filename:t.filename,content:t.content.clone(),separator:t.separator})}),e},K.prototype.generateDecodedMap=function(e){var t=this;void 0===e&&(e={});var n=[];this.sources.forEach(function(e){Object.keys(e.content.storedNames).forEach(function(e){~n.indexOf(e)||n.push(e)})});var r=new U(e.hires);return this.intro&&r.advance(this.intro),this.sources.forEach(function(e,i){i>0&&r.advance(t.separator);var s=e.filename?t.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=W(o.original);o.intro&&r.advance(o.intro),o.firstChunk.eachNext(function(t){var i=a(t.start);t.intro.length&&r.advance(t.intro),e.filename?t.edited?r.addEdit(s,t.content,i,t.storeName?n.indexOf(t.original):-1):r.addUneditedChunk(s,t,o.original,i,o.sourcemapLocations):r.advance(t.content),t.outro.length&&r.advance(t.outro)}),o.outro&&r.advance(o.outro)}),{file:e.file?e.file.split(/[\/\\]/).pop():null,sources:this.uniqueSources.map(function(t){return e.file?B(e.file,t.filename):t.filename}),sourcesContent:this.uniqueSources.map(function(t){return e.includeContent?t.content:null}),names:n,mappings:r.raw}},K.prototype.generateMap=function(e){return new L(this.generateDecodedMap(e))},K.prototype.getIndentString=function(){var e={};return this.sources.forEach(function(t){var n=t.content.indentStr;null!==n&&(e[n]||(e[n]=0),e[n]+=1)}),Object.keys(e).sort(function(t,n){return e[t]-e[n]})[0]||"\t"},K.prototype.indent=function(e){var t=this;if(arguments.length||(e=this.getIndentString()),""===e)return this;var n=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach(function(r,i){var s=void 0!==r.separator?r.separator:t.separator,o=n||i>0&&/\r?\n$/.test(s);r.content.indent(e,{exclude:r.indentExclusionRanges,indentStart:o}),n="\n"===r.content.lastChar()}),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,function(t,n){return n>0?e+t:t})),this},K.prototype.prepend=function(e){return this.intro=e+this.intro,this},K.prototype.toString=function(){var e=this,t=this.sources.map(function(t,n){var r=void 0!==t.separator?t.separator:e.separator;return(n>0?r:"")+t.content.toString()}).join("");return this.intro+t},K.prototype.isEmpty=function(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some(function(e){return!e.content.isEmpty()})},K.prototype.length=function(){return this.sources.reduce(function(e,t){return e+t.content.length()},this.intro.length)},K.prototype.trimLines=function(){return this.trim("[\\r\\n]")},K.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},K.prototype.trimStart=function(e){var t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){var n,r=0;do{if(!(n=this.sources[r++]))break}while(!n.content.trimStartAborted(e))}return this},K.prototype.trimEnd=function(e){var t,n=new RegExp((e||"\\s")+"+$"),r=this.sources.length-1;do{if(!(t=this.sources[r--])){this.intro=this.intro.replace(n,"");break}}while(!t.content.trimEndAborted(e));return this};const Y="BlockStatement",X="CallExpression",Q="ClassDeclaration",J="ExportAllDeclaration",Z="ExportDefaultDeclaration",ee="ExpressionStatement",te="FunctionDeclaration",ne="FunctionExpression",re="Identifier",ie="ImportDefaultSpecifier",se="ImportNamespaceSpecifier",oe="Literal",ae="MemberExpression",he="Program",ue="Property",ce="ReturnStatement",le="TemplateLiteral",pe="VariableDeclaration";class de{static create(e){return new this(e)}constructor({withNew:e=!1,args:t=[],callIdentifier:n}={}){this.withNew=e,this.args=t,this.callIdentifier=n}equals(e){return e&&this.callIdentifier===e.callIdentifier}}const fe={UNKNOWN_KEY:!0},me=[],ge=[fe];function ye(e,t=null){return Object.create(t,e)}const xe={UNKNOWN_VALUE:!0},ve={deoptimizePath:()=>{},getLiteralValueAtPath:()=>xe,getReturnExpressionWhenCalledAtPath:()=>ve,hasEffectsWhenAccessedAtPath:e=>e.length>0,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:()=>!0,include:()=>{},included:!0,toString:()=>"[[UNKNOWN]]"},Ee={deoptimizePath:()=>{},getLiteralValueAtPath:()=>void 0,getReturnExpressionWhenCalledAtPath:()=>ve,hasEffectsWhenAccessedAtPath:e=>e.length>0,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:()=>!0,include:()=>{},included:!0,toString:()=>"undefined"},_e={value:{returns:null,returnsPrimitive:ve,callsArgs:null,mutatesSelf:!0}},be={value:{returns:null,returnsPrimitive:ve,callsArgs:[0],mutatesSelf:!1}};class Ae{constructor(){this.included=!1}deoptimizePath(){}getLiteralValueAtPath(){return xe}getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Fe(Be,e[0]):ve}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Ue(Be,e[0],this.included,t,n)}include(){this.included=!0}toString(){return"[[UNKNOWN ARRAY]]"}}const Se={value:{callsArgs:null,mutatesSelf:!1,returns:Ae,returnsPrimitive:null}},Ie={value:{callsArgs:null,mutatesSelf:!0,returns:Ae,returnsPrimitive:null}},we={value:{callsArgs:[0],mutatesSelf:!1,returns:Ae,returnsPrimitive:null}},Pe={value:{callsArgs:[0],mutatesSelf:!0,returns:Ae,returnsPrimitive:null}},ke={deoptimizePath:()=>{},getLiteralValueAtPath:()=>xe,getReturnExpressionWhenCalledAtPath:e=>1===e.length?Fe(ze,e[0]):ve,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:e=>{if(1===e.length){const t=e[0];return"string"!=typeof t||!ze[t]}return!0},include:()=>{},included:!0,toString:()=>"[[UNKNOWN BOOLEAN]]"},Ce={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:ke}},Ne={value:{callsArgs:[0],mutatesSelf:!1,returns:null,returnsPrimitive:ke}},$e={deoptimizePath:()=>{},getLiteralValueAtPath:()=>xe,getReturnExpressionWhenCalledAtPath:e=>1===e.length?Fe(je,e[0]):ve,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:e=>{if(1===e.length){const t=e[0];return"string"!=typeof t||!je[t]}return!0},include:()=>{},included:!0,toString:()=>"[[UNKNOWN NUMBER]]"},Re={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:$e}},Oe={value:{callsArgs:null,mutatesSelf:!0,returns:null,returnsPrimitive:$e}},Me={value:{callsArgs:[0],mutatesSelf:!1,returns:null,returnsPrimitive:$e}},Te={deoptimizePath:()=>{},getLiteralValueAtPath:()=>xe,getReturnExpressionWhenCalledAtPath:e=>1===e.length?Fe(We,e[0]):ve,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:(e,t,n)=>1!==e.length||Ue(We,e[0],!0,t,n),include:()=>{},included:!0,toString:()=>"[[UNKNOWN STRING]]"},De={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:Te}};class Le{constructor(){this.included=!1}deoptimizePath(){}getLiteralValueAtPath(){return xe}getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Fe(Ve,e[0]):ve}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Ue(Ve,e[0],this.included,t,n)}include(){this.included=!0}toString(){return"[[UNKNOWN OBJECT]]"}}const Ve=ye({hasOwnProperty:Ce,isPrototypeOf:Ce,propertyIsEnumerable:Ce,toLocaleString:De,toString:De,valueOf:{value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:ve}}}),Be=ye({concat:Se,copyWithin:Ie,every:Ne,fill:Ie,filter:we,find:be,findIndex:Me,forEach:be,includes:Ce,indexOf:Re,join:De,lastIndexOf:Re,map:we,pop:_e,push:Oe,reduce:be,reduceRight:be,reverse:Ie,shift:_e,slice:Se,some:Ne,sort:Pe,splice:Ie,unshift:Oe},Ve),ze=ye({valueOf:Ce},Ve),je=ye({toExponential:De,toFixed:De,toLocaleString:De,toPrecision:De,valueOf:Re},Ve),We=ye({charAt:De,charCodeAt:Re,codePointAt:Re,concat:De,endsWith:Ce,includes:Ce,indexOf:Re,lastIndexOf:Re,localeCompare:Re,match:Ce,normalize:De,padEnd:De,padStart:De,repeat:De,replace:{value:{callsArgs:[1],mutatesSelf:!1,returns:null,returnsPrimitive:Te}},search:Re,slice:De,split:Se,startsWith:Ce,substr:De,substring:De,toLocaleLowerCase:De,toLocaleUpperCase:De,toLowerCase:De,toUpperCase:De,trim:De,valueOf:De},Ve);function Ue(e,t,n,r,i){if("string"!=typeof t||!e[t])return!0;if(e[t].mutatesSelf&&n)return!0;if(!e[t].callsArgs)return!1;for(const n of e[t].callsArgs)if(r.args[n]&&r.args[n].hasEffectsWhenCalledAtPath(me,de.create({args:[],callIdentifier:{},withNew:!1}),i.getHasEffectsWhenCalledOptions()))return!0;return!1}function Fe(e,t){return"string"==typeof t&&e[t]?null!==e[t].returnsPrimitive?e[t].returnsPrimitive:new e[t].returns:ve}class qe{constructor(e){this.exportName=null,this.included=!1,this.isId=!1,this.isReassigned=!1,this.reexported=!1,this.renderBaseName=null,this.renderName=null,this.safeExportName=null,this.name=e}addReference(e){}deoptimizePath(e){}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getLiteralValueAtPath(e,t,n){return xe}getName(){const e=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}.${e}`:e}getReturnExpressionWhenCalledAtPath(e,t,n){return ve}hasEffectsWhenAccessedAtPath(e,t){return e.length>0}hasEffectsWhenAssignedAtPath(e,t){return!0}hasEffectsWhenCalledAtPath(e,t,n){return!0}include(){this.included=!0}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}setSafeName(e){this.renderName=e}toString(){return this.name}}class Ge extends qe{constructor(e,t){super(t),this.module=e,this.isNamespace="*"===t,this.referenced=!1}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}include(){this.included||(this.included=!0,this.module.used=!0)}}Ge.prototype.isExternal=!0;const He="break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public".split(" "),Ke="Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" "),Ye=Object.create(null);He.concat(Ke).forEach(e=>Ye[e]=!0);const Xe=/[^$_a-zA-Z0-9]/g,Qe=e=>/\d/.test(e[0]);function Je(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(Xe,"_"),(Qe(e)||Ye[e])&&(e=`_${e}`),e}const Ze=/^(?:\/|(?:[A-Za-z]:)?[\\|\/])/,et=/^\.?\.\//;function tt(e){return Ze.test(e)}function nt(e){return et.test(e)}function rt(e){return e.replace(/\\/g,"/")}function it(e){return e.split(/(\/|\\)/).pop()}function st(e){const t=/(\/|\\)[^\/\\]*$/.exec(e);if(!t)return".";const n=e.slice(0,-t[0].length);return n||"/"}function ot(e){const t=/\.[^.]+$/.exec(it(e));return t?t[0]:""}function at(e,t){const n=e.split(/[\/\\]/).filter(Boolean),r=t.split(/[\/\\]/).filter(Boolean);for(;n[0]&&r[0]&&n[0]===r[0];)n.shift(),r.shift();for(;"."===r[0]||".."===r[0];){".."===r.shift()&&n.pop()}for(;n.pop();)r.unshift("..");return r.join("/")}function ht(...e){let t=e.shift().split(/[\/\\]/);return e.forEach(e=>{if(tt(e))t=e.split(/[\/\\]/);else{const n=e.split(/[\/\\]/);for(;"."===n[0]||".."===n[0];){".."===n.shift()&&t.pop()}t.push.apply(t,n)}}),t.join("/")}class ut{constructor(e,t,n){this.exportsNames=!1,this.exportsNamespace=!1,this.isExternal=!0,this.mostCommonSuggestion=0,this.reexported=!1,this.renderPath=void 0,this.renormalizeRenderPath=!1,this.used=!1,this.graph=e,this.id=t,this.execIndex=1/0,this.moduleSideEffects=n;const r=t.split(/[\\\/]/);this.variableName=Je(r.pop()),this.nameSuggestions=Object.create(null),this.declarations=Object.create(null),this.exportedVariables=new Map}getVariableForExportName(e,t){"default"!==e&&"*"!==e&&(this.exportsNames=!0),"*"===e&&(this.exportsNamespace=!0);let n=this.declarations[e];return n||(this.declarations[e]=n=new Ge(this,e),this.exportedVariables.set(n,e),n)}setRenderPath(e,t){return this.renderPath="",e.paths&&(this.renderPath="function"==typeof e.paths?e.paths(this.id):e.paths[this.id]),this.renderPath||(tt(this.id)?(this.renderPath=rt(at(t,this.id)),this.renormalizeRenderPath=!0):this.renderPath=this.id),this.renderPath}suggestName(e){this.nameSuggestions[e]||(this.nameSuggestions[e]=0),this.nameSuggestions[e]+=1,this.nameSuggestions[e]>this.mostCommonSuggestion&&(this.mostCommonSuggestion=this.nameSuggestions[e],this.variableName=e)}warnUnusedImports(){const e=Object.keys(this.declarations).filter(e=>{if("*"===e)return!1;const t=this.declarations[e];return!t.included&&!this.reexported&&!t.referenced});if(0===e.length)return;const t=1===e.length?`'${e[0]}' is`:`${e.slice(0,-1).map(e=>`'${e}'`).join(", ")} and '${e.slice(-1)}' are`;this.graph.warn({code:"UNUSED_EXTERNAL_IMPORT",message:`${t} imported from external module '${this.id}' but never used`,names:e,source:this.id})}}function ct(e){e.isExecuted=!0;const t=[e],n={};for(const e of t)for(const r of e.dependencies)r instanceof ut||r.isExecuted||!r.moduleSideEffects||n[r.id]||(r.isExecuted=!0,n[r.id]=!0,t.push(r))}const lt=7;class pt extends qe{constructor(e,t,n,r){super(e),this.additionalInitializers=null,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.init=n,this.deoptimizationTracker=r.deoptimizationTracker,this.module=r.module}addDeclaration(e,t){this.declarations.push(e),null===this.additionalInitializers&&(this.additionalInitializers=null===this.init?[]:[this.init],this.init=ve,this.isReassigned=!0),null!==t&&this.additionalInitializers.push(t)}consolidateInitializers(){if(null!==this.additionalInitializers){for(const e of this.additionalInitializers)e.deoptimizePath(ge);this.additionalInitializers=null}}deoptimizePath(e){if(!(e.length>lt||this.isReassigned||this.deoptimizationTracker.track(this,e)))if(0===e.length){if(!this.isReassigned){this.isReassigned=!0;for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache();this.init&&this.init.deoptimizePath(ge)}}else this.init&&this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.isReassigned||!this.init||e.length>lt||t.isTracked(this.init,e)?xe:(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath(e,t.track(this.init,e),n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isReassigned||!this.init||e.length>lt||t.isTracked(this.init,e)?ve:(this.expressionsToBeDeoptimized.push(n),this.init.getReturnExpressionWhenCalledAtPath(e,t.track(this.init,e),n))}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(this.isReassigned||e.length>lt||this.init&&!t.hasNodeBeenAccessedAtPath(e,this.init)&&this.init.hasEffectsWhenAccessedAtPath(e,t.addAccessedNodeAtPath(e,this.init)))}hasEffectsWhenAssignedAtPath(e,t){return!!(this.included||e.length>lt)||0!==e.length&&(this.isReassigned||this.init&&!t.hasNodeBeenAssignedAtPath(e,this.init)&&this.init.hasEffectsWhenAssignedAtPath(e,t.addAssignedNodeAtPath(e,this.init)))}hasEffectsWhenCalledAtPath(e,t,n){return e.length>lt||(this.isReassigned||this.init&&!n.hasNodeBeenCalledAtPathWithOptions(e,this.init,t)&&this.init.hasEffectsWhenCalledAtPath(e,t,n.addCalledNodeAtPathWithOptions(e,this.init,t)))}include(){if(!this.included){this.included=!0,this.module.isExecuted||ct(this.module);for(const e of this.declarations){e.included||e.include(!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==he);)t=t.parent}}}}pt.prototype.isLocal=!0;class dt extends pt{constructor(e,t,n){super(e,t,t.declaration,n),this.originalId=null;const r=t.declaration;r.type!==te&&r.type!==Q||!r.id?r.type===re&&(this.originalId=r):(this.hasId=!0,this.originalId=r.id)}addReference(e){this.hasId||(this.name=e.name)}getName(){return this.referencesOriginal()?this.originalId.variable.getName():super.getName()}getOriginalVariable(){return this.originalId&&this.originalId.variable||null}getOriginalVariableName(){return this.originalId&&this.originalId.name||null}referencesOriginal(){return this.originalId&&(this.hasId||!this.originalId.variable.isReassigned)}setRenderNames(e,t){this.referencesOriginal()?this.originalId.variable.setRenderNames(e,t):super.setRenderNames(e,t)}setSafeName(e){this.referencesOriginal()?this.originalId.variable.setSafeName(e):super.setSafeName(e)}}dt.prototype.getBaseVariableName=dt.prototype.getName,dt.prototype.isDefault=!0;const ft="_missingExportShim",mt="_interopDefault";class gt extends qe{constructor(e){super(ft),this.module=e}}const yt={},xt="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),vt="Int8x16 Int16x8 Int32x4 Float32x4 Float64x2".split(" "),Et="abs add and bool check div equal extractLane fromFloat32x4 fromFloat32x4Bits fromFloat64x2 fromFloat64x2Bits fromInt16x8Bits fromInt32x4 fromInt32x4Bits fromInt8x16Bits greaterThan greaterThanOrEqual lessThan lessThanOrEqual load max maxNum min minNum mul neg not notEqual or reciprocalApproximation reciprocalSqrtApproximation replaceLane select selectBits shiftLeftByScalar shiftRightArithmeticByScalar shiftRightLogicalByScalar shuffle splat sqrt store sub swizzle xor".split(" "),_t=[];vt.forEach(e=>{Et.forEach(t=>{_t.push(`SIMD.${e}.${t}`)})}),["Array.isArray","Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","Object","Object.create","Object.getNotifier","Object.getOwn","Object.getOwnPropertyDescriptor","Object.getOwnPropertyNames","Object.getOwnPropertySymbols","Object.getPrototypeOf","Object.is","Object.isExtensible","Object.isFrozen","Object.isSealed","Object.keys","Boolean","Number","Number.isFinite","Number.isInteger","Number.isNaN","Number.isSafeInteger","Number.parseFloat","Number.parseInt","Symbol","Symbol.for","Symbol.keyFor","Math.abs","Math.acos","Math.acosh","Math.asin","Math.asinh","Math.atan","Math.atan2","Math.atanh","Math.cbrt","Math.ceil","Math.clz32","Math.cos","Math.cosh","Math.exp","Math.expm1","Math.floor","Math.fround","Math.hypot","Math.imul","Math.log","Math.log10","Math.log1p","Math.log2","Math.max","Math.min","Math.pow","Math.random","Math.round","Math.sign","Math.sin","Math.sinh","Math.sqrt","Math.tan","Math.tanh","Math.trunc","Date","Date.UTC","Date.now","Date.parse","String","String.fromCharCode","String.fromCodePoint","String.raw","RegExp","Map","Set","WeakMap","WeakSet","ArrayBuffer","ArrayBuffer.isView","DataView","Promise.all","Promise.race","Promise.resolve","Intl.Collator","Intl.Collator.supportedLocalesOf","Intl.DateTimeFormat","Intl.DateTimeFormat.supportedLocalesOf","Intl.NumberFormat","Intl.NumberFormat.supportedLocalesOf"].concat(xt,xt.map(e=>`${e}.from`),xt.map(e=>`${e}.of`),vt.map(e=>`SIMD.${e}`),_t).forEach(e=>yt[e]=!0);class bt extends qe{hasEffectsWhenAccessedAtPath(e){return e.length>0&&!this.isPureFunctionMember(e)&&!("Reflect"===this.name&&1===e.length)}hasEffectsWhenCalledAtPath(e){return!yt[[this.name,...e].join(".")]}isPureFunctionMember(e){return yt[[this.name,...e].join(".")]||e.length>=1&&yt[[this.name,...e.slice(0,-1)].join(".")]||e.length>=2&&yt[[this.name,...e.slice(0,-2)].join(".")]&&"prototype"===e[e.length-2]}}const At=Object.assign(Object.create(null),{await:!0,break:!0,case:!0,catch:!0,class:!0,const:!0,continue:!0,debugger:!0,default:!0,delete:!0,do:!0,else:!0,enum:!0,eval:!0,export:!0,extends:!0,false:!0,finally:!0,for:!0,function:!0,if:!0,implements:!0,import:!0,in:!0,instanceof:!0,interface:!0,let:!0,new:!0,null:!0,package:!0,private:!0,protected:!0,public:!0,return:!0,static:!0,super:!0,switch:!0,this:!0,throw:!0,true:!0,try:!0,typeof:!0,undefined:!0,var:!0,void:!0,while:!0,with:!0,yield:!0}),St={},It={exports:!0},wt={amd:{formatGlobals:It,forbiddenNames:At},cjs:{forbiddenNames:At,formatGlobals:{exports:!0,module:!0,[mt]:!0}},es:{formatGlobals:St,forbiddenNames:At},iife:{formatGlobals:It,forbiddenNames:At},system:{forbiddenNames:Object.assign(Object.create(null),At,It),formatGlobals:St},umd:{formatGlobals:It,forbiddenNames:At}};class Pt extends qe{constructor(e){super(e.getModuleName()),this.memberVariables=Object.create(null),this.containsExternalNamespace=!1,this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module;for(const e of this.context.getExports().concat(this.context.getReexports()))"*"===e[0]&&e.length>1&&(this.containsExternalNamespace=!0),this.memberVariables[e]=this.context.traceExport(e)}addReference(e){this.references.push(e),this.name=e.name}deoptimizePath(){for(const e in this.memberVariables)this.memberVariables[e].deoptimizePath(ge)}include(){if(!this.included){this.containsExternalNamespace&&this.context.error({code:"NAMESPACE_CANNOT_CONTAIN_EXTERNAL",id:this.module.id,message:`Cannot create an explicit namespace object for module "${this.context.getModuleName()}" because it contains a reexported external namespace`},void 0),this.included=!0;for(const e of this.references)if(e.context.getModuleExecIndex()<=this.context.getModuleExecIndex()){this.referencedEarly=!0;break}if(this.context.preserveModules)for(const e of Object.keys(this.memberVariables))this.memberVariables[e].include();else for(const e of Object.keys(this.memberVariables))this.context.includeVariable(this.memberVariables[e])}}renderBlock(e){const t=e.compact?"":" ",n=e.compact?"":"\n",r=e.indent,i=Object.keys(this.memberVariables).map(n=>{const i=this.memberVariables[n];if(this.referencedEarly||i.isReassigned)return`${r}get ${n}${t}()${t}{${t}return ${i.getName()}${e.compact?"":";"}${t}}`;const s=At[n]?`'${n}'`:n;return`${r}${s}: ${i.getName()}`}),s=this.getName(),o=e.freeze?"/*#__PURE__*/Object.freeze":"";let a=`${e.varOrConst} ${s} = ${e.namespaceToStringTag?`{${n}${i.join(`,${n}`)}${n}};`:`${o}({${n}${i.join(`,${n}`)}${n}});`}`;return e.namespaceToStringTag&&(a+=`${n}if${t}(typeof Symbol${t}!==${t}'undefined'${t}&&${t}Symbol.toStringTag)${n}`,a+=`${r}Object.defineProperty(${s},${t}Symbol.toStringTag,${t}{${t}value:${t}'Module'${t}});${n}`,a+=`else${n||" "}`,a+=`${r}Object.defineProperty(${s},${t}'toString',${t}{${t}value:${t}function${t}()${t}{${t}return${t}'[object Module]'${e.compact?";":""}${t}}${t}});${n}`,a+=`${o}(${s});`),"system"===e.format&&this.exportName&&(a+=`${n}exports('${this.exportName}',${t}${s});`),a}renderFirst(){return this.referencedEarly}}Pt.prototype.isNamespace=!0;const kt="Object.defineProperty(exports, '__esModule', { value: true });",Ct="Object.defineProperty(exports,'__esModule',{value:true});";function Nt(e,t,n,r,i,s,o="return "){const a=i?"":" ",h=i?"":"\n";if(!n){let n;return e.some(e=>"default"===e.exported&&(n=e.local,!0)),n||t.some(e=>!!e.reexports&&e.reexports.some(t=>"default"===t.reexported&&(n=e.namedExportsMode?`${e.name}.${t.imported}`:e.name,!0))),`${o}${n};`}let u="";return t.forEach(({name:e,reexports:t})=>{t&&n&&t.forEach(t=>{"*"===t.reexported&&(!i&&u&&(u+="\n"),u+=`Object.keys(${e}).forEach(function${a}(key)${a}{${h}`+`${s}Object.defineProperty(exports,${a}key,${a}{${h}`+`${s}${s}enumerable:${a}true,${h}`+`${s}${s}get:${a}function${a}()${a}{${h}`+`${s}${s}${s}return ${e}[key];${h}`+`${s}${s}}${h}${s}});${h}});`)})}),t.forEach(({name:e,imports:t,reexports:o,isChunk:c,namedExportsMode:l})=>{o&&n&&o.forEach(n=>{if("default"!==n.imported||c)if("*"!==n.imported){u&&!i&&(u+="\n");const t="default"!==n.imported||l?`${e}.${n.imported}`:e;u+=n.needsLiveBinding?`Object.defineProperty(exports,${a}'${n.reexported}',${a}{${h}`+`${s}enumerable:${a}true,${h}`+`${s}get:${a}function${a}()${a}{${h}`+`${s}${s}return ${t};${h}${s}}${h}});`:`exports.${n.reexported}${a}=${a}${t};`}else"*"!==n.reexported&&(u&&!i&&(u+="\n"),u+=`exports.${n.reexported}${a}=${a}${e};`);else{const s=t&&t.some(e=>"default"!==e.imported)||o&&o.some(e=>"default"!==e.imported&&"*"!==e.imported),h=o&&o.some(e=>"default"===e.imported&&"default"===e.reexported);u&&!i&&(u+="\n"),u+=s||h?`exports.${n.reexported}${a}=${a}${e}${!1!==r?"__default":".default"};`:`exports.${n.reexported}${a}=${a}${e};`}})}),e.forEach(e=>{const t=`exports.${e.exported}`,n=e.local;t!==n&&(u&&!i&&(u+="\n"),u+=`${t}${a}=${a}${n};`)}),u}function $t(e,t,n){return e.map(({name:e,exportsNames:r,exportsDefault:i,namedExportsMode:s})=>{if(s)return i&&!1!==t.interop?r?t.compact?`${n} ${e}__default='default'in ${e}?${e}['default']:${e};`:`${n} ${e}__default = 'default' in ${e} ? ${e}['default'] : ${e};`:t.compact?`${e}=${e}&&${e}.hasOwnProperty('default')?${e}['default']:${e};`:`${e} = ${e} && ${e}.hasOwnProperty('default') ? ${e}['default'] : ${e};`:null}).filter(Boolean).join(t.compact?"":"\n")}const Rt={assert:!0,buffer:!0,console:!0,constants:!0,domain:!0,events:!0,http:!0,https:!0,os:!0,path:!0,process:!0,punycode:!0,querystring:!0,stream:!0,string_decoder:!0,timers:!0,tty:!0,url:!0,util:!0,vm:!0,zlib:!0};function Ot(e,t){const n=t.map(({id:e})=>e).filter(e=>e in Rt);n.length&&e({code:"MISSING_NODE_BUILTINS",message:`Creating a browser bundle that depends on Node.js built-in ${1===n.length?`module ('${n[0]}')`:`modules (${n.slice(0,-1).map(e=>`'${e}'`).join(", ")} and '${n.slice(-1)}')`}. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins`,modules:n})}function Mt(e,t,n){if("number"==typeof n)throw new Error("locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument");return function(e,t){void 0===t&&(t={});var n=t.offsetLine||0,r=t.offsetColumn||0,i=e.split("\n"),s=0,o=i.map(function(e,t){var n=s+e.length+1,r={start:s,end:n,line:t};return s=n,r}),a=0;function h(e,t){return e.start<=t&&t<e.end}function u(e,t){return{line:n+e.line,column:r+t-e.start,character:t}}return function(t,n){"string"==typeof t&&(t=e.indexOf(t,n||0));for(var r=o[a],i=t>=r.end?1:-1;r;){if(h(r,t))return u(r,t);r=o[a+=i]}}}(e,n)(t,n&&n.startIndex)}function Tt(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}function Dt(e,t,n){let r=e.split("\n");const i=Math.max(0,t-3);let s=Math.min(t+2,r.length);for(r=r.slice(i,s);!/\S/.test(r[r.length-1]);)r.pop(),s-=1;const o=String(s).length;return r.map((e,r)=>{const s=i+r+1===t;let a=String(r+i+1);for(;a.length<o;)a=` ${a}`;if(s){const t=function(e){let t="";for(;e--;)t+=" ";return t}(o+2+Tt(e.slice(0,n)).length)+"^";return`${a}: ${Tt(e)}\n${t}`}return`${a}: ${Tt(e)}`}).join("\n")}function Lt(e){const t=it(e);return t.substr(0,t.length-ot(e).length)}function Vt(e){return"undefined"!=typeof process&&tt(e)?at(process.cwd(),e):e}function Bt(e){return!("/"===e[0]||"."===e[1]&&("/"===e[2]||"."===e[2]&&"/"===e[3]))}function zt(e,t){throw e instanceof Error==!1&&(e=Object.assign(new Error(e.message),e)),t&&Object.assign(e,t),e}function jt(e,t,n,r){if(void 0!==t.line&&void 0!==t.column){const{line:n,column:i}=t;e.loc={file:r,line:n,column:i}}else{e.pos=t;const{line:i,column:s}=Mt(n,t,{offsetLine:1});e.loc={file:r,line:i,column:s}}if(void 0===e.frame){const{line:t,column:r}=e.loc;e.frame=Dt(n,t,r)}}var Wt;function Ut(e,t,n){return{code:Wt.INVALID_CHUNK,message:`Cannot assign ${Vt(e)} to the "${t}" chunk as it is already in the "${n}" chunk.`}}function Ft(e,t,n){return{code:Wt.NAMESPACE_CONFLICT,message:`Conflicting namespaces: ${Vt(t.id)} re-exports '${e}' from both ${Vt(t.exportsAll[e])} and ${Vt(n.exportsAll[e])} (will be ignored)`,name:e,reexporter:t.id,sources:[t.exportsAll[e],n.exportsAll[e]]}}!function(e){e.ASSET_NOT_FINALISED="ASSET_NOT_FINALISED",e.ASSET_NOT_FOUND="ASSET_NOT_FOUND",e.ASSET_SOURCE_ALREADY_SET="ASSET_SOURCE_ALREADY_SET",e.ASSET_SOURCE_MISSING="ASSET_SOURCE_MISSING",e.BAD_LOADER="BAD_LOADER",e.CHUNK_NOT_FOUND="CHUNK_NOT_FOUND",e.CHUNK_NOT_GENERATED="CHUNK_NOT_GENERATED",e.INVALID_ASSET_NAME="INVALID_ASSET_NAME",e.INVALID_CHUNK="INVALID_CHUNK",e.INVALID_EXTERNAL_ID="INVALID_EXTERNAL_ID",e.INVALID_OPTION="INVALID_OPTION",e.INVALID_PLUGIN_HOOK="INVALID_PLUGIN_HOOK",e.INVALID_ROLLUP_PHASE="INVALID_ROLLUP_PHASE",e.NAMESPACE_CONFLICT="NAMESPACE_CONFLICT",e.UNRESOLVED_ENTRY="UNRESOLVED_ENTRY",e.UNRESOLVED_IMPORT="UNRESOLVED_IMPORT"}(Wt||(Wt={}));const qt=/^[a-zA-Z$_][a-zA-Z0-9$_]*$/;function Gt(e){return qt.test(e)?`.${e}`:`['${e}']`}function Ht(e){return e.split(".").map(Gt).join("")}function Kt(e,t,n,r,i){const s=r?"":" ",o=e.split(".");n&&(o[0]=("function"==typeof n?n(o[0]):n[o[0]])||o[0]);const a=o.pop();let h=t,u=o.map(e=>(h+=Gt(e),`${h}${s}=${s}${h}${s}||${s}{}`)).concat(`${h}${Gt(a)}`).join(`,${s}`).concat(`${s}=${s}${i}`);return o.length>0&&(u=`(${u})`),u}function Yt(e){let t=e.length;for(;t--;){const n=e[t];if(n.exportsDefault||n.exportsNames)return e.slice(0,t+1)}return[]}const Xt=e=>`this${Ht(e)}`;const Qt=(e,t,n,r,i)=>e?`${i}${r}${t} _starExcludes${n}=${n}{${n}${Array.from(e).join(`:${n}1,${n}`)}${e.size?`:${n}1`:""}${n}};`:"",Jt=(e,t,n,r)=>e.length?`${r}${n}var ${e.join(`,${t}`)};`:"";function Zt(e,t,n,r){return 0===e.length?"":1===e.length?`${n}${n}${n}exports('${e[0].name}',${t}${e[0].value});${r}${r}`:`${n}${n}${n}exports({${r}`+e.map(({name:e,value:r})=>`${n}${n}${n}${n}${e}:${t}${r}`).join(`,${r}`)+`${r}${n}${n}${n}});${r}${r}`}const en=(e,t,n,r)=>Zt(e.filter(e=>e.hoisted||e.uninitialized).map(e=>({name:e.exported,value:e.uninitialized?"void 0":e.local})),t,n,r),tn=(e,t,n,r)=>Zt(e.filter(e=>e.local===ft).map(e=>({name:e.exported,value:ft})),t,n,r);function nn(e,t){return e?`${t}${Ht(e)}`:"null"}var rn={system:function(e,{dependencies:t,exports:n,indentString:r,intro:i,outro:s,usesTopLevelAwait:o,varOrConst:a},h){const u=h.compact?"":"\n",c=h.compact?"":" ",l=t.map(e=>`'${e.id}'`),p=[];let d;const f=[];t.forEach(({imports:e,reexports:i})=>{const s=[];if(e&&e.forEach(e=>{p.push(e.local),"*"===e.imported?s.push(`${e.local}${c}=${c}module;`):s.push(`${e.local}${c}=${c}module.${e.imported};`)}),i){let e=!1;i.length>1||1===i.length&&("*"===i[0].reexported||"*"===i[0].imported)?(i.forEach(i=>{"*"===i.reexported&&(d||(d=function({dependencies:e,exports:t}){const n=new Set(t.map(e=>e.exported));return n.has("default")||n.add("default"),e.forEach(({reexports:e})=>{e&&e.forEach(e=>{"*"===e.imported||n.has(e.reexported)||n.add(e.reexported)})}),n}({dependencies:t,exports:n})),e||(s.push(`${a} _setter${c}=${c}{};`),e=!0),s.push(`for${c}(var _$p${c}in${c}module)${c}{`),s.push(`${r}if${c}(!_starExcludes[_$p])${c}_setter[_$p]${c}=${c}module[_$p];`),s.push("}"))}),i.forEach(e=>{"*"===e.imported&&"*"!==e.reexported&&s.push(`exports('${e.reexported}',${c}module);`)}),i.forEach(t=>{"*"!==t.reexported&&"*"!==t.imported&&(e||(s.push(`${a} _setter${c}=${c}{};`),e=!0),s.push(`_setter.${t.reexported}${c}=${c}module.${t.imported};`))}),e&&s.push("exports(_setter);")):i.forEach(e=>{s.push(`exports('${e.reexported}',${c}module.${e.imported});`)})}f.push(s.join(`${u}${r}${r}${r}`))});let m=`System.register(${h.name?`'${h.name}',${c}`:""}[`+l.join(`,${c}`)+`],${c}function${c}(exports,${c}module)${c}{${u}${r}'use strict';`+Qt(d,a,c,r,u)+Jt(p,c,r,u)+`${u}${r}return${c}{${f.length?`${u}${r}${r}setters:${c}[${f.map(e=>e?`function${c}(module)${c}{${u}${r}${r}${r}${e}${u}${r}${r}}`:`function${c}()${c}{}`).join(`,${c}`)}],`:""}${u}`;m+=`${r}${r}execute:${c}${o?`async${c}`:""}function${c}()${c}{${u}${u}`+en(n,c,r,u);const g=`${u}${u}`+tn(n,c,r,u)+`${r}${r}}${u}${r}}${h.compact?"":";"}${u}});`;return i&&e.prepend(i),s&&e.append(s),e.indent(`${r}${r}${r}`).append(g).prepend(m)},amd:function(e,{dependencies:t,dynamicImport:n,exports:r,hasExports:i,indentString:s,intro:o,isEntryModuleFacade:a,namedExportsMode:h,needsAmdModule:u,outro:c,varOrConst:l,warn:p},d){Ot(p,t);const f=t.map(e=>`'${function(e){return"."===e[0]&&e.endsWith(".js")?e.slice(0,-3):e}(e.id)}'`),m=t.map(e=>e.name),g=d.compact?"":"\n",y=d.compact?"":" ";h&&i&&(m.unshift("exports"),f.unshift("'exports'")),n&&(m.unshift("require"),f.unshift("'require'")),u&&(m.unshift("module"),f.unshift("'module'"));const x=d.amd||{},v=(x.id?`'${x.id}',${y}`:"")+(f.length?`[${f.join(`,${y}`)}],${y}`:""),E=!1!==d.strict?`${y}'use strict';`:"",_=`${x.define||"define"}(${v}function${y}(${m.join(`,${y}`)})${y}{${E}${g}${g}`,b=$t(t,d,l);b&&e.prepend(b+g+g),o&&e.prepend(o);const A=Nt(r,t,h,d.interop,d.compact,s);return A&&e.append(g+g+A),h&&i&&a&&d.esModule&&e.append(`${g}${g}${d.compact?Ct:kt}`),c&&e.append(c),e.indent(s).append(g+g+"});").prepend(_)},cjs:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,isEntryModuleFacade:o,namedExportsMode:a,outro:h,varOrConst:u},c){const l=c.compact?"":"\n",p=c.compact?"":" ";s=(!1===c.strict?s:`'use strict';${l}${l}${s}`)+(a&&r&&o&&c.esModule?`${c.compact?Ct:kt}${l}${l}`:"");let d=!1;const f=!1!==c.interop;let m,g=!1;m="";for(const{id:e,namedExportsMode:n,isChunk:r,name:i,reexports:s,imports:o,exportsNames:a,exportsDefault:h}of t)s||o?(m+=c.compact&&g?",":`${m?`;${l}`:""}${u} `,g=!0,f&&!r&&h&&n?(d=!0,m+=a?`${i}${p}=${p}require('${e}')${c.compact?",":`;\n${u} `}${i}__default${p}=${p}${mt}(${i})`:`${i}${p}=${p}${mt}(require('${e}'))`):m+=`${i}${p}=${p}require('${e}')`):(m&&(m+=!c.compact||g?`;${l}`:","),g=!1,m+=`require('${e}')`);if(m&&(m+=";"),d){const e=c.compact?"e":"ex";s+=`function ${mt}${p}(${e})${p}{${p}return${p}`+`(${e}${p}&&${p}(typeof ${e}${p}===${p}'object')${p}&&${p}'default'${p}in ${e})${p}`+`?${p}${e}['default']${p}:${p}${e}${c.compact?"":"; "}}${l}${l}`}m&&(s+=m+l+l);const y=Nt(n,t,a,c.interop,c.compact,i,`module.exports${p}=${p}`);return e.prepend(s),y&&e.append(l+l+y),h&&e.append(h),e},es:function(e,{intro:t,outro:n,dependencies:r,exports:i},s){const o=s.compact?"":" ",a=s.compact?"":"\n",h=r.map(({id:e,reexports:t,imports:n,name:r})=>{if(!t&&!n)return`import${o}'${e}';`;let i="";if(n){const t=n.find(e=>"default"===e.imported),r=n.find(e=>"*"===e.imported);r&&(i+=`import${o}*${o}as ${r.local} from${o}'${e}';`,n.length>1&&(i+=a)),t&&1===n.length?i+=`import ${t.local} from${o}'${e}';`:(!r||n.length>1)&&(i+=`import ${t?`${t.local},${o}`:""}{${o}${n.filter(e=>e!==t&&e!==r).map(e=>e.imported===e.local?e.imported:`${e.imported} as ${e.local}`).join(`,${o}`)}${o}}${o}from${o}'${e}';`)}if(t){n&&(i+=a);const s=t.find(e=>"*"===e.reexported),h=t.find(e=>"*"===e.imported&&"*"!==e.reexported);if(s){if(i+=`export${o}*${o}from${o}'${e}';`,1===t.length)return i;i+=a}if(h){if(n&&n.some(e=>"*"===e.imported&&e.local===r)||(i+=`import${o}*${o}as ${r} from${o}'${e}';${a}`),i+=`export${o}{${o}${r===h.reexported?r:`${r} as ${h.reexported}`} };`,t.length===(s?2:1))return i;i+=a}i+=`export${o}{${o}${t.filter(e=>e!==s&&e!==h).map(e=>e.imported===e.reexported?e.imported:`${e.imported} as ${e.reexported}`).join(`,${o}`)}${o}}${o}from${o}'${e}';`}return i}).join(a);h&&(t+=h+a+a),t&&e.prepend(t);const u=[],c=[];return i.forEach(e=>{"default"===e.exported?u.push(`export default ${e.local};`):c.push(e.exported===e.local?e.local:`${e.local} as ${e.exported}`)}),c.length&&u.push(`export${o}{${o}${c.join(`,${o}`)}${o}};`),u.length&&e.append(a+a+u.join(a).trim()),n&&e.append(n),e.trim()},iife:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,namedExportsMode:o,outro:a,varOrConst:h,warn:u},c){const l=c.compact?"":" ",p=c.compact?"":"\n",{extend:d,name:f}=c,m=f&&-1!==f.indexOf("."),g=!d&&!m;var y;f&&g&&(Qe(y=f)||Ye[y]||Xe.test(y))&&zt({code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name (${f}) is not legal JS identifier. If you need this you can try --extend option`}),Ot(u,t);const x=Yt(t),v=x.map(e=>e.globalName||"null"),E=x.map(e=>e.name);r&&!f&&zt({code:"INVALID_OPTION",message:'You must supply "output.name" for IIFE bundles.'}),o&&r&&(d?(v.unshift(`${Xt(f)}${l}=${l}${Xt(f)}${l}||${l}{}`),E.unshift("exports")):(v.unshift("{}"),E.unshift("exports")));const _=!1!==c.strict?`${i}'use strict';${p}${p}`:"";let b=`(function${l}(${E.join(`,${l}`)})${l}{${p}${_}`;!r||d&&o||(b=(g?`${h} ${f}`:Xt(f))+`${l}=${l}${b}`),m&&r&&(b=function(e,t,n,r){const i=e.split(".");n&&(i[0]=("function"==typeof n?n(i[0]):n[i[0]])||i[0]);const s=r?"":" ";i.pop();let o=t;return i.map(e=>(o+=Gt(e),`${o}${s}=${s}${o}${s}||${s}{}${r?"":";"}`)).join(r?",":"\n")+(r&&i.length?";":"\n")}(f,"this",c.globals,c.compact)+b);let A=`${p}${p}}(${v.join(`,${l}`)}));`;!d&&o&&r&&(A=`${p}${p}${i}return exports;${A}`);const S=$t(t,c,h);S&&e.prepend(S+p+p),s&&e.prepend(s);const I=Nt(n,t,o,c.interop,c.compact,i);return I&&e.append(p+p+I),a&&e.append(a),e.indent(i).prepend(b).append(A)},umd:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,namedExportsMode:o,outro:a,varOrConst:h,warn:u},c){const l=c.compact?"":" ",p=c.compact?"":"\n",d=c.compact?"f":"factory",f=c.compact?"g":"global";r&&!c.name&&zt({code:"INVALID_OPTION",message:'You must supply "output.name" for UMD bundles.'}),Ot(u,t);const m=t.map(e=>`'${e.id}'`),g=t.map(e=>`require('${e.id}')`),y=Yt(t),x=y.map(e=>nn(e.globalName,f)),v=y.map(e=>e.name);o&&(r||!0===c.noConflict)&&(m.unshift("'exports'"),g.unshift("exports"),x.unshift(Kt(c.name,f,c.globals,c.compact,`${c.extend?`${nn(c.name,f)}${l}||${l}`:""}{}`)),v.unshift("exports"));const E=c.amd||{},_=(E.id?`'${E.id}',${l}`:"")+(m.length?`[${m.join(`,${l}`)}],${l}`:""),b=E.define||"define",A=!o&&r?`module.exports${l}=${l}`:"",S=!1!==c.strict?`${l}'use strict';${p}`:"";let I;if(!0===c.noConflict){const e=c.compact?"e":"exports";let t;!o&&r?t=`var ${e}${l}=${l}${Kt(c.name,f,c.globals,c.compact,`${d}(${x.join(`,${l}`)})`)};`:o&&(t=`var ${e}${l}=${l}${x.shift()};${p}`+`${i}${i}${d}(${[e].concat(x).join(`,${l}`)});`),I=`(function${l}()${l}{${p}`+`${i}${i}var current${l}=${l}${function(e,t,n){const r=e.split(".");let i=t;return r.map(e=>(i+=Gt(e),i)).join(`${n}&&${n}`)}(c.name,f,l)};${p}`+`${i}${i}${t}${p}`+`${i}${i}${e}.noConflict${l}=${l}function${l}()${l}{${l}`+`${nn(c.name,f)}${l}=${l}current;${l}return ${e}${c.compact?"":"; "}};${p}`+`${i}}())`}else I=`${d}(${x.join(`,${l}`)})`,!o&&r&&(I=Kt(c.name,f,c.globals,c.compact,I));const w=r||!0===c.noConflict&&o||x.length>0,P=w?`this,${l}`:"",k=w?`(${f}${l}=${l}${f}${l}||${l}self,${l}`:"",C=w?")":"",N=`(function${l}(${w?`${f},${l}`:""}${d})${l}{${p}`+(w?`${i}typeof exports${l}===${l}'object'${l}&&${l}typeof module${l}!==${l}'undefined'${l}?`+`${l}${A}${d}(${g.join(`,${l}`)})${l}:${p}`:"")+`${i}typeof ${b}${l}===${l}'function'${l}&&${l}${b}.amd${l}?${l}${b}(${_}${d})${l}:${p}`+`${i}${k}${I}${C};${p}`+`}(${P}function${l}(${v.join(", ")})${l}{${S}${p}`,$=p+p+"}));",R=$t(t,c,h);R&&e.prepend(R+p+p),s&&e.prepend(s);const O=Nt(n,t,o,c.interop,c.compact,i);return O&&e.append(p+p+O),o&&r&&c.esModule&&e.append(p+p+(c.compact?Ct:kt)),a&&e.append(a),e.trim().indent(i).append($).prepend(N)}};const sn={ArrayPattern(e,t){for(const n of t.elements)n&&sn[n.type](e,n)},AssignmentPattern(e,t){sn[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const n of t.properties)"RestElement"===n.type?sn.RestElement(e,n):sn[n.value.type](e,n.value)},RestElement(e,t){sn[t.argument.type](e,t.argument)}},on=function(e){const t=[];return sn[e.type](t,e),t},an=Object.create(null);function hn(e,t,n,r){if(t.remove(n,r),e.annotations)for(const r of e.annotations){if(!(r.start<n))return;t.remove(r.start,r.end)}}function un(e,t){if(e.annotations||e.parent.type!==ee||(e=e.parent),e.annotations)for(const n of e.annotations)t.remove(n.start,n.end)}const cn={isNoStatement:!0};function ln(e,t,n=0){let r,i;for(r=e.indexOf(t,n);;){if(-1===(n=e.indexOf("/",n))||n>r)return r;if(i=e.charCodeAt(++n),++n,47===i){if(0===(n=e.indexOf("\n",n)+1))return-1;n>r&&(r=e.indexOf(t,n))}else 42===i&&(n=e.indexOf("*/",n)+2)>r&&(r=e.indexOf(t,n))}}function pn(e,t=0){let n,r;for(n=e.indexOf("\n",t);;){if(-1===(t=e.indexOf("/",t))||t>n)return n;if(47===(r=e.charCodeAt(++t)))return n;++t,42===r&&(t=e.indexOf("*/",t)+2)>n&&(n=e.indexOf("\n",t))}}function dn(e,t,n,r,i){if(0===e.length)return;let s,o,a,h,u=e[0],c=!u.included||u.needsBoundaries;c&&(h=n+pn(t.original.slice(n,u.start))+1);for(let n=1;n<=e.length;n++)s=u,o=h,a=c,c=void 0!==(u=e[n])&&(!u.included||u.needsBoundaries),a||c?(h=s.end+pn(t.original.slice(s.end,void 0===u?r:u.start))+1,s.included?a?s.render(t,i,{end:h,start:o}):s.render(t,i):hn(s,t,o,h)):s.render(t,i)}function fn(e,t,n,r){const i=[];let s,o,a,h,u,c=n-1;for(let r=0;r<e.length;r++){for(o=e[r],void 0!==s&&(c=s.end+ln(t.original.slice(s.end,o.start),",")),a=h=c+2+pn(t.original.slice(c+1,o.start));32===(u=t.original.charCodeAt(a))||9===u||10===u||13===u;)a++;void 0!==s&&i.push({contentEnd:h,end:a,node:s,separator:c,start:n}),s=o,n=a}return i.push({contentEnd:r,end:r,node:s,separator:null,start:n}),i}const mn="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",gn=64;function yn(e){let t="";do{const n=e%gn;e=Math.floor(e/gn),t=mn[n]+t}while(0!==e);return t}function xn(e,t){let n=e,r=1;for(;t[n];)n=`${e}$${yn(r++)}`;return t[n]=!0,n}class vn{constructor(){this.children=[],this.variables=Object.create(null)}addDeclaration(e,t,n=null,r){const i=e.name;return this.variables[i]?this.variables[i].addDeclaration(e,n):this.variables[i]=new pt(e.name,e,n||Ee,t),this.variables[i]}contains(e){return e in this.variables}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class En extends vn{constructor(e){super(),this.accessedOutsideVariables=Object.create(null),this.parent=e,e.children.push(this)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables[e]=t,this.parent instanceof En&&this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof En&&this.parent.addReturnExpression(e)}contains(e){return e in this.variables||this.parent.contains(e)}deconflict(e){const t=Object.assign(Object.create(null),e);for(const e of Object.keys(this.accessedOutsideVariables)){const n=this.accessedOutsideVariables[e];n.included&&(t[n.getBaseVariableName()]=!0)}for(const e of Object.keys(this.variables)){const n=this.variables[e];n.included&&n.setSafeName(xn(e,t))}for(const t of this.children)t.deconflict(e)}findLexicalBoundary(){return this.parent instanceof En?this.parent.findLexicalBoundary():this}findVariable(e){const t=this.variables[e]||this.accessedOutsideVariables[e];return t||(this.accessedOutsideVariables[e]=this.parent.findVariable(e))}}var _n=5,bn=1<<_n,An=bn-1,Sn={};function In(e){e&&(e.value=!0)}function wn(){}function Pn(e){return void 0===e.size&&(e.size=e.__iterate(Cn)),e.size}function kn(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?Pn(e)+t:t}function Cn(){return!0}function Nn(e,t,n){return(0===e&&!Mn(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function $n(e,t){return On(e,t,0)}function Rn(e,t){return On(e,t,t)}function On(e,t,n){return void 0===e?n:Mn(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function Mn(e){return e<0||0===e&&1/e==-1/0}var Tn="@@__IMMUTABLE_ITERABLE__@@";function Dn(e){return Boolean(e&&e[Tn])}var Ln="@@__IMMUTABLE_KEYED__@@";function Vn(e){return Boolean(e&&e[Ln])}var Bn="@@__IMMUTABLE_INDEXED__@@";function zn(e){return Boolean(e&&e[Bn])}function jn(e){return Vn(e)||zn(e)}var Wn=function(e){return Dn(e)?e:fr(e)},Un=function(e){function t(e){return Vn(e)?e:mr(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Wn),Fn=function(e){function t(e){return zn(e)?e:gr(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Wn),qn=function(e){function t(e){return Dn(e)&&!jn(e)?e:yr(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Wn);Wn.Keyed=Un,Wn.Indexed=Fn,Wn.Set=qn;var Gn="@@__IMMUTABLE_SEQ__@@";function Hn(e){return Boolean(e&&e[Gn])}var Kn="@@__IMMUTABLE_RECORD__@@";function Yn(e){return Boolean(e&&e[Kn])}function Xn(e){return Dn(e)||Yn(e)}var Qn="@@__IMMUTABLE_ORDERED__@@";function Jn(e){return Boolean(e&&e[Qn])}var Zn=0,er=1,tr=2,nr="function"==typeof Symbol&&Symbol.iterator,rr="@@iterator",ir=nr||rr,sr=function(e){this.next=e};function or(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function ar(){return{value:void 0,done:!0}}function hr(e){return!!lr(e)}function ur(e){return e&&"function"==typeof e.next}function cr(e){var t=lr(e);return t&&t.call(e)}function lr(e){var t=e&&(nr&&e[nr]||e[rr]);if("function"==typeof t)return t}sr.prototype.toString=function(){return"[Iterator]"},sr.KEYS=Zn,sr.VALUES=er,sr.ENTRIES=tr,sr.prototype.inspect=sr.prototype.toSource=function(){return this.toString()},sr.prototype[ir]=function(){return this};var pr=Object.prototype.hasOwnProperty;function dr(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var fr=function(e){function t(e){return null==e?br():Xn(e)?e.toSeq():function(e){var t=Ir(e);if(t)return t;if("object"==typeof e)return new vr(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var s=n[t?r-++i:i++];if(!1===e(s[1],s[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new sr(function(){if(i===r)return{value:void 0,done:!0};var s=n[t?r-++i:i++];return or(e,s[0],s[1])})}return this.__iteratorUncached(e,t)},t}(Wn),mr=function(e){function t(e){return null==e?br().toKeyedSeq():Dn(e)?Vn(e)?e.toSeq():e.fromEntrySeq():Yn(e)?e.toSeq():Ar(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(fr),gr=function(e){function t(e){return null==e?br():Dn(e)?Vn(e)?e.entrySeq():e.toIndexedSeq():Yn(e)?e.toSeq().entrySeq():Sr(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(fr),yr=function(e){function t(e){return(Dn(e)&&!jn(e)?e:gr(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(fr);fr.isSeq=Hn,fr.Keyed=mr,fr.Set=yr,fr.Indexed=gr,fr.prototype[Gn]=!0;var xr=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[kn(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var s=t?r-++i:i++;if(!1===e(n[s],s,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new sr(function(){if(i===r)return{value:void 0,done:!0};var s=t?r-++i:i++;return or(e,s,n[s])})},t}(gr),vr=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return pr.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,s=0;s!==i;){var o=r[t?i-++s:s++];if(!1===e(n[o],o,this))break}return s},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,s=0;return new sr(function(){if(s===i)return{value:void 0,done:!0};var o=r[t?i-++s:s++];return or(e,o,n[o])})},t}(mr);vr.prototype[Qn]=!0;var Er,_r=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=cr(this._collection),r=0;if(ur(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=cr(this._collection);if(!ur(n))return new sr(ar);var r=0;return new sr(function(){var t=n.next();return t.done?t:or(e,r++,t.value)})},t}(gr);function br(){return Er||(Er=new xr([]))}function Ar(e){var t=Array.isArray(e)?new xr(e):hr(e)?new _r(e):void 0;if(t)return t.fromEntrySeq();if("object"==typeof e)return new vr(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function Sr(e){var t=Ir(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function Ir(e){return dr(e)?new xr(e):hr(e)?new _r(e):void 0}var wr="@@__IMMUTABLE_MAP__@@";function Pr(e){return Boolean(e&&e[wr])}function kr(e){return Pr(e)&&Jn(e)}function Cr(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function Nr(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(Cr(e)&&Cr(t)&&e.equals(t))}var $r="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Rr(e){return e>>>1&1073741824|3221225471&e}var Or=Object.prototype.valueOf;function Mr(e){switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return Rr(t)}(e);case"string":return e.length>Wr?function(e){var t=qr[e];void 0===t&&(t=Tr(e),Fr===Ur&&(Fr=0,qr={}),Fr++,qr[e]=t);return t}(e):Tr(e);case"object":case"function":return null===e?1108378658:"function"==typeof e.hashCode?Rr(e.hashCode(e)):(e.valueOf!==Or&&"function"==typeof e.valueOf&&(e=e.valueOf(e)),function(e){var t;if(Br&&void 0!==(t=Vr.get(e)))return t;if(void 0!==(t=e[jr]))return t;if(!Lr){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[jr]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}t=++zr,1073741824&zr&&(zr=0);if(Br)Vr.set(e,t);else{if(void 0!==Dr&&!1===Dr(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Lr)Object.defineProperty(e,jr,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[jr]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[jr]=t}}return t}(e));case"undefined":return 1108378659;default:if("function"==typeof e.toString)return Tr(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function Tr(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Rr(t)}var Dr=Object.isExtensible,Lr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();var Vr,Br="function"==typeof WeakMap;Br&&(Vr=new WeakMap);var zr=0,jr="__immutablehash__";"function"==typeof Symbol&&(jr=Symbol(jr));var Wr=16,Ur=255,Fr=0,qr={},Gr=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=Jr(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=Qr(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(mr);Gr.prototype[Qn]=!0;var Hr=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&Pn(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(er,t),i=0;return t&&Pn(this),new sr(function(){var s=r.next();return s.done?s:or(e,t?n.size-++i:i++,s.value,s)})},t}(gr),Kr=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(er,t);return new sr(function(){var t=n.next();return t.done?t:or(e,t.value,t.value,t)})},t}(yr),Yr=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){hi(t);var r=Dn(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(er,t);return new sr(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){hi(r);var i=Dn(r);return or(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(mr);function Xr(e){var t=ci(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=li,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===tr){var r=e.__iterator(t,n);return new sr(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===er?Zn:er,n)},t}function Qr(e,t,n){var r=ci(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var s=e.get(r,Sn);return s===Sn?i:t.call(n,s,r,e)},r.__iterateUncached=function(r,i){var s=this;return e.__iterate(function(e,i,o){return!1!==r(t.call(n,e,i,o),i,s)},i)},r.__iteratorUncached=function(r,i){var s=e.__iterator(tr,i);return new sr(function(){var i=s.next();if(i.done)return i;var o=i.value,a=o[0];return or(r,a,t.call(n,o[1],a,e),i)})},r}function Jr(e,t){var n=this,r=ci(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=Xr(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=li,r.__iterate=function(n,r){var i=this,s=0;return r&&Pn(e),e.__iterate(function(e,o){return n(e,t?o:r?i.size-++s:s++,i)},!r)},r.__iterator=function(r,i){var s=0;i&&Pn(e);var o=e.__iterator(tr,!i);return new sr(function(){var e=o.next();if(e.done)return e;var a=e.value;return or(r,t?a[0]:i?n.size-++s:s++,a[1],e)})},r}function Zr(e,t,n,r){var i=ci(e);return r&&(i.has=function(r){var i=e.get(r,Sn);return i!==Sn&&!!t.call(n,i,r,e)},i.get=function(r,i){var s=e.get(r,Sn);return s!==Sn&&t.call(n,s,r,e)?s:i}),i.__iterateUncached=function(i,s){var o=this,a=0;return e.__iterate(function(e,s,h){if(t.call(n,e,s,h))return a++,i(e,r?s:a-1,o)},s),a},i.__iteratorUncached=function(i,s){var o=e.__iterator(tr,s),a=0;return new sr(function(){for(;;){var s=o.next();if(s.done)return s;var h=s.value,u=h[0],c=h[1];if(t.call(n,c,u,e))return or(i,r?u:a++,c,s)}})},i}function ei(e,t,n,r){var i=e.size;if(Nn(t,n,i))return e;var s=$n(t,i),o=Rn(n,i);if(s!=s||o!=o)return ei(e.toSeq().cacheResult(),t,n,r);var a,h=o-s;h==h&&(a=h<0?0:h);var u=ci(e);return u.size=0===a?a:e.size&&a||void 0,!r&&Hn(e)&&a>=0&&(u.get=function(t,n){return(t=kn(this,t))>=0&&t<a?e.get(t+s,n):n}),u.__iterateUncached=function(t,n){var i=this;if(0===a)return 0;if(n)return this.cacheResult().__iterate(t,n);var o=0,h=!0,u=0;return e.__iterate(function(e,n){if(!h||!(h=o++<s))return u++,!1!==t(e,r?n:u-1,i)&&u!==a}),u},u.__iteratorUncached=function(t,n){if(0!==a&&n)return this.cacheResult().__iterator(t,n);if(0===a)return new sr(ar);var i=e.__iterator(t,n),o=0,h=0;return new sr(function(){for(;o++<s;)i.next();if(++h>a)return{value:void 0,done:!0};var e=i.next();return r||t===er||e.done?e:or(t,h-1,t===Zn?void 0:e.value[1],e)})},u}function ti(e,t,n,r){var i=ci(e);return i.__iterateUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterate(i,s);var a=!0,h=0;return e.__iterate(function(e,s,u){if(!a||!(a=t.call(n,e,s,u)))return h++,i(e,r?s:h-1,o)}),h},i.__iteratorUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterator(i,s);var a=e.__iterator(tr,s),h=!0,u=0;return new sr(function(){var e,s,c;do{if((e=a.next()).done)return r||i===er?e:or(i,u++,i===Zn?void 0:e.value[1],e);var l=e.value;s=l[0],c=l[1],h&&(h=t.call(n,c,s,o))}while(h);return i===tr?e:or(i,s,c,e)})},i}function ni(e,t,n){var r=ci(e);return r.__iterateUncached=function(i,s){if(s)return this.cacheResult().__iterate(i,s);var o=0,a=!1;return function e(h,u){h.__iterate(function(s,h){return(!t||u<t)&&Dn(s)?e(s,u+1):(o++,!1===i(s,n?h:o-1,r)&&(a=!0)),!a},s)}(e,0),o},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var s=e.__iterator(r,i),o=[],a=0;return new sr(function(){for(;s;){var e=s.next();if(!1===e.done){var h=e.value;if(r===tr&&(h=h[1]),t&&!(o.length<t)||!Dn(h))return n?e:or(r,a++,h,e);o.push(s),s=h.__iterator(r,i)}else s=o.pop()}return{value:void 0,done:!0}})},r}function ri(e,t,n){t||(t=pi);var r=Vn(e),i=0,s=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return s.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){s[t].length=2}:function(e,t){s[t]=e[1]}),r?mr(s):zn(e)?gr(s):yr(s)}function ii(e,t,n){if(t||(t=pi),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return si(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return si(t,e,n)?n:e})}function si(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function oi(e,t,n,r){var i=ci(e),s=new xr(n).map(function(e){return e.size});return i.size=r?s.max():s.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(er,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var s=n.map(function(e){return e=Wn(e),cr(i?e.reverse():e)}),o=0,a=!1;return new sr(function(){var n;return a||(n=s.map(function(e){return e.next()}),a=r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),a?{value:void 0,done:!0}:or(e,o++,t.apply(null,n.map(function(e){return e.value})))})},i}function ai(e,t){return e===t?e:Hn(e)?t:e.constructor(t)}function hi(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function ui(e){return Vn(e)?Un:zn(e)?Fn:qn}function ci(e){return Object.create((Vn(e)?mr:zn(e)?gr:yr).prototype)}function li(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):fr.prototype.cacheResult.call(this)}function pi(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function di(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function fi(e,t){if(!e)throw new Error(t)}function mi(e){fi(e!==1/0,"Cannot perform this action with an infinite size.")}function gi(e){if(dr(e)&&"string"!=typeof e)return e;if(Jn(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function yi(e){return e&&("function"!=typeof e.constructor||"Object"===e.constructor.name)}function xi(e){return"object"==typeof e&&(Xn(e)||Array.isArray(e)||yi(e))}function vi(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function Ei(e,t){return Xn(e)?e.has(t):xi(e)&&pr.call(e,t)}function _i(e,t,n){return Xn(e)?e.get(t,n):Ei(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function bi(e){if(Array.isArray(e))return di(e);var t={};for(var n in e)pr.call(e,n)&&(t[n]=e[n]);return t}function Ai(e,t){if(!xi(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Xn(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!pr.call(e,t))return e;var n=bi(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function Si(e,t,n){if(!xi(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Xn(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(pr.call(e,t)&&n===e[t])return e;var r=bi(e);return r[t]=n,r}function Ii(e,t,n,r){r||(r=n,n=void 0);var i=function e(t,n,r,i,s,o){var a=n===Sn;if(i===r.length){var h=a?s:n,u=o(h);return u===h?n:u}if(!a&&!xi(n))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,i).map(vi)+"]: "+n);var c=r[i];var l=a?Sn:_i(n,c,Sn);var p=e(l===Sn?t:Xn(l),l,r,i+1,s,o);return p===l?n:p===Sn?Ai(n,c):Si(a?t?is():{}:n,c,p)}(Xn(e),e,gi(t),0,n,r);return i===Sn?n:i}function wi(e,t,n){return Ii(e,t,Sn,function(){return n})}function Pi(e,t){return wi(this,e,t)}function ki(e,t){return Ii(e,t,function(){return Sn})}function Ci(e){return ki(this,e)}function Ni(e,t,n,r){return Ii(e,[t],n,r)}function $i(e,t,n){return 1===arguments.length?e(this):Ni(this,e,t,n)}function Ri(e,t,n){return Ii(this,e,t,n)}function Oi(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Ti(this,e)}function Mi(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return Ti(this,t,e)}function Ti(e,t,n){for(var r=[],i=0;i<t.length;i++){var s=Un(t[i]);0!==s.size&&r.push(s)}return 0===r.length?e:0!==e.toSeq().size||e.__ownerID||1!==r.length?e.withMutations(function(e){for(var t=n?function(t,r){Ni(e,r,Sn,function(e){return e===Sn?t:n(e,t,r)})}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)}):e.constructor(r[0])}function Di(e,t,n){return Li(e,t,function(e){return function t(n,r,i){return xi(n)&&xi(r)?Li(n,[r],t):e?e(n,r,i):r}}(n))}function Li(e,t,n){if(!xi(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(Xn(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,s=r?Fn:Un,o=r?function(t){i===e&&(i=bi(i)),i.push(t)}:function(t,r){var s=pr.call(i,r),o=s&&n?n(i[r],t,r):t;s&&o===i[r]||(i===e&&(i=bi(i)),i[r]=o)},a=0;a<t.length;a++)s(t[a]).forEach(o);return i}function Vi(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Di(this,e)}function Bi(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Di(this,t,e)}function zi(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Ii(this,e,is(),function(e){return Li(e,t)})}function ji(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Ii(this,e,is(),function(e){return Di(e,t)})}function Wi(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Ui(){return this.__ownerID?this:this.__ensureOwner(new wn)}function Fi(){return this.__ensureOwner()}function qi(){return this.__altered}Hr.prototype.cacheResult=Gr.prototype.cacheResult=Kr.prototype.cacheResult=Yr.prototype.cacheResult=li;var Gi=function(e){function t(t){return null==t?is():Pr(t)&&!Jn(t)?t:is().withMutations(function(n){var r=e(t);mi(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return is().withMutations(function(t){for(var n=0;n<e.length;n+=2){if(n+1>=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return ss(this,e,t)},t.prototype.remove=function(e){return ss(this,e,Sn)},t.prototype.deleteAll=function(e){var t=Wn(e);return 0===t.size?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):is()},t.prototype.sort=function(e){return Ns(ri(this,e))},t.prototype.sortBy=function(e,t){return Ns(ri(this,t,e))},t.prototype.map=function(e,t){return this.withMutations(function(n){n.forEach(function(r,i){n.set(i,e.call(t,r,i,n))})})},t.prototype.__iterator=function(e,t){return new es(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rs(this.size,this._root,e,this.__hash):0===this.size?is():(this.__ownerID=e,this.__altered=!1,this)},t}(Un);Gi.isMap=Pr;var Hi=Gi.prototype;Hi[wr]=!0,Hi.delete=Hi.remove,Hi.removeAll=Hi.deleteAll,Hi.setIn=Pi,Hi.removeIn=Hi.deleteIn=Ci,Hi.update=$i,Hi.updateIn=Ri,Hi.merge=Hi.concat=Oi,Hi.mergeWith=Mi,Hi.mergeDeep=Vi,Hi.mergeDeepWith=Bi,Hi.mergeIn=zi,Hi.mergeDeepIn=ji,Hi.withMutations=Wi,Hi.wasAltered=qi,Hi.asImmutable=Fi,Hi["@@transducer/init"]=Hi.asMutable=Ui,Hi["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Hi["@@transducer/result"]=function(e){return e.asImmutable()};var Ki=function(e,t){this.ownerID=e,this.entries=t};Ki.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if(Nr(n,i[s][0]))return i[s][1];return r},Ki.prototype.update=function(e,t,n,r,i,s,o){for(var a=i===Sn,h=this.entries,u=0,c=h.length;u<c&&!Nr(r,h[u][0]);u++);var l=u<c;if(l?h[u][1]===i:a)return this;if(In(o),(a||!l)&&In(s),!a||1!==h.length){if(!l&&!a&&h.length>=ls)return function(e,t,n,r){e||(e=new wn);for(var i=new Ji(e,Mr(n),[n,r]),s=0;s<t.length;s++){var o=t[s];i=i.update(e,0,void 0,o[0],o[1])}return i}(e,h,r,i);var p=e&&e===this.ownerID,d=p?h:di(h);return l?a?u===c-1?d.pop():d[u]=d.pop():d[u]=[r,i]:d.push([r,i]),p?(this.entries=d,this):new Ki(e,d)}};var Yi=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};Yi.prototype.get=function(e,t,n,r){void 0===t&&(t=Mr(n));var i=1<<((0===e?t:t>>>e)&An),s=this.bitmap;return 0==(s&i)?r:this.nodes[us(s&i-1)].get(e+_n,t,n,r)},Yi.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Mr(r));var a=(0===t?n:n>>>t)&An,h=1<<a,u=this.bitmap,c=0!=(u&h);if(!c&&i===Sn)return this;var l=us(u&h-1),p=this.nodes,d=c?p[l]:void 0,f=os(d,e,t+_n,n,r,i,s,o);if(f===d)return this;if(!c&&f&&p.length>=ps)return function(e,t,n,r,i){for(var s=0,o=new Array(bn),a=0;0!==n;a++,n>>>=1)o[a]=1&n?t[s++]:void 0;return o[r]=i,new Xi(e,s+1,o)}(e,p,u,a,f);if(c&&!f&&2===p.length&&as(p[1^l]))return p[1^l];if(c&&f&&1===p.length&&as(f))return f;var m=e&&e===this.ownerID,g=c?f?u:u^h:u|h,y=c?f?cs(p,l,f,m):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),s=0,o=0;o<r;o++)o===t&&(s=1),i[o]=e[o+s];return i}(p,l,m):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var s=new Array(i),o=0,a=0;a<i;a++)a===t?(s[a]=n,o=-1):s[a]=e[a+o];return s}(p,l,f,m);return m?(this.bitmap=g,this.nodes=y,this):new Yi(e,g,y)};var Xi=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};Xi.prototype.get=function(e,t,n,r){void 0===t&&(t=Mr(n));var i=(0===e?t:t>>>e)&An,s=this.nodes[i];return s?s.get(e+_n,t,n,r):r},Xi.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Mr(r));var a=(0===t?n:n>>>t)&An,h=i===Sn,u=this.nodes,c=u[a];if(h&&!c)return this;var l=os(c,e,t+_n,n,r,i,s,o);if(l===c)return this;var p=this.count;if(c){if(!l&&--p<ds)return function(e,t,n,r){for(var i=0,s=0,o=new Array(n),a=0,h=1,u=t.length;a<u;a++,h<<=1){var c=t[a];void 0!==c&&a!==r&&(i|=h,o[s++]=c)}return new Yi(e,i,o)}(e,u,p,a)}else p++;var d=e&&e===this.ownerID,f=cs(u,a,l,d);return d?(this.count=p,this.nodes=f,this):new Xi(e,p,f)};var Qi=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};Qi.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if(Nr(n,i[s][0]))return i[s][1];return r},Qi.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Mr(r));var a=i===Sn;if(n!==this.keyHash)return a?this:(In(o),In(s),hs(this,e,t,n,[r,i]));for(var h=this.entries,u=0,c=h.length;u<c&&!Nr(r,h[u][0]);u++);var l=u<c;if(l?h[u][1]===i:a)return this;if(In(o),(a||!l)&&In(s),a&&2===c)return new Ji(e,this.keyHash,h[1^u]);var p=e&&e===this.ownerID,d=p?h:di(h);return l?a?u===c-1?d.pop():d[u]=d.pop():d[u]=[r,i]:d.push([r,i]),p?(this.entries=d,this):new Qi(e,this.keyHash,d)};var Ji=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};Ji.prototype.get=function(e,t,n,r){return Nr(n,this.entry[0])?this.entry[1]:r},Ji.prototype.update=function(e,t,n,r,i,s,o){var a=i===Sn,h=Nr(r,this.entry[0]);return(h?i===this.entry[1]:a)?this:(In(o),a?void In(s):h?e&&e===this.ownerID?(this.entry[1]=i,this):new Ji(e,this.keyHash,[r,i]):(In(s),hs(this,e,t,Mr(r),[r,i])))},Ki.prototype.iterate=Qi.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Yi.prototype.iterate=Xi.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var s=n[t?i-r:r];if(s&&!1===s.iterate(e,t))return!1}},Ji.prototype.iterate=function(e,t){return e(this.entry)};var Zi,es=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&ns(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return ts(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return ts(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var s=n.nodes[this._reverse?i-r:r];if(s){if(s.entry)return ts(e,s.entry);t=this._stack=ns(s,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(sr);function ts(e,t){return or(e,t[0],t[1])}function ns(e,t){return{node:e,index:0,__prev:t}}function rs(e,t,n,r){var i=Object.create(Hi);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function is(){return Zi||(Zi=rs(0))}function ss(e,t,n){var r,i;if(e._root){var s={value:!1},o={value:!1};if(r=os(e._root,e.__ownerID,0,void 0,t,n,s,o),!o.value)return e;i=e.size+(s.value?n===Sn?-1:1:0)}else{if(n===Sn)return e;i=1,r=new Ki(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rs(i,r):is()}function os(e,t,n,r,i,s,o,a){return e?e.update(t,n,r,i,s,o,a):s===Sn?e:(In(a),In(o),new Ji(t,r,[i,s]))}function as(e){return e.constructor===Ji||e.constructor===Qi}function hs(e,t,n,r,i){if(e.keyHash===r)return new Qi(t,r,[e.entry,i]);var s,o=(0===n?e.keyHash:e.keyHash>>>n)&An,a=(0===n?r:r>>>n)&An,h=o===a?[hs(e,t,n+_n,r,i)]:(s=new Ji(t,r,i),o<a?[e,s]:[s,e]);return new Yi(t,1<<o|1<<a,h)}function us(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function cs(e,t,n,r){var i=r?e:di(e);return i[t]=n,i}var ls=bn/4,ps=bn/2,ds=bn/4,fs="@@__IMMUTABLE_LIST__@@";function ms(e){return Boolean(e&&e[fs])}var gs=function(e){function t(t){var n=As();if(null==t)return n;if(ms(t))return t;var r=e(t),i=r.size;return 0===i?n:(mi(i),i>0&&i<bn?bs(0,i,_n,null,new xs(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=kn(this,e))>=0&&e<this.size){var n=ws(this,e+=this._origin);return n&&n.array[e&An]}return t},t.prototype.set=function(e,t){return function(e,t,n){if((t=kn(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Ps(e,t).set(0,n):Ps(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,s={value:!1};t>=ks(e._capacity)?r=Ss(r,e.__ownerID,0,t,n,s):i=Ss(i,e.__ownerID,e._level,t,n,s);if(!s.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return bs(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=_n,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):As()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Ps(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return Ps(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Ps(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return Ps(this,1)},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],s=e("string"!=typeof i&&hr(i)?i:[i]);0!==s.size&&n.push(s)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(n[0])},t.prototype.setSize=function(e){return Ps(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,r))})},t.prototype.slice=function(e,t){var n=this.size;return Nn(e,t,n)?this:Ps(this,$n(e,n),Rn(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=_s(this,t);return new sr(function(){var i=r();return i===Es?{value:void 0,done:!0}:or(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=_s(this,t);(n=i())!==Es&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?bs(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?As():(this.__ownerID=e,this.__altered=!1,this)},t}(Fn);gs.isList=ms;var ys=gs.prototype;ys[fs]=!0,ys.delete=ys.remove,ys.merge=ys.concat,ys.setIn=Pi,ys.deleteIn=ys.removeIn=Ci,ys.update=$i,ys.updateIn=Ri,ys.mergeIn=zi,ys.mergeDeepIn=ji,ys.withMutations=Wi,ys.wasAltered=qi,ys.asImmutable=Fi,ys["@@transducer/init"]=ys.asMutable=Ui,ys["@@transducer/step"]=function(e,t){return e.push(t)},ys["@@transducer/result"]=function(e){return e.asImmutable()};var xs=function(e,t){this.array=e,this.ownerID=t};xs.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&An;if(r>=this.array.length)return new xs([],e);var i,s=0===r;if(t>0){var o=this.array[r];if((i=o&&o.removeBefore(e,t-_n,n))===o&&s)return this}if(s&&!i)return this;var a=Is(this,e);if(!s)for(var h=0;h<r;h++)a.array[h]=void 0;return i&&(a.array[r]=i),a},xs.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&An;if(i>=this.array.length)return this;if(t>0){var s=this.array[i];if((r=s&&s.removeAfter(e,t-_n,n))===s&&i===this.array.length-1)return this}var o=Is(this,e);return o.array.splice(i+1),r&&(o.array[i]=r),o};var vs,Es={};function _s(e,t){var n=e._origin,r=e._capacity,i=ks(r),s=e._tail;return o(e._root,e._level,0);function o(e,a,h){return 0===a?function(e,o){var a=o===i?s&&s.array:e&&e.array,h=o>n?0:n-o,u=r-o;u>bn&&(u=bn);return function(){if(h===u)return Es;var e=t?--u:h++;return a&&a[e]}}(e,h):function(e,i,s){var a,h=e&&e.array,u=s>n?0:n-s>>i,c=1+(r-s>>i);c>bn&&(c=bn);return function(){for(;;){if(a){var e=a();if(e!==Es)return e;a=null}if(u===c)return Es;var n=t?--c:u++;a=o(h&&h[n],i-_n,s+(n<<i))}}}(e,a,h)}}function bs(e,t,n,r,i,s,o){var a=Object.create(ys);return a.size=t-e,a._origin=e,a._capacity=t,a._level=n,a._root=r,a._tail=i,a.__ownerID=s,a.__hash=o,a.__altered=!1,a}function As(){return vs||(vs=bs(0,0,_n))}function Ss(e,t,n,r,i,s){var o,a=r>>>n&An,h=e&&a<e.array.length;if(!h&&void 0===i)return e;if(n>0){var u=e&&e.array[a],c=Ss(u,t,n-_n,r,i,s);return c===u?e:((o=Is(e,t)).array[a]=c,o)}return h&&e.array[a]===i?e:(s&&In(s),o=Is(e,t),void 0===i&&a===o.array.length-1?o.array.pop():o.array[a]=i,o)}function Is(e,t){return t&&e&&t===e.ownerID?e:new xs(e?e.array.slice():[],t)}function ws(e,t){if(t>=ks(e._capacity))return e._tail;if(t<1<<e._level+_n){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&An],r-=_n;return n}}function Ps(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new wn,i=e._origin,s=e._capacity,o=i+t,a=void 0===n?s:n<0?s+n:i+n;if(o===i&&a===s)return e;if(o>=a)return e.clear();for(var h=e._level,u=e._root,c=0;o+c<0;)u=new xs(u&&u.array.length?[void 0,u]:[],r),c+=1<<(h+=_n);c&&(o+=c,i+=c,a+=c,s+=c);for(var l=ks(s),p=ks(a);p>=1<<h+_n;)u=new xs(u&&u.array.length?[u]:[],r),h+=_n;var d=e._tail,f=p<l?ws(e,a-1):p>l?new xs([],r):d;if(d&&p>l&&o<s&&d.array.length){for(var m=u=Is(u,r),g=h;g>_n;g-=_n){var y=l>>>g&An;m=m.array[y]=Is(m.array[y],r)}m.array[l>>>_n&An]=d}if(a<s&&(f=f&&f.removeAfter(r,0,a)),o>=p)o-=p,a-=p,h=_n,u=null,f=f&&f.removeBefore(r,0,o);else if(o>i||p<l){for(c=0;u;){var x=o>>>h&An;if(x!==p>>>h&An)break;x&&(c+=(1<<h)*x),h-=_n,u=u.array[x]}u&&o>i&&(u=u.removeBefore(r,h,o-c)),u&&p<l&&(u=u.removeAfter(r,h,p-c)),c&&(o-=c,a-=c)}return e.__ownerID?(e.size=a-o,e._origin=o,e._capacity=a,e._level=h,e._root=u,e._tail=f,e.__hash=void 0,e.__altered=!0,e):bs(o,a,h,u,f)}function ks(e){return e<bn?0:e-1>>>_n<<_n}var Cs,Ns=function(e){function t(e){return null==e?Rs():kr(e)?e:Rs().withMutations(function(t){var n=Un(e);mi(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Rs()},t.prototype.set=function(e,t){return Os(this,e,t)},t.prototype.remove=function(e){return Os(this,e,Sn)},t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?$s(t,n,e,this.__hash):0===this.size?Rs():(this.__ownerID=e,this._map=t,this._list=n,this)},t}(Gi);function $s(e,t,n,r){var i=Object.create(Ns.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function Rs(){return Cs||(Cs=$s(is(),As()))}function Os(e,t,n){var r,i,s=e._map,o=e._list,a=s.get(t),h=void 0!==a;if(n===Sn){if(!h)return e;o.size>=bn&&o.size>=2*s.size?(r=(i=o.filter(function(e,t){return void 0!==e&&a!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=s.remove(t),i=a===o.size-1?o.pop():o.set(a,void 0))}else if(h){if(n===o.get(a)[1])return e;r=s,i=o.set(a,[t,n])}else r=s.set(t,o.size),i=o.set(o.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):$s(r,i)}Ns.isOrderedMap=kr,Ns.prototype[Qn]=!0,Ns.prototype.delete=Ns.prototype.remove;var Ms="@@__IMMUTABLE_STACK__@@";function Ts(e){return Boolean(e&&e[Ms])}var Ds=function(e){function t(e){return null==e?zs():Ts(e)?e:zs().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=kn(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Bs(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Ts(t))return t;mi(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):Bs(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):zs()},t.prototype.slice=function(t,n){if(Nn(t,n,this.size))return this;var r=$n(t,this.size);if(Rn(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,s=this._head;r--;)s=s.next;return this.__ownerID?(this.size=i,this._head=s,this.__hash=void 0,this.__altered=!0,this):Bs(i,s)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Bs(this.size,this._head,e,this.__hash):0===this.size?zs():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new xr(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new xr(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new sr(function(){if(r){var t=r.value;return r=r.next,or(e,n++,t)}return{value:void 0,done:!0}})},t}(Fn);Ds.isStack=Ts;var Ls,Vs=Ds.prototype;function Bs(e,t,n,r){var i=Object.create(Vs);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function zs(){return Ls||(Ls=Bs(0))}Vs[Ms]=!0,Vs.shift=Vs.pop,Vs.unshift=Vs.push,Vs.unshiftAll=Vs.pushAll,Vs.withMutations=Wi,Vs.wasAltered=qi,Vs.asImmutable=Fi,Vs["@@transducer/init"]=Vs.asMutable=Ui,Vs["@@transducer/step"]=function(e,t){return e.unshift(t)},Vs["@@transducer/result"]=function(e){return e.asImmutable()};var js="@@__IMMUTABLE_SET__@@";function Ws(e){return Boolean(e&&e[js])}function Us(e){return Ws(e)&&Jn(e)}function Fs(e,t){if(e===t)return!0;if(!Dn(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||Vn(e)!==Vn(t)||zn(e)!==zn(t)||Jn(e)!==Jn(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!jn(e);if(Jn(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&Nr(i[1],e)&&(n||Nr(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var s=e;e=t,t=s}var o=!0,a=t.__iterate(function(t,r){if(n?!e.has(t):i?!Nr(t,e.get(r,Sn)):!Nr(e.get(r,Sn),t))return o=!1,!1});return o&&e.size===a}function qs(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Gs(e){if(!e||"object"!=typeof e)return e;if(!Dn(e)){if(!xi(e))return e;e=fr(e)}if(Vn(e)){var t={};return e.__iterate(function(e,n){t[n]=Gs(e)}),t}var n=[];return e.__iterate(function(e){n.push(Gs(e))}),n}var Hs=function(e){function t(t){return null==t?Js():Ws(t)&&!Jn(t)?t:Js().withMutations(function(n){var r=e(t);mi(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(Un(e).keySeq())},t.intersect=function(e){return(e=Wn(e).toArray()).length?Ys.intersect.apply(t(e.pop()),e):Js()},t.union=function(e){return(e=Wn(e).toArray()).length?Ys.union.apply(t(e.pop()),e):Js()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Xs(this,this._map.set(e,e))},t.prototype.remove=function(e){return Xs(this,this._map.remove(e))},t.prototype.clear=function(){return Xs(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=[],i=[];return this.forEach(function(s){var o=e.call(t,s,s,n);o!==s&&(r.push(s),i.push(o))}),this.withMutations(function(e){r.forEach(function(t){return e.remove(t)}),i.forEach(function(t){return e.add(t)})})},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(n){for(var r=0;r<t.length;r++)e(t[r]).forEach(function(e){return n.add(e)})}):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return yo(ri(this,e))},t.prototype.sortBy=function(e,t){return yo(ri(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(qn);Hs.isSet=Ws;var Ks,Ys=Hs.prototype;function Xs(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Qs(e,t){var n=Object.create(Ys);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Js(){return Ks||(Ks=Qs(is()))}Ys[js]=!0,Ys.delete=Ys.remove,Ys.merge=Ys.concat=Ys.union,Ys.withMutations=Wi,Ys.asImmutable=Fi,Ys["@@transducer/init"]=Ys.asMutable=Ui,Ys["@@transducer/step"]=function(e,t){return e.add(t)},Ys["@@transducer/result"]=function(e){return e.asImmutable()},Ys.__empty=Js,Ys.__make=Qs;var Zs,eo=function(e){function t(e,n,r){if(!(this instanceof t))return new t(e,n,r);if(fi(0!==r,"Cannot step a Range by 0"),e=e||0,void 0===n&&(n=1/0),r=void 0===r?1:Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(Zs)return Zs;Zs=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+kn(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return Nn(e,n,this.size)?this:(e=$n(e,this.size),(n=Rn(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,s=0;s!==n&&!1!==e(i,t?n-++s:s++,this);)i+=t?-r:r;return s},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,s=0;return new sr(function(){if(s===n)return{value:void 0,done:!0};var o=i;return i+=t?-r:r,or(e,t?n-++s:s++,o)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:Fs(this,e)},t}(gr);function to(e,t,n){for(var r=gi(t),i=0;i!==r.length;)if((e=_i(e,r[i++],Sn))===Sn)return n;return e}function no(e,t){return to(this,e,t)}function ro(e,t){return to(e,t,Sn)!==Sn}function io(){mi(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e}Wn.isIterable=Dn,Wn.isKeyed=Vn,Wn.isIndexed=zn,Wn.isAssociative=jn,Wn.isOrdered=Jn,Wn.Iterator=sr,qs(Wn,{toArray:function(){mi(this.size);var e=new Array(this.size||0),t=Vn(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new Hr(this)},toJS:function(){return Gs(this)},toKeyedSeq:function(){return new Gr(this,!0)},toMap:function(){return Gi(this.toKeyedSeq())},toObject:io,toOrderedMap:function(){return Ns(this.toKeyedSeq())},toOrderedSet:function(){return yo(Vn(this)?this.valueSeq():this)},toSet:function(){return Hs(Vn(this)?this.valueSeq():this)},toSetSeq:function(){return new Kr(this)},toSeq:function(){return zn(this)?this.toIndexedSeq():Vn(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ds(Vn(this)?this.valueSeq():this)},toList:function(){return gs(Vn(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return ai(this,function(e,t){var n=Vn(e),r=[e].concat(t).map(function(e){return Dn(e)?n&&(e=Un(e)):e=n?Ar(e):Sr(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&Vn(i)||zn(e)&&zn(i))return i}var s=new xr(r);return n?s=s.toKeyedSeq():zn(e)||(s=s.toSetSeq()),(s=s.flatten(!0)).size=r.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),s}(this,e))},includes:function(e){return this.some(function(t){return Nr(t,e)})},entries:function(){return this.__iterator(tr)},every:function(e,t){mi(this.size);var n=!0;return this.__iterate(function(r,i,s){if(!e.call(t,r,i,s))return n=!1,!1}),n},filter:function(e,t){return ai(this,Zr(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return mi(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){mi(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(Zn)},map:function(e,t){return ai(this,Qr(this,e,t))},reduce:function(e,t,n){return ho(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return ho(this,e,t,n,arguments.length<2,!0)},reverse:function(){return ai(this,Jr(this,!0))},slice:function(e,t){return ai(this,ei(this,e,t,!0))},some:function(e,t){return!this.every(lo(e),t)},sort:function(e){return ai(this,ri(this,e))},values:function(){return this.__iterator(er)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return Pn(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Gi().asMutable();return e.__iterate(function(i,s){r.update(t.call(n,i,s,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return Fs(this,e)},entrySeq:function(){var e=this;if(e._cache)return new xr(e._cache);var t=e.toSeq().map(co).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(lo(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,s){if(e.call(t,n,i,s))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(Cn,null,e)},flatMap:function(e,t){return ai(this,function(e,t,n){var r=ui(e);return e.toSeq().map(function(i,s){return r(t.call(n,i,s,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return ai(this,ni(this,e,!0))},fromEntrySeq:function(){return new Yr(this)},get:function(e,t){return this.find(function(t,n){return Nr(n,e)},void 0,t)},getIn:no,groupBy:function(e,t){return function(e,t,n){var r=Vn(e),i=(Jn(e)?Ns():Gi()).asMutable();e.__iterate(function(s,o){i.update(t.call(n,s,o,e),function(e){return(e=e||[]).push(r?[o,s]:s),e})});var s=ui(e);return i.map(function(t){return ai(e,s(t))}).asImmutable()}(this,e,t)},has:function(e){return this.get(e,Sn)!==Sn},hasIn:function(e){return ro(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:Wn(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:Wn(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return Nr(t,e)})},keySeq:function(){return this.toSeq().map(uo).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return ii(this,e)},maxBy:function(e,t){return ii(this,t,e)},min:function(e){return ii(this,e?po(e):mo)},minBy:function(e,t){return ii(this,t?po(t):mo,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return ai(this,ti(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(lo(e),t)},sortBy:function(e,t){return ai(this,ri(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return ai(this,function(e,t,n){var r=ci(e);return r.__iterateUncached=function(r,i){var s=this;if(i)return this.cacheResult().__iterate(r,i);var o=0;return e.__iterate(function(e,i,a){return t.call(n,e,i,a)&&++o&&r(e,i,s)}),o},r.__iteratorUncached=function(r,i){var s=this;if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(tr,i),a=!0;return new sr(function(){if(!a)return{value:void 0,done:!0};var e=o.next();if(e.done)return e;var i=e.value,h=i[0],u=i[1];return t.call(n,u,h,s)?r===tr?e:or(r,h,u,e):(a=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(lo(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=Jn(e),n=Vn(e),r=t?1:0;return function(e,t){return t=$r(t,3432918353),t=$r(t<<15|t>>>-15,461845907),t=$r(t<<13|t>>>-13,5),t=$r((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Rr((t=$r(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+go(Mr(e),Mr(t))|0}:function(e,t){r=r+go(Mr(e),Mr(t))|0}:t?function(e){r=31*r+Mr(e)|0}:function(e){r=r+Mr(e)|0}),r)}(this))}});var so=Wn.prototype;so[Tn]=!0,so[ir]=so.values,so.toJSON=so.toArray,so.__toStringMapper=vi,so.inspect=so.toSource=function(){return this.toString()},so.chain=so.flatMap,so.contains=so.includes,qs(Un,{flip:function(){return ai(this,Xr(this))},mapEntries:function(e,t){var n=this,r=0;return ai(this,this.toSeq().map(function(i,s){return e.call(t,[s,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return ai(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var oo=Un.prototype;oo[Ln]=!0,oo[ir]=so.entries,oo.toJSON=io,oo.__toStringMapper=function(e,t){return vi(t)+": "+vi(e)},qs(Fn,{toKeyedSeq:function(){return new Gr(this,!1)},filter:function(e,t){return ai(this,Zr(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return ai(this,Jr(this,!1))},slice:function(e,t){return ai(this,ei(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=$n(e,e<0?this.count():this.size);var r=this.slice(0,e);return ai(this,1===n?r:r.concat(di(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return ai(this,ni(this,e,!1))},get:function(e,t){return(e=kn(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=kn(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return ai(this,function(e,t){var n=ci(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,s=0;return e.__iterate(function(e){return(!s||!1!==n(t,s++,i))&&!1!==n(e,s++,i)},r),s},n.__iteratorUncached=function(n,r){var i,s=e.__iterator(er,r),o=0;return new sr(function(){return(!i||o%2)&&(i=s.next()).done?i:o%2?or(n,o++,t):or(n,o++,i.value,i)})},n}(this,e))},interleave:function(){var e=[this].concat(di(arguments)),t=oi(this.toSeq(),gr.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),ai(this,n)},keySeq:function(){return eo(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return ai(this,ti(this,e,t,!1))},zip:function(){return ai(this,oi(this,fo,[this].concat(di(arguments))))},zipAll:function(){return ai(this,oi(this,fo,[this].concat(di(arguments)),!0))},zipWith:function(e){var t=di(arguments);return t[0]=this,ai(this,oi(this,e,t))}});var ao=Fn.prototype;function ho(e,t,n,r,i,s){return mi(e.size),e.__iterate(function(e,s,o){i?(i=!1,n=e):n=t.call(r,n,e,s,o)},s),n}function uo(e,t){return t}function co(e,t){return[t,e]}function lo(e){return function(){return!e.apply(this,arguments)}}function po(e){return function(){return-e.apply(this,arguments)}}function fo(){return di(arguments)}function mo(e,t){return e<t?1:e>t?-1:0}function go(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}ao[Bn]=!0,ao[Qn]=!0,qs(qn,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),qn.prototype.has=so.includes,qn.prototype.contains=qn.prototype.includes,qs(mr,Un.prototype),qs(gr,Fn.prototype),qs(yr,qn.prototype);var yo=function(e){function t(e){return null==e?_o():Us(e)?e:_o().withMutations(function(t){var n=qn(e);mi(n.size),n.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(Un(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Hs);yo.isOrderedSet=Us;var xo,vo=yo.prototype;function Eo(e,t){var n=Object.create(vo);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function _o(){return xo||(xo=Eo(Rs()))}vo[Qn]=!0,vo.zip=ao.zip,vo.zipWith=ao.zipWith,vo.__empty=_o,vo.__make=Eo;var bo=function(e,t){var n,r=function(s){var o=this;if(s instanceof r)return s;if(!(this instanceof r))return new r(s);if(!n){n=!0;var a=Object.keys(e),h=i._indices={};i._name=t,i._keys=a,i._defaultValues=e;for(var u=0;u<a.length;u++){var c=a[u];h[c]=u,i[c]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+wo(this)+' with property "'+c+'" since that property name is part of the Record API.'):ko(i,c)}}this.__ownerID=void 0,this._values=gs().withMutations(function(e){e.setSize(o._keys.length),Un(s).forEach(function(t,n){e.set(o._indices[n],t===o._defaultValues[n]?void 0:t)})})},i=r.prototype=Object.create(So);return i.constructor=r,t&&(r.displayName=t),r};bo.prototype.toString=function(){for(var e,t=wo(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)t+=(r?", ":"")+(e=n[r])+": "+vi(this.get(e));return t+" }"},bo.prototype.equals=function(e){return this===e||e&&this._keys===e._keys&&Po(this).equals(Po(e))},bo.prototype.hashCode=function(){return Po(this).hashCode()},bo.prototype.has=function(e){return this._indices.hasOwnProperty(e)},bo.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return void 0===r?this._defaultValues[e]:r},bo.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return Io(this,n)}return this},bo.prototype.remove=function(e){return this.set(e)},bo.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Io(this,e)},bo.prototype.wasAltered=function(){return this._values.wasAltered()},bo.prototype.toSeq=function(){return Po(this)},bo.prototype.toJS=function(){return Gs(this)},bo.prototype.entries=function(){return this.__iterator(tr)},bo.prototype.__iterator=function(e,t){return Po(this).__iterator(e,t)},bo.prototype.__iterate=function(e,t){return Po(this).__iterate(e,t)},bo.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?Io(this,t,e):(this.__ownerID=e,this._values=t,this)},bo.isRecord=Yn,bo.getDescriptiveName=wo;var Ao,So=bo.prototype;function Io(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function wo(e){return e.constructor.displayName||e.constructor.name||"Record"}function Po(e){return Ar(e._keys.map(function(t){return[t,e.get(t)]}))}function ko(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){fi(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}function Co(e,t){return Vn(t)?t.toMap():t.toList()}So[Kn]=!0,So.delete=So.remove,So.deleteIn=So.removeIn=Ci,So.getIn=no,So.hasIn=so.hasIn,So.merge=Oi,So.mergeWith=Mi,So.mergeIn=zi,So.mergeDeep=Vi,So.mergeDeepWith=Bi,So.mergeDeepIn=ji,So.setIn=Pi,So.update=$i,So.updateIn=Ri,So.withMutations=Wi,So.asMutable=Ui,So.asImmutable=Fi,So[ir]=So.entries,So.toJSON=So.toObject=so.toObject,So.inspect=So.toSource=function(){return this.toString()};var No,$o={version:"4.0.0-rc.11",Collection:Wn,Iterable:Wn,Seq:fr,Map:Gi,OrderedMap:Ns,List:gs,Stack:Ds,Set:Hs,OrderedSet:yo,Record:bo,Range:eo,Repeat:function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(Ao)return Ao;Ao=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return Nr(this._value,e)},t.prototype.slice=function(e,n){var r=this.size;return Nn(e,n,r)?this:new t(this._value,Rn(n,r)-$n(e,r))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return Nr(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return Nr(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},t.prototype.__iterator=function(e,t){var n=this,r=this.size,i=0;return new sr(function(){return i===r?{value:void 0,done:!0}:or(e,t?r-++i:i++,n._value)})},t.prototype.equals=function(e){return e instanceof t?Nr(this._value,e._value):Fs(e)},t}(gr),is:Nr,fromJS:function(e,t){return function e(t,n,r,i,s,o){var a=Array.isArray(r)?gr:yi(r)?mr:null;if(a){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),s&&""!==i&&s.push(i);var h=n.call(o,i,a(r).map(function(i,o){return e(t,n,i,o,s,r)}),s&&s.slice());return t.pop(),s&&s.pop(),h}return r}([],t||Co,e,"",t&&t.length>2?[]:void 0,{"":e})},hash:Mr,isImmutable:Xn,isCollection:Dn,isKeyed:Vn,isIndexed:zn,isAssociative:jn,isOrdered:Jn,isValueObject:Cr,isSeq:Hn,isList:ms,isMap:Pr,isOrderedMap:kr,isStack:Ts,isSet:Ws,isOrderedSet:Us,isRecord:Yn,get:_i,getIn:to,has:Ei,hasIn:ro,merge:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Li(e,t)},mergeDeep:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Di(e,t)},mergeWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Li(t,n,e)},mergeDeepWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Di(t,n,e)},remove:Ai,removeIn:ki,set:Si,setIn:wi,update:Ni,updateIn:Ii};!function(e){e[e.IGNORED_LABELS=0]="IGNORED_LABELS",e[e.ACCESSED_NODES=1]="ACCESSED_NODES",e[e.ARGUMENTS_VARIABLES=2]="ARGUMENTS_VARIABLES",e[e.ASSIGNED_NODES=3]="ASSIGNED_NODES",e[e.IGNORE_BREAK_STATEMENTS=4]="IGNORE_BREAK_STATEMENTS",e[e.IGNORE_RETURN_AWAIT_YIELD=5]="IGNORE_RETURN_AWAIT_YIELD",e[e.NODES_CALLED_AT_PATH_WITH_OPTIONS=6]="NODES_CALLED_AT_PATH_WITH_OPTIONS",e[e.REPLACED_VARIABLE_INITS=7]="REPLACED_VARIABLE_INITS",e[e.RETURN_EXPRESSIONS_ACCESSED_AT_PATH=8]="RETURN_EXPRESSIONS_ACCESSED_AT_PATH",e[e.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH=9]="RETURN_EXPRESSIONS_ASSIGNED_AT_PATH",e[e.RETURN_EXPRESSIONS_CALLED_AT_PATH=10]="RETURN_EXPRESSIONS_CALLED_AT_PATH"}(No||(No={}));const Ro={};class Oo{static create(){return new this($o.Map())}constructor(e){this.optionValues=e}addAccessedNodeAtPath(e,t){return this.setIn([No.ACCESSED_NODES,t,...e,Ro],!0)}addAccessedReturnExpressionAtPath(e,t){return this.setIn([No.RETURN_EXPRESSIONS_ACCESSED_AT_PATH,t,...e,Ro],!0)}addAssignedNodeAtPath(e,t){return this.setIn([No.ASSIGNED_NODES,t,...e,Ro],!0)}addAssignedReturnExpressionAtPath(e,t){return this.setIn([No.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH,t,...e,Ro],!0)}addCalledNodeAtPathWithOptions(e,t,n){return this.setIn([No.NODES_CALLED_AT_PATH_WITH_OPTIONS,t,...e,Ro,n],!0)}addCalledReturnExpressionAtPath(e,t){return this.setIn([No.RETURN_EXPRESSIONS_CALLED_AT_PATH,t,...e,Ro],!0)}getArgumentsVariables(){return this.get(No.ARGUMENTS_VARIABLES)||[]}getHasEffectsWhenCalledOptions(){return this.setIgnoreReturnAwaitYield().setIgnoreBreakStatements(!1).setIgnoreNoLabels()}getReplacedVariableInit(e){return this.optionValues.getIn([No.REPLACED_VARIABLE_INITS,e])}hasNodeBeenAccessedAtPath(e,t){return this.optionValues.getIn([No.ACCESSED_NODES,t,...e,Ro])}hasNodeBeenAssignedAtPath(e,t){return this.optionValues.getIn([No.ASSIGNED_NODES,t,...e,Ro])}hasNodeBeenCalledAtPathWithOptions(e,t,n){const r=this.optionValues.getIn([No.NODES_CALLED_AT_PATH_WITH_OPTIONS,t,...e,Ro]);return r&&r.find((e,t)=>t.equals(n))}hasReturnExpressionBeenAccessedAtPath(e,t){return this.optionValues.getIn([No.RETURN_EXPRESSIONS_ACCESSED_AT_PATH,t,...e,Ro])}hasReturnExpressionBeenAssignedAtPath(e,t){return this.optionValues.getIn([No.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH,t,...e,Ro])}hasReturnExpressionBeenCalledAtPath(e,t){return this.optionValues.getIn([No.RETURN_EXPRESSIONS_CALLED_AT_PATH,t,...e,Ro])}ignoreBreakStatements(){return this.get(No.IGNORE_BREAK_STATEMENTS)}ignoreLabel(e){return this.optionValues.getIn([No.IGNORED_LABELS,e])}ignoreReturnAwaitYield(){return this.get(No.IGNORE_RETURN_AWAIT_YIELD)}replaceVariableInit(e,t){return this.setIn([No.REPLACED_VARIABLE_INITS,e],t)}setArgumentsVariables(e){return this.set(No.ARGUMENTS_VARIABLES,e)}setIgnoreBreakStatements(e=!0){return this.set(No.IGNORE_BREAK_STATEMENTS,e)}setIgnoreLabel(e){return this.setIn([No.IGNORED_LABELS,e],!0)}setIgnoreNoLabels(){return this.remove(No.IGNORED_LABELS)}setIgnoreReturnAwaitYield(e=!0){return this.set(No.IGNORE_RETURN_AWAIT_YIELD,e)}get(e){return this.optionValues.get(e)}remove(e){return new Oo(this.optionValues.remove(e))}set(e,t){return new Oo(this.optionValues.set(e,t))}setIn(e,t){return new Oo(this.optionValues.setIn(e,t))}}const Mo={Literal:[],Program:["body"]};const To=Oo.create();class Do{constructor(e,t,n){this.keys=Mo[e.type]||function(e){return Mo[e.type]=Object.keys(e).filter(t=>"object"==typeof e[t]),Mo[e.type]}(e),this.parent=t,this.context=t.context,this.createScope(n),this.parseNode(e),this.initialise(),this.context.magicString.addSourcemapLocation(this.start),this.context.magicString.addSourcemapLocation(this.end)}bind(){for(const e of this.keys){const t=this[e];if(null!==t&&"annotations"!==e)if(Array.isArray(t))for(const e of t)null!==e&&e.bind();else t.bind()}}createScope(e){this.scope=e}declare(e,t){}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return xe}getReturnExpressionWhenCalledAtPath(e,t,n){return ve}hasEffects(e){for(const t of this.keys){const n=this[t];if(null!==n&&"annotations"!==t)if(Array.isArray(n)){for(const t of n)if(null!==t&&t.hasEffects(e))return!0}else if(n.hasEffects(e))return!0}return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>0}hasEffectsWhenAssignedAtPath(e,t){return!0}hasEffectsWhenCalledAtPath(e,t,n){return!0}include(e){this.included=!0;for(const t of this.keys){const n=this[t];if(null!==n&&"annotations"!==t)if(Array.isArray(n))for(const t of n)null!==t&&t.include(e);else n.include(e)}}includeWithAllDeclaredVariables(e){this.include(e)}initialise(){this.included=!1}insertSemicolon(e){";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}locate(){const e=Mt(this.context.code,this.start,{offsetLine:1});return e.file=this.context.fileName,e.toString=(()=>JSON.stringify(e)),e}parseNode(e){for(const t of Object.keys(e)){if(this.hasOwnProperty(t))continue;const n=e[t];if("object"!=typeof n||null===n||"annotations"===t)this[t]=n;else if(Array.isArray(n)){this[t]=[];for(const e of n)this[t].push(null===e?null:new(this.context.nodeConstructors[e.type]||this.context.nodeConstructors.UnknownNode)(e,this,this.scope))}else this[t]=new(this.context.nodeConstructors[n.type]||this.context.nodeConstructors.UnknownNode)(n,this,this.scope)}}render(e,t){for(const n of this.keys){const r=this[n];if(null!==r&&"annotations"!==n)if(Array.isArray(r))for(const n of r)null!==n&&n.render(e,t);else r.render(e,t)}}shouldBeIncluded(){return this.included||this.hasEffects(To)}toString(){return this.context.code.slice(this.start,this.end)}}class Lo extends Do{createScope(e){this.scope=new En(e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}hasEffectsWhenAssignedAtPath(e,t){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return this.body.hasEffectsWhenCalledAtPath(e,t,n)||this.superClass&&this.superClass.hasEffectsWhenCalledAtPath(e,t,n)}initialise(){this.included=!1,null!==this.id&&this.id.declare("class",this)}}function Vo(e){return e.type===Q}const Bo=(e,t)=>{const n=parseInt(e[0],10);return n<t.getArgumentsVariables().length&&t.getArgumentsVariables()[n]||ve};class zo extends pt{constructor(e,t){super("arguments",null,ve,t),this.parameters=e}deoptimizePath(e){const t=parseInt(e[0],10);e.length>0&&t>=0&&this.parameters[t]&&this.parameters[t].deoptimizePath(e.slice(1))}hasEffectsWhenAccessedAtPath(e,t){return e.length>1&&Bo(e,t).hasEffectsWhenAccessedAtPath(e.slice(1),t)}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||this.included||Bo(e,t).hasEffectsWhenAssignedAtPath(e.slice(1),t)}hasEffectsWhenCalledAtPath(e,t,n){return 0===e.length||Bo(e,n).hasEffectsWhenCalledAtPath(e.slice(1),t,n)}}class jo extends pt{constructor(e){super("this",null,null,e)}_getInit(e){return e.getReplacedVariableInit(this)||ve}getLiteralValueAtPath(){return xe}hasEffectsWhenAccessedAtPath(e,t){return this._getInit(t).hasEffectsWhenAccessedAtPath(e,t)||super.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return this._getInit(t).hasEffectsWhenAssignedAtPath(e,t)||super.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return this._getInit(n).hasEffectsWhenCalledAtPath(e,t,n)||super.hasEffectsWhenCalledAtPath(e,t,n)}}class Wo extends En{constructor(e,t){super(e),this.parameters=[],this.context=t,this.hoistedBodyVarScope=new En(this)}addParameterDeclaration(e){const t=e.name;let n;return t in this.hoistedBodyVarScope.variables?(n=this.hoistedBodyVarScope.variables[t]).addDeclaration(e,null):n=new pt(t,e,ve,this.context),this.variables[t]=n,this.parameters.push(n),n}getParameterVariables(){return this.parameters}}class Uo extends Wo{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=ve;for(const e of this.returnExpressions)e.deoptimizePath(ge)}}}class Fo extends Uo{constructor(e,t){super(e,t),this.variables.arguments=new zo(super.getParameterVariables(),t),this.variables.this=new jo(t)}findLexicalBoundary(){return this}getOptionsWhenCalledWith({args:e,withNew:t},n){return n.replaceVariableInit(this.variables.this,t?new Le:ve).setArgumentsVariables(e.map((e,t)=>super.getParameterVariables()[t]||e))}}class qo extends Do{createScope(e){this.scope=new Fo(e,this.context)}deoptimizePath(e){1===e.length&&("prototype"===e[0]?this.isPrototypeDeoptimized=!0:e[0]===fe&&(this.isPrototypeDeoptimized=!0,this.scope.getReturnExpression().deoptimizePath(ge)))}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.scope.getReturnExpression():ve}hasEffects(e){return this.id&&this.id.hasEffects(e)}hasEffectsWhenAccessedAtPath(e){return!(e.length<=1)&&(e.length>2||"prototype"!==e[0]||this.isPrototypeDeoptimized)}hasEffectsWhenAssignedAtPath(e){return!(e.length<=1)&&(e.length>2||"prototype"!==e[0]||this.isPrototypeDeoptimized)}hasEffectsWhenCalledAtPath(e,t,n){if(e.length>0)return!0;const r=this.scope.getOptionsWhenCalledWith(t,n);for(const e of this.params)if(e.hasEffects(r))return!0;return this.body.hasEffects(r)}include(e){this.scope.variables.arguments.include(),super.include(e)}initialise(){this.included=!1,this.isPrototypeDeoptimized=!1,null!==this.id&&this.id.declare("function",this);for(const e of this.params)e.declare("parameter",ve);this.body.addImplicitReturnExpressionToScope()}parseNode(e){this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope.hoistedBodyVarScope),super.parseNode(e)}}qo.prototype.preventChildBlockScope=!0;const Go=/\s/;class Ho extends Do{include(e){super.include(e),e&&this.context.includeVariable(this.variable)}initialise(){this.included=!1,this.declarationName=this.declaration.id&&this.declaration.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context),this.context.addExport(this)}render(e,t,{start:n,end:r}=an){const i=function(e,t=0){for(t=ln(e,"default",t)+7;Go.test(e[t]);)t++;return t}(e.original,this.start);if(this.declaration.type===te)this.renderNamedDeclaration(e,i,"function",null===this.declaration.id,t);else if(Vo(this.declaration))this.renderNamedDeclaration(e,i,"class",null===this.declaration.id,t);else{if(this.variable.referencesOriginal())return void("system"===t.format&&this.variable.exportName?e.overwrite(n,r,`exports('${this.variable.exportName}', ${this.variable.getName()});`):hn(this,e,n,r));if(!this.variable.included)return e.remove(this.start,i),this.declaration.render(e,t,{isCalleeOfRenderedParent:!1,renderedParentType:ee}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,i,t)}this.declaration.render(e,t)}renderNamedDeclaration(e,t,n,r,i){const s=this.variable.getName();e.remove(this.start,t),r&&e.appendLeft(function(e,t,n=0){const r=ln(e,t,n)+t.length;e=e.slice(r,ln(e,"{",r));const i=ln(e,"*");return-1===i?r:r+i+1}(e.original,n,t),` ${s}`),"system"===i.format&&Vo(this.declaration)&&this.variable.exportName&&e.appendLeft(this.end,` exports('${this.variable.exportName}', ${s});`)}renderVariableDeclaration(e,t,n){const r="system"===n.format&&this.variable.exportName?`exports('${this.variable.exportName}', `:"";e.overwrite(this.start,t,`${n.varOrConst} ${this.variable.getName()} = ${r}`);const i=59===e.original.charCodeAt(this.end-1);r?e.appendRight(i?this.end-1:this.end,")"+(i?"":";")):i||e.appendLeft(this.end,";")}}Ho.prototype.needsBoundaries=!0;class Ko extends En{addDeclaration(e,t,n=null,r=!1){return r?this.parent.addDeclaration(e,t,ve,!0):super.addDeclaration(e,t,n,!1)}}class Yo extends Do{addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&e.type===ce||this.scope.addReturnExpression(ve)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new Ko(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0}include(e){this.included=!0;for(const t of this.body)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){this.body.length?dn(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class Xo extends Do{createScope(e){this.scope=new Uo(e,this.context)}deoptimizePath(e){1===e.length&&e[0]===fe&&this.scope.getReturnExpression().deoptimizePath(ge)}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.scope.getReturnExpression():ve}hasEffects(e){return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}hasEffectsWhenAssignedAtPath(e,t){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){if(e.length>0)return!0;for(const e of this.params)if(e.hasEffects(n))return!0;return this.body.hasEffects(n)}initialise(){this.included=!1;for(const e of this.params)e.declare("parameter",ve);this.body instanceof Yo?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(e){e.body.type===Y&&(this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope.hoistedBodyVarScope)),super.parseNode(e)}}function Qo(e){return 1===e.length?`exports('${e[0].safeExportName||e[0].exportName}', ${e[0].getName()});`:`exports({${e.map(e=>`${e.safeExportName||e.exportName}: ${e.getName()}`).join(", ")}});`}Xo.prototype.preventChildBlockScope=!0;const Jo={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>Math.pow(e,t),"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>e<t,"<<":(e,t)=>e<<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,in:()=>xe,instanceof:()=>xe,"|":(e,t)=>e|t};const Zo={};class ea{constructor(e=$o.Map()){this.entityPaths=e}isTracked(e,t){return this.entityPaths.getIn([e,...t,Zo])}track(e,t){return new ea(this.entityPaths.setIn([e,...t,Zo],!0))}}const ta=new ea;function na(e){return e.type===re}class ra extends Do{addExportedVariables(e){this.variable.exportName&&e.push(this.variable)}bind(){this.bound||(this.bound=!0,null===this.variable&&function e(t,n){if("MemberExpression"===t.type)return!t.computed&&e(t.object,t);if("Identifier"===t.type)switch(n.type){case"MemberExpression":return n.computed||t===n.object;case"MethodDefinition":return n.computed;case"Property":return n.computed||t===n.value;case"ExportSpecifier":return t===n.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}return!1}(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)),null!==this.variable&&this.variable.isLocal&&null!==this.variable.additionalInitializers&&this.variable.consolidateInitializers())}declare(e,t){switch(e){case"var":case"function":this.variable=this.scope.addDeclaration(this,this.context,t,!0);break;case"let":case"const":case"class":this.variable=this.scope.addDeclaration(this,this.context,t,!1);break;case"parameter":this.variable=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Unexpected identifier kind ${e}.`)}}deoptimizePath(e){this.bound||this.bind(),null!==this.variable&&(0===e.length&&this.name in this.context.importDescriptions&&!this.scope.contains(this.name)&&this.disallowImportReassignment(),this.variable.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.bound||this.bind(),null!==this.variable?this.variable.getLiteralValueAtPath(e,t,n):xe}getReturnExpressionWhenCalledAtPath(e,t,n){return this.bound||this.bind(),null!==this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n):ve}hasEffectsWhenAccessedAtPath(e,t){return this.variable&&this.variable.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return!this.variable||this.variable.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return!this.variable||this.variable.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included||(this.included=!0,null!==this.variable&&this.context.includeVariable(this.variable))}initialise(){this.included=!1,this.bound=!1,this.variable||(this.variable=null)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r,isShorthandProperty:i}=an){if(this.variable){const t=this.variable.getName();t!==this.name&&(e.overwrite(this.start,this.end,t,{contentOnly:!0,storeName:!0}),i&&e.prependRight(this.start,`${this.name}: `)),"eval"===t&&n===X&&r&&e.appendRight(this.start,"0, ")}}disallowImportReassignment(){this.context.error({code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment to import '${this.name}'`},this.start)}}class ia extends Wo{addDeclaration(e,t,n=null,r=!1){return r?this.parent.addDeclaration(e,t,n,!0):super.addDeclaration(e,t,n,!1)}}class sa extends Do{createScope(e){this.scope=new ia(e,this.context)}initialise(){this.included=!1,this.param&&this.param.declare("parameter",ve)}parseNode(e){this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope),super.parseNode(e)}}sa.prototype.preventChildBlockScope=!0;class oa{constructor(e){this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getLiteralValueAtPath(){return xe}getReturnExpressionWhenCalledAtPath(e,t,n){return new oa(this.expressions.map(r=>r.getReturnExpressionWhenCalledAtPath(e,t,n)))}hasEffectsWhenAccessedAtPath(e,t){for(const n of this.expressions)if(n.hasEffectsWhenAccessedAtPath(e,t))return!0;return!1}hasEffectsWhenAssignedAtPath(e,t){for(const n of this.expressions)if(n.hasEffectsWhenAssignedAtPath(e,t))return!0;return!1}hasEffectsWhenCalledAtPath(e,t,n){for(const r of this.expressions)if(r.hasEffectsWhenCalledAtPath(e,t,n))return!0;return!1}include(){}}class aa extends Do{hasEffects(){return!1}initialise(){this.included=!1,this.context.addExport(this)}render(e,t,{start:n,end:r}=an){e.remove(n,r)}}aa.prototype.needsBoundaries=!0;class ha extends Do{bind(){null!==this.declaration&&this.declaration.bind()}hasEffects(e){return this.declaration&&this.declaration.hasEffects(e)}initialise(){this.included=!1,this.context.addExport(this)}render(e,t,{start:n,end:r}=an){null===this.declaration?e.remove(n,r):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{start:n,end:r}))}}ha.prototype.needsBoundaries=!0;const ua=e=>{switch(e.format){case"cjs":{const t=e.compact?"":" ";return{interopLeft:`Promise.resolve({${t}default:${t}require(`,interopRight:`)${t}})`,left:"Promise.resolve(require(",right:"))"}}case"amd":{const t=e.compact?"":" ",n=e.compact?"c":"resolve",r=e.compact?"e":"reject";return{interopLeft:`new Promise(function${t}(${n},${t}${r})${t}{${t}require([`,interopRight:`],${t}function${t}(m)${t}{${t}${n}({${t}default:${t}m${t}})${t}},${t}${r})${t}})`,left:`new Promise(function${t}(${n},${t}${r})${t}{${t}require([`,right:`],${t}${n},${t}${r})${t}})`}}case"system":return{left:"module.import(",right:")"};case"es":return{left:`${e.dynamicImportFunction||"import"}(`,right:")"}}};class ca extends Do{bind(){}hasEffects(){return!1}initialise(){this.included=!1,this.context.addImport(this)}render(e,t,{start:n,end:r}=an){e.remove(n,r)}}ca.prototype.needsBoundaries=!0;class la extends Do{getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.context.code.charCodeAt(this.start)||"bigint"==typeof this.value?xe:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?ve:Fe(this.members,e[0])}hasEffectsWhenAccessedAtPath(e){return null===this.value?e.length>0:e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>0}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Ue(this.members,e[0],this.included,t,n)}initialise(){this.included=!1,this.members=function(e){switch(typeof e){case"boolean":return ze;case"number":return je;case"string":return We;default:return Object.create(null)}}(this.value)}render(e,t){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function pa(e){return e.computed?function(e){if(e instanceof la)return String(e.value);return null}(e.property):e.property.name}function da(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof ra)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n.type===ae){const r=da(n);return r&&[...r,{key:t,pos:e.property.start}]}}return null}class fa extends Do{constructor(){super(...arguments),this.variable=null}addExportedVariables(){}bind(){if(this.bound)return;this.bound=!0;const e=da(this),t=e&&this.scope.findVariable(e[0].key);if(t&&t.isNamespace){const n=this.resolveNamespaceVariables(t,e.slice(1));n?"string"==typeof n?this.replacement=n:(n.isExternal&&n.module&&n.module.suggestName(e[0].key),this.variable=n,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let n=1;n<e.length;n++)t+="."+e[n].key;return t}(e),n)):super.bind()}else super.bind(),null===this.propertyKey&&this.analysePropertyKey()}deoptimizeCache(){for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}deoptimizePath(e){this.bound||this.bind(),0===e.length&&this.disallowNamespaceReassignment(),this.variable?this.variable.deoptimizePath(e):(null===this.propertyKey&&this.analysePropertyKey(),this.object.deoptimizePath([this.propertyKey,...e]))}getLiteralValueAtPath(e,t,n){return null!==this.variable?this.variable.getLiteralValueAtPath(e,t,n):(null===this.propertyKey&&this.analysePropertyKey(),this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([this.propertyKey,...e],t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return null!==this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n):(null===this.propertyKey&&this.analysePropertyKey(),this.expressionsToBeDeoptimized.push(n),this.object.getReturnExpressionWhenCalledAtPath([this.propertyKey,...e],t,n))}hasEffects(e){return this.property.hasEffects(e)||this.object.hasEffects(e)||this.context.propertyReadSideEffects&&this.object.hasEffectsWhenAccessedAtPath([this.propertyKey],e)}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null!==this.variable?this.variable.hasEffectsWhenAccessedAtPath(e,t):this.object.hasEffectsWhenAccessedAtPath([this.propertyKey,...e],t))}hasEffectsWhenAssignedAtPath(e,t){return null!==this.variable?this.variable.hasEffectsWhenAssignedAtPath(e,t):this.object.hasEffectsWhenAssignedAtPath([this.propertyKey,...e],t)}hasEffectsWhenCalledAtPath(e,t,n){return null!==this.variable?this.variable.hasEffectsWhenCalledAtPath(e,t,n):this.object.hasEffectsWhenCalledAtPath([this.propertyKey,...e],t,n)}include(e){this.included||(this.included=!0,null!==this.variable&&this.context.includeVariable(this.variable)),this.object.include(e),this.property.include(e)}initialise(){this.included=!1,this.propertyKey=pa(this),this.variable=null,this.bound=!1,this.replacement=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=an){const i=n===X&&r;if(this.variable||this.replacement){let t=this.variable?this.variable.getName():this.replacement;i&&(t="0, "+t),e.overwrite(this.start,this.end,t,{contentOnly:!0,storeName:!0})}else i&&e.appendRight(this.start,"0, "),super.render(e,t)}analysePropertyKey(){this.propertyKey=fe;const e=this.property.getLiteralValueAtPath(me,ta,this);this.propertyKey=e===xe?fe:String(e)}disallowNamespaceReassignment(){this.object instanceof ra&&this.scope.findVariable(this.object.name).isNamespace&&this.context.error({code:"ILLEGAL_NAMESPACE_REASSIGNMENT",message:`Illegal reassignment to import '${this.object.name}'`},this.start)}resolveNamespaceVariables(e,t){if(0===t.length)return e;if(!e.isNamespace)return null;const n=t[0].key,r=e.isExternal?e.module.getVariableForExportName(n):e.context.traceExport(n);if(!r){const r=e.isExternal?e.module.id:e.context.fileName;return this.context.warn({code:"MISSING_EXPORT",exporter:Vt(r),importer:Vt(this.context.fileName),message:`'${n}' is not exported by '${Vt(r)}'`,missing:n,url:"https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-"},t[0].pos),"undefined"}return this.resolveNamespaceVariables(r,t.slice(1))}}const ma="ROLLUP_ASSET_URL_",ga="ROLLUP_CHUNK_URL_";class ya extends Do{bind(){super.bind(),this.argument.deoptimizePath([fe,fe])}}class xa extends Do{hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0}include(e){this.included=!0;for(const t of this.body)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){this.body.length?dn(this.body,e,this.start,this.end,t):super.render(e,t)}}class va extends En{constructor(e,t){super(e),this.context=t,this.variables.this=new pt("this",null,Ee,t)}addExportDefaultDeclaration(e,t,n){return this.variables.default=new dt(e,t,n)}addNamespaceMemberAccess(e,t){t instanceof bt&&(this.accessedOutsideVariables[t.name]=t)}deconflict(e){for(const t of this.children)t.deconflict(e)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables[e]||this.accessedOutsideVariables[e];if(t)return t;const n=this.context.traceVariable(e)||this.parent.findVariable(e);return n instanceof bt&&(this.accessedOutsideVariables[e]=n),n}}const Ea={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>xe,typeof:e=>typeof e,void:()=>void 0,"~":e=>~e};function _a(e){return e.renderBaseName&&e.exportName&&e.isReassigned}const ba={ArrayExpression:class extends Do{bind(){super.bind();for(const e of this.elements)null!==e&&e.deoptimizePath(ge)}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?ve:Fe(Be,e[0])}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Ue(Be,e[0],this.included,t,n)}},ArrayPattern:class extends Do{addExportedVariables(e){for(const t of this.elements)null!==t&&t.addExportedVariables(e)}declare(e,t){for(const t of this.elements)null!==t&&t.declare(e,ve)}deoptimizePath(e){if(0===e.length)for(const t of this.elements)null!==t&&t.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){if(e.length>0)return!0;for(const e of this.elements)if(null!==e&&e.hasEffectsWhenAssignedAtPath(me,t))return!0;return!1}},ArrowFunctionExpression:Xo,AssignmentExpression:class extends Do{bind(){super.bind(),this.left.deoptimizePath(me),this.right.deoptimizePath(ge)}hasEffects(e){return this.right.hasEffects(e)||this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(me,e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.right.hasEffectsWhenAccessedAtPath(e,t)}render(e,t){if(this.left.render(e,t),this.right.render(e,t),"system"===t.format)if(this.left.variable&&this.left.variable.exportName)e.prependLeft(e.original.indexOf("=",this.left.end)+1,` exports('${this.left.variable.exportName}',`),e.appendLeft(this.right.end,")");else if("addExportedVariables"in this.left){const t=[];this.left.addExportedVariables(t),t.length>0&&(e.prependRight(this.start,`function (v) {${Qo(t)} return v;} (`),e.appendLeft(this.end,")"))}}},AssignmentPattern:class extends Do{addExportedVariables(e){this.left.addExportedVariables(e)}bind(){super.bind(),this.left.deoptimizePath(me),this.right.deoptimizePath(ge)}declare(e,t){this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){return e.length>0||this.left.hasEffectsWhenAssignedAtPath(me,t)}render(e,t,{isShorthandProperty:n}=an){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}},AwaitExpression:class extends Do{hasEffects(e){return super.hasEffects(e)||!e.ignoreReturnAwaitYield()}include(e){if(super.include(e),!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof qo||e instanceof Xo)return}while(e=e.parent);this.context.usesTopLevelAwait=!0}}render(e,t){super.render(e,t)}},BinaryExpression:class extends Do{getLiteralValueAtPath(e,t,n){if(e.length>0)return xe;const r=this.left.getLiteralValueAtPath(me,t,n);if(r===xe)return xe;const i=this.right.getLiteralValueAtPath(me,t,n);if(i===xe)return xe;const s=Jo[this.operator];return s?s(r,i):xe}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}},BlockStatement:Yo,BreakStatement:class extends Do{hasEffects(e){return super.hasEffects(e)||!e.ignoreBreakStatements()||this.label&&!e.ignoreLabel(this.label.name)}},CallExpression:class extends Do{bind(){super.bind(),this.callee instanceof ra&&(this.scope.findVariable(this.callee.name).isNamespace&&this.context.error({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${this.callee.name}')`},this.start),"eval"===this.callee.name&&this.context.warn({code:"EVAL",message:"Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification",url:"https://rollupjs.org/guide/en#avoiding-eval"},this.start)),null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(me,ta,this));for(const e of this.arguments)e.deoptimizePath(ge)}deoptimizeCache(){if(this.returnExpression!==ve){this.returnExpression=ve;for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&!this.context.deoptimizationTracker.track(this,e)&&(null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(me,ta,this)),this.returnExpression.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(me,t,this)),this.returnExpression===ve||t.isTracked(this.returnExpression,e)?xe:(this.expressionsToBeDeoptimized.push(n),this.returnExpression.getLiteralValueAtPath(e,t.track(this.returnExpression,e),n))}getReturnExpressionWhenCalledAtPath(e,t,n){return null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(me,t,this)),this.returnExpression===ve||t.isTracked(this.returnExpression,e)?ve:(this.expressionsToBeDeoptimized.push(n),this.returnExpression.getReturnExpressionWhenCalledAtPath(e,t.track(this.returnExpression,e),n))}hasEffects(e){for(const t of this.arguments)if(t.hasEffects(e))return!0;return(!this.context.annotations||!this.annotatedPure)&&(this.callee.hasEffects(e)||this.callee.hasEffectsWhenCalledAtPath(me,this.callOptions,e.getHasEffectsWhenCalledOptions()))}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&!t.hasReturnExpressionBeenAccessedAtPath(e,this)&&this.returnExpression.hasEffectsWhenAccessedAtPath(e,t.addAccessedReturnExpressionAtPath(e,this))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||!t.hasReturnExpressionBeenAssignedAtPath(e,this)&&this.returnExpression.hasEffectsWhenAssignedAtPath(e,t.addAssignedReturnExpressionAtPath(e,this))}hasEffectsWhenCalledAtPath(e,t,n){return!n.hasReturnExpressionBeenCalledAtPath(e,this)&&this.returnExpression.hasEffectsWhenCalledAtPath(e,t,n.addCalledReturnExpressionAtPath(e,this))}include(e){super.include(e),this.returnExpression.included||this.returnExpression.include(!1)}initialise(){this.included=!1,this.returnExpression=null,this.callOptions=de.create({args:this.arguments,callIdentifier:this,withNew:!1}),this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n}=an){super.render(e,t),n===ee&&this.callee.type===ne&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}},CatchClause:sa,ClassBody:class extends Do{hasEffectsWhenCalledAtPath(e,t,n){return e.length>0||null!==this.classConstructor&&this.classConstructor.hasEffectsWhenCalledAtPath(me,t,n)}initialise(){this.included=!1;for(const e of this.body)if("constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}},ClassDeclaration:class extends Lo{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new this.context.nodeConstructors.Identifier(e.id,this,this.scope.parent)),super.parseNode(e)}render(e,t){"system"===t.format&&this.id&&this.id.variable.exportName&&e.appendLeft(this.end,` exports('${this.id.variable.exportName}', ${this.id.variable.getName()});`),super.render(e,t)}},ClassExpression:class extends Lo{},ConditionalExpression:class extends Do{bind(){super.bind(),this.isBranchResolutionAnalysed||this.analyseBranchResolution()}deoptimizeCache(){if(null!==this.usedBranch){this.usedBranch=null,this.unusedBranch.deoptimizePath(ge);for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&(this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e)):this.usedBranch.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?xe:(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getLiteralValueAtPath(e,t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?new oa([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,n),this.alternate.getReturnExpressionWhenCalledAtPath(e,t,n)]):(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getReturnExpressionWhenCalledAtPath(e,t,n))}hasEffects(e){return!!this.test.hasEffects(e)||(null===this.usedBranch?this.consequent.hasEffects(e)||this.alternate.hasEffects(e):this.usedBranch.hasEffects(e))}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null===this.usedBranch?this.consequent.hasEffectsWhenAccessedAtPath(e,t)||this.alternate.hasEffectsWhenAccessedAtPath(e,t):this.usedBranch.hasEffectsWhenAccessedAtPath(e,t))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||(null===this.usedBranch?this.consequent.hasEffectsWhenAssignedAtPath(e,t)||this.alternate.hasEffectsWhenAssignedAtPath(e,t):this.usedBranch.hasEffectsWhenAssignedAtPath(e,t))}hasEffectsWhenCalledAtPath(e,t,n){return null===this.usedBranch?this.consequent.hasEffectsWhenCalledAtPath(e,t,n)||this.alternate.hasEffectsWhenCalledAtPath(e,t,n):this.usedBranch.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0,e||null===this.usedBranch||this.test.shouldBeIncluded()?(this.test.include(e),this.consequent.include(e),this.alternate.include(e)):this.usedBranch.include(e)}initialise(){this.included=!1,this.isBranchResolutionAnalysed=!1,this.usedBranch=null,this.unusedBranch=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=an){this.test.included?super.render(e,t):(e.remove(this.start,this.usedBranch.start),e.remove(this.usedBranch.end,this.end),un(this,e),this.usedBranch.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}))}analyseBranchResolution(){this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(me,ta,this);e!==xe&&(e?(this.usedBranch=this.consequent,this.unusedBranch=this.alternate):(this.usedBranch=this.alternate,this.unusedBranch=this.consequent))}},DoWhileStatement:class extends Do{hasEffects(e){return this.test.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}},EmptyStatement:class extends Do{hasEffects(){return!1}},ExportAllDeclaration:aa,ExportDefaultDeclaration:Ho,ExportNamedDeclaration:ha,ExpressionStatement:class extends Do{initialise(){this.included=!1,this.directive&&"use strict"!==this.directive&&this.parent.type===he&&this.context.warn({code:"MODULE_LEVEL_DIRECTIVE",message:`Module level directives cause errors when bundled, '${this.directive}' was ignored.`},this.start)}render(e,t){super.render(e,t),this.included&&this.insertSemicolon(e)}shouldBeIncluded(){return this.directive&&"use strict"!==this.directive?this.parent.type!==he:super.shouldBeIncluded()}},ForInStatement:class extends Do{bind(){this.left.bind(),this.left.deoptimizePath(me),this.right.bind(),this.body.bind()}createScope(e){this.scope=new Ko(e)}hasEffects(e){return this.left&&(this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(me,e))||this.right&&this.right.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}include(e){this.included=!0,this.left.includeWithAllDeclaredVariables(e),this.left.deoptimizePath(me),this.right.include(e),this.body.include(e)}render(e,t){this.left.render(e,t,cn),this.right.render(e,t,cn),this.body.render(e,t)}},ForOfStatement:class extends Do{bind(){this.left.bind(),this.left.deoptimizePath(me),this.right.bind(),this.body.bind()}createScope(e){this.scope=new Ko(e)}hasEffects(e){return this.left&&(this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(me,e))||this.right&&this.right.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}include(e){this.included=!0,this.left.includeWithAllDeclaredVariables(e),this.left.deoptimizePath(me),this.right.include(e),this.body.include(e)}render(e,t){this.left.render(e,t,cn),this.right.render(e,t,cn),this.body.render(e,t)}},ForStatement:class extends Do{createScope(e){this.scope=new Ko(e)}hasEffects(e){return this.init&&this.init.hasEffects(e)||this.test&&this.test.hasEffects(e)||this.update&&this.update.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}render(e,t){this.init&&this.init.render(e,t,cn),this.test&&this.test.render(e,t,cn),this.update&&this.update.render(e,t,cn),this.body.render(e,t)}},FunctionDeclaration:class extends qo{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new this.context.nodeConstructors.Identifier(e.id,this,this.scope.parent)),super.parseNode(e)}},FunctionExpression:class extends qo{},Identifier:ra,IfStatement:class extends Do{bind(){super.bind(),this.isTestValueAnalysed||(this.testValue=xe,this.isTestValueAnalysed=!0,this.testValue=this.test.getLiteralValueAtPath(me,ta,this))}deoptimizeCache(){this.testValue=xe}hasEffects(e){return!!this.test.hasEffects(e)||(this.testValue===xe?this.consequent.hasEffects(e)||null!==this.alternate&&this.alternate.hasEffects(e):this.testValue?this.consequent.hasEffects(e):null!==this.alternate&&this.alternate.hasEffects(e))}include(e){if(this.included=!0,e)return this.test.include(!0),this.consequent.include(!0),void(null!==this.alternate&&this.alternate.include(!0));const t=this.testValue===xe;(t||this.test.shouldBeIncluded())&&this.test.include(!1),(t||this.testValue)&&this.consequent.shouldBeIncluded()&&this.consequent.include(!1),null===this.alternate||!t&&this.testValue||!this.alternate.shouldBeIncluded()||this.alternate.include(!1)}initialise(){this.included=!1,this.isTestValueAnalysed=!1}render(e,t){if(this.test.included||(this.testValue?null!==this.alternate&&this.alternate.included:this.consequent.included))this.test.included?this.test.render(e,t):e.overwrite(this.test.start,this.test.end,this.testValue?"true":"false"),this.consequent.included?this.consequent.render(e,t):e.overwrite(this.consequent.start,this.consequent.end,";"),null!==this.alternate&&(this.alternate.included?this.alternate.render(e,t):e.remove(this.consequent.end,this.alternate.end));else{const n=this.testValue?this.consequent:this.alternate;e.remove(this.start,n.start),e.remove(n.end,this.end),un(this,e),n.render(e,t)}}},Import:class extends Do{include(){this.included=!0,this.context.includeDynamicImport(this)}initialise(){this.included=!1,this.resolutionNamespace=void 0,this.resolutionInterop=!1,this.context.addDynamicImport(this)}render(e,t){if(this.resolutionNamespace){const n=t.compact?"":" ",r=t.compact?"":";";return void e.overwrite(this.parent.start,this.parent.end,`Promise.resolve().then(function${n}()${n}{${n}return ${this.resolutionNamespace}${r}${n}})`)}const n=ua(t);if(n){const t=this.resolutionInterop&&n.interopLeft||n.left,r=ln(e.original,"(",this.parent.callee.end)+1;e.overwrite(this.parent.start,r,t);const i=this.resolutionInterop&&n.interopRight||n.right;e.overwrite(this.parent.end-1,this.parent.end,i)}}renderFinalResolution(e,t,n){this.included&&("amd"===n&&t.startsWith("'.")&&t.endsWith(".js'")&&(t=t.slice(0,-4)+"'"),e.overwrite(this.parent.arguments[0].start,this.parent.arguments[0].end,t))}setResolution(e,t){this.resolutionInterop=e,this.resolutionNamespace=t}},ImportDeclaration:ca,LabeledStatement:class extends Do{hasEffects(e){return this.body.hasEffects(e.setIgnoreLabel(this.label.name).setIgnoreBreakStatements())}},Literal:la,LogicalExpression:class extends Do{bind(){super.bind(),this.isBranchResolutionAnalysed||this.analyseBranchResolution()}deoptimizeCache(){if(null!==this.usedBranch){this.usedBranch=null,this.unusedBranch.deoptimizePath(ge);for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&(this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?(this.left.deoptimizePath(e),this.right.deoptimizePath(e)):this.usedBranch.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?xe:(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getLiteralValueAtPath(e,t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?new oa([this.left.getReturnExpressionWhenCalledAtPath(e,t,n),this.right.getReturnExpressionWhenCalledAtPath(e,t,n)]):(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getReturnExpressionWhenCalledAtPath(e,t,n))}hasEffects(e){return null===this.usedBranch?this.left.hasEffects(e)||this.right.hasEffects(e):this.usedBranch.hasEffects(e)}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null===this.usedBranch?this.left.hasEffectsWhenAccessedAtPath(e,t)||this.right.hasEffectsWhenAccessedAtPath(e,t):this.usedBranch.hasEffectsWhenAccessedAtPath(e,t))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||(null===this.usedBranch?this.left.hasEffectsWhenAssignedAtPath(e,t)||this.right.hasEffectsWhenAssignedAtPath(e,t):this.usedBranch.hasEffectsWhenAssignedAtPath(e,t))}hasEffectsWhenCalledAtPath(e,t,n){return null===this.usedBranch?this.left.hasEffectsWhenCalledAtPath(e,t,n)||this.right.hasEffectsWhenCalledAtPath(e,t,n):this.usedBranch.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0,e||null===this.usedBranch||this.unusedBranch.shouldBeIncluded()?(this.left.include(e),this.right.include(e)):this.usedBranch.include(e)}initialise(){this.included=!1,this.isBranchResolutionAnalysed=!1,this.usedBranch=null,this.unusedBranch=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=an){this.left.included&&this.right.included?super.render(e,t):(e.remove(this.start,this.usedBranch.start),e.remove(this.usedBranch.end,this.end),un(this,e),this.usedBranch.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}))}analyseBranchResolution(){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(me,ta,this);e!==xe&&(("||"===this.operator?e:!e)?(this.usedBranch=this.left,this.unusedBranch=this.right):(this.usedBranch=this.right,this.unusedBranch=this.left))}},MemberExpression:fa,MetaProperty:class extends Do{hasEffectsWhenAccessedAtPath(e){return e.length>1}initialise(){"import"===this.meta.name&&this.context.addImportMeta(this),this.included=!1}renderFinalMechanism(e,t,n,r){if(!this.included)return!1;const i=this.parent,s=i instanceof fa&&"string"==typeof i.propertyKey?i.propertyKey:null;if(s&&(s.startsWith(ma)||s.startsWith(ga))){let o,a=null,h=null;s.startsWith(ma)?(a=s.substr(ma.length),o=this.context.getAssetFileName(a)):(h=s.substr(ga.length),o=this.context.getChunkFileName(h));const u=rt(at(st(t),o));let c;return null!==a&&(c=r.hookFirstSync("resolveAssetUrl",[{assetFileName:o,chunkId:t,format:n,moduleId:this.context.module.id,relativeAssetPath:u}])),c||(c=r.hookFirstSync("resolveFileUrl",[{assetReferenceId:a,chunkId:t,chunkReferenceId:h,fileName:o,format:n,moduleId:this.context.module.id,relativePath:u}])),e.overwrite(i.start,i.end,c),!0}const o=r.hookFirstSync("resolveImportMeta",[s,{chunkId:t,format:n,moduleId:this.context.module.id}]);return"string"==typeof o&&(i instanceof fa?e.overwrite(i.start,i.end,o):e.overwrite(this.start,this.end,o),!0)}},MethodDefinition:class extends Do{hasEffects(e){return this.key.hasEffects(e)}hasEffectsWhenCalledAtPath(e,t,n){return e.length>0||this.value.hasEffectsWhenCalledAtPath(me,t,n)}},NewExpression:class extends Do{bind(){super.bind();for(const e of this.arguments)e.deoptimizePath(ge)}hasEffects(e){for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotatedPure&&this.callee.hasEffectsWhenCalledAtPath(me,this.callOptions,e.getHasEffectsWhenCalledOptions())}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}initialise(){this.included=!1,this.callOptions=de.create({args:this.arguments,callIdentifier:this,withNew:!0})}},ObjectExpression:class extends Do{bind(){super.bind(),null===this.propertyMap&&this.buildPropertyMap()}deoptimizeCache(){this.hasUnknownDeoptimizedProperty||this.deoptimizeAllProperties()}deoptimizePath(e){if(this.hasUnknownDeoptimizedProperty)return;if(null===this.propertyMap&&this.buildPropertyMap(),0===e.length)return void this.deoptimizeAllProperties();const t=e[0];if(1===e.length){if("string"!=typeof t)return void this.deoptimizeAllProperties();if(!this.deoptimizedPaths[t]&&(this.deoptimizedPaths[t]=!0,this.expressionsToBeDeoptimized[t]))for(const e of this.expressionsToBeDeoptimized[t])e.deoptimizeCache()}const n=1===e.length?ge:e.slice(1);for(const e of"string"==typeof t?this.propertyMap[t]?this.propertyMap[t].propertiesRead:[]:this.properties)e.deoptimizePath(n)}getLiteralValueAtPath(e,t,n){null===this.propertyMap&&this.buildPropertyMap();const r=e[0];return 0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]?xe:1!==e.length||this.propertyMap[r]||Ve[r]||0!==this.unmatchablePropertiesRead.length?!this.propertyMap[r]||null===this.propertyMap[r].exactMatchRead||this.propertyMap[r].propertiesRead.length>1?xe:(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n],this.propertyMap[r].exactMatchRead.getLiteralValueAtPath(e.slice(1),t,n)):void(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n])}getReturnExpressionWhenCalledAtPath(e,t,n){null===this.propertyMap&&this.buildPropertyMap();const r=e[0];return 0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]?ve:1!==e.length||!Ve[r]||0!==this.unmatchablePropertiesRead.length||this.propertyMap[r]&&null!==this.propertyMap[r].exactMatchRead?!this.propertyMap[r]||null===this.propertyMap[r].exactMatchRead||this.propertyMap[r].propertiesRead.length>1?ve:(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n],this.propertyMap[r].exactMatchRead.getReturnExpressionWhenCalledAtPath(e.slice(1),t,n)):Fe(Ve,r)}hasEffectsWhenAccessedAtPath(e,t){if(0===e.length)return!1;const n=e[0];if(e.length>1&&(this.hasUnknownDeoptimizedProperty||"string"!=typeof n||this.deoptimizedPaths[n]||!this.propertyMap[n]||null===this.propertyMap[n].exactMatchRead))return!0;const r=e.slice(1);for(const e of"string"!=typeof n?this.properties:this.propertyMap[n]?this.propertyMap[n].propertiesRead:[])if(e.hasEffectsWhenAccessedAtPath(r,t))return!0;return!1}hasEffectsWhenAssignedAtPath(e,t){if(0===e.length)return!1;const n=e[0];if(e.length>1&&(this.hasUnknownDeoptimizedProperty||"string"!=typeof n||this.deoptimizedPaths[n]||!this.propertyMap[n]||null===this.propertyMap[n].exactMatchRead))return!0;const r=e.slice(1);for(const i of"string"!=typeof n?this.properties:e.length>1?this.propertyMap[n].propertiesRead:this.propertyMap[n]?this.propertyMap[n].propertiesSet:[])if(i.hasEffectsWhenAssignedAtPath(r,t))return!0;return!1}hasEffectsWhenCalledAtPath(e,t,n){const r=e[0];if(0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]||(this.propertyMap[r]?!this.propertyMap[r].exactMatchRead:e.length>1||!Ve[r]))return!0;const i=e.slice(1);for(const e of this.propertyMap[r]?this.propertyMap[r].propertiesRead:[])if(e.hasEffectsWhenCalledAtPath(i,t,n))return!0;return!(1!==e.length||!Ve[r])&&Ue(Ve,r,this.included,t,n)}initialise(){this.included=!1,this.hasUnknownDeoptimizedProperty=!1,this.deoptimizedPaths=Object.create(null),this.propertyMap=null,this.expressionsToBeDeoptimized=Object.create(null)}render(e,t,{renderedParentType:n}=an){super.render(e,t),n===ee&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}buildPropertyMap(){this.propertyMap=Object.create(null),this.unmatchablePropertiesRead=[],this.unmatchablePropertiesWrite=[];for(let e=this.properties.length-1;e>=0;e--){const t=this.properties[e];if(t instanceof ya){this.unmatchablePropertiesRead.push(t);continue}const n="get"!==t.kind,r="set"!==t.kind;let i;if(t.computed){const e=t.key.getLiteralValueAtPath(me,ta,this);if(e===xe){r?this.unmatchablePropertiesRead.push(t):this.unmatchablePropertiesWrite.push(t);continue}i=String(e)}else i=t.key instanceof ra?t.key.name:String(t.key.value);const s=this.propertyMap[i];s?(r&&null===s.exactMatchRead&&(s.exactMatchRead=t,s.propertiesRead.push(t,...this.unmatchablePropertiesRead)),n&&!r&&null===s.exactMatchWrite&&(s.exactMatchWrite=t,s.propertiesSet.push(t,...this.unmatchablePropertiesWrite))):this.propertyMap[i]={exactMatchRead:r?t:null,exactMatchWrite:n?t:null,propertiesRead:r?[t,...this.unmatchablePropertiesRead]:[],propertiesSet:n&&!r?[t,...this.unmatchablePropertiesWrite]:[]}}}deoptimizeAllProperties(){this.hasUnknownDeoptimizedProperty=!0;for(const e of this.properties)e.deoptimizePath(ge);for(const e of Object.keys(this.expressionsToBeDeoptimized))for(const t of this.expressionsToBeDeoptimized[e])t.deoptimizeCache()}},ObjectPattern:class extends Do{addExportedVariables(e){for(const t of this.properties)t.type===ue?t.value.addExportedVariables(e):t.argument.addExportedVariables(e)}declare(e,t){for(const n of this.properties)n.declare(e,t)}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){if(e.length>0)return!0;for(const e of this.properties)if(e.hasEffectsWhenAssignedAtPath(me,t))return!0;return!1}},Program:xa,Property:class extends Do{constructor(){super(...arguments),this.declarationInit=null}bind(){super.bind(),"get"===this.kind&&null===this.returnExpression&&this.updateReturnExpression(),null!==this.declarationInit&&this.declarationInit.deoptimizePath([fe,fe])}declare(e,t){this.declarationInit=t,this.value.declare(e,ve)}deoptimizeCache(){throw new Error("Unexpected deoptimization")}deoptimizePath(e){"get"===this.kind?e.length>0&&(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.deoptimizePath(e)):"set"!==this.kind&&this.value.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return"set"===this.kind?xe:"get"===this.kind?(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.getLiteralValueAtPath(e,t,n)):this.value.getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n){return"set"===this.kind?ve:"get"===this.kind?(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.getReturnExpressionWhenCalledAtPath(e,t,n)):this.value.getReturnExpressionWhenCalledAtPath(e,t,n)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenAccessedAtPath(e,t){return"get"===this.kind?this.value.hasEffectsWhenCalledAtPath(me,this.accessorCallOptions,t.getHasEffectsWhenCalledOptions())||e.length>0&&this.returnExpression.hasEffectsWhenAccessedAtPath(e,t):this.value.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return"get"===this.kind?0===e.length||this.returnExpression.hasEffectsWhenAssignedAtPath(e,t):"set"===this.kind?e.length>0||this.value.hasEffectsWhenCalledAtPath(me,this.accessorCallOptions,t.getHasEffectsWhenCalledOptions()):this.value.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return"get"===this.kind?this.returnExpression.hasEffectsWhenCalledAtPath(e,t,n):this.value.hasEffectsWhenCalledAtPath(e,t,n)}initialise(){this.included=!1,this.returnExpression=null,this.accessorCallOptions=de.create({callIdentifier:this,withNew:!1})}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}updateReturnExpression(){this.returnExpression=ve,this.returnExpression=this.value.getReturnExpressionWhenCalledAtPath(me,ta,this)}},RestElement:class extends Do{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e){this.argument.addExportedVariables(e)}bind(){super.bind(),null!==this.declarationInit&&this.declarationInit.deoptimizePath([fe,fe])}declare(e,t){this.argument.declare(e,ve),this.declarationInit=t}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(me)}hasEffectsWhenAssignedAtPath(e,t){return e.length>0||this.argument.hasEffectsWhenAssignedAtPath(me,t)}},ReturnStatement:class extends Do{hasEffects(e){return!e.ignoreReturnAwaitYield()||this.argument&&this.argument.hasEffects(e)}initialise(){this.included=!1,this.scope.addReturnExpression(this.argument||ve)}render(e,t){this.argument&&(this.argument.render(e,t),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends Do{deoptimizePath(e){e.length>0&&this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,n)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.expressions[this.expressions.length-1].hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||this.expressions[this.expressions.length-1].hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return this.expressions[this.expressions.length-1].hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0;for(let t=0;t<this.expressions.length-1;t++){const n=this.expressions[t];(e||n.shouldBeIncluded())&&n.include(e)}this.expressions[this.expressions.length-1].include(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=an){let i,s=0,o=0;for(const{node:a,start:h,end:u}of fn(this.expressions,e,this.start,this.end))a.included?(o++,0===s&&(s=h),i=u,a===this.expressions[this.expressions.length-1]&&1===o?a.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}):a.render(e,t)):hn(a,e,h,u);o>1&&n&&(e.prependRight(s,"("),e.appendLeft(i,")"))}},SpreadElement:ya,SwitchCase:class extends Do{include(e){this.included=!0,this.test&&this.test.include(e);for(const t of this.consequent)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){if(this.consequent.length){this.test&&this.test.render(e,t);const n=this.test?this.test.end:ln(e.original,"default",this.start)+7,r=ln(e.original,":",n)+1;dn(this.consequent,e,r,this.end,t)}else super.render(e,t)}},SwitchStatement:class extends Do{createScope(e){this.scope=new Ko(e)}hasEffects(e){return super.hasEffects(e.setIgnoreBreakStatements())}},TaggedTemplateExpression:class extends Do{bind(){super.bind(),this.tag.type===re&&(this.scope.findVariable(this.tag.name).isNamespace&&this.context.error({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${this.tag.name}')`},this.start),"eval"===this.tag.name&&this.context.warn({code:"EVAL",message:"Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification",url:"https://rollupjs.org/guide/en#avoiding-eval"},this.start))}hasEffects(e){return super.hasEffects(e)||this.tag.hasEffectsWhenCalledAtPath(me,this.callOptions,e.getHasEffectsWhenCalledOptions())}initialise(){this.included=!1,this.callOptions=de.create({callIdentifier:this,withNew:!1})}},TemplateElement:class extends Do{hasEffects(e){return!1}},TemplateLiteral:class extends Do{getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?xe:this.quasis[0].value.cooked}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}},ThisExpression:class extends Do{bind(){super.bind(),this.variable=this.scope.findVariable("this")}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.variable.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return this.variable.hasEffectsWhenAssignedAtPath(e,t)}initialise(){this.included=!1,this.variable=null,this.alias=this.scope.findLexicalBoundary()instanceof va?this.context.moduleContext:null,"undefined"===this.alias&&this.context.warn({code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:"https://rollupjs.org/guide/en#error-this-is-undefined"},this.start)}render(e,t){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends Do{hasEffects(e){return!0}},TryStatement:Do,UnaryExpression:class extends Do{bind(){super.bind(),"delete"===this.operator&&this.argument.deoptimizePath(me)}getLiteralValueAtPath(e,t,n){if(e.length>0)return xe;const r=this.argument.getLiteralValueAtPath(me,t,n);return r===xe?xe:Ea[this.operator](r)}hasEffects(e){return this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsWhenAssignedAtPath(me,e)}hasEffectsWhenAccessedAtPath(e,t){return"void"===this.operator?e.length>0:e.length>1}},UnknownNode:class extends Do{hasEffects(e){return!0}include(){super.include(!0)}},UpdateExpression:class extends Do{bind(){super.bind(),this.argument.deoptimizePath(me),na(this.argument)&&(this.scope.findVariable(this.argument.name).isReassigned=!0)}hasEffects(e){return this.argument.hasEffects(e)||this.argument.hasEffectsWhenAssignedAtPath(me,e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}render(e,t){this.argument.render(e,t);const n=this.argument.variable;if("system"===t.format&&n&&n.exportName){const t=n.getName();if(this.prefix)e.overwrite(this.start,this.end,`exports('${n.exportName}', ${this.operator}${t})`);else{let r;switch(this.operator){case"++":r=`${t} + 1`;break;case"--":r=`${t} - 1`}e.overwrite(this.start,this.end,`(exports('${n.exportName}', ${r}), ${t}${this.operator})`)}}}},VariableDeclaration:class extends Do{deoptimizePath(e){for(const e of this.declarations)e.deoptimizePath(me)}hasEffectsWhenAssignedAtPath(e,t){return!1}include(e){this.included=!0;for(const t of this.declarations)(e||t.shouldBeIncluded())&&t.include(e)}includeWithAllDeclaredVariables(e){this.included=!0;for(const t of this.declarations)t.include(e)}initialise(){this.included=!1;for(const e of this.declarations)e.declareDeclarator(this.kind)}render(e,t,n=an){if(function(e){for(const t of e){if(!t.included)return!1;if(t.id.type===re){if(t.id.variable.exportName)return!1}else{const e=[];if(t.id.addExportedVariables(e),e.length>0)return!1}}return!0}(this.declarations)){for(const n of this.declarations)n.render(e,t);n.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t,n)}renderDeclarationEnd(e,t,n,r,i,s,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),s&&(t+=";"),null!==n?(10!==e.original.charCodeAt(r-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(r--,13===e.original.charCodeAt(r)&&r--),r===n+1?e.overwrite(n,i,t):(e.overwrite(n,n+1,t),e.remove(r,i))):e.appendLeft(i,t),o.length>0&&e.appendLeft(i," "+Qo(o))}renderReplacedDeclarations(e,t,{start:n=this.start,end:r=this.end,isNoStatement:i}){const s=fn(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let o,a,h=(a=/\n\s*$/.test(e.slice(this.start,s[0].start))?this.start+this.kind.length:s[0].start)-1;e.remove(this.start,h);let u,c,l=!1,p=!1,d="";const f=[];for(const{node:n,start:r,separator:i,contentEnd:m,end:g}of s)!n.included||na(n.id)&&_a(n.id.variable)&&null===n.init?e.remove(r,g):(u="",c="",na(n.id)&&_a(n.id.variable)?(p&&(d+=";"),l=!1):("system"===t.format&&null!==n.init&&(n.id.type!==re?n.id.addExportedVariables(f):n.id.variable.exportName&&(e.prependLeft(e.original.indexOf("=",n.id.end)+1,` exports('${n.id.variable.safeExportName||n.id.variable.exportName}',`),c+=")")),l?d+=",":(p&&(d+=";"),u+=`${this.kind} `,l=!0)),a===h+1?e.overwrite(h,a,d+u):(e.overwrite(h,h+1,d),e.appendLeft(a,u)),n.render(e,t),o=m,a=g,p=!0,h=i,d=c);p?this.renderDeclarationEnd(e,d,h,o,a,!i,f):e.remove(n,r)}},VariableDeclarator:class extends Do{declareDeclarator(e){this.id.declare(e,this.init||Ee)}deoptimizePath(e){this.id.deoptimizePath(e)}render(e,t){null===this.init||this.init.included?super.render(e,t):(e.remove(this.id.end,this.end),this.id.render(e,t))}},WhileStatement:class extends Do{hasEffects(e){return this.test.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}},YieldExpression:class extends Do{bind(){super.bind(),null!==this.argument&&this.argument.deoptimizePath(ge)}hasEffects(e){return!e.ignoreReturnAwaitYield()||this.argument&&this.argument.hasEffects(e)}render(e,t){this.argument&&(this.argument.render(e,t),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}};function Aa(e,t,n){n(e,t)}function Sa(e,t,n){}var Ia={};function wa(e,t,n=e.type){let r=t.commentNodes[t.commentIndex];for(;r&&e.start>=r.end;)Pa(e,r),r=t.commentNodes[++t.commentIndex];r&&r.end<=e.end&&Ia[n](e,t,wa)}function Pa(e,t){e.annotations?e.annotations.push(t):e.annotations=[t],"ExpressionStatement"===e.type&&(e=e.expression),"CallExpression"!==e.type&&"NewExpression"!==e.type||(e.annotatedPure=!0)}Ia.Program=Ia.BlockStatement=function(e,t,n){for(var r=0,i=e.body;r<i.length;r+=1){n(i[r],t,"Statement")}},Ia.Statement=Aa,Ia.EmptyStatement=Sa,Ia.ExpressionStatement=Ia.ParenthesizedExpression=function(e,t,n){return n(e.expression,t,"Expression")},Ia.IfStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Statement"),e.alternate&&n(e.alternate,t,"Statement")},Ia.LabeledStatement=function(e,t,n){return n(e.body,t,"Statement")},Ia.BreakStatement=Ia.ContinueStatement=Sa,Ia.WithStatement=function(e,t,n){n(e.object,t,"Expression"),n(e.body,t,"Statement")},Ia.SwitchStatement=function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0,i=e.cases;r<i.length;r+=1){var s=i[r];s.test&&n(s.test,t,"Expression");for(var o=0,a=s.consequent;o<a.length;o+=1){n(a[o],t,"Statement")}}},Ia.SwitchCase=function(e,t,n){e.test&&n(e.test,t,"Expression");for(var r=0,i=e.consequent;r<i.length;r+=1){n(i[r],t,"Statement")}},Ia.ReturnStatement=Ia.YieldExpression=Ia.AwaitExpression=function(e,t,n){e.argument&&n(e.argument,t,"Expression")},Ia.ThrowStatement=Ia.SpreadElement=function(e,t,n){return n(e.argument,t,"Expression")},Ia.TryStatement=function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,"Statement")},Ia.CatchClause=function(e,t,n){e.param&&n(e.param,t,"Pattern"),n(e.body,t,"Statement")},Ia.WhileStatement=Ia.DoWhileStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.body,t,"Statement")},Ia.ForStatement=function(e,t,n){e.init&&n(e.init,t,"ForInit"),e.test&&n(e.test,t,"Expression"),e.update&&n(e.update,t,"Expression"),n(e.body,t,"Statement")},Ia.ForInStatement=Ia.ForOfStatement=function(e,t,n){n(e.left,t,"ForInit"),n(e.right,t,"Expression"),n(e.body,t,"Statement")},Ia.ForInit=function(e,t,n){"VariableDeclaration"===e.type?n(e,t):n(e,t,"Expression")},Ia.DebuggerStatement=Sa,Ia.FunctionDeclaration=function(e,t,n){return n(e,t,"Function")},Ia.VariableDeclaration=function(e,t,n){for(var r=0,i=e.declarations;r<i.length;r+=1){n(i[r],t)}},Ia.VariableDeclarator=function(e,t,n){n(e.id,t,"Pattern"),e.init&&n(e.init,t,"Expression")},Ia.Function=function(e,t,n){e.id&&n(e.id,t,"Pattern");for(var r=0,i=e.params;r<i.length;r+=1){n(i[r],t,"Pattern")}n(e.body,t,e.expression?"Expression":"Statement")},Ia.Pattern=function(e,t,n){"Identifier"===e.type?n(e,t,"VariablePattern"):"MemberExpression"===e.type?n(e,t,"MemberPattern"):n(e,t)},Ia.VariablePattern=Sa,Ia.MemberPattern=Aa,Ia.RestElement=function(e,t,n){return n(e.argument,t,"Pattern")},Ia.ArrayPattern=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Pattern")}},Ia.ObjectPattern=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];"Property"===s.type?(s.computed&&n(s.key,t,"Expression"),n(s.value,t,"Pattern")):"RestElement"===s.type&&n(s.argument,t,"Pattern")}},Ia.Expression=Aa,Ia.ThisExpression=Ia.Super=Ia.MetaProperty=Sa,Ia.ArrayExpression=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Expression")}},Ia.ObjectExpression=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){n(i[r],t)}},Ia.FunctionExpression=Ia.ArrowFunctionExpression=Ia.FunctionDeclaration,Ia.SequenceExpression=function(e,t,n){for(var r=0,i=e.expressions;r<i.length;r+=1){n(i[r],t,"Expression")}},Ia.TemplateLiteral=function(e,t,n){for(var r=0,i=e.quasis;r<i.length;r+=1){n(i[r],t)}for(var s=0,o=e.expressions;s<o.length;s+=1){n(o[s],t,"Expression")}},Ia.TemplateElement=Sa,Ia.UnaryExpression=Ia.UpdateExpression=function(e,t,n){n(e.argument,t,"Expression")},Ia.BinaryExpression=Ia.LogicalExpression=function(e,t,n){n(e.left,t,"Expression"),n(e.right,t,"Expression")},Ia.AssignmentExpression=Ia.AssignmentPattern=function(e,t,n){n(e.left,t,"Pattern"),n(e.right,t,"Expression")},Ia.ConditionalExpression=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Expression"),n(e.alternate,t,"Expression")},Ia.NewExpression=Ia.CallExpression=function(e,t,n){if(n(e.callee,t,"Expression"),e.arguments)for(var r=0,i=e.arguments;r<i.length;r+=1){n(i[r],t,"Expression")}},Ia.MemberExpression=function(e,t,n){n(e.object,t,"Expression"),e.computed&&n(e.property,t,"Expression")},Ia.ExportNamedDeclaration=Ia.ExportDefaultDeclaration=function(e,t,n){e.declaration&&n(e.declaration,t,"ExportNamedDeclaration"===e.type||e.declaration.id?"Statement":"Expression"),e.source&&n(e.source,t,"Expression")},Ia.ExportAllDeclaration=function(e,t,n){n(e.source,t,"Expression")},Ia.ImportDeclaration=function(e,t,n){for(var r=0,i=e.specifiers;r<i.length;r+=1){n(i[r],t)}n(e.source,t,"Expression")},Ia.ImportSpecifier=Ia.ImportDefaultSpecifier=Ia.ImportNamespaceSpecifier=Ia.Identifier=Ia.Literal=Sa,Ia.TaggedTemplateExpression=function(e,t,n){n(e.tag,t,"Expression"),n(e.quasi,t,"Expression")},Ia.ClassDeclaration=Ia.ClassExpression=function(e,t,n){return n(e,t,"Class")},Ia.Class=function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression"),n(e.body,t)},Ia.ClassBody=function(e,t,n){for(var r=0,i=e.body;r<i.length;r+=1){n(i[r],t)}},Ia.MethodDefinition=Ia.Property=function(e,t,n){e.computed&&n(e.key,t,"Expression"),n(e.value,t,"Expression")};const ka=/[@#]__PURE__/,Ca=e=>ka.test(e.text);let Na="sourceMa";Na+="ppingURL";const $a=new RegExp(`^#\\s+${Na}=.+\\n?`),Ra=()=>{};let Oa=()=>0,Ma=()=>0,Ta=()=>0,Da={};const La=e=>1e3*e[0]+e[1]/1e6;function Va(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function Ba(e,t=3){e=Va(e,t),Da.hasOwnProperty(e)||(Da[e]={memory:0,startMemory:void 0,startTime:void 0,time:0,totalMemory:0});const n=Ta();Da[e].startTime=Oa(),Da[e].startMemory=n}function za(e,t=3){if(e=Va(e,t),Da.hasOwnProperty(e)){const t=Ta();Da[e].time+=Ma(Da[e].startTime),Da[e].totalMemory=Math.max(Da[e].totalMemory,t),Da[e].memory+=t-Da[e].startMemory}}function ja(){const e={};return Object.keys(Da).forEach(t=>{e[t]=[Da[t].time,Da[t].memory,Da[t].totalMemory]}),e}let Wa=Ra,Ua=Ra;const Fa={load:!0,ongenerate:!0,onwrite:!0,resolveDynamicImport:!0,resolveId:!0,transform:!0,transformBundle:!0};function qa(e,t){const n={};for(const r of Object.keys(e))if(!0===Fa[r]){let i=`plugin ${t}`;e.name&&(i+=` (${e.name})`),i+=` - ${r}`,n[r]=function(){Wa(i,4);const t=e[r].apply(this===n?e:this,arguments);return Ua(i,4),t&&"function"==typeof t.then&&(Wa(`${i} (async)`,4),t.then(()=>Ua(`${i} (async)`,4))),t}}else n[r]=e[r];return n}function Ga(e){e.perf?(Da={},"undefined"!=typeof process&&"function"==typeof process.hrtime?(Oa=process.hrtime.bind(process),Ma=(e=>La(process.hrtime(e)))):"undefined"!=typeof performance&&"function"==typeof performance.now&&(Oa=performance.now.bind(performance),Ma=(e=>performance.now()-e)),"undefined"!=typeof process&&"function"==typeof process.memoryUsage&&(Ta=(()=>process.memoryUsage().heapUsed)),Wa=Ba,Ua=za,e.plugins=e.plugins.map(qa)):(Wa=Ra,Ua=Ra)}const Ha={ecmaVersion:2019,preserveParens:!1,sourceType:"module"};function Ka(e,t,n,r){t.error({code:"MISSING_EXPORT",message:`'${e}' is not exported by ${Vt(n)}`,url:"https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-"},r)}const Ya={localName:ft};class Xa{constructor(e,t,n,r){this.chunkAlias=null,this.comments=[],this.dependencies=[],this.dynamicallyImportedBy=[],this.dynamicDependencies=[],this.dynamicImports=[],this.entryPointsHash=new Uint8Array(10),this.execIndex=1/0,this.exportAllModules=null,this.exportAllSources=[],this.exports=Object.create(null),this.exportsAll=Object.create(null),this.exportShimVariable=new gt(this),this.facadeChunk=null,this.importDescriptions=Object.create(null),this.importMetas=[],this.imports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.manualChunkAlias=null,this.reexports=Object.create(null),this.sources=[],this.usesTopLevelAwait=!1,this.namespaceVariable=void 0,this.id=t,this.graph=e,this.excludeFromSourcemap=/\0/.test(t),this.context=e.getModuleContext(t),this.moduleSideEffects=n,this.isEntryPoint=r}basename(){const e=it(this.id),t=ot(this.id);return Je(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){if(void 0!==t){e.pos=t;let n=Mt(this.code,t,{offsetLine:1});try{n=function(e,t){const n=e.filter(e=>e.mappings);for(;n.length>0;){const e=n.pop(),r=e.mappings[t.line-1];let i=!1;if(void 0!==r)for(const n of r)if(n[0]>=t.column){if(n.length<4)break;t={column:n[3],line:n[2]+1,name:e.names[n[4]],source:e.sources[n[1]]},i=!0;break}if(!i)throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,n)}catch(e){this.warn({code:"SOURCEMAP_ERROR",loc:{column:n.column,file:this.id,line:n.line},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:t},void 0)}e.loc={column:n.column,file:this.id,line:n.line},e.frame=Dt(this.originalCode,n.line,n.column)}zt(e)}getAllExports(){const e=Object.assign(Object.create(null),this.exports,this.reexports);return this.exportAllModules.forEach(t=>{if(t.isExternal)e[`*${t.id}`]=!0;else for(const n of t.getAllExports())"default"!==n&&(e[n]=!0)}),Object.keys(e)}getDynamicImportExpressions(){return this.dynamicImports.map(({node:e})=>{const t=e.parent.arguments[0];if(function(e){return e.type===le}(t)){if(0===t.expressions.length&&1===t.quasis.length)return t.quasis[0].value.cooked}else{if(!function(e){return e.type===oe}(t))return t;if("string"==typeof t.value)return t.value}})}getExports(){return Object.keys(this.exports)}getOrCreateNamespace(){return this.namespaceVariable||(this.namespaceVariable=new Pt(this.astContext))}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set;for(const t in this.reexports)e.add(t);for(const t of this.exportAllModules)if(t instanceof ut)e.add(`*${t.id}`);else for(const n of t.getExports().concat(t.getReexports()))"default"!==n&&e.add(n);return this.transitiveReexports=Array.from(e)}getRenderedExports(){const e=[],t=[];for(const n in this.exports){const r=this.getVariableForExportName(n);(r&&r.included?e:t).push(n)}return{renderedExports:e,removedExports:t}}getTransitiveDependencies(){return this.dependencies.concat(this.getReexports().map(e=>this.getVariableForExportName(e).module))}getVariableForExportName(e,t){if("*"===e[0]){if(1===e.length)return this.getOrCreateNamespace();return this.graph.moduleById.get(e.slice(1)).getVariableForExportName("*")}const n=this.reexports[e];if(n){const e=n.module.getVariableForExportName(n.localName);return e||Ka(n.localName,this,n.module.id,n.start),e}const r=this.exports[e];if(r){if(r===Ya)return this.exportShimVariable;const e=r.localName;return this.traceVariable(e)||this.graph.scope.findVariable(e)}if("default"!==e)for(let t=0;t<this.exportAllModules.length;t+=1){const n=this.exportAllModules[t].getVariableForExportName(e,!0);if(n)return n}if(this.graph.shimMissingExports&&!t)return this.shimMissingExport(e),this.exportShimVariable}include(){this.ast.shouldBeIncluded()&&this.ast.include(!1)}includeAllExports(){this.isExecuted||(this.graph.needsTreeshakingPass=!0,ct(this));for(const e of this.getExports()){const t=this.getVariableForExportName(e);t.deoptimizePath(ge),t.included||(t.include(),this.graph.needsTreeshakingPass=!0)}for(const e of this.getReexports()){const t=this.getVariableForExportName(e);t.isExternal?t.reexported=t.module.reexported=!0:t.included||(t.include(),t.deoptimizePath(ge),this.graph.needsTreeshakingPass=!0)}}includeAllInBundle(){this.ast.include(!0)}isIncluded(){return this.ast.included||this.namespaceVariable&&this.namespaceVariable.included}linkDependencies(){for(const e of this.sources){const t=this.resolvedIds[e].id;if(t){const e=this.graph.moduleById.get(t);this.dependencies.push(e)}}for(const{resolution:e}of this.dynamicImports)(e instanceof Xa||e instanceof ut)&&this.dynamicDependencies.push(e);this.addModulesToSpecifiers(this.importDescriptions),this.addModulesToSpecifiers(this.reexports),this.exportAllModules=this.exportAllSources.map(e=>{const t=this.resolvedIds[e].id;return this.graph.moduleById.get(t)})}render(e){const t=this.magicString.clone();return this.ast.render(t,e),this.usesTopLevelAwait=this.astContext.usesTopLevelAwait,t}setSource({ast:e,code:t,customTransformCache:n,moduleSideEffects:r,originalCode:i,originalSourcemap:s,resolvedIds:o,sourcemapChain:a,transformDependencies:h}){var u;this.code=t,this.originalCode=i,this.originalSourcemap=s,this.sourcemapChain=a,this.transformDependencies=h,this.customTransformCache=n,"boolean"==typeof r&&(this.moduleSideEffects=r),Wa("generate ast",3),this.esTreeAst=e||function(e,t,n){try{return t.parse(e.code,Object.assign({},Ha,n,{onComment:(t,n,r,i)=>e.comments.push({block:t,text:n,start:r,end:i})}))}catch(t){let n=t.message.replace(/ \(\d+:\d+\)$/,"");e.id.endsWith(".json")?n+=" (Note that you need rollup-plugin-json to import JSON files)":e.id.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),e.error({code:"PARSE_ERROR",message:n},t.pos)}}(this,this.graph.acornParser,this.graph.acornOptions),u=this.comments,wa(this.esTreeAst,{commentIndex:0,commentNodes:u.filter(Ca)}),Ua("generate ast",3),this.resolvedIds=o||Object.create(null);const c=this.id;this.magicString=new G(t,{filename:this.excludeFromSourcemap?null:c,indentExclusionRanges:[]}),this.removeExistingSourceMap(),Wa("analyse ast",3),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),annotations:this.graph.treeshake&&this.graph.treeshakingOptions.annotations,code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:c,getAssetFileName:this.graph.pluginDriver.getAssetFileName,getChunkFileName:this.graph.moduleLoader.getChunkFileName.bind(this.graph.moduleLoader),getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeDynamicImport:this.includeDynamicImport.bind(this),includeVariable:this.includeVariable.bind(this),isCrossChunkImport:e=>e.module.chunk!==this.chunk,magicString:this.magicString,module:this,moduleContext:this.context,nodeConstructors:ba,preserveModules:this.graph.preserveModules,propertyReadSideEffects:!this.graph.treeshake||this.graph.treeshakingOptions.propertyReadSideEffects,traceExport:this.getVariableForExportName.bind(this),traceVariable:this.traceVariable.bind(this),treeshake:this.graph.treeshake,usesTopLevelAwait:!1,warn:this.warn.bind(this)},this.scope=new va(this.graph.scope,this.astContext),this.ast=new xa(this.esTreeAst,{type:"Module",context:this.astContext},this.scope),Ua("analyse ast",3)}toJSON(){return{ast:this.esTreeAst,code:this.code,customTransformCache:this.customTransformCache,dependencies:this.dependencies.map(e=>e.id),id:this.id,moduleSideEffects:this.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,transformAssets:this.transformAssets,transformDependencies:this.transformDependencies}}traceVariable(e){if(e in this.scope.variables)return this.scope.variables[e];if(e in this.importDescriptions){const t=this.importDescriptions[e],n=t.module;if(!n.isExternal&&"*"===t.name)return n.getOrCreateNamespace();const r=n.getVariableForExportName(t.name);return r||Ka(t.name,this,n.id,t.start),r}return null}warn(e,t){if(void 0!==t){e.pos=t;const{line:n,column:r}=Mt(this.code,t,{offsetLine:1});e.loc={file:this.id,line:n,column:r},e.frame=Dt(this.code,n,r)}e.id=this.id,this.graph.warn(e)}addDynamicImport(e){this.dynamicImports.push({node:e,resolution:void 0})}addExport(e){const t=e.source&&e.source.value;if(t)if(-1===this.sources.indexOf(t)&&this.sources.push(t),e.type===J)this.exportAllSources.push(t);else for(const n of e.specifiers){const e=n.exported.name;(this.exports[e]||this.reexports[e])&&this.error({code:"DUPLICATE_EXPORT",message:`A module cannot have multiple exports with the same name ('${e}')`},n.start),this.reexports[e]={localName:n.local.name,module:null,source:t,start:n.start}}else if(function(e){return e.type===Z}(e))this.exports.default&&this.error({code:"DUPLICATE_EXPORT",message:"A module can only have one default export"},e.start),this.exports.default={identifier:e.variable.getOriginalVariableName(),localName:"default"};else if(e.declaration){const t=e.declaration;if(t.type===pe)for(const e of t.declarations)for(const t of on(e.id))this.exports[t]={localName:t};else{const e=t.id.name;this.exports[e]={localName:e}}}else for(const t of e.specifiers){const e=t.local.name,n=t.exported.name;(this.exports[n]||this.reexports[n])&&this.error({code:"DUPLICATE_EXPORT",message:`A module cannot have multiple exports with the same name ('${n}')`},t.start),this.exports[n]={localName:e}}}addImport(e){const t=e.source.value;-1===this.sources.indexOf(t)&&this.sources.push(t);for(const n of e.specifiers){const e=n.local.name;this.importDescriptions[e]&&this.error({code:"DUPLICATE_IMPORT",message:`Duplicated import '${e}'`},n.start);const r=n.type===ie,i=n.type===se,s=r?"default":i?"*":n.imported.name;this.importDescriptions[e]={source:t,start:n.start,name:s,module:null}}}addImportMeta(e){this.importMetas.push(e)}addModulesToSpecifiers(e){for(const t of Object.keys(e)){const n=e[t],r=this.resolvedIds[n.source].id;n.module=this.graph.moduleById.get(r)}}includeDynamicImport(e){const t=this.dynamicImports.find(t=>t.node===e).resolution;t instanceof Xa&&(t.dynamicallyImportedBy.push(this),t.includeAllExports())}includeVariable(e){const t=e.module;e.included||(e.include(),this.graph.needsTreeshakingPass=!0),t&&t!==this&&this.imports.add(e)}removeExistingSourceMap(){for(const e of this.comments)!e.block&&$a.test(e.text)&&this.magicString.remove(e.start,e.end)}shimMissingExport(e){this.exports[e]||(this.graph.warn({code:"SHIMMED_EXPORT",exporter:Vt(this.id),exportName:e,message:`Missing export "${e}" has been shimmed in module ${Vt(this.id)}.`}),this.exports[e]=Ya)}}class Qa{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,n){return{line:e,column:t,name:n,source:this}}}class Ja{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=[],n=[],r=[];for(const i of this.mappings){const s=[];for(const r of i){const i=this.sources[r[1]];if(!i)continue;const o=i.traceSegment(r[2],r[3],this.names[r[4]]);if(o){let i=e.lastIndexOf(o.source.filename);-1===i?(i=e.length,e.push(o.source.filename),t[i]=o.source.content):null==t[i]?t[i]=o.source.content:null!=o.source.content&&t[i]!==o.source.content&&zt({message:`Multiple conflicting contents for sourcemap source ${o.source.filename}`});const a=[r[0],i,o.line,o.column];if(o.name){let e=n.indexOf(o.name);-1===e&&(e=n.length,n.push(o.name)),a[4]=e}s.push(a)}}r.push(s)}return{sources:e,sourcesContent:t,names:n,mappings:r}}traceSegment(e,t,n){const r=this.mappings[e];if(!r)return null;let i=0,s=r.length-1;for(;i<=s;){const e=i+s>>1,o=r[e];if(o[0]===t){const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],this.names[o[4]]||n):null}o[0]>t?s=e-1:i=e+1}return null}}const Za={amd:nh,cjs:nh,es:th,iife:nh,system:th,umd:nh};function eh(e,t,n,r,i,s,o){const{forbiddenNames:a,formatGlobals:h}=wt[i];Object.assign(r,a),Object.assign(r,h),function(e,t){const n=Object.assign({},...t.map(e=>e.scope.accessedOutsideVariables));for(const t of Object.keys(n)){const r=n[t];r.included&&(e[t]=!0)}}(r,e),function(e,t){for(const n of t){const t=n.scope.variables;for(const n of Object.keys(t)){const r=t[n];r.included&&!(r.renderBaseName||r instanceof dt&&r.referencesOriginal())&&r.setRenderNames(null,xn(r.name,e))}const r=n.getOrCreateNamespace();r.included&&r.setRenderNames(null,xn(r.name,e))}}(r,e),Za[i](r,n,t,s,o);for(const t of e)t.scope.deconflict(a)}function th(e,t,n,r){for(const n of t){const t=n.module,i=n.name;let s;s=t instanceof ut&&("*"===i||"default"===i)?"default"===i&&r&&t.exportsNamespace?t.variableName+"__default":t.variableName:i,n.setRenderNames(null,xn(s,e))}}function nh(e,t,n,r,i){for(const t of n)t.variableName=xn(t.variableName,e);for(const e of t){const t=e.module;if(t instanceof ut){const n=e.name;"default"===n&&r&&(t.exportsNamespace||t.exportsNames)?e.setRenderNames(null,t.variableName+"__default"):"*"===n||"default"===n?e.setRenderNames(null,t.variableName):e.setRenderNames(t.variableName,null)}else{const n=t.chunk;"default"===n.exportMode||i&&e.isNamespace?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,t.chunk.getVariableExportName(e))}}}const rh=(e,t)=>e.execIndex>t.execIndex?1:-1;function ih(e){e.sort(rh)}function sh(e,t,n){const r=[Vt(e)];let i=t;for(;i!==e&&(r.push(Vt(i)),i=n[i]););return r.push(r[0]),r.reverse(),r}function oh(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),r=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===r.length)return null;if(n.length>=r.length)return"\t";const i=r.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(" ")}function ah(e,t,n){return Bt(e)||zt({code:"INVALID_PATTERN",message:`Invalid output pattern "${e}" for ${t}, cannot be an absolute or relative URL or path.`}),e.replace(/\[(\w+)\]/g,(e,r)=>{const i=n(r);return void 0===i&&zt({code:"INVALID_PATTERN_REPLACEMENT",message:`"${r}" is not a valid substitution name in output option ${t} pattern.`}),Bt(i)||zt({code:"INVALID_PATTERN_REPLACEMENT",message:`Invalid replacement "${i}" for "${r}" in ${t} pattern, must be a plain path name.`}),i})}function hh(e,t){if(e in t==!1)return e;const n=ot(e);e=e.substr(0,e.length-n.length);let r,i=1;for(;t[r=e+ ++i+n];);return r}function uh(e){return e.replace(/[\0?*]/g,"_")}function ch(e,t,n,r){let i;return"function"==typeof t?i=t(e.id):t&&(i=t[e.id]),i||(r?(n.warn({code:"MISSING_GLOBAL_NAME",guess:e.variableName,message:`No name was provided for external module '${e.id}' in output.globals – guessing '${e.variableName}'`,source:e.id}),e.variableName):void 0)}function lh(e){return!e.isEmpty||e.entryModules.length>0||null!==e.manualChunkAlias}class ph{constructor(e,t){this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.hasDynamicImport=!1,this.id=void 0,this.indentString=void 0,this.manualChunkAlias=null,this.usedModules=void 0,this.dependencies=void 0,this.dynamicDependencies=void 0,this.exportNames=Object.create(null),this.exports=new Set,this.imports=new Set,this.needsExportsShim=!1,this.renderedDeclarations=void 0,this.renderedHash=void 0,this.renderedModuleSources=void 0,this.renderedSource=null,this.renderedSourceLength=void 0,this.sortedExportNames=null,this.graph=e,this.orderedModules=t,this.execIndex=t.length>0?t[0].execIndex:1/0,this.isEmpty=!0;for(const e of t)this.isEmpty&&e.isIncluded()&&(this.isEmpty=!1),e.manualChunkAlias&&(this.manualChunkAlias=e.manualChunkAlias),e.chunk=this,(e.isEntryPoint||e.dynamicallyImportedBy.some(e=>-1===t.indexOf(e)))&&this.entryModules.push(e);const n=this.entryModules[0];this.variableName=n?Je(it(n.chunkAlias||n.manualChunkAlias||Lt(n.id))):"__chunk_"+ ++e.curChunkIndex}generateEntryExportsOrMarkAsTainted(){const e=this.entryModules.map(e=>({map:this.getVariableExportNamesForModule(e),module:e}));for(const{map:t}of e)for(const e of t.keys())this.exports.add(e);e:for(const{map:t,module:n}of e){if(!this.graph.preserveModules){if(this.manualChunkAlias&&n.chunkAlias&&this.manualChunkAlias!==n.chunkAlias)continue e;for(const e of this.exports)if(!t.has(e))continue e}this.facadeModule=n;for(const[e,n]of t)for(const t of n)this.exportNames[t]=e;return}}generateId(e,t,n,r,i){this.id=hh(ah(e,t,e=>{switch(e){case"format":return"es"===r.format?"esm":r.format;case"hash":return this.computeContentHashWithDependencies(n,r);case"name":return this.getChunkName()}}),i)}generateIdPreserveModules(e,t){const n=uh(this.orderedModules[0].id);this.id=hh(rt(tt(this.orderedModules[0].id)?at(e,n):"_virtual/"+it(n)),t)}generateInternalExports(e){if(null!==this.facadeModule)return;const t="system"===e.format||"es"===e.format||e.compact;let n,r=0;if(this.exportNames=Object.create(null),this.sortedExportNames=null,t)for(const e of this.exports){do{49===(n=yn(++r)).charCodeAt(0)&&(n=yn(r+=9*Math.pow(64,n.length-1)))}while(At[n]);this.exportNames[n]=e}else for(const e of this.exports){for(r=0,n=e.name;this.exportNames[n];)n=e.name+"$"+ ++r;this.exportNames[n]=e}}getChunkName(){return this.chunkName||(this.chunkName=this.computeChunkName())}getDynamicImportIds(){return this.dynamicDependencies.map(e=>e.id).filter(Boolean)}getExportNames(){return this.sortedExportNames||(this.sortedExportNames=Object.keys(this.exportNames).sort())}getImportIds(){return this.dependencies.map(e=>e.id)}getRenderedHash(){if(this.renderedHash)return this.renderedHash;if(!this.renderedSource)return"";const e=C();return e.update(this.renderedSource.toString()),e.update(this.getExportNames().map(e=>{const t=this.exportNames[e];return`${Vt(t.module.id).replace(/\\/g,"/")}:${t.name}:${e}`}).join(",")),this.renderedHash=e.digest("hex")}getRenderedSourceLength(){return void 0!==this.renderedSourceLength?this.renderedSourceLength:this.renderedSourceLength=this.renderedSource.length()}getVariableExportName(e){if(this.graph.preserveModules&&e instanceof Pt)return"*";for(const t of Object.keys(this.exportNames))if(this.exportNames[t]===e)return t}link(){const e=new Set,t=new Set;for(const n of this.orderedModules)this.addChunksFromDependencies(n.getTransitiveDependencies(),e),this.addChunksFromDependencies(n.dynamicDependencies,t),this.setUpModuleImports(n);this.dependencies=Array.from(e),this.dynamicDependencies=Array.from(t)}merge(e,t,n,r){if(null!==this.facadeModule||null!==e.facadeModule)throw new Error("Internal error: Code splitting chunk merges not supported for facades");for(const t of e.orderedModules)t.chunk=this,this.orderedModules.push(t);for(const t of e.imports)this.imports.has(t)||t.module.chunk===this||this.imports.add(t);for(const t of e.exports)this.exports.has(t)||this.exports.add(t);const i=this.exportNames;this.generateInternalExports(n);const s=(e,t)=>{if(e.imports)for(const n of e.imports)n.imported=this.getVariableExportName(t[n.imported]);if(e.reexports)for(const n of e.reexports)n.imported=this.getVariableExportName(t[n.imported])},o=(e,t)=>{t.imports&&(e.imports?e.imports=e.imports.concat(t.imports):e.imports=t.imports),t.reexports&&(e.reexports?e.reexports=e.reexports.concat(t.reexports):e.reexports=t.reexports),!e.exportsNames&&t.exportsNames&&(e.exportsNames=!0),!e.exportsDefault&&t.exportsDefault&&(e.exportsDefault=!0),e.name=this.variableName};for(const n of t){let t;for(let r=0;r<n.dependencies.length;r++){const a=n.dependencies[r];if(a!==e&&a!==this||!t)a===e?(n.dependencies[r]=this,s(t=n.renderedDeclarations.dependencies[r],e.exportNames)):a===this&&s(t=n.renderedDeclarations.dependencies[r],i);else{const h=n.renderedDeclarations.dependencies[r];s(h,a===e?e.exportNames:i),o(t,h),n.renderedDeclarations.dependencies.splice(r,1),n.dependencies.splice(r--,1)}}}this.preRender(n,r)}preRender(e,t){Wa("render modules",3);const n=new K({separator:e.compact?"":"\n\n"});this.usedModules=[],this.indentString=e.compact?"":function(e,t){if(!0!==t.indent)return t.indent||"";for(let t=0;t<e.length;t++){const n=oh(e[t].originalCode);if(null!==n)return n}return"\t"}(this.orderedModules,e);const r=e.compact?"":"\n",i=e.compact?"":" ",s={compact:e.compact,dynamicImportFunction:e.dynamicImportFunction,format:e.format,freeze:!1!==e.freeze,indent:this.indentString,namespaceToStringTag:!0===e.namespaceToStringTag,varOrConst:e.preferConst?"const":"var"};for(const{module:e}of this.imports){const t=e instanceof Xa?e.chunk:e;-1===this.dependencies.indexOf(t)&&this.dependencies.push(t)}if(!this.graph.preserveModules&&null!==this.facadeModule)for(const e of this.dependencies)e instanceof ph&&this.inlineChunkDependencies(e,!0);for(let e=0;e<this.dependencies.length;e++){const t=this.dependencies[e];t instanceof ph&&t.isEmpty&&(this.dependencies.splice(e--,1),this.inlineChunkDependencies(t,!1))}ih(this.dependencies),this.setIdentifierRenderResolutions(e),this.prepareDynamicImports();let o="";this.renderedModules=Object.create(null),this.renderedModuleSources=[];for(let t=0;t<this.orderedModules.length;t++){const i=this.orderedModules[t],a=i.render(s);a.trim(),e.compact&&-1!==a.lastLine().indexOf("//")&&a.append("\n"),this.renderedModuleSources.push(a);const{renderedExports:h,removedExports:u}=i.getRenderedExports();this.renderedModules[i.id]={originalLength:i.originalCode.length,removedExports:u,renderedExports:h,renderedLength:a.length()};const c=i.getOrCreateNamespace();if((c.included||!a.isEmpty())&&(n.addSource(a),this.usedModules.push(i),c.included&&!this.graph.preserveModules)){const e=c.renderBlock(s);c.renderFirst()?o+=r+e:n.addSource(new G(e))}}o&&n.prepend(o+r+r),this.needsExportsShim&&n.prepend(`${r}${s.varOrConst} ${ft}${i}=${i}void 0;${r}${r}`),e.compact?this.renderedSource=n:this.renderedSource=n.trim(),this.renderedSourceLength=void 0,this.renderedHash=void 0,0===this.getExportNames().length&&0===this.getImportIds().length&&this.isEmpty&&this.graph.warn({code:"EMPTY_BUNDLE",message:"Generated an empty bundle"}),this.setExternalRenderPaths(e,t),this.renderedDeclarations={dependencies:this.getChunkDependencyDeclarations(e),exports:"none"===this.exportMode?[]:this.getChunkExportDeclarations()},Ua("render modules",3)}render(e,t,n){if(Wa("render format",3),!this.renderedSource)throw new Error("Internal error: Chunk render called before preRender");const r=rn[e.format];r||zt({code:"INVALID_OPTION",message:`Invalid format: ${e.format} - valid options are ${Object.keys(rn).join(", ")}.`}),e.dynamicImportFunction&&"es"!==e.format&&this.graph.warn({code:"INVALID_OPTION",message:'"output.dynamicImportFunction" is ignored for formats other than "esm".'});for(let e=0;e<this.dependencies.length;e++){const t=this.dependencies[e];if(t instanceof ut&&!t.renormalizeRenderPath)continue;const n=this.renderedDeclarations.dependencies[e],r=t instanceof ut?n.id:t.id;let i=this.id?rt(at(st(this.id),r)):r;i.startsWith("../")||(i="./"+i),t instanceof ph&&(n.namedExportsMode="default"!==t.exportMode),n.id=i}this.finaliseDynamicImports(e.format);const i=this.finaliseImportMetas(e),s=0!==this.renderedDeclarations.exports.length||this.renderedDeclarations.dependencies.some(e=>e.reexports&&0!==e.reexports.length),o=this.orderedModules.some(e=>e.usesTopLevelAwait);o&&"es"!==e.format&&"system"!==e.format&&zt({code:"INVALID_TLA_FORMAT",message:`Module format ${e.format} does not support top-level await. Use the "es" or "system" output formats rather.`});const a=r(this.renderedSource,{dependencies:this.renderedDeclarations.dependencies,dynamicImport:this.hasDynamicImport,exports:this.renderedDeclarations.exports,hasExports:s,indentString:this.indentString,intro:t.intro,isEntryModuleFacade:null!==this.facadeModule&&this.facadeModule.isEntryPoint,namedExportsMode:"default"!==this.exportMode,needsAmdModule:i,outro:t.outro,usesTopLevelAwait:o,varOrConst:e.preferConst?"const":"var",warn:this.graph.warn.bind(this.graph)},e);t.banner&&a.prepend(t.banner),t.footer&&a.append(t.footer);const h=a.toString();Ua("render format",3);let u=null;const c=[];return function({graph:e,chunk:t,renderChunk:n,code:r,sourcemapChain:i,options:s}){const o=(e,t,n)=>{if(null==t)return e;"string"==typeof t&&(t={code:t,map:void 0});const r="string"==typeof t.map?JSON.parse(t.map):t.map;return r&&"string"==typeof r.mappings&&(r.mappings=O(r.mappings)),null!==r&&i.push(r||{missing:!0,plugin:n.name}),t.code};let a=!1,h=!0;return e.pluginDriver.hookReduceArg0("renderChunk",[r,n,s],o).then(n=>(h=!1,e.pluginDriver.hookReduceArg0("transformChunk",[n,s,t],o))).then(n=>(a=!0,e.pluginDriver.hookReduceArg0("transformBundle",[n,s,t],o))).catch(e=>{if(h)throw e;zt(e,{code:a?"BAD_BUNDLE_TRANSFORMER":"BAD_CHUNK_TRANSFORMER",message:`Error transforming ${(a?"bundle":"chunk")+(e.plugin?` with '${e.plugin}' plugin`:"")}: ${e.message}`,plugin:e.plugin})})}({chunk:this,code:h,graph:this.graph,options:e,renderChunk:n,sourcemapChain:c}).then(t=>{if(e.sourcemap){let t;if(Wa("sourcemap",3),t=e.file?ht(e.sourcemapFile||e.file):e.dir?ht(e.dir,this.id):ht(this.id),this.graph.pluginDriver.hasLoadersOrTransforms){const n=a.generateDecodedMap({});u=function(e,t,n,r,i,s){function o(t,n){return n.missing&&(e.graph.warn({code:"SOURCEMAP_BROKEN",message:`Sourcemap is likely to be incorrect: a plugin${n.plugin?` ('${n.plugin}')`:""} was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:n.plugin,url:"https://rollupjs.org/guide/en#warning-sourcemap-is-likely-to-be-incorrect"}),n={mappings:"",names:[]}),new Ja(n,[t])}const a=r.filter(e=>!e.excludeFromSourcemap).map(e=>{let t,n=e.sourcemapChain;const r=e.originalSourcemap;if(r){const i=r.sources,s=r.sourcesContent||[];if(null==i||i.length<=1&&null==i[0])t=new Qa(e.id,s[0]),n=[r].concat(n);else{const n=st(e.id)||".",o=r.sourceRoot||".",a=i.map((e,t)=>new Qa(ht(n,o,e),s[t]));t=new Ja(r,a)}}else t=new Qa(e.id,e.originalCode);return t=n.reduce(o,t)});let h=new Ja(n,a);h=i.reduce(o,h);let{sources:u,sourcesContent:c,names:l,mappings:p}=h.traceMappings();if(t){const e=st(t);u=u.map(t=>at(e,t)),t=it(t)}return new L({file:t,sources:u,sourcesContent:c=s?null:c,names:l,mappings:p})}(this,t,n,this.usedModules,c,e.sourcemapExcludeSources)}else u=a.generateMap({file:t,includeContent:!e.sourcemapExcludeSources});u.sources=u.sources.map(t=>rt(e.sourcemapPathTransform?e.sourcemapPathTransform(t):t)),Ua("sourcemap",3)}return!0!==e.compact&&"\n"!==t[t.length-1]&&(t+="\n"),{code:t,map:u}})}turnIntoFacade(e){this.dependencies=[e.chunk],this.dynamicDependencies=[],this.facadeModule=e,e.facadeChunk=this;for(const t of e.getAllExports()){const n=e.getVariableForExportName(t);this.exports.add(n),this.exportNames[t]=n}}visitDependencies(e){const t=[this],n=new Set;for(const r of t)if(e(r),!(r instanceof ut))for(const e of r.dependencies.concat(r.dynamicDependencies))n.has(e)||(n.add(e),t.push(e))}visitStaticDependenciesUntilCondition(e){const t=new Set;return function n(r){if(!t.has(r)){if(t.add(r),r instanceof ph)for(const e of r.dependencies)if(n(e))return!0;return!0===e(r)}}(this)}addChunksFromDependencies(e,t){for(const n of e){if(n.chunk===this)continue;let e;if(n instanceof Xa)e=n.chunk;else{if(!n.used&&!n.moduleSideEffects)continue;e=n}t.add(e)}}computeChunkName(){if(this.manualChunkAlias)return uh(this.manualChunkAlias);if(null!==this.facadeModule)return uh(this.facadeModule.chunkAlias||Lt(this.facadeModule.id));for(const e of this.orderedModules)if(e.chunkAlias)return uh(e.chunkAlias);return"chunk"}computeContentHashWithDependencies(e,t){const n=C();return n.update([e.intro,e.outro,e.banner,e.footer].map(e=>e||"").join(":")),n.update(t.format),this.visitDependencies(e=>{e instanceof ut?n.update(":"+e.renderPath):n.update(e.getRenderedHash())}),n.digest("hex").substr(0,8)}finaliseDynamicImports(e){for(let t=0;t<this.orderedModules.length;t++){const n=this.orderedModules[t],r=this.renderedModuleSources[t];for(const{node:t,resolution:i}of n.dynamicImports)if(i)if(i instanceof Xa){if(i.chunk!==this&&lh(i.chunk)){const n=i.facadeChunk||i.chunk;let s=rt(at(st(this.id),n.id));s.startsWith("../")||(s="./"+s),t.renderFinalResolution(r,`'${s}'`,e)}}else if(i instanceof ut){let n=i.id;i.renormalizeRenderPath&&((n=rt(at(st(this.id),i.renderPath))).startsWith("../")||(n="./"+n)),t.renderFinalResolution(r,`'${n}'`,e)}else t.renderFinalResolution(r,i,e)}}finaliseImportMetas(e){let t=!1;for(let n=0;n<this.orderedModules.length;n++){const r=this.orderedModules[n],i=this.renderedModuleSources[n];for(const n of r.importMetas)n.renderFinalMechanism(i,this.id,e.format,this.graph.pluginDriver)&&(t=!0)}return t}getChunkDependencyDeclarations(e){const t=new Map;for(let e of this.getExportNames()){let n,r,i=!1;if("*"===e[0])n=this.graph.moduleById.get(e.substr(1)),r=e="*";else{const t=this.exportNames[e],s=t.module;if(!s||s.chunk===this)continue;s instanceof Xa?(n=s.chunk,r=s.chunk.getVariableExportName(t),i=t.isReassigned):(n=s,r=t.name,i=!0)}let s=t.get(n);s||t.set(n,s=[]),s.push({imported:r,reexported:e,needsLiveBinding:i})}const n=new Set,r=[];for(const i of this.dependencies){const s=[];for(const e of this.imports){const t=e instanceof dt&&e.referencesOriginal()?e.getOriginalVariable():e;if((e.module instanceof Xa?e.module.chunk===i:e.module===i)&&!n.has(t)){n.add(t);const r=e.getName(),i=e.module instanceof ut?e.name:e.module.chunk.getVariableExportName(e);s.push({local:r,imported:i})}}const o=t.get(i);let a,h,u,c,l=!0;i instanceof ut?(a=i.exportsNames||i.exportsNamespace,h="default"in i.declarations):(a=!0,h=!1,l="default"!==i.exportMode),i instanceof ut&&(u=i.renderPath,"umd"!==e.format&&"iife"!==e.format||(c=ch(i,e.globals,this.graph,a||h))),r.push({exportsDefault:h,exportsNames:a,globalName:c,id:u,imports:s.length>0?s:null,isChunk:!i.isExternal,name:i.variableName,namedExportsMode:l,reexports:o})}return r}getChunkExportDeclarations(){const e=[];for(const t of this.getExportNames()){if("*"===t[0])continue;const n=this.exportNames[t],r=n.module;if(r&&r.chunk!==this)continue;let i=!1,s=!1;n instanceof pt?(n.init===Ee&&(s=!0),n.declarations.forEach(e=>{e.type===Z?e.declaration.type===te&&(i=!0):e.parent.type===te&&(i=!0)})):n instanceof bt&&(i=!0);const o=n.getName();e.push({exported:"*"===t?o:t,hoisted:i,local:o,uninitialized:s})}return e}getVariableExportNamesForModule(e){const t=new Map;for(const n of e.getAllExports()){const r=e.getVariableForExportName(n);if(!r||!r.included&&!r.isExternal)continue;const i=t.get(r);i?i.push(n):t.set(r,[n]);const s=r.module;s&&s.chunk&&s.chunk!==this&&s.chunk.exports.add(r)}return t}inlineChunkDependencies(e,t){for(const n of e.dependencies)if(n instanceof ut)-1===this.dependencies.indexOf(n)&&this.dependencies.push(n);else{if(n===this||-1!==this.dependencies.indexOf(n))continue;n.isEmpty||this.dependencies.push(n),t&&this.inlineChunkDependencies(n,!0)}}prepareDynamicImports(){for(const e of this.orderedModules)for(const{node:t,resolution:n}of e.dynamicImports)if(n)if(n instanceof Xa)if(n.chunk===this){const e=n.getOrCreateNamespace();t.setResolution(!1,e.getName())}else t.setResolution(!1);else t.setResolution(!1)}setExternalRenderPaths(e,t){for(const n of this.dependencies.concat(this.dynamicDependencies))n instanceof ut&&n.setRenderPath(e,t)}setIdentifierRenderResolutions(e){for(const t of this.getExportNames()){const n=this.exportNames[t];n&&(n instanceof gt&&(this.needsExportsShim=!0),n.exportName=t,"es"===e.format||"system"===e.format||!n.isReassigned||n.isId||n.isDefault&&n.hasId?n.setRenderNames(null,null):n.setRenderNames("exports",t))}const t=Object.create(null);this.needsExportsShim&&(t[ft]=!0),eh(this.orderedModules,this.dependencies,this.imports,t,e.format,!1!==e.interop,this.graph.preserveModules)}setUpModuleImports(e){for(const t of e.imports)t.module.chunk!==this&&(this.imports.add(t),t.module instanceof Xa&&t.module.chunk.exports.add(t));if(e.getOrCreateNamespace().included)for(const t of Object.keys(e.reexports)){const n=e.reexports[t],r=n.module.getVariableForExportName(n.localName);r.module.chunk!==this&&(this.imports.add(r),r.module instanceof Xa&&r.module.chunk.exports.add(r))}for(const{node:t,resolution:n}of e.dynamicImports)t.included&&(this.hasDynamicImport=!0,n instanceof Xa&&n.chunk===this&&n.getOrCreateNamespace().include())}}var dh={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},fh="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",mh={5:fh,6:fh+" const class extends export import super"},gh=/^in(stanceof)?$/,yh="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-��ⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",xh="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",vh=new RegExp("["+yh+"]"),Eh=new RegExp("["+yh+xh+"]");yh=xh=null;var _h=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],bh=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function Ah(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}}function Sh(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&vh.test(String.fromCharCode(e)):!1!==t&&Ah(e,_h)))}function Ih(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Eh.test(String.fromCharCode(e)):!1!==t&&(Ah(e,_h)||Ah(e,bh)))))}var wh=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function Ph(e,t){return new wh(e,{beforeExpr:!0,binop:t})}var kh={beforeExpr:!0},Ch={startsExpr:!0},Nh={};function $h(e,t){return void 0===t&&(t={}),t.keyword=e,Nh[e]=new wh(e,t)}var Rh={num:new wh("num",Ch),regexp:new wh("regexp",Ch),string:new wh("string",Ch),name:new wh("name",Ch),eof:new wh("eof"),bracketL:new wh("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new wh("]"),braceL:new wh("{",{beforeExpr:!0,startsExpr:!0}),braceR:new wh("}"),parenL:new wh("(",{beforeExpr:!0,startsExpr:!0}),parenR:new wh(")"),comma:new wh(",",kh),semi:new wh(";",kh),colon:new wh(":",kh),dot:new wh("."),question:new wh("?",kh),arrow:new wh("=>",kh),template:new wh("template"),invalidTemplate:new wh("invalidTemplate"),ellipsis:new wh("...",kh),backQuote:new wh("`",Ch),dollarBraceL:new wh("${",{beforeExpr:!0,startsExpr:!0}),eq:new wh("=",{beforeExpr:!0,isAssign:!0}),assign:new wh("_=",{beforeExpr:!0,isAssign:!0}),incDec:new wh("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new wh("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Ph("||",1),logicalAND:Ph("&&",2),bitwiseOR:Ph("|",3),bitwiseXOR:Ph("^",4),bitwiseAND:Ph("&",5),equality:Ph("==/!=/===/!==",6),relational:Ph("</>/<=/>=",7),bitShift:Ph("<</>>/>>>",8),plusMin:new wh("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Ph("%",10),star:Ph("*",10),slash:Ph("/",10),starstar:new wh("**",{beforeExpr:!0}),_break:$h("break"),_case:$h("case",kh),_catch:$h("catch"),_continue:$h("continue"),_debugger:$h("debugger"),_default:$h("default",kh),_do:$h("do",{isLoop:!0,beforeExpr:!0}),_else:$h("else",kh),_finally:$h("finally"),_for:$h("for",{isLoop:!0}),_function:$h("function",Ch),_if:$h("if"),_return:$h("return",kh),_switch:$h("switch"),_throw:$h("throw",kh),_try:$h("try"),_var:$h("var"),_const:$h("const"),_while:$h("while",{isLoop:!0}),_with:$h("with"),_new:$h("new",{beforeExpr:!0,startsExpr:!0}),_this:$h("this",Ch),_super:$h("super",Ch),_class:$h("class",Ch),_extends:$h("extends",kh),_export:$h("export"),_import:$h("import"),_null:$h("null",Ch),_true:$h("true",Ch),_false:$h("false",Ch),_in:$h("in",{beforeExpr:!0,binop:7}),_instanceof:$h("instanceof",{beforeExpr:!0,binop:7}),_typeof:$h("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:$h("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:$h("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Oh=/\r\n?|\n|\u2028|\u2029/,Mh=new RegExp(Oh.source,"g");function Th(e,t){return 10===e||13===e||!t&&(8232===e||8233===e)}var Dh=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Lh=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Vh=Object.prototype,Bh=Vh.hasOwnProperty,zh=Vh.toString;function jh(e,t){return Bh.call(e,t)}var Wh=Array.isArray||function(e){return"[object Array]"===zh.call(e)};function Uh(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var Fh=function(e,t){this.line=e,this.column=t};Fh.prototype.offset=function(e){return new Fh(this.line,this.column+e)};var qh=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function Gh(e,t){for(var n=1,r=0;;){Mh.lastIndex=r;var i=Mh.exec(e);if(!(i&&i.index<t))return new Fh(n,t-r);++n,r=i.index+i[0].length}}var Hh={ecmaVersion:9,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function Kh(e){var t={};for(var n in Hh)t[n]=e&&jh(e,n)?e[n]:Hh[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),Wh(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return Wh(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,s,o,a){var h={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(h.loc=new qh(this,o,a)),e.ranges&&(h.range=[i,s]),t.push(h)}}(t,t.onComment)),t}var Yh=2,Xh=1|Yh,Qh=4,Jh=8;function Zh(e,t){return Yh|(e?Qh:0)|(t?Jh:0)}var eu=function(e,t,n){this.options=e=Kh(e),this.sourceFile=e.sourceFile,this.keywords=Uh(mh[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=dh[i]);i--);"module"===e.sourceType&&(r+=" await")}this.reservedWords=Uh(r);var s=(r?r+" ":"")+dh.strict;this.reservedWordsStrict=Uh(s),this.reservedWordsStrictBind=Uh(s+" "+dh.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Oh).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=Rh.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},tu={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};eu.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},tu.inFunction.get=function(){return(this.currentVarScope().flags&Yh)>0},tu.inGenerator.get=function(){return(this.currentVarScope().flags&Jh)>0},tu.inAsync.get=function(){return(this.currentVarScope().flags&Qh)>0},tu.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},tu.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},tu.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},eu.prototype.inNonArrowFunction=function(){return(this.currentThisScope().flags&Yh)>0},eu.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},eu.parse=function(e,t){return new this(t,e).parse()},eu.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},eu.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(eu.prototype,tu);var nu=eu.prototype,ru=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/;function iu(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}nu.strictDirective=function(e){for(;;){Lh.lastIndex=e,e+=Lh.exec(this.input)[0].length;var t=ru.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2]))return!0;e+=t[0].length,Lh.lastIndex=e,e+=Lh.exec(this.input)[0].length,";"===this.input[e]&&e++}},nu.eat=function(e){return this.type===e&&(this.next(),!0)},nu.isContextual=function(e){return this.type===Rh.name&&this.value===e&&!this.containsEsc},nu.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},nu.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},nu.canInsertSemicolon=function(){return this.type===Rh.eof||this.type===Rh.braceR||Oh.test(this.input.slice(this.lastTokEnd,this.start))},nu.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},nu.semicolon=function(){this.eat(Rh.semi)||this.insertSemicolon()||this.unexpected()},nu.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},nu.expect=function(e){this.eat(e)||this.unexpected()},nu.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},nu.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},nu.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},nu.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},nu.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var su=eu.prototype;su.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==Rh.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var s=i[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var ou={kind:"loop"},au={kind:"switch"};su.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Lh.lastIndex=this.pos;var t=Lh.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r)return!0;if(e)return!1;if(123===r)return!0;if(Sh(r,!0)){for(var i=n+1;Ih(this.input.charCodeAt(i),!0);)++i;var s=this.input.slice(n,i);if(!gh.test(s))return!0}return!1},su.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Lh.lastIndex=this.pos;var e=Lh.exec(this.input),t=this.pos+e[0].length;return!(Oh.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!==this.input.length&&Ih(this.input.charAt(t+8)))},su.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=Rh._var,r="let"),i){case Rh._break:case Rh._continue:return this.parseBreakContinueStatement(s,i.keyword);case Rh._debugger:return this.parseDebuggerStatement(s);case Rh._do:return this.parseDoStatement(s);case Rh._for:return this.parseForStatement(s);case Rh._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case Rh._class:return e&&this.unexpected(),this.parseClass(s,!0);case Rh._if:return this.parseIfStatement(s);case Rh._return:return this.parseReturnStatement(s);case Rh._switch:return this.parseSwitchStatement(s);case Rh._throw:return this.parseThrowStatement(s);case Rh._try:return this.parseTryStatement(s);case Rh._const:case Rh._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case Rh._while:return this.parseWhileStatement(s);case Rh._with:return this.parseWithStatement(s);case Rh.braceL:return this.parseBlock(!0,s);case Rh.semi:return this.parseEmptyStatement(s);case Rh._export:case Rh._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===Rh._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var o=this.value,a=this.parseExpression();return i===Rh.name&&"Identifier"===a.type&&this.eat(Rh.colon)?this.parseLabeledStatement(s,o,a,e):this.parseExpressionStatement(s,a)}},su.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(Rh.semi)||this.insertSemicolon()?e.label=null:this.type!==Rh.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},su.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},su.parseDoStatement=function(e){return this.next(),this.labels.push(ou),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(Rh._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(Rh.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},su.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ou),this.enterScope(0),this.expect(Rh.parenL),this.type===Rh.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===Rh._var||this.type===Rh._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),!(this.type===Rh._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==r.declarations.length||"var"!==i&&r.declarations[0].init?(t>-1&&this.unexpected(t),this.parseFor(e,r)):(this.options.ecmaVersion>=9&&(this.type===Rh._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r))}var s=new iu,o=this.parseExpression(!0,s);return this.type===Rh._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===Rh._in?t>-1&&this.unexpected(t):e.await=t>-1),this.toAssignable(o,!1,s),this.checkLVal(o),this.parseForIn(e,o)):(this.checkExpressionErrors(s,!0),t>-1&&this.unexpected(t),this.parseFor(e,o))},su.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,uu|(n?0:cu),!1,t)},su.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(Rh._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},su.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(Rh.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},su.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(Rh.braceL),this.labels.push(au),this.enterScope(0);for(var n=!1;this.type!==Rh.braceR;)if(this.type===Rh._case||this.type===Rh._default){var r=this.type===Rh._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(Rh.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},su.parseThrowStatement=function(e){return this.next(),Oh.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var hu=[];su.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===Rh._catch){var t=this.startNode();if(this.next(),this.eat(Rh.parenL)){t.param=this.parseBindingAtom();var n="Identifier"===t.param.type;this.enterScope(n?32:0),this.checkLVal(t.param,n?4:2),this.expect(Rh.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(Rh._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},su.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},su.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(ou),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},su.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},su.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},su.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i<s.length;i+=1){s[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var o=this.type.isLoop?"loop":this.type===Rh._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var h=this.labels[a];if(h.statementStart!==e.start)break;h.statementStart=this.start,h.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},su.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},su.parseBlock=function(e,t){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(Rh.braceL),e&&this.enterScope(0);!this.eat(Rh.braceR);){var n=this.parseStatement(null);t.body.push(n)}return e&&this.exitScope(),this.finishNode(t,"BlockStatement")},su.parseFor=function(e,t){return e.init=t,this.expect(Rh.semi),e.test=this.type===Rh.semi?null:this.parseExpression(),this.expect(Rh.semi),e.update=this.type===Rh.parenR?null:this.parseExpression(),this.expect(Rh.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},su.parseForIn=function(e,t){var n=this.type===Rh._in?"ForInStatement":"ForOfStatement";return this.next(),"ForInStatement"===n&&("AssignmentPattern"===t.type||"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(this.strict||"Identifier"!==t.declarations[0].id.type))&&this.raise(t.start,"Invalid assignment in for-in loop head"),e.left=t,e.right="ForInStatement"===n?this.parseExpression():this.parseMaybeAssign(),this.expect(Rh.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n)},su.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(Rh.eq)?r.init=this.parseMaybeAssign(t):"const"!==n||this.type===Rh._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===r.id.type||t&&(this.type===Rh._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(Rh.comma))break}return e},su.parseVarId=function(e,t){"const"!==t&&"let"!==t||!this.isContextual("let")||this.raiseRecoverable(this.start,"let is disallowed as a lexically bound name"),e.id=this.parseBindingAtom(),this.checkLVal(e.id,"var"===t?1:2,!1)};var uu=1,cu=2;su.parseFunction=function(e,t,n,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===Rh.star&&t&cu&&this.unexpected(),e.generator=this.eat(Rh.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&uu&&(e.id=4&t&&this.type!==Rh.name?null:this.parseIdent(),!e.id||t&cu||this.checkLVal(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Zh(e.async,e.generator)),t&uu||(e.id=this.type===Rh.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,t&uu?"FunctionDeclaration":"FunctionExpression")},su.parseFunctionParams=function(e){this.expect(Rh.parenL),e.params=this.parseBindingList(Rh.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},su.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),i=!1;for(r.body=[],this.expect(Rh.braceL);!this.eat(Rh.braceR);){var s=this.parseClassElement(null!==e.superClass);s&&(r.body.push(s),"MethodDefinition"===s.type&&"constructor"===s.kind&&(i&&this.raise(s.start,"Duplicate constructor in the same class"),i=!0))}return e.body=this.finishNode(r,"ClassBody"),this.strict=n,this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},su.parseClassElement=function(e){var t=this;if(this.eat(Rh.semi))return null;var n=this.startNode(),r=function(e,r){void 0===r&&(r=!1);var i=t.start,s=t.startLoc;return!!t.eatContextual(e)&&(!(t.type===Rh.parenL||r&&t.canInsertSemicolon())||(n.key&&t.unexpected(),n.computed=!1,n.key=t.startNodeAt(i,s),n.key.name=e,t.finishNode(n.key,"Identifier"),!1))};n.kind="method",n.static=r("static");var i=this.eat(Rh.star),s=!1;i||(this.options.ecmaVersion>=8&&r("async",!0)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(Rh.star)):r("get")?n.kind="get":r("set")&&(n.kind="set")),n.key||this.parsePropertyName(n);var o=n.key,a=!1;return n.computed||n.static||!("Identifier"===o.type&&"constructor"===o.name||"Literal"===o.type&&"constructor"===o.value)?n.static&&"Identifier"===o.type&&"prototype"===o.name&&this.raise(o.start,"Classes may not have a static property named prototype"):("method"!==n.kind&&this.raise(o.start,"Constructor can't have get/set modifier"),i&&this.raise(o.start,"Constructor can't be a generator"),s&&this.raise(o.start,"Constructor can't be an async method"),n.kind="constructor",a=e),this.parseClassMethod(n,i,s,a),"get"===n.kind&&0!==n.value.params.length&&this.raiseRecoverable(n.value.start,"getter should have no params"),"set"===n.kind&&1!==n.value.params.length&&this.raiseRecoverable(n.value.start,"setter should have exactly one param"),"set"===n.kind&&"RestElement"===n.value.params[0].type&&this.raiseRecoverable(n.value.params[0].start,"Setter cannot use rest params"),n},su.parseClassMethod=function(e,t,n,r){return e.value=this.parseMethod(t,n,r),this.finishNode(e,"MethodDefinition")},su.parseClassId=function(e,t){this.type===Rh.name?(e.id=this.parseIdent(),t&&this.checkLVal(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},su.parseClassSuper=function(e){e.superClass=this.eat(Rh._extends)?this.parseExprSubscripts():null},su.parseExport=function(e,t){if(this.next(),this.eat(Rh.star))return this.expectContextual("from"),this.type!==Rh.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(Rh._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===Rh._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,4|uu,!1,n)}else if(this.type===Rh._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==Rh.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,o=e.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local),this.checkLocalExport(a.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},su.checkExport=function(e,t,n){e&&(jh(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},su.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var o=0,a=t.elements;o<a.length;o+=1){var h=a[o];h&&this.checkPatternExport(e,h)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===n&&this.checkPatternExport(e,t.expression)},su.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},su.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},su.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(Rh.braceL);!this.eat(Rh.braceR);){if(n)n=!1;else if(this.expect(Rh.comma),this.afterTrailingComma(Rh.braceR))break;var r=this.startNode();r.local=this.parseIdent(!0),r.exported=this.eatContextual("as")?this.parseIdent(!0):r.local,this.checkExport(e,r.exported.name,r.exported.start),t.push(this.finishNode(r,"ExportSpecifier"))}return t},su.parseImport=function(e){return this.next(),this.type===Rh.string?(e.specifiers=hu,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===Rh.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},su.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===Rh.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,2),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(Rh.comma))return e}if(this.type===Rh.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLVal(r.local,2),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(Rh.braceL);!this.eat(Rh.braceR);){if(t)t=!1;else if(this.expect(Rh.comma),this.afterTrailingComma(Rh.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLVal(i.local,2),e.push(this.finishNode(i,"ImportSpecifier"))}return e},su.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},su.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var lu=eu.prototype;lu.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.toAssignable(s,t),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},lu.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},lu.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},lu.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==Rh.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},lu.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case Rh.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(Rh.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case Rh.braceL:return this.parseObj(!0)}return this.parseIdent()},lu.parseBindingList=function(e,t,n){for(var r=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(Rh.comma),t&&this.type===Rh.comma)r.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===Rh.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),r.push(s),this.type===Rh.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),r.push(o)}return r},lu.parseBindingListItem=function(e){return e},lu.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(Rh.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},lu.checkLVal=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(jh(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),0!==t&&5!==t&&this.declareName(e.name,t,e.start);break;case"MemberExpression":t&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.checkLVal(s,t,n)}break;case"Property":this.checkLVal(e.value,t,n);break;case"ArrayPattern":for(var o=0,a=e.elements;o<a.length;o+=1){var h=a[o];h&&this.checkLVal(h,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var pu=eu.prototype;pu.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===s&&(t.proto&&(n&&n.doubleProto<0?n.doubleProto=i.start:this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var o=t[r="$"+r];if(o)("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(i.start,"Redefinition of property");else o=t[r]={init:!1,get:!1,set:!1};o[s]=!0}}},pu.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===Rh.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(Rh.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},pu.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,s=-1,o=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,o=t.shorthandAssign,t.parenthesizedAssign=t.trailingComma=t.shorthandAssign=-1):(t=new iu,r=!0);var a=this.start,h=this.startLoc;this.type!==Rh.parenL&&this.type!==Rh.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,a,h)),this.type.isAssign){var c=this.startNodeAt(a,h);return c.operator=this.value,c.left=this.type===Rh.eq?this.toAssignable(u,!1,t):u,r||iu.call(t),t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),o>-1&&(t.shorthandAssign=o),u},pu.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(Rh.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(Rh.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},pu.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},pu.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==Rh._in)&&s>r){var o=this.type===Rh.logicalOR||this.type===Rh.logicalAND,a=this.value;this.next();var h=this.start,u=this.startLoc,c=this.parseExprOp(this.parseMaybeUnary(null,!1),h,u,s,i),l=this.buildBinary(t,n,e,c,a,o);return this.parseExprOp(l,t,n,r,i)}return e},pu.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},pu.parseMaybeUnary=function(e,t){var n,r=this.start,i=this.startLoc;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))n=this.parseAwait(),t=!0;else if(this.type.prefix){var s=this.startNode(),o=this.type===Rh.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(s,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var a=this.startNodeAt(r,i);a.operator=this.value,a.prefix=!1,a.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(a,"UpdateExpression")}}return!t&&this.eat(Rh.starstar)?this.buildBinary(r,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},pu.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},pu.parseSubscripts=function(e,t,n,r){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(e.start,e.end);;){var s=this.parseSubscript(e,t,n,r,i);if(s===e||"ArrowFunctionExpression"===s.type)return s;e=s}},pu.parseSubscript=function(e,t,n,r,i){var s=this.eat(Rh.bracketL);if(s||this.eat(Rh.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=s?this.parseExpression():this.parseIdent(!0),o.computed=!!s,s&&this.expect(Rh.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!r&&this.eat(Rh.parenL)){var a=new iu,h=this.yieldPos,u=this.awaitPos,c=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var l=this.parseExprList(Rh.parenR,this.options.ecmaVersion>=8,!1,a);if(i&&!this.canInsertSemicolon()&&this.eat(Rh.arrow))return this.checkPatternErrors(a,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=u,this.awaitIdentPos=c,this.parseArrowExpression(this.startNodeAt(t,n),l,!0);this.checkExpressionErrors(a,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=u||this.awaitPos,this.awaitIdentPos=c||this.awaitIdentPos;var p=this.startNodeAt(t,n);p.callee=e,p.arguments=l,e=this.finishNode(p,"CallExpression")}else if(this.type===Rh.backQuote){var d=this.startNodeAt(t,n);d.tag=e,d.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(d,"TaggedTemplateExpression")}return e},pu.parseExprAtom=function(e){this.type===Rh.slash&&this.readRegexp();var t,n=this.potentialArrowAt===this.start;switch(this.type){case Rh._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),t=this.startNode(),this.next(),this.type!==Rh.parenL||this.allowDirectSuper||this.raise(t.start,"super() call outside constructor of a subclass"),this.type!==Rh.dot&&this.type!==Rh.bracketL&&this.type!==Rh.parenL&&this.unexpected(),this.finishNode(t,"Super");case Rh._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case Rh.name:var r=this.start,i=this.startLoc,s=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(Rh._function))return this.parseFunction(this.startNodeAt(r,i),0,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(Rh.arrow))return this.parseArrowExpression(this.startNodeAt(r,i),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===Rh.name&&!s)return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(Rh.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,i),[o],!0)}return o;case Rh.regexp:var a=this.value;return(t=this.parseLiteral(a.value)).regex={pattern:a.pattern,flags:a.flags},t;case Rh.num:case Rh.string:return this.parseLiteral(this.value);case Rh._null:case Rh._true:case Rh._false:return(t=this.startNode()).value=this.type===Rh._null?null:this.type===Rh._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case Rh.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case Rh.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(Rh.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case Rh.braceL:return this.parseObj(!1,e);case Rh._function:return t=this.startNode(),this.next(),this.parseFunction(t,0);case Rh._class:return this.parseClass(this.startNode(),!1);case Rh._new:return this.parseNew();case Rh.backQuote:return this.parseTemplate();default:this.unexpected()}},pu.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},pu.parseParenExpression=function(){this.expect(Rh.parenL);var e=this.parseExpression();return this.expect(Rh.parenR),e},pu.parseParenAndDistinguishExpression=function(e){var t,n=this.start,r=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o=this.start,a=this.startLoc,h=[],u=!0,c=!1,l=new iu,p=this.yieldPos,d=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==Rh.parenR;){if(u?u=!1:this.expect(Rh.comma),i&&this.afterTrailingComma(Rh.parenR,!0)){c=!0;break}if(this.type===Rh.ellipsis){s=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===Rh.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}h.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var f=this.start,m=this.startLoc;if(this.expect(Rh.parenR),e&&!this.canInsertSemicolon()&&this.eat(Rh.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=d,this.parseParenArrowList(n,r,h);h.length&&!c||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(l,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=d||this.awaitPos,h.length>1?((t=this.startNodeAt(o,a)).expressions=h,this.finishNodeAt(t,"SequenceExpression",f,m)):t=h[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var g=this.startNodeAt(n,r);return g.expression=t,this.finishNode(g,"ParenthesizedExpression")}return t},pu.parseParenItem=function(e){return e},pu.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var du=[];pu.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(Rh.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),("target"!==e.property.name||n)&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inNonArrowFunction()||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),r,i,!0),this.eat(Rh.parenL)?e.arguments=this.parseExprList(Rh.parenR,this.options.ecmaVersion>=8,!1):e.arguments=du,this.finishNode(e,"NewExpression")},pu.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===Rh.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===Rh.backQuote,this.finishNode(n,"TemplateElement")},pu.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===Rh.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(Rh.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(Rh.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},pu.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===Rh.name||this.type===Rh.num||this.type===Rh.string||this.type===Rh.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===Rh.star)&&!Oh.test(this.input.slice(this.lastTokEnd,this.start))},pu.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(Rh.braceR);){if(r)r=!1;else if(this.expect(Rh.comma),this.afterTrailingComma(Rh.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},pu.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(Rh.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===Rh.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(this.type===Rh.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),o.argument=this.parseMaybeAssign(!1,t),this.type===Rh.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(Rh.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(Rh.star),this.parsePropertyName(o,t)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t,a),this.finishNode(o,"Property")},pu.parsePropertyValue=function(e,t,n,r,i,s,o,a){if((n||r)&&this.type===Rh.colon&&this.unexpected(),this.eat(Rh.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===Rh.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===Rh.comma||this.type===Rh.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===Rh.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var h="get"===e.kind?0:1;if(e.value.params.length!==h){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},pu.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(Rh.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(Rh.bracketR),e.key;e.computed=!1}return e.key=this.type===Rh.num||this.type===Rh.string?this.parseExprAtom():this.parseIdent(!0)},pu.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},pu.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Zh(t,r.generator)|(n?128:0)),this.expect(Rh.parenL),r.params=this.parseBindingList(Rh.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},pu.parseArrowExpression=function(e,t,n){var r=this.yieldPos,i=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(16|Zh(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1),this.yieldPos=r,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")},pu.parseFunctionBody=function(e,t,n){var r=t&&this.type!==Rh.braceL,i=this.strict,s=!1;if(r)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var a=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!i&&!s&&!t&&!n&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=a}this.exitScope(),this.strict&&e.id&&this.checkLVal(e.id,5),this.strict=i},pu.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){if("Identifier"!==n[t].type)return!1}return!0},pu.checkParams=function(e,t){for(var n={},r=0,i=e.params;r<i.length;r+=1){var s=i[r];this.checkLVal(s,1,t?null:n)}},pu.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(Rh.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===Rh.comma?o=null:this.type===Rh.ellipsis?(o=this.parseSpread(r),r&&this.type===Rh.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},pu.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;(this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},pu.parseIdent=function(e,t){var n=this.startNode();return e&&"never"===this.options.allowReserved&&(e=!1),this.type===Rh.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(),this.finishNode(n,"Identifier"),e||(this.checkUnreserved(n),"await"!==n.name||this.awaitIdentPos||(this.awaitIdentPos=n.start)),n},pu.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===Rh.semi||this.canInsertSemicolon()||this.type!==Rh.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(Rh.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},pu.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var fu=eu.prototype;fu.raise=function(e,t){var n=Gh(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},fu.raiseRecoverable=fu.raise,fu.curPosition=function(){if(this.options.locations)return new Fh(this.curLine,this.pos-this.lineStart)};var mu=eu.prototype,gu=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};mu.enterScope=function(e){this.scopeStack.push(new gu(e))},mu.exitScope=function(){this.scopeStack.pop()},mu.treatFunctionsAsVarInScope=function(e){return e.flags&Yh||!this.inModule&&1&e.flags},mu.declareName=function(e,t,n){var r=!1;if(2===t){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){r=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],a.flags&Xh)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},mu.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},mu.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},mu.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Xh)return t}},mu.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Xh&&!(16&t.flags))return t}};var yu=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new qh(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},xu=eu.prototype;function vu(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}xu.startNode=function(){return new yu(this,this.start,this.startLoc)},xu.startNodeAt=function(e,t){return new yu(this,e,t)},xu.finishNode=function(e,t){return vu.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},xu.finishNodeAt=function(e,t,n,r){return vu.call(this,e,t,n,r)};var Eu=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},_u={b_stat:new Eu("{",!1),b_expr:new Eu("{",!0),b_tmpl:new Eu("${",!1),p_stat:new Eu("(",!1),p_expr:new Eu("(",!0),q_tmpl:new Eu("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Eu("function",!1),f_expr:new Eu("function",!0),f_expr_gen:new Eu("function",!0,!1,null,!0),f_gen:new Eu("function",!1,!1,null,!0)},bu=eu.prototype;bu.initialContext=function(){return[_u.b_stat]},bu.braceIsBlock=function(e){var t=this.curContext();return t===_u.f_expr||t===_u.f_stat||(e!==Rh.colon||t!==_u.b_stat&&t!==_u.b_expr?e===Rh._return||e===Rh.name&&this.exprAllowed?Oh.test(this.input.slice(this.lastTokEnd,this.start)):e===Rh._else||e===Rh.semi||e===Rh.eof||e===Rh.parenR||e===Rh.arrow||(e===Rh.braceL?t===_u.b_stat:e!==Rh._var&&e!==Rh._const&&e!==Rh.name&&!this.exprAllowed):!t.isExpr)},bu.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},bu.updateContext=function(e){var t,n=this.type;n.keyword&&e===Rh.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},Rh.parenR.updateContext=Rh.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===_u.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},Rh.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?_u.b_stat:_u.b_expr),this.exprAllowed=!0},Rh.dollarBraceL.updateContext=function(){this.context.push(_u.b_tmpl),this.exprAllowed=!0},Rh.parenL.updateContext=function(e){var t=e===Rh._if||e===Rh._for||e===Rh._with||e===Rh._while;this.context.push(t?_u.p_stat:_u.p_expr),this.exprAllowed=!0},Rh.incDec.updateContext=function(){},Rh._function.updateContext=Rh._class.updateContext=function(e){!e.beforeExpr||e===Rh.semi||e===Rh._else||e===Rh._return&&Oh.test(this.input.slice(this.lastTokEnd,this.start))||(e===Rh.colon||e===Rh.braceL)&&this.curContext()===_u.b_stat?this.context.push(_u.f_stat):this.context.push(_u.f_expr),this.exprAllowed=!1},Rh.backQuote.updateContext=function(){this.curContext()===_u.q_tmpl?this.context.pop():this.context.push(_u.q_tmpl),this.exprAllowed=!1},Rh.star.updateContext=function(e){if(e===Rh._function){var t=this.context.length-1;this.context[t]===_u.f_expr?this.context[t]=_u.f_expr_gen:this.context[t]=_u.f_gen}this.exprAllowed=!0},Rh.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==Rh.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var Au="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Su={9:Au,10:Au+" Extended_Pictographic"},Iu="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",wu="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Pu={9:wu,10:wu+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"},ku={};function Cu(e){var t=ku[e]={binary:Uh(Su[e]+" "+Iu),nonBinary:{General_Category:Uh(Iu),Script:Uh(Pu[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}Cu(9),Cu(10);var Nu=eu.prototype,$u=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":""),this.unicodeProperties=ku[e.options.ecmaVersion>=10?10:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function Ru(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function Ou(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Mu(e){return e>=65&&e<=90||e>=97&&e<=122}function Tu(e){return Mu(e)||95===e}function Du(e){return Tu(e)||Lu(e)}function Lu(e){return e>=48&&e<=57}function Vu(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Bu(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function zu(e){return e>=48&&e<=55}$u.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchN=r&&this.parser.options.ecmaVersion>=9},$u.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},$u.prototype.at=function(e){var t=this.source,n=t.length;if(e>=n)return-1;var r=t.charCodeAt(e);return!this.switchU||r<=55295||r>=57344||e+1>=n?r:(r<<10)+t.charCodeAt(e+1)-56613888},$u.prototype.nextIndex=function(e){var t=this.source,n=t.length;if(e>=n)return n;var r=t.charCodeAt(e);return!this.switchU||r<=55295||r>=57344||e+1>=n?e+1:e+2},$u.prototype.current=function(){return this.at(this.pos)},$u.prototype.lookahead=function(){return this.at(this.nextIndex(this.pos))},$u.prototype.advance=function(){this.pos=this.nextIndex(this.pos)},$u.prototype.eat=function(e){return this.current()===e&&(this.advance(),!0)},Nu.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=0;r<n.length;r++){var i=n.charAt(r);-1===t.indexOf(i)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(i,r+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},Nu.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},Nu.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];-1===e.groupNames.indexOf(r)&&e.raise("Invalid named capture referenced")}},Nu.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},Nu.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Nu.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!(e.switchU?!this.regexp_eatAtom(e):!this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},Nu.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Nu.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Nu.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Nu.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},Nu.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Nu.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Nu.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},Nu.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Nu.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Nu.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Nu.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!Ou(t)&&(e.lastIntValue=t,e.advance(),!0)},Nu.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!Ou(n);)e.advance();return e.pos!==t},Nu.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},Nu.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},Nu.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Nu.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Ru(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Ru(e.lastIntValue);return!0}return!1},Nu.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return Sh(e,!0)||36===e||95===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},Nu.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return Ih(e,!0)||36===e||95===e||8204===e||8205===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},Nu.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Nu.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Nu.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Nu.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Nu.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Nu.regexp_eatZero=function(e){return 48===e.current()&&!Lu(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Nu.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Nu.regexp_eatControlLetter=function(e){var t=e.current();return!!Mu(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Nu.regexp_eatRegExpUnicodeEscapeSequence=function(e){var t,n=e.pos;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(e.switchU&&r>=55296&&r<=56319){var i=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=1024*(r-55296)+(s-56320)+65536,!0}e.pos=i,e.lastIntValue=r}return!0}if(e.switchU&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((t=e.lastIntValue)>=0&&t<=1114111))return!0;e.switchU&&e.raise("Invalid unicode escape"),e.pos=n}return!1},Nu.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},Nu.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},Nu.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},Nu.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i),!0}return!1},Nu.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){jh(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},Nu.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},Nu.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Tu(t=e.current());)e.lastStringValue+=Ru(t),e.advance();return""!==e.lastStringValue},Nu.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Du(t=e.current());)e.lastStringValue+=Ru(t),e.advance();return""!==e.lastStringValue},Nu.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Nu.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},Nu.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},Nu.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||zu(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},Nu.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Nu.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Lu(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},Nu.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Nu.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Lu(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},Nu.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Vu(n=e.current());)e.lastIntValue=16*e.lastIntValue+Bu(n),e.advance();return e.pos!==t},Nu.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},Nu.regexp_eatOctalDigit=function(e){var t=e.current();return zu(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Nu.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Vu(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Bu(i),e.advance()}return!0};var ju=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new qh(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Wu=eu.prototype;function Uu(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Wu.next=function(){this.options.onToken&&this.options.onToken(new ju(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Wu.getToken=function(){return this.next(),new ju(this)},"undefined"!=typeof Symbol&&(Wu[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===Rh.eof,value:t}}}}),Wu.curContext=function(){return this.context[this.context.length-1]},Wu.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(Rh.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Wu.readToken=function(e){return Sh(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Wu.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},Wu.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(-1===r&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(Mh.lastIndex=n;(e=Mh.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,r),n,this.pos,t,this.curPosition())},Wu.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Th(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Wu.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&Dh.test(String.fromCharCode(e))))break e;++this.pos}}},Wu.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Wu.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(Rh.ellipsis)):(++this.pos,this.finishToken(Rh.dot))},Wu.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(Rh.assign,2):this.finishOp(Rh.slash,1)},Wu.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?Rh.star:Rh.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=Rh.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(Rh.assign,n+1):this.finishOp(r,n)},Wu.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?Rh.logicalOR:Rh.logicalAND,2):61===t?this.finishOp(Rh.assign,2):this.finishOp(124===e?Rh.bitwiseOR:Rh.bitwiseAND,1)},Wu.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(Rh.assign,2):this.finishOp(Rh.bitwiseXOR,1)},Wu.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!Oh.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(Rh.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(Rh.assign,2):this.finishOp(Rh.plusMin,1)},Wu.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(Rh.assign,n+1):this.finishOp(Rh.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(Rh.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Wu.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(Rh.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(Rh.arrow)):this.finishOp(61===e?Rh.eq:Rh.prefix,1)},Wu.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(Rh.parenL);case 41:return++this.pos,this.finishToken(Rh.parenR);case 59:return++this.pos,this.finishToken(Rh.semi);case 44:return++this.pos,this.finishToken(Rh.comma);case 91:return++this.pos,this.finishToken(Rh.bracketL);case 93:return++this.pos,this.finishToken(Rh.bracketR);case 123:return++this.pos,this.finishToken(Rh.braceL);case 125:return++this.pos,this.finishToken(Rh.braceR);case 58:return++this.pos,this.finishToken(Rh.colon);case 63:return++this.pos,this.finishToken(Rh.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(Rh.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(Rh.prefix,1)}this.raise(this.pos,"Unexpected character '"+Uu(e)+"'")},Wu.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Wu.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Oh.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new $u(this));a.reset(n,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var h=null;try{h=new RegExp(i,o)}catch(e){}return this.finishToken(Rh.regexp,{pattern:i,flags:o,value:h})},Wu.readInt=function(e,t){for(var n=this.pos,r=0,i=0,s=null==t?1/0:t;i<s;++i){var o=this.input.charCodeAt(this.pos),a=void 0;if((a=o>=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=e)break;++this.pos,r=r*e+a}return this.pos===n||null!=t&&this.pos-n!==t?null:r},Wu.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),Sh(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Rh.num,t)},Wu.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number"),n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1);var r=this.input.charCodeAt(this.pos);46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),Sh(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var i=this.input.slice(t,this.pos),s=n?parseInt(i,8):parseFloat(i);return this.finishToken(Rh.num,s)},Wu.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Wu.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(Th(r,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(Rh.string,t)};var Fu={};Wu.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Fu)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Wu.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Fu;this.raise(e,t)},Wu.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==Rh.template&&this.type!==Rh.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(Rh.template,e)):36===n?(this.pos+=2,this.finishToken(Rh.dollarBraceL)):(++this.pos,this.finishToken(Rh.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Th(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Wu.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(Rh.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Wu.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Uu(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),"0"===n&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Th(t)?"":String.fromCharCode(t)}},Wu.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Wu.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(Ih(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?Sh:Ih)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=Uu(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},Wu.readWord=function(){var e=this.readWord1(),t=Rh.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=Nh[e]),this.finishToken(t,e)};var qu=function(e){return e&&e.default||e}(Object.freeze({version:"6.1.1",parse:function(e,t){return eu.parse(e,t)},parseExpressionAt:function(e,t,n){return eu.parseExpressionAt(e,t,n)},tokenizer:function(e,t){return eu.tokenizer(e,t)},Parser:eu,defaultOptions:Hh,Position:Fh,SourceLocation:qh,getLineInfo:Gh,Node:yu,TokenType:wh,tokTypes:Rh,keywordTypes:Nh,TokContext:Eu,tokContexts:_u,isIdentifierChar:Ih,isIdentifierStart:Sh,Token:ju,isNewLine:Th,lineBreak:Oh,lineBreakG:Mh,nonASCIIwhitespace:Dh}));const Gu=qu.tokTypes,Hu=qu.isIdentifierStart;var Ku=function(e){return class extends e{parseLiteral(e){const t=super.parseLiteral(e);return 110==t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=this.getNumberInput(t.start,t.end)),t}readRadixNumber(e){let t=this.pos;this.pos+=2;let n=this.readInt(e);if(null===n&&this.raise(this.start+2,`Expected number in radix ${e}`),110==this.input.charCodeAt(this.pos)){let e=this.getNumberInput(t,this.pos);n="undefined"!=typeof BigInt?BigInt(e):null,++this.pos}else Hu(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");return this.finishToken(Gu.num,n)}readNumber(e){let t=this.pos;if(e)return super.readNumber(e);if(48===this.input.charCodeAt(t)&&110!==this.input.charCodeAt(t+1))return super.readNumber(e);if(null===this.readInt(10)&&this.raise(t,"Invalid number"),110!=this.input.charCodeAt(this.pos))return this.pos=t,super.readNumber(e);let n=this.getNumberInput(t,this.pos),r="undefined"!=typeof BigInt?BigInt(n):null;return++this.pos,this.finishToken(Gu.num,r)}getNumberInput(e,t){return super.getNumberInput?super.getNumberInput(e,t):this.input.slice(e,t)}}};const Yu="Import";function Xu(e){return class extends e{parseStatement(e,t,n){return this.type===Rh._import&&function(){return/^(\s|\/\/.*|\/\*[^]*?\*\/)*\(/.test(this.input.slice(this.pos))}.call(this)?this.parseExpressionStatement(this.startNode(),this.parseExpression()):super.parseStatement(e,t,n)}parseExprAtom(e){return this.type===Rh._import?function(){const e=this.startNode();return this.next(),this.type!==Rh.parenL&&this.unexpected(),this.finishNode(e,Yu)}.call(this):super.parseExprAtom(e)}}}Rh._import.startsExpr=!0;const Qu=qu.tokTypes,Ju=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Zu=e=>{Ju.lastIndex=e.pos;let t=Ju.exec(e.input),n=e.pos+t[0].length;return"."===e.input.slice(n,n+1)};var ec=function(e){return class extends e{parseExprAtom(e){if(this.type!==Qu._import||!Zu(this))return super.parseExprAtom(e);this.options.allowImportExportEverywhere||this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'");let t=this.startNode();return t.meta=this.parseIdent(!0),this.expect(Qu.dot),t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is import.meta"),this.containsEsc&&this.raiseRecoverable(t.property.start,'"meta" in import.meta must not contain escape sequences'),this.finishNode(t,"MetaProperty")}parseStatement(e,t,n){if(this.type!==Qu._import||!Zu(this))return super.parseStatement(e,t,n);let r=this.startNode(),i=this.parseExpression();return this.parseExpressionStatement(r,i)}}};class tc extends qe{constructor(){super("undefined")}getLiteralValueAtPath(){}}class nc extends vn{constructor(){super(),this.variables.undefined=new tc}findVariable(e){return this.variables[e]?this.variables[e]:this.variables[e]=new bt(e)}}const rc=()=>({paths:Object.create(null),tracked:!1,unknownPath:null});class ic{constructor(){this.entityPaths=new Map}track(e,t){let n=this.entityPaths.get(e);n||(n=rc(),this.entityPaths.set(e,n));let r,i=0;for(;i<t.length;){const e=t[i];"string"==typeof e?(r=n.paths[e])||(r=rc(),n.paths[e]=r):(r=n.unknownPath)||(r=rc(),n.unknownPath=r),n=r,i++}const s=n.tracked;return n.tracked=!0,s}}function sc(e,t,n){let r;do{const e=C();r?e.update(r):e.update(n),r=e.digest("hex").substr(0,8)}while(t.has(r));return t.set(r,e),r}function oc(e,t,n){return void 0===e.source&&zt(function(e){return{code:Wt.ASSET_SOURCE_MISSING,message:`Plugin error creating asset "${e.name}" - no asset source set.`}}(e)),e.fileName?e.fileName:hh(ah(n,"assetFileNames",t=>{switch(t){case"hash":const n=C();return n.update(t),n.update(":"),n.update(e.source),n.digest("hex").substr(0,8);case"name":return e.name.substr(0,e.name.length-ot(e.name).length);case"extname":return ot(e.name);case"ext":return ot(e.name).substr(1)}}),t)}function ac(e,t,n){return{emitAsset(r,i){"string"==typeof r&&Bt(r)||zt(function(e){return{code:Wt.INVALID_ASSET_NAME,message:`Plugin error creating asset, name "${e}" is not a plain (non relative or absolute URL) string name.`}}(r));const s={name:r,source:i,fileName:void 0};return t&&void 0!==i&&hc(s,t,n),sc(s,e,r)},setAssetSource(r,i){const s=e.get(r);s||zt(function(e){return{code:Wt.ASSET_NOT_FOUND,message:`Plugin error - Unable to set the source for unknown asset "${e}".`}}(r)),void 0!==s.source&&zt(function(e){return{code:Wt.ASSET_SOURCE_ALREADY_SET,message:`Plugin error - Unable to set the source for asset "${e.name}", source already set.`}}(s)),"string"==typeof i||i||zt(function(e){return{code:Wt.ASSET_SOURCE_MISSING,message:`Plugin error creating asset "${e.name}", setAssetSource call without a source.`}}(s)),s.source=i,t&&hc(s,t,n)},getAssetFileName(t){const n=e.get(t);return n||zt(function(e){return{code:Wt.ASSET_NOT_FOUND,message:`Plugin error - Unable to get file name for unknown asset "${e}".`}}(t)),void 0===n.fileName&&zt(function(e){return{code:Wt.ASSET_NOT_FINALISED,message:`Plugin error - Unable to get file name for asset "${e.name}". Ensure that the source is set and that generate is called first.`}}(n)),n.fileName}}}function hc(e,t,n){const r=oc(e,t,n);e.fileName=r,t[r]={fileName:r,isAsset:!0,source:e.source}}var uc;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(uc||(uc={}));const cc=e=>(...t)=>{throw new Error(`Cannot use fs.${e} inside browser`)},lc=cc("lstatSync"),pc=cc("readdirSync"),dc=cc("readFileSync"),fc=cc("realpathSync"),mc=cc("writeFile");function gc(e,t){try{const n=lc(e);if(!t&&n.isSymbolicLink())return gc(fc(e),t);if(t&&n.isSymbolicLink()||n.isFile()){const t=it(e);if(-1!==pc(st(e)).indexOf(t))return e}}catch(e){}}function yc(e){return function(t,n){return"undefined"==typeof process&&zt({code:"MISSING_PROCESS",message:"It looks like you're using Rollup in a non-Node.js environment. This means you must supply a plugin with custom resolveId and load functions",url:"https://rollupjs.org/guide/en#a-simple-example"}),void 0===n||tt(t)||"."===t[0]?function(e,t){let n=gc(e,t);return n||((n=gc(e+".mjs",t))?n:n=gc(e+".js",t))}(ht(n?st(n):ht(),t),e):null}}const xc=(e,t="URL")=>`new ${t}(${e}).href`,vc=e=>`(document.currentScript && document.currentScript.src || new URL('${e}', document.baseURI).href)`,Ec=e=>(t,n)=>{const r=e(n);return null===t?`({ url: ${r} })`:"url"===t?r:"undefined"},_c={amd:Ec(()=>xc("module.uri, document.baseURI")),cjs:Ec(e=>`(typeof document === 'undefined' ? ${xc("'file:' + __filename","(require('u' + 'rl').URL)")} : ${vc(e)})`),iife:Ec(e=>vc(e)),system:e=>null===e?"module.meta":`module.meta.${e}`,umd:Ec(e=>`(typeof document === 'undefined' ? ${xc("'file:' + __filename","(require('u' + 'rl').URL)")} : ${vc(e)})`)},bc=e=>xc(`(document.currentScript && document.currentScript.src || document.baseURI) + '/../${e}'`),Ac={amd:e=>xc(`module.uri + '/../${e}', document.baseURI`),cjs:e=>`(typeof document === 'undefined' ? ${xc(`'file:' + __dirname + '/${e}'`,"(require('u' + 'rl').URL)")} : ${bc(e)})`,es:e=>xc(`'${e}', import.meta.url`),iife:e=>bc(e),system:e=>xc(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' ? ${xc(`'file:' + __dirname + '/${e}'`,"(require('u' + 'rl').URL)")} : ${bc(e)})`},Sc={ongenerate:"generateBundle",onwrite:"generateBundle",transformBundle:"renderChunk",transformChunk:"renderChunk"};function Ic(e,n,r,i){const s=[...n.plugins||[],(o=n.preserveSymlinks,{name:"Rollup Core",resolveId:yc(o),load:e=>dc(e,"utf-8"),resolveFileUrl:({relativePath:e,format:t})=>Ac[t](e),resolveImportMeta(e,{chunkId:t,format:n}){const r=_c[n]&&_c[n](e,t);if(r)return r}})];var o;const{emitAsset:a,getAssetFileName:h,setAssetSource:u}=ac(e.assetsById),c={};let l=!1;const p=s.map((n,s)=>{let o,p=!0;if("string"!=typeof n.cacheKey&&("string"!=typeof n.name||c[n.name]?p=!1:c[n.name]=!0),!l&&(n.load||n.transform||n.transformBundle||n.transformChunk)&&(l=!0),r)if(p){const e=n.cacheKey||n.name;o=function(e){return{has(t){const n=e[t];return!!n&&(n[0]=0,!0)},get(t){const n=e[t];if(n)return n[0]=0,n[1]},set(t,n){e[t]=[0,n]},delete:t=>delete e[t]}}(r[e]||(r[e]=Object.create(null)))}else o=kc(n.name);else o=wc;let d=!1;function f(e,t){return d||(m.warn({code:"PLUGIN_WATCHER_DEPRECATED",message:"this.watcher usage is deprecated in plugins. Use the watchChange plugin hook and this.addWatchFile() instead."}),d=!0),i.on(e,t)}const m={addWatchFile(t){e.phase>=uc.GENERATE&&this.error({code:Wt.INVALID_ROLLUP_PHASE,message:"Cannot call addWatchFile after the build has finished."}),e.watchFiles[t]=!0},cache:o,emitAsset:a,emitChunk(t,n){return e.phase>uc.LOAD_AND_PARSE&&this.error({code:Wt.INVALID_ROLLUP_PHASE,message:"Cannot call emitChunk after module loading has finished."}),e.moduleLoader.addEntryModuleAndGetReferenceId({alias:n&&n.name||null,unresolvedId:t})},error(e){"string"==typeof e&&(e={message:e}),e.code&&(e.pluginCode=e.code),e.code="PLUGIN_ERROR",e.plugin=n.name||`Plugin at position ${s+1}`,zt(e)},isExternal:(t,n,r=!1)=>e.moduleLoader.isExternal(t,n,r),getAssetFileName:h,getChunkFileName:t=>e.moduleLoader.getChunkFileName(t),getModuleInfo(t){const n=e.moduleById.get(t);if(null==n)throw new Error(`Unable to find module ${t}`);return{hasModuleSideEffects:n.moduleSideEffects,id:n.id,importedIds:n instanceof ut?[]:n.sources.map(e=>n.resolvedIds[e].id),isEntry:n instanceof Xa&&n.isEntryPoint,isExternal:n instanceof ut}},meta:{rollupVersion:t},get moduleIds(){return e.moduleById.keys()},parse:e.contextParse,resolveId:(t,n)=>e.moduleLoader.resolveId(t,n).then(e=>e&&e.id),resolve:(t,n,r)=>e.moduleLoader.resolveId(t,n,r&&r.skipSelf?s:null),setAssetSource:u,warn(t){"string"==typeof t&&(t={message:t}),t.code&&(t.pluginCode=t.code),t.code="PLUGIN_WARNING",t.plugin=n.name||`Plugin at position ${s+1}`,e.warn(t)},watcher:i?Object.assign({},i,{addListener:f,on:f}):void 0};return m});function d(e,t,n,r=!1,i){const o=s[n];let a=p[n];const h=o[e];if(!h)return;const u=Sc[e];if(u&&a.warn(Cc(e,u,o,n)),i&&(!(a=i(a,o))||a===p[n]))throw new Error("Internal Rollup error: hookContext must return a new context object.");try{if("function"!=typeof h){if(r)return h;zt({code:"INVALID_PLUGIN_HOOK",message:`Error running plugin hook ${e} for ${o.name||`Plugin at position ${n+1}`}, expected a function hook.`})}return h.apply(a,t)}catch(t){"string"==typeof t&&(t={message:t}),"PLUGIN_ERROR"!==t.code&&(t.code&&(t.pluginCode=t.code),t.code="PLUGIN_ERROR"),t.plugin=o.name||`Plugin at position ${n+1}`,t.hook=e,zt(t)}}function f(e,t,n,r=!1,i){const o=s[n];let a=p[n];const h=o[e];if(!h)return;const u=Sc[e];if(u&&a.warn(Cc(e,u,o,n)),i&&(!(a=i(a,o))||a===p[n]))throw new Error("Internal Rollup error: hookContext must return a new context object.");return Promise.resolve().then(()=>{if("function"!=typeof h){if(r)return h;zt({code:"INVALID_PLUGIN_HOOK",message:`Error running plugin hook ${e} for ${o.name||`Plugin at position ${n+1}`}, expected a function hook.`})}return h.apply(a,t)}).catch(t=>{"string"==typeof t&&(t={message:t}),"PLUGIN_ERROR"!==t.code&&(t.code&&(t.pluginCode=t.code),t.code="PLUGIN_ERROR"),t.plugin=o.name||`Plugin at position ${n+1}`,t.hook=e,zt(t)})}return{emitAsset:a,getAssetFileName:h,hasLoadersOrTransforms:l,hookSeq(e,t,n){let r=Promise.resolve();for(let i=0;i<s.length;i++)r=r.then(()=>f(e,t,i,!1,n));return r},hookSeqSync(e,t,n){for(let r=0;r<s.length;r++)d(e,t,r,!1,n)},hookFirst(e,t,n,r){let i=Promise.resolve();for(let o=0;o<s.length;o++)r!==o&&(i=i.then(r=>null!=r?r:f(e,t,o,!1,n)));return i},hookFirstSync(e,t,n){for(let r=0;r<s.length;r++){const i=d(e,t,r,!1,n);if(null!=i)return i}return null},hookParallel(e,t,n){const r=[];for(let i=0;i<s.length;i++){const s=f(e,t,i,!1,n);s&&r.push(s)}return Promise.all(r).then(()=>{})},hookReduceArg0(e,[t,...n],r,i){let o=Promise.resolve(t);for(let t=0;t<s.length;t++)o=o.then(o=>{const a=f(e,[o,...n],t,!1,i);return a?a.then(e=>r.call(p[t],o,e,s[t])):o});return o},hookReduceArg0Sync(e,[t,...n],r,i){for(let o=0;o<s.length;o++){const a=d(e,[t,...n],o,!1,i);t=r.call(p[o],t,a,s[o])}return t},hookReduceValue(e,t,n,r,i){let o=Promise.resolve(t);for(let t=0;t<s.length;t++)o=o.then(o=>{const a=f(e,n,t,!0,i);return a?a.then(e=>r.call(p[t],o,e,s[t])):o});return o}}}const wc={has:()=>!1,get(){},set(){},delete:()=>!1};function Pc(e){zt(e?{code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`}:{code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."})}const kc=e=>({has:()=>(Pc(e),!1),get(){Pc(e)},set(){Pc(e)},delete:()=>(Pc(e),!1)});function Cc(e,t,n,r){return{code:e.toUpperCase()+"_HOOK_DEPRECATED",message:`The ${e} hook used by plugin ${n.name||`at position ${r+1}`} is deprecated. The ${t} hook should be used instead.`}}function Nc(e,t){return nt(t)?ht(e,"..",t):t}function $c(e){if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>!t.startsWith("\0")&&e(t,...n)||!1;if(e){const t=new Set(Array.isArray(e)?e:e?[e]:[]);return e=>t.has(e)}return()=>!1}function Rc(e,t,n){if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>!!t.startsWith("\0")||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}var r,i;e&&n.warn((r="treeshake.moduleSideEffects",i='please use one of false, "no-external", a function or an array',{code:Wt.INVALID_OPTION,message:`Invalid value for option "${r}" - ${i}.`}));const s=$c(t);return(e,t)=>!(t&&s(e))}class Oc{constructor(e,t,n,r,i,s,o){this.entriesByReferenceId=new Map,this.entryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.manualChunkModules={},this.loadEntryModule=(({alias:e,unresolvedId:t},n)=>this.pluginDriver.hookFirst("resolveId",[t,void 0]).then(r=>{(!1===r||r&&"object"==typeof r&&r.external)&&zt(function(e){return{code:Wt.UNRESOLVED_ENTRY,message:`Entry module cannot be external (${Vt(e)}).`}}(t));const i=r&&"object"==typeof r?r.id:r;if("string"==typeof i)return this.fetchModule(i,void 0,!0,n).then(t=>(null!==e&&(null!==t.chunkAlias&&t.chunkAlias!==e&&zt(Ut(t.id,e,t.chunkAlias)),t.chunkAlias=e),t));zt(function(e){return{code:Wt.UNRESOLVED_ENTRY,message:`Could not resolve entry module (${Vt(e)}).`}}(t))})),this.graph=e,this.modulesById=t,this.pluginDriver=n,this.isExternal=$c(r),this.hasModuleSideEffects=Rc(s,o,e),this.getManualChunk="function"==typeof i?i:()=>null}addEntryModuleAndGetReferenceId(e){const t={module:null,name:e.unresolvedId},n=sc(t,this.entriesByReferenceId,e.unresolvedId);return this.addEntryModules([e],!1).then(({newEntryModules:[e]})=>{t.module=e}).catch(()=>{}),n}addEntryModules(e,t){const n=Promise.all(e.map(e=>this.loadEntryModule(e,!0))).then(e=>{for(const n of e){n.isUserDefinedEntryPoint=n.isUserDefinedEntryPoint||t,this.entryModules.find(e=>e.id===n.id)||this.entryModules.push(n)}return e});return this.awaitLoadModulesPromise(n).then(e=>({entryModules:this.entryModules,manualChunkModulesByAlias:this.manualChunkModules,newEntryModules:e}))}addManualChunks(e){const t=[];for(const n of Object.keys(e)){const r=e[n];for(const e of r)t.push({alias:null,unresolvedId:e,manualChunkAlias:n})}const n=Promise.all(t.map(e=>this.loadEntryModule(e,!1))).then(e=>{for(let n=0;n<e.length;n++)this.addToManualChunk(t[n].manualChunkAlias,e[n])});return this.awaitLoadModulesPromise(n)}getChunkFileName(e){const t=this.entriesByReferenceId.get(e);var n;t||zt((n=e,{code:Wt.CHUNK_NOT_FOUND,message:`Plugin error - Unable to get file name for unknown chunk "${n}".`}));const r=t.module&&(t.module.facadeChunk?t.module.facadeChunk.id:t.module.chunk.id);var i;return r||zt((i=t,{code:Wt.CHUNK_NOT_GENERATED,message:`Plugin error - Unable to get file name for chunk "${i.name}". Ensure that generate is called first.`})),r}resolveId(e,t,n){return Promise.resolve(this.isExternal(e,t,!1)?{id:e,external:!0}:this.pluginDriver.hookFirst("resolveId",[e,t],null,n)).then(n=>this.normalizeResolveIdResult(n,t,e))}addToManualChunk(e,t){null!==t.manualChunkAlias&&t.manualChunkAlias!==e&&zt(Ut(t.id,e,t.manualChunkAlias)),t.manualChunkAlias=e,this.manualChunkModules[e]||(this.manualChunkModules[e]=[]),this.manualChunkModules[e].push(t)}awaitLoadModulesPromise(e){this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]);const t=()=>{const e=this.latestLoadModulesPromise;return e.then(()=>{if(this.latestLoadModulesPromise!==e)return t()})};return t().then(()=>e)}fetchAllDependencies(e){const t=Promise.all(e.getDynamicImportExpressions().map((t,n)=>this.resolveDynamicImport(t,e.id).then(t=>{if(null===t)return;const r=e.dynamicImports[n];if("string"!=typeof t)return this.fetchResolvedDependency(Vt(t.id),e.id,t).then(e=>{r.resolution=e});r.resolution=t})));return t.catch(()=>{}),Promise.all(e.sources.map(t=>this.resolveAndFetchDependency(e,t))).then(()=>t)}fetchModule(e,t,n,r){const i=this.modulesById.get(e);if(i){if(i instanceof ut)throw new Error(`Cannot fetch external module ${e}`);return i.isEntryPoint=i.isEntryPoint||r,Promise.resolve(i)}const s=new Xa(this.graph,e,n,r);this.modulesById.set(e,s);const o=this.getManualChunk(e);return"string"==typeof o&&this.addToManualChunk(o,s),Wa("load modules",3),Promise.resolve(this.pluginDriver.hookFirst("load",[e])).catch(n=>{Ua("load modules",3);let r=`Could not load ${e}`;throw t&&(r+=` (imported by ${t})`),r+=`: ${n.message}`,new Error(r)}).then(t=>(Ua("load modules",3),"string"==typeof t?{code:t}:t&&"object"==typeof t&&"string"==typeof t.code?t:void zt(function(e){return{code:Wt.BAD_LOADER,message:`Error loading ${Vt(e)}: plugin load hook should return a string, a { code, map } object, or nothing/null`}}(e)))).then(t=>{const n=this.graph.cachedModules.get(e);if(n&&!n.customTransformCache&&n.originalCode===t.code){if(n.transformAssets)for(const e of n.transformAssets)this.pluginDriver.emitAsset(e.name,e.source);return n}return"boolean"==typeof t.moduleSideEffects&&(s.moduleSideEffects=t.moduleSideEffects),function(e,t,n){const r=n.id,i=[],s="string"==typeof t.map?JSON.parse(t.map):t.map;s&&"string"==typeof s.mappings&&(s.mappings=O(s.mappings));const o=e.pluginDriver.emitAsset,a=t.code;let h,u,c,l,p=t.ast,d=!1,f=null;const m=t.code;let g;return e.pluginDriver.hookReduceArg0("transform",[m,r],function(t,s,o){if(!d&&c.used&&(d=!0),d){if(s&&"object"==typeof s&&Array.isArray(s.dependencies))for(const t of s.dependencies){const n=ht(st(r),t);e.watchFiles[n]||(e.watchFiles[n]=!0)}}else if(u.length&&(n.transformAssets=u),s&&"object"==typeof s&&Array.isArray(s.dependencies)){l.warnedTransformDependencies||this.warn({code:"TRANSFORM_DEPENDENCIES_DEPRECATED",message:'Returning "dependencies" from plugin transform hook is deprecated for using this.addWatchFile() instead.'}),l.warnedTransformDependencies=!0,h||(h=[]);for(const e of s.dependencies)h.push(ht(st(r),e))}if("string"==typeof s)s={ast:void 0,code:s,map:void 0};else{if(!s||"object"!=typeof s)return t;"string"==typeof s.map&&(s.map=JSON.parse(s.map)),"boolean"==typeof s.moduleSideEffects&&(f=s.moduleSideEffects)}return s.map&&"string"==typeof s.map.mappings&&(s.map.mappings=O(s.map.mappings)),null!==s.map&&i.push(s.map||{missing:!0,plugin:o.name}),p=s.ast,s.code},(t,n)=>{let i;return l=n,n.cacheKey?d=!0:c=function(e){const t={used:!1,cache:void 0};return t.cache={has:n=>(t.used=!0,e.has(n)),get:n=>(t.used=!0,e.get(n)),set:(n,r)=>(t.used=!0,e.set(n,r)),delete:n=>(t.used=!0,e.delete(n))},t}(t.cache),({assets:u,emitAsset:i}=function(e,t){const n=[];return{assets:n,emitAsset:(r,i)=>{const s=t(r,i),o=e.get(s);return n.push({fileName:void 0,name:o.name,source:o.source}),s}}}(e.assetsById,o)),Object.assign({},t,{cache:c?c.cache:t.cache,warn(e,n){"string"==typeof e&&(e={message:e}),n&&jt(e,n,m,r),e.id=r,e.hook="transform",t.warn(e)},error(e,n){"string"==typeof e&&(e={message:e}),n&&jt(e,n,m,r),e.id=r,e.hook="transform",t.error(e)},emitAsset:i,addWatchFile(e){h||(h=[]),h.push(e),t.addWatchFile(e)},setAssetSource(e,n){if(t.setAssetSource(e,n),!d&&!g)try{this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitAsset with a source, or call setAssetSource in another hook."})}catch(e){g=e}}})}).catch(e=>{"string"==typeof e&&(e={message:e}),"PLUGIN_ERROR"!==e.code&&(e.code&&(e.pluginCode=e.code),e.code="PLUGIN_ERROR"),e.id=r,zt(e)}).then(e=>{if(!d&&g)throw g;return{ast:p,code:e,customTransformCache:d,moduleSideEffects:f,originalCode:a,originalSourcemap:s,sourcemapChain:i,transformDependencies:h}})}(this.graph,t,s)}).then(t=>(s.setSource(t),this.modulesById.set(e,s),this.fetchAllDependencies(s).then(()=>{for(const e in s.exports)"default"!==e&&(s.exportsAll[e]=s.id);return s.exportAllSources.forEach(e=>{const t=s.resolvedIds[e].id,n=this.modulesById.get(t);if(!(n instanceof ut))for(const e in n.exportsAll)e in s.exportsAll?this.graph.warn(Ft(e,s,n)):s.exportsAll[e]=n.exportsAll[e]}),s})))}fetchResolvedDependency(e,t,n){if(n.external){this.modulesById.has(n.id)||this.modulesById.set(n.id,new ut(this.graph,n.id,n.moduleSideEffects));const r=this.modulesById.get(n.id);return r instanceof ut==!1&&zt(function(e,t){return{code:Wt.INVALID_EXTERNAL_ID,message:`'${e}' is imported as an external by ${Vt(t)}, but is already an existing non-external module id.`}}(e,t)),Promise.resolve(r)}return this.fetchModule(n.id,t,n.moduleSideEffects,!1)}handleMissingImports(e,t,n){return null===e?(nt(t)&&zt(function(e,t){return{code:Wt.UNRESOLVED_IMPORT,message:`Could not resolve '${e}' from ${Vt(t)}`}}(t,n)),this.graph.warn(function(e,t){return{code:Wt.UNRESOLVED_IMPORT,importer:Vt(t),message:`'${e}' is imported by ${Vt(t)}, but could not be resolved – treating it as an external dependency`,source:e,url:"https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency"}}(t,n)),{id:t,external:!0,moduleSideEffects:!0}):e}normalizeResolveIdResult(e,t,n){let r="",i=!1,s=null;if(e)"object"==typeof e?(r=e.id,e.external&&(i=!0),"boolean"==typeof e.moduleSideEffects&&(s=e.moduleSideEffects)):(r=e,this.isExternal(r,t,!0)&&(i=!0)),i&&(r=Nc(t,r));else{if(r=Nc(t,n),!1!==e&&!this.isExternal(r,t,!0))return null;i=!0}return{external:i,id:r,moduleSideEffects:"boolean"==typeof s?s:this.hasModuleSideEffects(r,i)}}resolveAndFetchDependency(e,t){return Promise.resolve(e.resolvedIds[t]||this.resolveId(t,e.id).then(n=>this.handleMissingImports(n,t,e.id))).then(n=>(e.resolvedIds[t]=n,this.fetchResolvedDependency(t,e.id,n)))}resolveDynamicImport(e,t){return this.pluginDriver.hookFirst("resolveDynamicImport",[e,t]).then(n=>"string"!=typeof e?"string"==typeof n?n:n?Object.assign({external:!1,moduleSideEffects:!0},n):null:null==n?this.resolveId(e,t).then(n=>this.handleMissingImports(n,e,t)):this.handleMissingImports(this.normalizeResolveIdResult(n,t,e),e,t))}}const Mc=97,Tc=48;function Dc(e){return e<10?String.fromCharCode(Tc+e):String.fromCharCode(Mc+(e-10))}function Lc(e){let t="";for(let n=0;n<e.length;n++){const r=e[n];t+=Dc(r>>4),t+=Dc(15&r)}return t}function Vc(e){const t=new Uint8Array(e);for(let e=0;e<t.length;e++)t[e]=512*Math.random();return t}function Bc(e){return"string"==typeof e?[{alias:null,unresolvedId:e}]:Array.isArray(e)?e.map(e=>({alias:null,unresolvedId:e})):Object.keys(e).map(t=>({alias:t,unresolvedId:e[t]}))}class zc{constructor(e,t){if(this.assetsById=new Map,this.curChunkIndex=0,this.moduleById=new Map,this.needsTreeshakingPass=!1,this.phase=uc.LOAD_AND_PARSE,this.watchFiles=Object.create(null),this.externalModules=[],this.modules=[],this.curChunkIndex=0,this.deoptimizationTracker=new ic,this.cachedModules=new Map,e.cache&&e.cache.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);if(!1!==e.cache){this.pluginCache=e.cache&&e.cache.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.keys(t))t[e][0]++}}if(this.preserveModules=e.preserveModules,this.cacheExpiry=e.experimentalCacheExpiry,this.treeshake=!1!==e.treeshake,this.treeshake&&(this.treeshakingOptions=e.treeshake?{annotations:!1!==e.treeshake.annotations,moduleSideEffects:e.treeshake.moduleSideEffects,propertyReadSideEffects:!1!==e.treeshake.propertyReadSideEffects,pureExternalModules:e.treeshake.pureExternalModules}:{annotations:!0,moduleSideEffects:!0,propertyReadSideEffects:!0,pureExternalModules:!1}),this.contextParse=((e,t={})=>this.acornParser.parse(e,Object.assign({},Ha,t,this.acornOptions))),this.pluginDriver=Ic(this,e,this.pluginCache,t),t){const e=e=>this.pluginDriver.hookSeqSync("watchChange",[e]);t.on("change",e),t.once("restart",()=>{t.removeListener("change",e)})}this.shimMissingExports=e.shimMissingExports,this.scope=new nc,this.context=String(e.context);const n=e.moduleContext;if("function"==typeof n)this.getModuleContext=(e=>n(e)||this.context);else if("object"==typeof n){const e=new Map;for(const t in n)e.set(ht(t),n[t]);this.getModuleContext=(t=>e.get(t)||this.context)}else this.getModuleContext=(()=>this.context);this.onwarn=e.onwarn||function(){const e=Object.create(null);return t=>{const n=t.toString();n in e||(console.error(n),e[n]=!0)}}(),this.acornOptions=e.acorn||{};const r=[];r.push(Xu),r.push(ec),r.push(Ku),e.experimentalTopLevelAwait&&(this.acornOptions.allowAwaitOutsideFunction=!0);const i=e.acornInjectPlugins;r.push(...Array.isArray(i)?i:i?[i]:[]),this.acornParser=eu.extend(...r),this.moduleLoader=new Oc(this,this.moduleById,this.pluginDriver,e.external,"function"==typeof e.manualChunks&&e.manualChunks,this.treeshake?this.treeshakingOptions.moduleSideEffects:null,!!this.treeshake&&this.treeshakingOptions.pureExternalModules)}build(e,t,n){return Wa("parse modules",2),Promise.all([this.moduleLoader.addEntryModules(Bc(e),!0),t&&"object"==typeof t&&this.moduleLoader.addManualChunks(t)]).then(([{entryModules:e,manualChunkModulesByAlias:t}])=>{if(0===e.length)throw new Error("You must supply options.input to rollup");for(const e of this.moduleById.values())e instanceof Xa?(this.modules.push(e),this.watchFiles[e.id]=!0):this.externalModules.push(e);if(Ua("parse modules",2),this.phase=uc.ANALYSE,Wa("analyse dependency graph",2),this.link(e),Ua("analyse dependency graph",2),Wa("mark included statements",2),n&&e.length>1)throw new Error("Internal Error: can only inline dynamic imports for single-file builds.");for(const t of e)t.includeAllExports();this.includeMarked(this.modules);for(const e of this.externalModules)e.warnUnusedImports();Ua("mark included statements",2),Wa("generate chunks",2),this.preserveModules||n||function(e,t){let n,r,i;const s=new Set,o=[],a=e=>{n.manualChunkAlias?(e.manualChunkAlias=n.manualChunkAlias,e.entryPointsHash=r):function(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]^t[n]}(e.entryPointsHash,r);for(const t of e.dependencies)t instanceof ut||i.has(t.id)||(i.add(t.id),s.has(t.id)||t.manualChunkAlias||a(t));for(const{resolution:t}of e.dynamicImports)t instanceof Xa&&t.dynamicallyImportedBy.length>0&&!t.manualChunkAlias&&o.push(t)};if(t)for(const e of Object.keys(t))for(n of(r=Vc(10),t[e]))i=new Set(n.id),a(n);for(n of e)s.add(n.id),r=Vc(10),i=new Set(n.id),n.manualChunkAlias||a(n);for(n of o)s.has(n.id)||(s.add(n.id),r=Vc(10),i=new Set(n.id),a(n))}(e,t);let r=[];if(this.preserveModules)for(const e of this.modules){const t=new ph(this,[e]);!e.isEntryPoint&&t.isEmpty||(t.entryModules=[e]),r.push(t)}else{const e={};for(const t of this.modules){const n=Lc(t.entryPointsHash),r=e[n];r?r.push(t):e[n]=[t]}for(const t in e){const n=e[t];ih(n);const i=new ph(this,n);r.push(i)}}for(const e of r)e.link();r=r.filter(lh);for(const e of r)(this.preserveModules||e.entryModules.length>0)&&e.generateEntryExportsOrMarkAsTainted();const i=[];if(!this.preserveModules)for(const e of r)for(const t of e.entryModules)if(e.facadeModule!==t){const e=new ph(this,[]);e.turnIntoFacade(t),i.push(e)}return Ua("generate chunks",2),this.phase=uc.GENERATE,r.concat(i)})}finaliseAssets(e){const t=Object.create(null);return this.assetsById.forEach(n=>{void 0!==n.source&&hc(n,t,e)}),t}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let n=!0;for(const e of Object.keys(t))t[e][0]>=this.cacheExpiry?delete t[e]:n=!1;n&&delete this.pluginCache[e]}return{modules:this.modules.map(e=>e.toJSON()),plugins:this.pluginCache}}includeMarked(e){if(this.treeshake){let t=1;do{Wa(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const t of e)t.isExecuted&&t.include();Ua(`treeshaking pass ${t++}`,3)}while(this.needsTreeshakingPass)}else for(const t of e)t.includeAllInBundle()}warn(e){e.toString=(()=>{let t="";return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${Vt(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+=e.message}),this.onwarn(e)}link(e){for(const e of this.modules)e.linkDependencies();const{orderedModules:t,cyclePaths:n}=function(e){let t=0;const n=[],r={},i=[],s=[],o={},a=e=>{if(!r[e.id]){if(e instanceof ut)return e.execIndex=t++,void(r[e.id]=!0);for(const t of e.dependencies)t.id in o?r[t.id]||n.push(sh(t.id,e.id,o)):(o[t.id]=e.id,a(t));for(const{resolution:t}of e.dynamicImports)t instanceof Xa&&-1===s.indexOf(t)&&s.push(t);e.execIndex=t++,r[e.id]=!0,i.push(e)}};for(const t of e)o[t.id]||(o[t.id]=null,a(t));for(const e of s)o[e.id]||(o[e.id]=null,a(e));return{orderedModules:i,cyclePaths:n}}(e);for(const e of n)this.warn({code:"CIRCULAR_DEPENDENCY",importer:e[0],message:`Circular dependency: ${e.join(" -> ")}`});this.modules=t;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of Object.keys(e.importDescriptions)){const n=e.importDescriptions[t];"*"===n.name||n.module.getVariableForExportName(n.name)||e.warn({code:"NON_EXISTENT_EXPORT",message:`Non-existent export '${n.name}' is imported from ${Vt(n.module.id)}`,name:n.name,source:n.module.id},n.start)}}}function jc(e){switch(typeof e){case"function":return e();case"string":return e;default:return""}}const Wc=(e,t)=>t?`${e}\n${t}`:e,Uc=(e,t)=>t?`${e}\n\n${t}`:e;function Fc(e,t){zt({code:"INVALID_EXPORT_OPTION",message:`'${e}' was specified for output.exports, but entry module has following exports: ${t.join(", ")}`})}function qc(e,{exports:t,name:n,format:r}){const i=e.getExportNames();return"default"===t?1===i.length&&"default"===i[0]||Fc("default",i):"none"===t&&i.length&&Fc("none",i),t&&"auto"!==t||(0===i.length?t="none":1===i.length&&"default"===i[0]?t="default":(null!==e.facadeModule&&e.facadeModule.isEntryPoint&&"es"!==r&&-1!==i.indexOf("default")&&e.graph.warn({code:"MIXED_EXPORTS",message:`Using named and default exports together. Consumers of your bundle will have to use ${n||"bundle"}['default'] to access the default export, which may not be what you want. Use \`output.exports: 'named'\` to disable this warning`,url:"https://rollupjs.org/guide/en#output-exports"}),t="named")),/(?:default|named|none)/.test(t)||zt({code:"INVALID_EXPORT_OPTION",message:"output.exports must be 'default', 'named', 'none', 'auto', or left unspecified (defaults to 'auto')",url:"https://rollupjs.org/guide/en#output-exports"}),t}const Gc=(e,t)=>(n,r)=>void 0!==t[n]?t[n]:void 0!==e[n]?e[n]:r,Hc=e=>e&&"object"!=typeof e?{}:e,Kc=(e,t,n)=>{const r=Hc(t[n]),i=Hc(e[n]);return void 0!==r?r&&i?Object.assign({},i,r):r:i},Yc=(e,t,n=(e=>{"string"==typeof e?console.warn(e):console.warn(e.message)}))=>t.silent?()=>{}:e.onwarn?t=>e.onwarn(t,n):n,Xc=(e,t)=>{const n=e.external;return"function"==typeof n?(e,...r)=>n(e,...r)||-1!==t.external.indexOf(e):(n||[]).concat(t.external)},Qc={c:"config",d:"dir",e:"external",f:"format",g:"globals",h:"help",i:"input",m:"sourcemap",n:"name",o:"file",v:"version",w:"watch"};function Jc({config:e={},command:t={},defaultOnWarnHandler:n}){const r=function(e){const t=Object.assign({},e);t.external=e.external?e.external.split(","):[],e.globals&&(t.globals=Object.create(null),e.globals.split(",").forEach(e=>{const n=e.split(":");t.globals[n[0]]=n[1],-1===t.external.indexOf(n[0])&&t.external.push(n[0])}));return t}(t),i=function(e,t={},n){const r=Gc(e,t),i={acorn:e.acorn,acornInjectPlugins:e.acornInjectPlugins,cache:r("cache"),chunkGroupingSize:r("chunkGroupingSize",5e3),context:e.context,experimentalCacheExpiry:r("experimentalCacheExpiry",10),experimentalOptimizeChunks:r("experimentalOptimizeChunks"),experimentalTopLevelAwait:r("experimentalTopLevelAwait"),external:Xc(e,t),inlineDynamicImports:r("inlineDynamicImports",!1),input:r("input",[]),manualChunks:r("manualChunks"),moduleContext:e.moduleContext,onwarn:Yc(e,t,n),perf:r("perf",!1),plugins:e.plugins,preserveModules:r("preserveModules"),preserveSymlinks:r("preserveSymlinks"),shimMissingExports:r("shimMissingExports"),treeshake:Kc(e,t,"treeshake"),watch:e.watch};i.cache&&i.cache.cache&&(i.cache=i.cache.cache);return i}(e,r,n);r.output&&Object.assign(r,r.output);const s=e.output,o=Array.isArray(s)?s:s?[s]:[];0===o.length&&o.push({});const a=o.map(e=>(function(e,t={}){const n=Gc(e,t);let r=n("format");switch(r){case"esm":case"module":r="es";break;case"commonjs":r="cjs"}return{amd:Object.assign({},e.amd,t.amd),assetFileNames:n("assetFileNames"),banner:n("banner"),chunkFileNames:n("chunkFileNames"),compact:n("compact",!1),dir:n("dir"),dynamicImportFunction:n("dynamicImportFunction"),entryFileNames:n("entryFileNames"),esModule:n("esModule",!0),exports:n("exports"),extend:n("extend"),file:n("file"),footer:n("footer"),format:"esm"===r?"es":r,freeze:n("freeze",!0),globals:n("globals"),indent:n("indent",!0),interop:n("interop",!0),intro:n("intro"),name:n("name"),namespaceToStringTag:n("namespaceToStringTag",!1),noConflict:n("noConflict"),outro:n("outro"),paths:n("paths"),preferConst:n("preferConst"),sourcemap:n("sourcemap"),sourcemapExcludeSources:n("sourcemapExcludeSources"),sourcemapFile:n("sourcemapFile"),sourcemapPathTransform:n("sourcemapPathTransform"),strict:n("strict",!0)}})(e,r)),h=[],u=Object.keys(i);Zc(h,Object.keys(e),u,"input option",/^output$/);const c=Object.keys(a[0]);Zc(h,a.reduce((e,t)=>e.concat(Object.keys(t)),[]),c,"output option");const l=c.filter(e=>"sourcemapPathTransform"!==e);return Zc(h,Object.keys(r),u.concat(l,Object.keys(Qc),"config","environment","silent"),"CLI flag",/^_|output|(config.*)$/),{inputOptions:i,optionError:h.length>0?h.join("\n"):null,outputOptions:a}}function Zc(e,t,n,r,i=/$./){const s=t.filter(e=>-1===n.indexOf(e)&&!i.test(e));s.length>0&&e.push(`Unknown ${r}: ${s.join(", ")}. Allowed options: ${n.sort().join(", ")}`)}const el={get(){throw new Error("bundle.generate(...) now returns a Promise instead of a { code, map } object")}};function tl(e,n){return n.options&&n.options.call({meta:{rollupVersion:t}},e)||e}let nl;function rl(e){try{const t=function(e){if(!e)throw new Error("You must supply an options object to rollup");let{inputOptions:t,optionError:n}=Jc({config:e});n&&t.onwarn({message:n,code:"UNKNOWN_OPTION"});const r=t.plugins;return t.plugins=Array.isArray(r)?r.filter(Boolean):r?[r]:[],(t=t.plugins.reduce(tl,t)).inlineDynamicImports?(t.preserveModules&&zt({code:"INVALID_OPTION",message:'"preserveModules" does not support the "inlineDynamicImports" option.'}),t.manualChunks&&zt({code:"INVALID_OPTION",message:'"manualChunks" option is not supported for "inlineDynamicImports".'}),t.experimentalOptimizeChunks&&zt({code:"INVALID_OPTION",message:'"experimentalOptimizeChunks" option is not supported for "inlineDynamicImports".'}),(t.input instanceof Array&&t.input.length>1||"object"==typeof t.input&&Object.keys(t.input).length>1)&&zt({code:"INVALID_OPTION",message:'Multiple inputs are not supported for "inlineDynamicImports".'})):t.preserveModules&&(t.manualChunks&&zt({code:"INVALID_OPTION",message:'"preserveModules" does not support the "manualChunks" option.'}),t.experimentalOptimizeChunks&&zt({code:"INVALID_OPTION",message:'"preserveModules" does not support the "experimentalOptimizeChunks" option.'})),t}(e);Ga(t);const n=new zc(t,nl);nl=void 0;const r=!1!==e.cache;return delete t.cache,delete e.cache,Wa("BUILD",1),n.pluginDriver.hookParallel("buildStart",[t]).then(()=>n.build(t.input,t.manualChunks,t.inlineDynamicImports)).then(e=>n.pluginDriver.hookParallel("buildEnd",[]).then(()=>e),e=>n.pluginDriver.hookParallel("buildEnd",[e]).then(()=>{throw e})).then(e=>{Ua("BUILD",1);let i=!1;function s(r){return function(e,t,n,r){if(!t)throw new Error("You must supply an options object");const i=Jc({config:{output:Object.assign({},t,t.output,e.output)}});if(i.optionError)throw new Error(i.optionError);const s=i.outputOptions[0],o=r.hookReduceArg0Sync("outputOptions",[s],(e,t)=>t||e);a=o,"es6"===a.format&&zt({message:'The "es6" output format is deprecated – use "esm" instead',url:"https://rollupjs.org/guide/en#output-format"}),["amd","cjs","system","es","iife","umd"].indexOf(a.format)<0&&zt({message:'You must specify "output.format", which can be one of "amd", "cjs", "system", "esm", "iife" or "umd".',url:"https://rollupjs.org/guide/en#output-format"}),"string"==typeof o.file&&("string"==typeof o.dir&&zt({code:"INVALID_OPTION",message:'You must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks.'}),e.preserveModules&&zt({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when using the "preserveModules" option.'}),"object"!=typeof e.input||Array.isArray(e.input)||zt({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when providing named inputs.'}));var a;n&&("umd"!==o.format&&"iife"!==o.format||zt({code:"INVALID_OPTION",message:"UMD and IIFE output formats are not supported for code-splitting builds."}),"string"==typeof o.file&&zt({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when generating multiple chunks.'}));return o}(t,r,e.length>1,n.pluginDriver)}function o(r,s){Wa("GENERATE",1);const o=r.assetFileNames||"assets/[name]-[hash][extname]",a=n.finaliseAssets(o),h=function(e){if(0===e.length)return"/";if(1===e.length)return st(e[0]);const t=e.slice(1).reduce((e,t)=>{const n=t.split(/\/+|\\+/);let r;for(r=0;e[r]===n[r]&&r<Math.min(e.length,n.length);r++);return e.slice(0,r)},e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}(function(e){const t=[];for(const n of e)for(const e of n.entryModules)tt(e.id)&&t.push(e.id);return t}(e));return n.pluginDriver.hookParallel("renderStart",[]).then(()=>(function(e,t){const n=e.pluginDriver;return Promise.all([n.hookReduceValue("banner",jc(t.banner),[],Wc),n.hookReduceValue("footer",jc(t.footer),[],Wc),n.hookReduceValue("intro",jc(t.intro),[],Uc),n.hookReduceValue("outro",jc(t.outro),[],Uc)]).then(([e,t,n,r])=>(n&&(n+="\n\n"),r&&(r=`\n\n${r}`),e.length&&(e+="\n"),t.length&&(t="\n"+t),{intro:n,outro:r,banner:e,footer:t})).catch(e=>{zt({code:"ADDON_ERROR",message:`Could not retrieve ${e.hook}. Check configuration of ${e.plugin}.\n\tError Message: ${e.message}`})})})(n,r)).then(s=>{for(const n of e)t.preserveModules||n.generateInternalExports(r),n.facadeModule&&n.facadeModule.isEntryPoint&&(n.exportMode=qc(n,r));for(const t of e)t.preRender(r,h);!i&&t.experimentalOptimizeChunks&&(!function(e,t,n,r){for(let i=0;i<e.length;i++){const s=e[i],o=[];if(s.visitStaticDependenciesUntilCondition(e=>{e instanceof ph&&o.push(e)}),o.length<2)continue;let a,h=1,u=!0,c=o[0],l=o[1];const p=e=>!(null!==e.facadeModule||null!==e.manualChunkAlias||!l||null!==l.facadeModule||e.getRenderedSourceLength()>n);do{if(u){p(c)&&(u=!1);continue}let s=n-a.getRenderedSourceLength()-c.getRenderedSourceLength();if(s<=0){p(c)||(u=!0);continue}const d=new Set;c.visitStaticDependenciesUntilCondition(e=>d.add(e));const f=new Set([c,a]);if(a.visitStaticDependenciesUntilCondition(e=>e!==c&&e!==a&&!d.has(e)&&(e instanceof ut||(s-=e.getRenderedSourceLength())<=0||void f.add(e)))){p(c)||(u=!0);continue}if(c.visitStaticDependenciesUntilCondition(e=>!f.has(e)&&(e instanceof ut||(s-=e.getRenderedSourceLength())<=0||void 0))){p(c)||(u=!0);continue}const m=e.indexOf(c);m<=i&&i--,e.splice(m,1),a.merge(c,e,t,r),o.splice(--h,1),c=a,l&&!p(l)&&(u=!0)}while(a=c,c=l,l=o[++h],c)}}(e,r,t.chunkGroupingSize,h),i=!0),function(e,t,n,r,i){const s={},[o,a]=e.reduce(([e,t],n)=>((n.facadeModule&&n.facadeModule.isUserDefinedEntryPoint?e:t).push(n),[e,t]),[[],[]]),h=o.concat(a);for(let e=0;e<h.length;e++){const o=h[e];if(n.file)o.id=it(n.file);else if(t.preserveModules)o.generateIdPreserveModules(r,s);else{let e,t;o.facadeModule&&o.facadeModule.isUserDefinedEntryPoint?(e=n.entryFileNames||"[name].js",t="output.entryFileNames"):(e=n.chunkFileNames||"[name]-[hash].js",t="output.chunkFileNames"),o.generateId(e,t,i,n,s)}s[o.id]=!0}}(e,t,r,h,s);for(let t=0;t<e.length;t++){const n=e[t],r=n.facadeModule;a[n.id]={code:void 0,dynamicImports:n.getDynamicImportIds(),exports:n.getExportNames(),facadeModuleId:r&&r.id,fileName:n.id,imports:n.getImportIds(),isDynamicEntry:null!==r&&r.dynamicallyImportedBy.length>0,isEntry:null!==r&&r.isEntryPoint,map:void 0,modules:n.renderedModules,get name(){return n.getChunkName()}}}return Promise.all(e.map(e=>{const t=a[e.id];return e.render(r,s,t).then(e=>(t.code=e.code,t.map=e.map,n.pluginDriver.hookParallel("ongenerate",[Object.assign({bundle:t},r),t])))})).then(()=>{})}).catch(e=>n.pluginDriver.hookParallel("renderError",[e]).then(()=>{throw e})).then(()=>{const e=new Map(n.assetsById),t=ac(e,a,o);return n.pluginDriver.hookSeq("generateBundle",[r,a,s],e=>Object.assign({},e,t)).then(()=>{e.forEach(e=>{void 0===e.fileName&&hc(e,a,o)})})}).then(()=>(Ua("GENERATE",1),a))}const a={cache:r?n.getCache():void 0,generate:e=>{const t=o(s(e),!1).then(e=>ol(e));return Object.defineProperty(t,"code",el),Object.defineProperty(t,"map",el),t},watchFiles:Object.keys(n.watchFiles),write:e=>{const r=s(e);return r.dir||r.file||zt({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.'}),o(r,!0).then(e=>{let i=0;for(const t of Object.keys(e)){if(!e[t].isAsset&&++i>1)break}return i>1&&(r.sourcemapFile&&zt({code:"INVALID_OPTION",message:'"output.sourcemapFile" is only supported for single-file builds.'}),"string"==typeof r.file&&zt({code:"INVALID_OPTION",message:'When building multiple chunks, the "output.dir" option must be used, not "output.file".'+("string"!=typeof t.input||!0===t.inlineDynamicImports?"":' To inline dynamic imports, set the "inlineDynamicImports" option.')})),Promise.all(Object.keys(e).map(t=>(function(e,t,n,r){const i=ht(r.dir||st(r.file),n.fileName);let s,o;if(al(n))o=n.source;else if(o=n.code,r.sourcemap&&n.map){let e;"inline"===r.sourcemap?e=n.map.toUrl():(e=`${it(n.fileName)}.map`,s=mc(`${i}.map`,n.map.toString())),o+=`//# ${Na}=${e}\n`}return mc(i,o).then(()=>s).then(()=>!al(n)&&e.pluginDriver.hookSeq("onwrite",[Object.assign({bundle:t},r),n])).then(()=>{})})(n,a,e[t],r))).then(()=>n.pluginDriver.hookParallel("writeBundle",[e])).then(()=>ol(e))})}};return!0===t.perf&&(a.getTimings=ja),a})}catch(e){return Promise.reject(e)}}var il;function sl(e){return e.isAsset?il.ASSET:e.isEntry?il.ENTRY_CHUNK:il.SECONDARY_CHUNK}function ol(e){return{output:Object.keys(e).map(t=>e[t]).sort((e,t)=>{const n=sl(e),r=sl(t);return n===r?0:n<r?-1:1})}}function al(e){return!0===e.isAsset}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(il||(il={}));export{t as VERSION,rl as rollup};
+var e,t="1.12.3",n=r;function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var h={inherits:(function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}(e={exports:{}},e.exports),e.exports),toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),s=0;s<e.length;s+=2)n.push(parseInt(e[s]+e[s+1],16))}else for(var r=0,s=0;s<e.length;s++){var o=e.charCodeAt(s);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):i(e,s)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++s)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(s=0;s<e.length;s++)n[s]=0|e[s];return n},toHex:function(e){for(var t="",n=0;n<e.length;n++)t+=o(e[n].toString(16));return t},htonl:s,toHex32:function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=s(i)),n+=a(i.toString(16))}return n},zero2:o,zero8:a,join32:function(e,t,r,i){var s=r-t;n(s%4==0);for(var o=new Array(s/4),a=0,h=t;a<o.length;a++,h+=4){var u;u="big"===i?e[h]<<24|e[h+1]<<16|e[h+2]<<8|e[h+3]:e[h+3]<<24|e[h+2]<<16|e[h+1]<<8|e[h],o[a]=u>>>0}return o},split32:function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var s=e[r];"big"===t?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=255&s):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=255&s)}return n},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<<t|e>>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,n){return e+t+n>>>0},sum32_4:function(e,t,n,r){return e+t+n+r>>>0},sum32_5:function(e,t,n,r,i){return e+t+n+r+i>>>0},sum64:function(e,t,n,r){var i=e[t],s=r+e[t+1]>>>0,o=(s<r?1:0)+n+i;e[t]=o>>>0,e[t+1]=s},sum64_hi:function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},sum64_lo:function(e,t,n,r){return t+r>>>0},sum64_4_hi:function(e,t,n,r,i,s,o,a){var h=0,u=t;return h+=(u=u+r>>>0)<t?1:0,h+=(u=u+s>>>0)<s?1:0,e+n+i+o+(h+=(u=u+a>>>0)<a?1:0)>>>0},sum64_4_lo:function(e,t,n,r,i,s,o,a){return t+r+s+a>>>0},sum64_5_hi:function(e,t,n,r,i,s,o,a,h,u){var c=0,l=t;return c+=(l=l+r>>>0)<t?1:0,c+=(l=l+s>>>0)<s?1:0,c+=(l=l+a>>>0)<a?1:0,e+n+i+o+h+(c+=(l=l+u>>>0)<u?1:0)>>>0},sum64_5_lo:function(e,t,n,r,i,s,o,a,h,u){return t+r+s+a+u>>>0},rotr64_hi:function(e,t,n){return(t<<32-n|e>>>n)>>>0},rotr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0},shr64_hi:function(e,t,n){return e>>>n},shr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0}};function u(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var c=u;u.prototype.update=function(e,t){if(e=h.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=h.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},u.prototype.digest=function(e){return this.update(this._pad()),n(null===this.pending),this._digest(e)},u.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,s=8;s<this.padLength;s++)r[i++]=0;return r};var l={BlockHash:c},p=h.rotr32;function d(e,t,n){return e&t^~e&n}function f(e,t,n){return e&t^e&n^t&n}function m(e,t,n){return e^t^n}var g={ft_1:function(e,t,n,r){return 0===e?d(t,n,r):1===e||3===e?m(t,n,r):2===e?f(t,n,r):void 0},ch32:d,maj32:f,p32:m,s0_256:function(e){return p(e,2)^p(e,13)^p(e,22)},s1_256:function(e){return p(e,6)^p(e,11)^p(e,25)},g0_256:function(e){return p(e,7)^p(e,18)^e>>>3},g1_256:function(e){return p(e,17)^p(e,19)^e>>>10}},y=h.sum32,x=h.sum32_4,v=h.sum32_5,E=g.ch32,_=g.maj32,b=g.s0_256,A=g.s1_256,S=g.g0_256,I=g.g1_256,w=l.BlockHash,P=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function k(){if(!(this instanceof k))return new k;w.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=P,this.W=new Array(64)}h.inherits(k,w);var C=k;k.blockSize=512,k.outSize=256,k.hmacStrength=192,k.padLength=64,k.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=x(I(r[i-2]),r[i-7],S(r[i-15]),r[i-16]);var s=this.h[0],o=this.h[1],a=this.h[2],h=this.h[3],u=this.h[4],c=this.h[5],l=this.h[6],p=this.h[7];for(n(this.k.length===r.length),i=0;i<r.length;i++){var d=v(p,A(u),E(u,c,l),this.k[i],r[i]),f=y(b(s),_(s,o,a));p=l,l=c,c=u,u=y(h,d),h=a,a=o,o=s,s=y(d,f)}this.h[0]=y(this.h[0],s),this.h[1]=y(this.h[1],o),this.h[2]=y(this.h[2],a),this.h[3]=y(this.h[3],h),this.h[4]=y(this.h[4],u),this.h[5]=y(this.h[5],c),this.h[6]=y(this.h[6],l),this.h[7]=y(this.h[7],p)},k.prototype._digest=function(e){return"hex"===e?h.toHex32(this.h,"big"):h.split32(this.h,"big")};for(var N={},$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",R=0;R<$.length;R++)N[$.charCodeAt(R)]=R;function O(e){for(var t=0,n=0,r=0,i=0,s=0,o=[],a=[],h=[],u=0,c=0,l=0,p=0,d=e.length;u<d;u++){var f=e.charCodeAt(u);if(44===f)h.length&&a.push(new Int32Array(h)),h=[],c=0;else if(59===f)h.length&&a.push(new Int32Array(h)),h=[],c=0,o.push(a),a=[],t=0;else{var m=N[f];if(void 0===m)throw new Error("Invalid character ("+String.fromCharCode(f)+")");var g=32&m;if(p+=(m&=31)<<l,g)l+=5;else{var y=1&p;p>>=1;var x=y?-p:p;0==c?(t+=x,h.push(t)):1===c?(n+=x,h.push(n)):2===c?(r+=x,h.push(r)):3===c?(i+=x,h.push(i)):4===c&&(s+=x,h.push(s)),c++,p=l=0}}}return h.length&&a.push(new Int32Array(h)),o.push(a),o}function M(e){var t="";e=e<0?-e<<1|1:e<<1;do{var n=31&e;(e>>=5)>0&&(n|=32),t+=$[n]}while(e>0);return t}var T=function(e,t,n){this.start=e,this.end=t,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,Object.defineProperties(this,{previous:{writable:!0,value:null},next:{writable:!0,value:null}})};T.prototype.appendLeft=function(e){this.outro+=e},T.prototype.appendRight=function(e){this.intro=this.intro+e},T.prototype.clone=function(){var e=new T(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e},T.prototype.contains=function(e){return this.start<e&&e<this.end},T.prototype.eachNext=function(e){for(var t=this;t;)e(t),t=t.next},T.prototype.eachPrevious=function(e){for(var t=this;t;)e(t),t=t.previous},T.prototype.edit=function(e,t,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this},T.prototype.prependLeft=function(e){this.outro=e+this.outro},T.prototype.prependRight=function(e){this.intro=e+this.intro},T.prototype.split=function(e){var t=e-this.start,n=this.original.slice(0,t),r=this.original.slice(t);this.original=n;var i=new T(e,this.end,r);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i},T.prototype.toString=function(){return this.intro+this.content+this.outro},T.prototype.trimEnd=function(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;var t=this.content.replace(e,"");return t.length?(t!==this.content&&this.split(this.start+t.length).edit("",void 0,!0),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)},T.prototype.trimStart=function(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;var t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.end-t.length),this.edit("",void 0,!0)),!0):(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0)};var D=function(){throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};"undefined"!=typeof window&&"function"==typeof window.btoa?D=function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"function"==typeof Buffer&&(D=function(e){return Buffer.from(e,"utf-8").toString("base64")});var L=function(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=function(e){for(var t=0,n=0,r=0,i=0,s="",o=0;o<e.length;o++){var a=e[o];if(o>0&&(s+=";"),0!==a.length){for(var h=0,u=[],c=0,l=a;c<l.length;c++){var p=l[c],d=M(p[0]-h);h=p[0],p.length>1&&(d+=M(p[1]-t)+M(p[2]-n)+M(p[3]-r),t=p[1],n=p[2],r=p[3]),5===p.length&&(d+=M(p[4]-i),i=p[4]),u.push(d)}s+=u.join(",")}}return s}(e.mappings)};function V(e){var t=e.split("\n"),n=t.filter(function(e){return/^\t+/.test(e)}),r=t.filter(function(e){return/^ {2,}/.test(e)});if(0===n.length&&0===r.length)return null;if(n.length>=r.length)return"\t";var i=r.reduce(function(e,t){var n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(" ")}function B(e,t){var n=e.split(/[\/\\]/),r=t.split(/[\/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length)for(var i=n.length;i--;)n[i]="..";return n.concat(r).join("/")}L.prototype.toString=function(){return JSON.stringify(this)},L.prototype.toUrl=function(){return"data:application/json;charset=utf-8;base64,"+D(this.toString())};var z=Object.prototype.toString;function j(e){return"[object Object]"===z.call(e)}function W(e){for(var t=e.split("\n"),n=[],r=0,i=0;r<t.length;r++)n.push(i),i+=t[r].length+1;return function(e){for(var t=0,r=n.length;t<r;){var i=t+r>>1;e<n[i]?r=i:t=i+1}var s=t-1;return{line:s,column:e-n[s]}}}var U=function(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null};U.prototype.addEdit=function(e,t,n,r){if(t.length){var i=[this.generatedCodeColumn,e,n.line,n.column];r>=0&&i.push(r),this.rawSegments.push(i)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null},U.prototype.addUneditedChunk=function(e,t,n,r,i){for(var s=t.start,o=!0;s<t.end;)(this.hires||o||i[s])&&this.rawSegments.push([this.generatedCodeColumn,e,r.line,r.column]),"\n"===n[s]?(r.line+=1,r.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0):(r.column+=1,this.generatedCodeColumn+=1),s+=1,o=!1;this.pending=[this.generatedCodeColumn,e,r.line,r.column]},U.prototype.advance=function(e){if(e){var t=e.split("\n");if(t.length>1){for(var n=0;n<t.length-1;n++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}};var F="\n",q={insertLeft:!1,insertRight:!1,storeName:!1},G=function(e,t){void 0===t&&(t={});var n=new T(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:{}},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:V(e)}}),this.byStart[0]=n,this.byEnd[e.length]=n};G.prototype.addSourcemapLocation=function(e){this.sourcemapLocations[e]=!0},G.prototype.append=function(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this},G.prototype.appendLeft=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this},G.prototype.appendRight=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this},G.prototype.clone=function(){for(var e=new G(this.original,{filename:this.filename}),t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;var r=t.next,i=r&&r.clone();i&&(n.next=i,i.previous=n,n=i),t=r}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),Object.keys(this.sourcemapLocations).forEach(function(t){e.sourcemapLocations[t]=!0}),e},G.prototype.generateDecodedMap=function(e){var t=this;e=e||{};var n=Object.keys(this.storedNames),r=new U(e.hires),i=W(this.original);return this.intro&&r.advance(this.intro),this.firstChunk.eachNext(function(e){var s=i(e.start);e.intro.length&&r.advance(e.intro),e.edited?r.addEdit(0,e.content,s,e.storeName?n.indexOf(e.original):-1):r.addUneditedChunk(0,e,t.original,s,t.sourcemapLocations),e.outro.length&&r.advance(e.outro)}),{file:e.file?e.file.split(/[\/\\]/).pop():null,sources:[e.source?B(e.file||"",e.source):null],sourcesContent:e.includeContent?[this.original]:[null],names:n,mappings:r.raw}},G.prototype.generateMap=function(e){return new L(this.generateDecodedMap(e))},G.prototype.getIndentString=function(){return null===this.indentStr?"\t":this.indentStr},G.prototype.indent=function(e,t){var n=/^[^\r\n]/gm;if(j(e)&&(t=e,e=void 0),""===(e=void 0!==e?e:this.indentStr||"\t"))return this;var r={};(t=t||{}).exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(function(e){for(var t=e[0];t<e[1];t+=1)r[t]=!0});var i=!1!==t.indentStart,s=function(t){return i?""+e+t:(i=!0,t)};this.intro=this.intro.replace(n,s);for(var o=0,a=this.firstChunk;a;){var h=a.end;if(a.edited)r[o]||(a.content=a.content.replace(n,s),a.content.length&&(i="\n"===a.content[a.content.length-1]));else for(o=a.start;o<h;){if(!r[o]){var u=this.original[o];"\n"===u?i=!0:"\r"!==u&&i&&(i=!1,o===a.start?a.prependRight(e):(this._splitChunk(a,o),(a=a.next).prependRight(e)))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(n,s),this},G.prototype.insert=function(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")},G.prototype.insertLeft=function(e,t){return q.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),q.insertLeft=!0),this.appendLeft(e,t)},G.prototype.insertRight=function(e,t){return q.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),q.insertRight=!0),this.prependRight(e,t)},G.prototype.move=function(e,t,n){if(n>=e&&n<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);var r=this.byStart[e],i=this.byEnd[t],s=r.previous,o=i.next,a=this.byStart[n];if(!a&&i===this.lastChunk)return this;var h=a?a.previous:this.lastChunk;return s&&(s.next=o),o&&(o.previous=s),h&&(h.next=r),a&&(a.previous=i),r.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=r.previous,this.lastChunk.next=null),r.previous=h,i.next=a||null,h||(this.firstChunk=r),a||(this.lastChunk=i),this},G.prototype.overwrite=function(e,t,n,r){if("string"!=typeof n)throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===r&&(q.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),q.storeName=!0),r={storeName:!0});var i=void 0!==r&&r.storeName,s=void 0!==r&&r.contentOnly;if(i){var o=this.original.slice(e,t);this.storedNames[o]=!0}var a=this.byStart[e],h=this.byEnd[t];if(a){if(t>a.end&&a.next!==this.byStart[a.end])throw new Error("Cannot overwrite across a split point");if(a.edit(n,i,s),a!==h){for(var u=a.next;u!==h;)u.edit("",!1),u=u.next;u.edit("",!1)}}else{var c=new T(e,t,"").edit(n,i);h.next=c,c.previous=h}return this},G.prototype.prepend=function(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this},G.prototype.prependLeft=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this},G.prototype.prependRight=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this},G.prototype.remove=function(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);for(var n=this.byStart[e];n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this},G.prototype.lastChar=function(){if(this.outro.length)return this.outro[this.outro.length-1];var e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""},G.prototype.lastLine=function(){var e=this.outro.lastIndexOf(F);if(-1!==e)return this.outro.substr(e+1);var t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(-1!==(e=n.outro.lastIndexOf(F)))return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(-1!==(e=n.content.lastIndexOf(F)))return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(-1!==(e=n.intro.lastIndexOf(F)))return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return-1!==(e=this.intro.lastIndexOf(F))?this.intro.substr(e+1)+t:this.intro+t},G.prototype.slice=function(e,t){for(void 0===e&&(e=0),void 0===t&&(t=this.original.length);e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;for(var n="",r=this.firstChunk;r&&(r.start>e||r.end<=e);){if(r.start<t&&r.end>=t)return n;r=r.next}if(r&&r.edited&&r.start!==e)throw new Error("Cannot use replaced character "+e+" as slice start anchor.");for(var i=r;r;){!r.intro||i===r&&r.start!==e||(n+=r.intro);var s=r.start<t&&r.end>=t;if(s&&r.edited&&r.end!==t)throw new Error("Cannot use replaced character "+t+" as slice end anchor.");var o=i===r?e-r.start:0,a=s?r.content.length+t-r.end:r.content.length;if(n+=r.content.slice(o,a),!r.outro||s&&r.end!==t||(n+=r.outro),s)break;r=r.next}return n},G.prototype.snip=function(e,t){var n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n},G.prototype._split=function(e){if(!this.byStart[e]&&!this.byEnd[e])for(var t=this.lastSearchedChunk,n=e>t.end;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}},G.prototype._splitChunk=function(e,t){if(e.edited&&e.content.length){var n=W(this.original)(t);throw new Error("Cannot split a chunk that has already been edited ("+n.line+":"+n.column+' – "'+e.original+'")')}var r=e.split(t);return this.byEnd[t]=e,this.byStart[t]=r,this.byEnd[r.end]=r,e===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=e,!0},G.prototype.toString=function(){for(var e=this.intro,t=this.firstChunk;t;)e+=t.toString(),t=t.next;return e+this.outro},G.prototype.isEmpty=function(){var e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0},G.prototype.length=function(){var e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t},G.prototype.trimLines=function(){return this.trim("[\\r\\n]")},G.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},G.prototype.trimEndAborted=function(e){var t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;var n=this.lastChunk;do{var r=n.end,i=n.trimEnd(t);if(n.end!==r&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),i)return!0;n=n.previous}while(n);return!1},G.prototype.trimEnd=function(e){return this.trimEndAborted(e),this},G.prototype.trimStartAborted=function(e){var t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;var n=this.firstChunk;do{var r=n.end,i=n.trimStart(t);if(n.end!==r&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),i)return!0;n=n.next}while(n);return!1},G.prototype.trimStart=function(e){return this.trimStartAborted(e),this};var H=Object.prototype.hasOwnProperty,K=function(e){void 0===e&&(e={}),this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}};K.prototype.addSource=function(e){if(e instanceof G)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!j(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","indentExclusionRanges","separator"].forEach(function(t){H.call(e,t)||(e[t]=e.content[t])}),void 0===e.separator&&(e.separator=this.separator),e.filename)if(H.call(this.uniqueSourceIndexByFilename,e.filename)){var t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error("Illegal source: same filename ("+e.filename+"), different contents")}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this},K.prototype.append=function(e,t){return this.addSource({content:new G(e),separator:t&&t.separator||""}),this},K.prototype.clone=function(){var e=new K({intro:this.intro,separator:this.separator});return this.sources.forEach(function(t){e.addSource({filename:t.filename,content:t.content.clone(),separator:t.separator})}),e},K.prototype.generateDecodedMap=function(e){var t=this;void 0===e&&(e={});var n=[];this.sources.forEach(function(e){Object.keys(e.content.storedNames).forEach(function(e){~n.indexOf(e)||n.push(e)})});var r=new U(e.hires);return this.intro&&r.advance(this.intro),this.sources.forEach(function(e,i){i>0&&r.advance(t.separator);var s=e.filename?t.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=W(o.original);o.intro&&r.advance(o.intro),o.firstChunk.eachNext(function(t){var i=a(t.start);t.intro.length&&r.advance(t.intro),e.filename?t.edited?r.addEdit(s,t.content,i,t.storeName?n.indexOf(t.original):-1):r.addUneditedChunk(s,t,o.original,i,o.sourcemapLocations):r.advance(t.content),t.outro.length&&r.advance(t.outro)}),o.outro&&r.advance(o.outro)}),{file:e.file?e.file.split(/[\/\\]/).pop():null,sources:this.uniqueSources.map(function(t){return e.file?B(e.file,t.filename):t.filename}),sourcesContent:this.uniqueSources.map(function(t){return e.includeContent?t.content:null}),names:n,mappings:r.raw}},K.prototype.generateMap=function(e){return new L(this.generateDecodedMap(e))},K.prototype.getIndentString=function(){var e={};return this.sources.forEach(function(t){var n=t.content.indentStr;null!==n&&(e[n]||(e[n]=0),e[n]+=1)}),Object.keys(e).sort(function(t,n){return e[t]-e[n]})[0]||"\t"},K.prototype.indent=function(e){var t=this;if(arguments.length||(e=this.getIndentString()),""===e)return this;var n=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach(function(r,i){var s=void 0!==r.separator?r.separator:t.separator,o=n||i>0&&/\r?\n$/.test(s);r.content.indent(e,{exclude:r.indentExclusionRanges,indentStart:o}),n="\n"===r.content.lastChar()}),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,function(t,n){return n>0?e+t:t})),this},K.prototype.prepend=function(e){return this.intro=e+this.intro,this},K.prototype.toString=function(){var e=this,t=this.sources.map(function(t,n){var r=void 0!==t.separator?t.separator:e.separator;return(n>0?r:"")+t.content.toString()}).join("");return this.intro+t},K.prototype.isEmpty=function(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some(function(e){return!e.content.isEmpty()})},K.prototype.length=function(){return this.sources.reduce(function(e,t){return e+t.content.length()},this.intro.length)},K.prototype.trimLines=function(){return this.trim("[\\r\\n]")},K.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},K.prototype.trimStart=function(e){var t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){var n,r=0;do{if(!(n=this.sources[r++]))break}while(!n.content.trimStartAborted(e))}return this},K.prototype.trimEnd=function(e){var t,n=new RegExp((e||"\\s")+"+$"),r=this.sources.length-1;do{if(!(t=this.sources[r--])){this.intro=this.intro.replace(n,"");break}}while(!t.content.trimEndAborted(e));return this};const Y=Object.create(null),X="BlockStatement",Q="CallExpression",J="ExportAllDeclaration",Z="ExpressionStatement",ee="FunctionExpression",te="Identifier",ne="ImportDefaultSpecifier",re="ImportNamespaceSpecifier",ie="Program",se="Property",oe="ReturnStatement",ae="VariableDeclaration";function he(e,t,n,r){if(t.remove(n,r),e.annotations)for(const r of e.annotations){if(!(r.start<n))return;t.remove(r.start,r.end)}}function ue(e,t){if(e.annotations||e.parent.type!==Z||(e=e.parent),e.annotations)for(const n of e.annotations)t.remove(n.start,n.end)}const ce={isNoStatement:!0};function le(e,t,n=0){let r,i;for(r=e.indexOf(t,n);;){if(-1===(n=e.indexOf("/",n))||n>r)return r;if(i=e.charCodeAt(++n),++n,47===i){if(0===(n=e.indexOf("\n",n)+1))return-1;n>r&&(r=e.indexOf(t,n))}else 42===i&&(n=e.indexOf("*/",n)+2)>r&&(r=e.indexOf(t,n))}}function pe(e,t=0){let n,r;for(n=e.indexOf("\n",t);;){if(-1===(t=e.indexOf("/",t))||t>n)return n;if(47===(r=e.charCodeAt(++t)))return n;++t,42===r&&(t=e.indexOf("*/",t)+2)>n&&(n=e.indexOf("\n",t))}}function de(e,t,n,r,i){if(0===e.length)return;let s,o,a,h,u=e[0],c=!u.included||u.needsBoundaries;c&&(h=n+pe(t.original.slice(n,u.start))+1);for(let n=1;n<=e.length;n++)s=u,o=h,a=c,c=void 0!==(u=e[n])&&(!u.included||u.needsBoundaries),a||c?(h=s.end+pe(t.original.slice(s.end,void 0===u?r:u.start))+1,s.included?a?s.render(t,i,{end:h,start:o}):s.render(t,i):he(s,t,o,h)):s.render(t,i)}function fe(e,t,n,r){const i=[];let s,o,a,h,u,c=n-1;for(let r=0;r<e.length;r++){for(o=e[r],void 0!==s&&(c=s.end+le(t.original.slice(s.end,o.start),",")),a=h=c+2+pe(t.original.slice(c+1,o.start));32===(u=t.original.charCodeAt(a))||9===u||10===u||13===u;)a++;void 0!==s&&i.push({contentEnd:h,end:a,node:s,separator:c,start:n}),s=o,n=a}return i.push({contentEnd:r,end:r,node:s,separator:null,start:n}),i}const me="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",ge=64;function ye(e){let t="";do{const n=e%ge;e=Math.floor(e/ge),t=me[n]+t}while(0!==e);return t}function xe(e,t){let n=e,r=1;for(;t[n];)n=`${e}$${ye(r++)}`;return t[n]=!0,n}class ve{static create(e){return new this(e)}constructor({withNew:e=!1,args:t=[],callIdentifier:n}={}){this.withNew=e,this.args=t,this.callIdentifier=n}equals(e){return e&&this.callIdentifier===e.callIdentifier}}const Ee={UNKNOWN_KEY:!0},_e=[],be=[Ee];function Ae(e,t=null){return Object.create(t,e)}const Se={UNKNOWN_VALUE:!0},Ie={deoptimizePath:()=>{},getLiteralValueAtPath:()=>Se,getReturnExpressionWhenCalledAtPath:()=>Ie,hasEffectsWhenAccessedAtPath:e=>e.length>0,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:()=>!0,include:()=>{},included:!0,toString:()=>"[[UNKNOWN]]"},we={deoptimizePath:()=>{},getLiteralValueAtPath:()=>void 0,getReturnExpressionWhenCalledAtPath:()=>Ie,hasEffectsWhenAccessedAtPath:e=>e.length>0,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:()=>!0,include:()=>{},included:!0,toString:()=>"undefined"},Pe={value:{returns:null,returnsPrimitive:Ie,callsArgs:null,mutatesSelf:!0}},ke={value:{returns:null,returnsPrimitive:Ie,callsArgs:[0],mutatesSelf:!1}};class Ce{constructor(){this.included=!1}deoptimizePath(){}getLiteralValueAtPath(){return Se}getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Xe(qe,e[0]):Ie}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Ye(qe,e[0],this.included,t,n)}include(){this.included=!0}toString(){return"[[UNKNOWN ARRAY]]"}}const Ne={value:{callsArgs:null,mutatesSelf:!1,returns:Ce,returnsPrimitive:null}},$e={value:{callsArgs:null,mutatesSelf:!0,returns:Ce,returnsPrimitive:null}},Re={value:{callsArgs:[0],mutatesSelf:!1,returns:Ce,returnsPrimitive:null}},Oe={value:{callsArgs:[0],mutatesSelf:!0,returns:Ce,returnsPrimitive:null}},Me={deoptimizePath:()=>{},getLiteralValueAtPath:()=>Se,getReturnExpressionWhenCalledAtPath:e=>1===e.length?Xe(Ge,e[0]):Ie,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:e=>{if(1===e.length){const t=e[0];return"string"!=typeof t||!Ge[t]}return!0},include:()=>{},included:!0,toString:()=>"[[UNKNOWN BOOLEAN]]"},Te={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:Me}},De={value:{callsArgs:[0],mutatesSelf:!1,returns:null,returnsPrimitive:Me}},Le={deoptimizePath:()=>{},getLiteralValueAtPath:()=>Se,getReturnExpressionWhenCalledAtPath:e=>1===e.length?Xe(He,e[0]):Ie,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:e=>{if(1===e.length){const t=e[0];return"string"!=typeof t||!He[t]}return!0},include:()=>{},included:!0,toString:()=>"[[UNKNOWN NUMBER]]"},Ve={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:Le}},Be={value:{callsArgs:null,mutatesSelf:!0,returns:null,returnsPrimitive:Le}},ze={value:{callsArgs:[0],mutatesSelf:!1,returns:null,returnsPrimitive:Le}},je={deoptimizePath:()=>{},getLiteralValueAtPath:()=>Se,getReturnExpressionWhenCalledAtPath:e=>1===e.length?Xe(Ke,e[0]):Ie,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:(e,t,n)=>1!==e.length||Ye(Ke,e[0],!0,t,n),include:()=>{},included:!0,toString:()=>"[[UNKNOWN STRING]]"},We={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:je}};class Ue{constructor(){this.included=!1}deoptimizePath(){}getLiteralValueAtPath(){return Se}getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Xe(Fe,e[0]):Ie}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Ye(Fe,e[0],this.included,t,n)}include(){this.included=!0}toString(){return"[[UNKNOWN OBJECT]]"}}const Fe=Ae({hasOwnProperty:Te,isPrototypeOf:Te,propertyIsEnumerable:Te,toLocaleString:We,toString:We,valueOf:{value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:Ie}}}),qe=Ae({concat:Ne,copyWithin:$e,every:De,fill:$e,filter:Re,find:ke,findIndex:ze,forEach:ke,includes:Te,indexOf:Ve,join:We,lastIndexOf:Ve,map:Re,pop:Pe,push:Be,reduce:ke,reduceRight:ke,reverse:$e,shift:Pe,slice:Ne,some:De,sort:Oe,splice:$e,unshift:Be},Fe),Ge=Ae({valueOf:Te},Fe),He=Ae({toExponential:We,toFixed:We,toLocaleString:We,toPrecision:We,valueOf:Ve},Fe),Ke=Ae({charAt:We,charCodeAt:Ve,codePointAt:Ve,concat:We,endsWith:Te,includes:Te,indexOf:Ve,lastIndexOf:Ve,localeCompare:Ve,match:Te,normalize:We,padEnd:We,padStart:We,repeat:We,replace:{value:{callsArgs:[1],mutatesSelf:!1,returns:null,returnsPrimitive:je}},search:Ve,slice:We,split:Ne,startsWith:Te,substr:We,substring:We,toLocaleLowerCase:We,toLocaleUpperCase:We,toLowerCase:We,toUpperCase:We,trim:We,valueOf:We},Fe);function Ye(e,t,n,r,i){if("string"!=typeof t||!e[t])return!0;if(e[t].mutatesSelf&&n)return!0;if(!e[t].callsArgs)return!1;for(const n of e[t].callsArgs)if(r.args[n]&&r.args[n].hasEffectsWhenCalledAtPath(_e,ve.create({args:[],callIdentifier:{},withNew:!1}),i.getHasEffectsWhenCalledOptions()))return!0;return!1}function Xe(e,t){return"string"==typeof t&&e[t]?null!==e[t].returnsPrimitive?e[t].returnsPrimitive:new e[t].returns:Ie}class Qe{constructor(e){this.exportName=null,this.included=!1,this.isId=!1,this.isReassigned=!1,this.reexported=!1,this.renderBaseName=null,this.renderName=null,this.safeExportName=null,this.name=e}addReference(e){}deoptimizePath(e){}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getLiteralValueAtPath(e,t,n){return Se}getName(){const e=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}.${e}`:e}getReturnExpressionWhenCalledAtPath(e,t,n){return Ie}hasEffectsWhenAccessedAtPath(e,t){return e.length>0}hasEffectsWhenAssignedAtPath(e,t){return!0}hasEffectsWhenCalledAtPath(e,t,n){return!0}include(){this.included=!0}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}setSafeName(e){this.renderName=e}toString(){return this.name}}class Je extends Qe{constructor(e,t){super(t),this.module=e,this.isNamespace="*"===t,this.referenced=!1}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}include(){this.included||(this.included=!0,this.module.used=!0)}}Je.prototype.isExternal=!0;const Ze="break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public".split(" "),et="Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" "),tt=Object.create(null);Ze.concat(et).forEach(e=>tt[e]=!0);const nt=/[^$_a-zA-Z0-9]/g,rt=e=>/\d/.test(e[0]);function it(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(nt,"_"),(rt(e)||tt[e])&&(e=`_${e}`),e}const st=/^(?:\/|(?:[A-Za-z]:)?[\\|\/])/,ot=/^\.?\.\//;function at(e){return st.test(e)}function ht(e){return ot.test(e)}function ut(e){return e.replace(/\\/g,"/")}function ct(e){return e.split(/(\/|\\)/).pop()}function lt(e){const t=/(\/|\\)[^\/\\]*$/.exec(e);if(!t)return".";const n=e.slice(0,-t[0].length);return n||"/"}function pt(e){const t=/\.[^.]+$/.exec(ct(e));return t?t[0]:""}function dt(e,t){const n=e.split(/[\/\\]/).filter(Boolean),r=t.split(/[\/\\]/).filter(Boolean);for(;n[0]&&r[0]&&n[0]===r[0];)n.shift(),r.shift();for(;"."===r[0]||".."===r[0];){".."===r.shift()&&n.pop()}for(;n.pop();)r.unshift("..");return r.join("/")}function ft(...e){let t=e.shift().split(/[\/\\]/);return e.forEach(e=>{if(at(e))t=e.split(/[\/\\]/);else{const n=e.split(/[\/\\]/);for(;"."===n[0]||".."===n[0];){".."===n.shift()&&t.pop()}t.push.apply(t,n)}}),t.join("/")}class mt{constructor(e,t,n){this.exportsNames=!1,this.exportsNamespace=!1,this.isExternal=!0,this.mostCommonSuggestion=0,this.reexported=!1,this.renderPath=void 0,this.renormalizeRenderPath=!1,this.used=!1,this.graph=e,this.id=t,this.execIndex=1/0,this.moduleSideEffects=n;const r=t.split(/[\\\/]/);this.variableName=it(r.pop()),this.nameSuggestions=Object.create(null),this.declarations=Object.create(null),this.exportedVariables=new Map}getVariableForExportName(e,t){"default"!==e&&"*"!==e&&(this.exportsNames=!0),"*"===e&&(this.exportsNamespace=!0);let n=this.declarations[e];return n||(this.declarations[e]=n=new Je(this,e),this.exportedVariables.set(n,e),n)}setRenderPath(e,t){return this.renderPath="",e.paths&&(this.renderPath="function"==typeof e.paths?e.paths(this.id):e.paths[this.id]),this.renderPath||(at(this.id)?(this.renderPath=ut(dt(t,this.id)),this.renormalizeRenderPath=!0):this.renderPath=this.id),this.renderPath}suggestName(e){this.nameSuggestions[e]||(this.nameSuggestions[e]=0),this.nameSuggestions[e]+=1,this.nameSuggestions[e]>this.mostCommonSuggestion&&(this.mostCommonSuggestion=this.nameSuggestions[e],this.variableName=e)}warnUnusedImports(){const e=Object.keys(this.declarations).filter(e=>{if("*"===e)return!1;const t=this.declarations[e];return!t.included&&!this.reexported&&!t.referenced});if(0===e.length)return;const t=1===e.length?`'${e[0]}' is`:`${e.slice(0,-1).map(e=>`'${e}'`).join(", ")} and '${e.slice(-1)}' are`;this.graph.warn({code:"UNUSED_EXTERNAL_IMPORT",message:`${t} imported from external module '${this.id}' but never used`,names:e,source:this.id})}}function gt(e){e.isExecuted=!0;const t=[e],n={};for(const e of t)for(const r of e.dependencies)r instanceof mt||r.isExecuted||!r.moduleSideEffects||n[r.id]||(r.isExecuted=!0,n[r.id]=!0,t.push(r))}const yt=7;class xt extends Qe{constructor(e,t,n,r){super(e),this.additionalInitializers=null,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.init=n,this.deoptimizationTracker=r.deoptimizationTracker,this.module=r.module}addDeclaration(e,t){this.declarations.push(e),null===this.additionalInitializers&&(this.additionalInitializers=null===this.init?[]:[this.init],this.init=Ie,this.isReassigned=!0),null!==t&&this.additionalInitializers.push(t)}consolidateInitializers(){if(null!==this.additionalInitializers){for(const e of this.additionalInitializers)e.deoptimizePath(be);this.additionalInitializers=null}}deoptimizePath(e){if(!(e.length>yt||this.isReassigned||this.deoptimizationTracker.track(this,e)))if(0===e.length){if(!this.isReassigned){this.isReassigned=!0;for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache();this.init&&this.init.deoptimizePath(be)}}else this.init&&this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.isReassigned||!this.init||e.length>yt||t.isTracked(this.init,e)?Se:(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath(e,t.track(this.init,e),n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isReassigned||!this.init||e.length>yt||t.isTracked(this.init,e)?Ie:(this.expressionsToBeDeoptimized.push(n),this.init.getReturnExpressionWhenCalledAtPath(e,t.track(this.init,e),n))}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(this.isReassigned||e.length>yt||this.init&&!t.hasNodeBeenAccessedAtPath(e,this.init)&&this.init.hasEffectsWhenAccessedAtPath(e,t.addAccessedNodeAtPath(e,this.init)))}hasEffectsWhenAssignedAtPath(e,t){return!!(this.included||e.length>yt)||0!==e.length&&(this.isReassigned||this.init&&!t.hasNodeBeenAssignedAtPath(e,this.init)&&this.init.hasEffectsWhenAssignedAtPath(e,t.addAssignedNodeAtPath(e,this.init)))}hasEffectsWhenCalledAtPath(e,t,n){return e.length>yt||(this.isReassigned||this.init&&!n.hasNodeBeenCalledAtPathWithOptions(e,this.init,t)&&this.init.hasEffectsWhenCalledAtPath(e,t,n.addCalledNodeAtPathWithOptions(e,this.init,t)))}include(){if(!this.included){this.included=!0,this.module.isExecuted||gt(this.module);for(const e of this.declarations){e.included||e.include(!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==ie);)t=t.parent}}}}xt.prototype.isLocal=!0;class vt{constructor(){this.children=[],this.variables=Object.create(null)}addDeclaration(e,t,n=null,r){const i=e.name;return this.variables[i]?this.variables[i].addDeclaration(e,n):this.variables[i]=new xt(e.name,e,n||we,t),this.variables[i]}contains(e){return e in this.variables}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class Et extends vt{constructor(e){super(),this.accessedOutsideVariables=Object.create(null),this.parent=e,e.children.push(this)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables[e]=t,this.parent instanceof Et&&this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Et&&this.parent.addReturnExpression(e)}contains(e){return e in this.variables||this.parent.contains(e)}deconflict(e){const t=Object.assign(Object.create(null),e);for(const e of Object.keys(this.accessedOutsideVariables)){const n=this.accessedOutsideVariables[e];n.included&&(t[n.getBaseVariableName()]=!0)}for(const e of Object.keys(this.variables)){const n=this.variables[e];n.included&&n.setSafeName(xe(e,t))}for(const t of this.children)t.deconflict(e)}findLexicalBoundary(){return this.parent instanceof Et?this.parent.findLexicalBoundary():this}findVariable(e){const t=this.variables[e]||this.accessedOutsideVariables[e];return t||(this.accessedOutsideVariables[e]=this.parent.findVariable(e))}}function _t(e,t,n){if("number"==typeof n)throw new Error("locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument");return function(e,t){void 0===t&&(t={});var n=t.offsetLine||0,r=t.offsetColumn||0,i=e.split("\n"),s=0,o=i.map(function(e,t){var n=s+e.length+1,r={start:s,end:n,line:t};return s=n,r}),a=0;function h(e,t){return e.start<=t&&t<e.end}function u(e,t){return{line:n+e.line,column:r+t-e.start,character:t}}return function(t,n){"string"==typeof t&&(t=e.indexOf(t,n||0));for(var r=o[a],i=t>=r.end?1:-1;r;){if(h(r,t))return u(r,t);r=o[a+=i]}}}(e,n)(t,n&&n.startIndex)}var bt=5,At=1<<bt,St=At-1,It={};function wt(e){e&&(e.value=!0)}function Pt(){}function kt(e){return void 0===e.size&&(e.size=e.__iterate(Nt)),e.size}function Ct(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?kt(e)+t:t}function Nt(){return!0}function $t(e,t,n){return(0===e&&!Tt(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function Rt(e,t){return Mt(e,t,0)}function Ot(e,t){return Mt(e,t,t)}function Mt(e,t,n){return void 0===e?n:Tt(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function Tt(e){return e<0||0===e&&1/e==-1/0}var Dt="@@__IMMUTABLE_ITERABLE__@@";function Lt(e){return Boolean(e&&e[Dt])}var Vt="@@__IMMUTABLE_KEYED__@@";function Bt(e){return Boolean(e&&e[Vt])}var zt="@@__IMMUTABLE_INDEXED__@@";function jt(e){return Boolean(e&&e[zt])}function Wt(e){return Bt(e)||jt(e)}var Ut=function(e){return Lt(e)?e:gn(e)},Ft=function(e){function t(e){return Bt(e)?e:yn(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Ut),qt=function(e){function t(e){return jt(e)?e:xn(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Ut),Gt=function(e){function t(e){return Lt(e)&&!Wt(e)?e:vn(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Ut);Ut.Keyed=Ft,Ut.Indexed=qt,Ut.Set=Gt;var Ht="@@__IMMUTABLE_SEQ__@@";function Kt(e){return Boolean(e&&e[Ht])}var Yt="@@__IMMUTABLE_RECORD__@@";function Xt(e){return Boolean(e&&e[Yt])}function Qt(e){return Lt(e)||Xt(e)}var Jt="@@__IMMUTABLE_ORDERED__@@";function Zt(e){return Boolean(e&&e[Jt])}var en=0,tn=1,nn=2,rn="function"==typeof Symbol&&Symbol.iterator,sn="@@iterator",on=rn||sn,an=function(e){this.next=e};function hn(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function un(){return{value:void 0,done:!0}}function cn(e){return!!dn(e)}function ln(e){return e&&"function"==typeof e.next}function pn(e){var t=dn(e);return t&&t.call(e)}function dn(e){var t=e&&(rn&&e[rn]||e[sn]);if("function"==typeof t)return t}an.prototype.toString=function(){return"[Iterator]"},an.KEYS=en,an.VALUES=tn,an.ENTRIES=nn,an.prototype.inspect=an.prototype.toSource=function(){return this.toString()},an.prototype[on]=function(){return this};var fn=Object.prototype.hasOwnProperty;function mn(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var gn=function(e){function t(e){return null==e?Sn():Qt(e)?e.toSeq():function(e){var t=Pn(e);if(t)return t;if("object"==typeof e)return new _n(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var s=n[t?r-++i:i++];if(!1===e(s[1],s[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new an(function(){if(i===r)return{value:void 0,done:!0};var s=n[t?r-++i:i++];return hn(e,s[0],s[1])})}return this.__iteratorUncached(e,t)},t}(Ut),yn=function(e){function t(e){return null==e?Sn().toKeyedSeq():Lt(e)?Bt(e)?e.toSeq():e.fromEntrySeq():Xt(e)?e.toSeq():In(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(gn),xn=function(e){function t(e){return null==e?Sn():Lt(e)?Bt(e)?e.entrySeq():e.toIndexedSeq():Xt(e)?e.toSeq().entrySeq():wn(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(gn),vn=function(e){function t(e){return(Lt(e)&&!Wt(e)?e:xn(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(gn);gn.isSeq=Kt,gn.Keyed=yn,gn.Set=vn,gn.Indexed=xn,gn.prototype[Ht]=!0;var En=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[Ct(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var s=t?r-++i:i++;if(!1===e(n[s],s,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new an(function(){if(i===r)return{value:void 0,done:!0};var s=t?r-++i:i++;return hn(e,s,n[s])})},t}(xn),_n=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return fn.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,s=0;s!==i;){var o=r[t?i-++s:s++];if(!1===e(n[o],o,this))break}return s},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,s=0;return new an(function(){if(s===i)return{value:void 0,done:!0};var o=r[t?i-++s:s++];return hn(e,o,n[o])})},t}(yn);_n.prototype[Jt]=!0;var bn,An=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=pn(this._collection),r=0;if(ln(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=pn(this._collection);if(!ln(n))return new an(un);var r=0;return new an(function(){var t=n.next();return t.done?t:hn(e,r++,t.value)})},t}(xn);function Sn(){return bn||(bn=new En([]))}function In(e){var t=Array.isArray(e)?new En(e):cn(e)?new An(e):void 0;if(t)return t.fromEntrySeq();if("object"==typeof e)return new _n(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function wn(e){var t=Pn(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function Pn(e){return mn(e)?new En(e):cn(e)?new An(e):void 0}var kn="@@__IMMUTABLE_MAP__@@";function Cn(e){return Boolean(e&&e[kn])}function Nn(e){return Cn(e)&&Zt(e)}function $n(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function Rn(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!($n(e)&&$n(t)&&e.equals(t))}var On="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Mn(e){return e>>>1&1073741824|3221225471&e}var Tn=Object.prototype.valueOf;function Dn(e){switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return Mn(t)}(e);case"string":return e.length>Fn?function(e){var t=Hn[e];void 0===t&&(t=Ln(e),Gn===qn&&(Gn=0,Hn={}),Gn++,Hn[e]=t);return t}(e):Ln(e);case"object":case"function":return null===e?1108378658:"function"==typeof e.hashCode?Mn(e.hashCode(e)):(e.valueOf!==Tn&&"function"==typeof e.valueOf&&(e=e.valueOf(e)),function(e){var t;if(jn&&void 0!==(t=zn.get(e)))return t;if(void 0!==(t=e[Un]))return t;if(!Bn){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Un]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}t=++Wn,1073741824&Wn&&(Wn=0);if(jn)zn.set(e,t);else{if(void 0!==Vn&&!1===Vn(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Bn)Object.defineProperty(e,Un,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Un]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Un]=t}}return t}(e));case"undefined":return 1108378659;default:if("function"==typeof e.toString)return Ln(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function Ln(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Mn(t)}var Vn=Object.isExtensible,Bn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();var zn,jn="function"==typeof WeakMap;jn&&(zn=new WeakMap);var Wn=0,Un="__immutablehash__";"function"==typeof Symbol&&(Un=Symbol(Un));var Fn=16,qn=255,Gn=0,Hn={},Kn=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=er(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=Zn(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(yn);Kn.prototype[Jt]=!0;var Yn=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&kt(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(tn,t),i=0;return t&&kt(this),new an(function(){var s=r.next();return s.done?s:hn(e,t?n.size-++i:i++,s.value,s)})},t}(xn),Xn=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(tn,t);return new an(function(){var t=n.next();return t.done?t:hn(e,t.value,t.value,t)})},t}(vn),Qn=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){cr(t);var r=Lt(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(tn,t);return new an(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){cr(r);var i=Lt(r);return hn(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(yn);function Jn(e){var t=pr(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=dr,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===nn){var r=e.__iterator(t,n);return new an(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===tn?en:tn,n)},t}function Zn(e,t,n){var r=pr(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var s=e.get(r,It);return s===It?i:t.call(n,s,r,e)},r.__iterateUncached=function(r,i){var s=this;return e.__iterate(function(e,i,o){return!1!==r(t.call(n,e,i,o),i,s)},i)},r.__iteratorUncached=function(r,i){var s=e.__iterator(nn,i);return new an(function(){var i=s.next();if(i.done)return i;var o=i.value,a=o[0];return hn(r,a,t.call(n,o[1],a,e),i)})},r}function er(e,t){var n=this,r=pr(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=Jn(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=dr,r.__iterate=function(n,r){var i=this,s=0;return r&&kt(e),e.__iterate(function(e,o){return n(e,t?o:r?i.size-++s:s++,i)},!r)},r.__iterator=function(r,i){var s=0;i&&kt(e);var o=e.__iterator(nn,!i);return new an(function(){var e=o.next();if(e.done)return e;var a=e.value;return hn(r,t?a[0]:i?n.size-++s:s++,a[1],e)})},r}function tr(e,t,n,r){var i=pr(e);return r&&(i.has=function(r){var i=e.get(r,It);return i!==It&&!!t.call(n,i,r,e)},i.get=function(r,i){var s=e.get(r,It);return s!==It&&t.call(n,s,r,e)?s:i}),i.__iterateUncached=function(i,s){var o=this,a=0;return e.__iterate(function(e,s,h){if(t.call(n,e,s,h))return a++,i(e,r?s:a-1,o)},s),a},i.__iteratorUncached=function(i,s){var o=e.__iterator(nn,s),a=0;return new an(function(){for(;;){var s=o.next();if(s.done)return s;var h=s.value,u=h[0],c=h[1];if(t.call(n,c,u,e))return hn(i,r?u:a++,c,s)}})},i}function nr(e,t,n,r){var i=e.size;if($t(t,n,i))return e;var s=Rt(t,i),o=Ot(n,i);if(s!=s||o!=o)return nr(e.toSeq().cacheResult(),t,n,r);var a,h=o-s;h==h&&(a=h<0?0:h);var u=pr(e);return u.size=0===a?a:e.size&&a||void 0,!r&&Kt(e)&&a>=0&&(u.get=function(t,n){return(t=Ct(this,t))>=0&&t<a?e.get(t+s,n):n}),u.__iterateUncached=function(t,n){var i=this;if(0===a)return 0;if(n)return this.cacheResult().__iterate(t,n);var o=0,h=!0,u=0;return e.__iterate(function(e,n){if(!h||!(h=o++<s))return u++,!1!==t(e,r?n:u-1,i)&&u!==a}),u},u.__iteratorUncached=function(t,n){if(0!==a&&n)return this.cacheResult().__iterator(t,n);if(0===a)return new an(un);var i=e.__iterator(t,n),o=0,h=0;return new an(function(){for(;o++<s;)i.next();if(++h>a)return{value:void 0,done:!0};var e=i.next();return r||t===tn||e.done?e:hn(t,h-1,t===en?void 0:e.value[1],e)})},u}function rr(e,t,n,r){var i=pr(e);return i.__iterateUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterate(i,s);var a=!0,h=0;return e.__iterate(function(e,s,u){if(!a||!(a=t.call(n,e,s,u)))return h++,i(e,r?s:h-1,o)}),h},i.__iteratorUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterator(i,s);var a=e.__iterator(nn,s),h=!0,u=0;return new an(function(){var e,s,c;do{if((e=a.next()).done)return r||i===tn?e:hn(i,u++,i===en?void 0:e.value[1],e);var l=e.value;s=l[0],c=l[1],h&&(h=t.call(n,c,s,o))}while(h);return i===nn?e:hn(i,s,c,e)})},i}function ir(e,t,n){var r=pr(e);return r.__iterateUncached=function(i,s){if(s)return this.cacheResult().__iterate(i,s);var o=0,a=!1;return function e(h,u){h.__iterate(function(s,h){return(!t||u<t)&&Lt(s)?e(s,u+1):(o++,!1===i(s,n?h:o-1,r)&&(a=!0)),!a},s)}(e,0),o},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var s=e.__iterator(r,i),o=[],a=0;return new an(function(){for(;s;){var e=s.next();if(!1===e.done){var h=e.value;if(r===nn&&(h=h[1]),t&&!(o.length<t)||!Lt(h))return n?e:hn(r,a++,h,e);o.push(s),s=h.__iterator(r,i)}else s=o.pop()}return{value:void 0,done:!0}})},r}function sr(e,t,n){t||(t=fr);var r=Bt(e),i=0,s=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return s.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){s[t].length=2}:function(e,t){s[t]=e[1]}),r?yn(s):jt(e)?xn(s):vn(s)}function or(e,t,n){if(t||(t=fr),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return ar(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return ar(t,e,n)?n:e})}function ar(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function hr(e,t,n,r){var i=pr(e),s=new En(n).map(function(e){return e.size});return i.size=r?s.max():s.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(tn,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var s=n.map(function(e){return e=Ut(e),pn(i?e.reverse():e)}),o=0,a=!1;return new an(function(){var n;return a||(n=s.map(function(e){return e.next()}),a=r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),a?{value:void 0,done:!0}:hn(e,o++,t.apply(null,n.map(function(e){return e.value})))})},i}function ur(e,t){return e===t?e:Kt(e)?t:e.constructor(t)}function cr(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function lr(e){return Bt(e)?Ft:jt(e)?qt:Gt}function pr(e){return Object.create((Bt(e)?yn:jt(e)?xn:vn).prototype)}function dr(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):gn.prototype.cacheResult.call(this)}function fr(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function mr(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function gr(e,t){if(!e)throw new Error(t)}function yr(e){gr(e!==1/0,"Cannot perform this action with an infinite size.")}function xr(e){if(mn(e)&&"string"!=typeof e)return e;if(Zt(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function vr(e){return e&&("function"!=typeof e.constructor||"Object"===e.constructor.name)}function Er(e){return"object"==typeof e&&(Qt(e)||Array.isArray(e)||vr(e))}function _r(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function br(e,t){return Qt(e)?e.has(t):Er(e)&&fn.call(e,t)}function Ar(e,t,n){return Qt(e)?e.get(t,n):br(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function Sr(e){if(Array.isArray(e))return mr(e);var t={};for(var n in e)fn.call(e,n)&&(t[n]=e[n]);return t}function Ir(e,t){if(!Er(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Qt(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!fn.call(e,t))return e;var n=Sr(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function wr(e,t,n){if(!Er(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Qt(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(fn.call(e,t)&&n===e[t])return e;var r=Sr(e);return r[t]=n,r}function Pr(e,t,n,r){r||(r=n,n=void 0);var i=function e(t,n,r,i,s,o){var a=n===It;if(i===r.length){var h=a?s:n,u=o(h);return u===h?n:u}if(!a&&!Er(n))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,i).map(_r)+"]: "+n);var c=r[i];var l=a?It:Ar(n,c,It);var p=e(l===It?t:Qt(l),l,r,i+1,s,o);return p===l?n:p===It?Ir(n,c):wr(a?t?oi():{}:n,c,p)}(Qt(e),e,xr(t),0,n,r);return i===It?n:i}function kr(e,t,n){return Pr(e,t,It,function(){return n})}function Cr(e,t){return kr(this,e,t)}function Nr(e,t){return Pr(e,t,function(){return It})}function $r(e){return Nr(this,e)}function Rr(e,t,n,r){return Pr(e,[t],n,r)}function Or(e,t,n){return 1===arguments.length?e(this):Rr(this,e,t,n)}function Mr(e,t,n){return Pr(this,e,t,n)}function Tr(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Lr(this,e)}function Dr(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return Lr(this,t,e)}function Lr(e,t,n){for(var r=[],i=0;i<t.length;i++){var s=Ft(t[i]);0!==s.size&&r.push(s)}return 0===r.length?e:0!==e.toSeq().size||e.__ownerID||1!==r.length?e.withMutations(function(e){for(var t=n?function(t,r){Rr(e,r,It,function(e){return e===It?t:n(e,t,r)})}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)}):e.constructor(r[0])}function Vr(e,t,n){return Br(e,t,function(e){return function t(n,r,i){return Er(n)&&Er(r)?Br(n,[r],t):e?e(n,r,i):r}}(n))}function Br(e,t,n){if(!Er(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(Qt(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,s=r?qt:Ft,o=r?function(t){i===e&&(i=Sr(i)),i.push(t)}:function(t,r){var s=fn.call(i,r),o=s&&n?n(i[r],t,r):t;s&&o===i[r]||(i===e&&(i=Sr(i)),i[r]=o)},a=0;a<t.length;a++)s(t[a]).forEach(o);return i}function zr(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Vr(this,e)}function jr(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Vr(this,t,e)}function Wr(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Pr(this,e,oi(),function(e){return Br(e,t)})}function Ur(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Pr(this,e,oi(),function(e){return Vr(e,t)})}function Fr(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function qr(){return this.__ownerID?this:this.__ensureOwner(new Pt)}function Gr(){return this.__ensureOwner()}function Hr(){return this.__altered}Yn.prototype.cacheResult=Kn.prototype.cacheResult=Xn.prototype.cacheResult=Qn.prototype.cacheResult=dr;var Kr=function(e){function t(t){return null==t?oi():Cn(t)&&!Zt(t)?t:oi().withMutations(function(n){var r=e(t);yr(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return oi().withMutations(function(t){for(var n=0;n<e.length;n+=2){if(n+1>=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return ai(this,e,t)},t.prototype.remove=function(e){return ai(this,e,It)},t.prototype.deleteAll=function(e){var t=Ut(e);return 0===t.size?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):oi()},t.prototype.sort=function(e){return Ri(sr(this,e))},t.prototype.sortBy=function(e,t){return Ri(sr(this,t,e))},t.prototype.map=function(e,t){return this.withMutations(function(n){n.forEach(function(r,i){n.set(i,e.call(t,r,i,n))})})},t.prototype.__iterator=function(e,t){return new ni(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?si(this.size,this._root,e,this.__hash):0===this.size?oi():(this.__ownerID=e,this.__altered=!1,this)},t}(Ft);Kr.isMap=Cn;var Yr=Kr.prototype;Yr[kn]=!0,Yr.delete=Yr.remove,Yr.removeAll=Yr.deleteAll,Yr.setIn=Cr,Yr.removeIn=Yr.deleteIn=$r,Yr.update=Or,Yr.updateIn=Mr,Yr.merge=Yr.concat=Tr,Yr.mergeWith=Dr,Yr.mergeDeep=zr,Yr.mergeDeepWith=jr,Yr.mergeIn=Wr,Yr.mergeDeepIn=Ur,Yr.withMutations=Fr,Yr.wasAltered=Hr,Yr.asImmutable=Gr,Yr["@@transducer/init"]=Yr.asMutable=qr,Yr["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Yr["@@transducer/result"]=function(e){return e.asImmutable()};var Xr=function(e,t){this.ownerID=e,this.entries=t};Xr.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if(Rn(n,i[s][0]))return i[s][1];return r},Xr.prototype.update=function(e,t,n,r,i,s,o){for(var a=i===It,h=this.entries,u=0,c=h.length;u<c&&!Rn(r,h[u][0]);u++);var l=u<c;if(l?h[u][1]===i:a)return this;if(wt(o),(a||!l)&&wt(s),!a||1!==h.length){if(!l&&!a&&h.length>=di)return function(e,t,n,r){e||(e=new Pt);for(var i=new ei(e,Dn(n),[n,r]),s=0;s<t.length;s++){var o=t[s];i=i.update(e,0,void 0,o[0],o[1])}return i}(e,h,r,i);var p=e&&e===this.ownerID,d=p?h:mr(h);return l?a?u===c-1?d.pop():d[u]=d.pop():d[u]=[r,i]:d.push([r,i]),p?(this.entries=d,this):new Xr(e,d)}};var Qr=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};Qr.prototype.get=function(e,t,n,r){void 0===t&&(t=Dn(n));var i=1<<((0===e?t:t>>>e)&St),s=this.bitmap;return 0==(s&i)?r:this.nodes[li(s&i-1)].get(e+bt,t,n,r)},Qr.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Dn(r));var a=(0===t?n:n>>>t)&St,h=1<<a,u=this.bitmap,c=0!=(u&h);if(!c&&i===It)return this;var l=li(u&h-1),p=this.nodes,d=c?p[l]:void 0,f=hi(d,e,t+bt,n,r,i,s,o);if(f===d)return this;if(!c&&f&&p.length>=fi)return function(e,t,n,r,i){for(var s=0,o=new Array(At),a=0;0!==n;a++,n>>>=1)o[a]=1&n?t[s++]:void 0;return o[r]=i,new Jr(e,s+1,o)}(e,p,u,a,f);if(c&&!f&&2===p.length&&ui(p[1^l]))return p[1^l];if(c&&f&&1===p.length&&ui(f))return f;var m=e&&e===this.ownerID,g=c?f?u:u^h:u|h,y=c?f?pi(p,l,f,m):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),s=0,o=0;o<r;o++)o===t&&(s=1),i[o]=e[o+s];return i}(p,l,m):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var s=new Array(i),o=0,a=0;a<i;a++)a===t?(s[a]=n,o=-1):s[a]=e[a+o];return s}(p,l,f,m);return m?(this.bitmap=g,this.nodes=y,this):new Qr(e,g,y)};var Jr=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};Jr.prototype.get=function(e,t,n,r){void 0===t&&(t=Dn(n));var i=(0===e?t:t>>>e)&St,s=this.nodes[i];return s?s.get(e+bt,t,n,r):r},Jr.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Dn(r));var a=(0===t?n:n>>>t)&St,h=i===It,u=this.nodes,c=u[a];if(h&&!c)return this;var l=hi(c,e,t+bt,n,r,i,s,o);if(l===c)return this;var p=this.count;if(c){if(!l&&--p<mi)return function(e,t,n,r){for(var i=0,s=0,o=new Array(n),a=0,h=1,u=t.length;a<u;a++,h<<=1){var c=t[a];void 0!==c&&a!==r&&(i|=h,o[s++]=c)}return new Qr(e,i,o)}(e,u,p,a)}else p++;var d=e&&e===this.ownerID,f=pi(u,a,l,d);return d?(this.count=p,this.nodes=f,this):new Jr(e,p,f)};var Zr=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};Zr.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if(Rn(n,i[s][0]))return i[s][1];return r},Zr.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Dn(r));var a=i===It;if(n!==this.keyHash)return a?this:(wt(o),wt(s),ci(this,e,t,n,[r,i]));for(var h=this.entries,u=0,c=h.length;u<c&&!Rn(r,h[u][0]);u++);var l=u<c;if(l?h[u][1]===i:a)return this;if(wt(o),(a||!l)&&wt(s),a&&2===c)return new ei(e,this.keyHash,h[1^u]);var p=e&&e===this.ownerID,d=p?h:mr(h);return l?a?u===c-1?d.pop():d[u]=d.pop():d[u]=[r,i]:d.push([r,i]),p?(this.entries=d,this):new Zr(e,this.keyHash,d)};var ei=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};ei.prototype.get=function(e,t,n,r){return Rn(n,this.entry[0])?this.entry[1]:r},ei.prototype.update=function(e,t,n,r,i,s,o){var a=i===It,h=Rn(r,this.entry[0]);return(h?i===this.entry[1]:a)?this:(wt(o),a?void wt(s):h?e&&e===this.ownerID?(this.entry[1]=i,this):new ei(e,this.keyHash,[r,i]):(wt(s),ci(this,e,t,Dn(r),[r,i])))},Xr.prototype.iterate=Zr.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Qr.prototype.iterate=Jr.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var s=n[t?i-r:r];if(s&&!1===s.iterate(e,t))return!1}},ei.prototype.iterate=function(e,t){return e(this.entry)};var ti,ni=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&ii(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return ri(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return ri(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var s=n.nodes[this._reverse?i-r:r];if(s){if(s.entry)return ri(e,s.entry);t=this._stack=ii(s,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(an);function ri(e,t){return hn(e,t[0],t[1])}function ii(e,t){return{node:e,index:0,__prev:t}}function si(e,t,n,r){var i=Object.create(Yr);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function oi(){return ti||(ti=si(0))}function ai(e,t,n){var r,i;if(e._root){var s={value:!1},o={value:!1};if(r=hi(e._root,e.__ownerID,0,void 0,t,n,s,o),!o.value)return e;i=e.size+(s.value?n===It?-1:1:0)}else{if(n===It)return e;i=1,r=new Xr(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?si(i,r):oi()}function hi(e,t,n,r,i,s,o,a){return e?e.update(t,n,r,i,s,o,a):s===It?e:(wt(a),wt(o),new ei(t,r,[i,s]))}function ui(e){return e.constructor===ei||e.constructor===Zr}function ci(e,t,n,r,i){if(e.keyHash===r)return new Zr(t,r,[e.entry,i]);var s,o=(0===n?e.keyHash:e.keyHash>>>n)&St,a=(0===n?r:r>>>n)&St,h=o===a?[ci(e,t,n+bt,r,i)]:(s=new ei(t,r,i),o<a?[e,s]:[s,e]);return new Qr(t,1<<o|1<<a,h)}function li(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function pi(e,t,n,r){var i=r?e:mr(e);return i[t]=n,i}var di=At/4,fi=At/2,mi=At/4,gi="@@__IMMUTABLE_LIST__@@";function yi(e){return Boolean(e&&e[gi])}var xi=function(e){function t(t){var n=Ii();if(null==t)return n;if(yi(t))return t;var r=e(t),i=r.size;return 0===i?n:(yr(i),i>0&&i<At?Si(0,i,bt,null,new Ei(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=Ct(this,e))>=0&&e<this.size){var n=ki(this,e+=this._origin);return n&&n.array[e&St]}return t},t.prototype.set=function(e,t){return function(e,t,n){if((t=Ct(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Ci(e,t).set(0,n):Ci(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,s={value:!1};t>=Ni(e._capacity)?r=wi(r,e.__ownerID,0,t,n,s):i=wi(i,e.__ownerID,e._level,t,n,s);if(!s.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return Si(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=bt,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Ii()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Ci(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return Ci(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Ci(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return Ci(this,1)},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],s=e("string"!=typeof i&&cn(i)?i:[i]);0!==s.size&&n.push(s)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(n[0])},t.prototype.setSize=function(e){return Ci(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,r))})},t.prototype.slice=function(e,t){var n=this.size;return $t(e,t,n)?this:Ci(this,Rt(e,n),Ot(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=Ai(this,t);return new an(function(){var i=r();return i===bi?{value:void 0,done:!0}:hn(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=Ai(this,t);(n=i())!==bi&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Si(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?Ii():(this.__ownerID=e,this.__altered=!1,this)},t}(qt);xi.isList=yi;var vi=xi.prototype;vi[gi]=!0,vi.delete=vi.remove,vi.merge=vi.concat,vi.setIn=Cr,vi.deleteIn=vi.removeIn=$r,vi.update=Or,vi.updateIn=Mr,vi.mergeIn=Wr,vi.mergeDeepIn=Ur,vi.withMutations=Fr,vi.wasAltered=Hr,vi.asImmutable=Gr,vi["@@transducer/init"]=vi.asMutable=qr,vi["@@transducer/step"]=function(e,t){return e.push(t)},vi["@@transducer/result"]=function(e){return e.asImmutable()};var Ei=function(e,t){this.array=e,this.ownerID=t};Ei.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&St;if(r>=this.array.length)return new Ei([],e);var i,s=0===r;if(t>0){var o=this.array[r];if((i=o&&o.removeBefore(e,t-bt,n))===o&&s)return this}if(s&&!i)return this;var a=Pi(this,e);if(!s)for(var h=0;h<r;h++)a.array[h]=void 0;return i&&(a.array[r]=i),a},Ei.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&St;if(i>=this.array.length)return this;if(t>0){var s=this.array[i];if((r=s&&s.removeAfter(e,t-bt,n))===s&&i===this.array.length-1)return this}var o=Pi(this,e);return o.array.splice(i+1),r&&(o.array[i]=r),o};var _i,bi={};function Ai(e,t){var n=e._origin,r=e._capacity,i=Ni(r),s=e._tail;return o(e._root,e._level,0);function o(e,a,h){return 0===a?function(e,o){var a=o===i?s&&s.array:e&&e.array,h=o>n?0:n-o,u=r-o;u>At&&(u=At);return function(){if(h===u)return bi;var e=t?--u:h++;return a&&a[e]}}(e,h):function(e,i,s){var a,h=e&&e.array,u=s>n?0:n-s>>i,c=1+(r-s>>i);c>At&&(c=At);return function(){for(;;){if(a){var e=a();if(e!==bi)return e;a=null}if(u===c)return bi;var n=t?--c:u++;a=o(h&&h[n],i-bt,s+(n<<i))}}}(e,a,h)}}function Si(e,t,n,r,i,s,o){var a=Object.create(vi);return a.size=t-e,a._origin=e,a._capacity=t,a._level=n,a._root=r,a._tail=i,a.__ownerID=s,a.__hash=o,a.__altered=!1,a}function Ii(){return _i||(_i=Si(0,0,bt))}function wi(e,t,n,r,i,s){var o,a=r>>>n&St,h=e&&a<e.array.length;if(!h&&void 0===i)return e;if(n>0){var u=e&&e.array[a],c=wi(u,t,n-bt,r,i,s);return c===u?e:((o=Pi(e,t)).array[a]=c,o)}return h&&e.array[a]===i?e:(s&&wt(s),o=Pi(e,t),void 0===i&&a===o.array.length-1?o.array.pop():o.array[a]=i,o)}function Pi(e,t){return t&&e&&t===e.ownerID?e:new Ei(e?e.array.slice():[],t)}function ki(e,t){if(t>=Ni(e._capacity))return e._tail;if(t<1<<e._level+bt){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&St],r-=bt;return n}}function Ci(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new Pt,i=e._origin,s=e._capacity,o=i+t,a=void 0===n?s:n<0?s+n:i+n;if(o===i&&a===s)return e;if(o>=a)return e.clear();for(var h=e._level,u=e._root,c=0;o+c<0;)u=new Ei(u&&u.array.length?[void 0,u]:[],r),c+=1<<(h+=bt);c&&(o+=c,i+=c,a+=c,s+=c);for(var l=Ni(s),p=Ni(a);p>=1<<h+bt;)u=new Ei(u&&u.array.length?[u]:[],r),h+=bt;var d=e._tail,f=p<l?ki(e,a-1):p>l?new Ei([],r):d;if(d&&p>l&&o<s&&d.array.length){for(var m=u=Pi(u,r),g=h;g>bt;g-=bt){var y=l>>>g&St;m=m.array[y]=Pi(m.array[y],r)}m.array[l>>>bt&St]=d}if(a<s&&(f=f&&f.removeAfter(r,0,a)),o>=p)o-=p,a-=p,h=bt,u=null,f=f&&f.removeBefore(r,0,o);else if(o>i||p<l){for(c=0;u;){var x=o>>>h&St;if(x!==p>>>h&St)break;x&&(c+=(1<<h)*x),h-=bt,u=u.array[x]}u&&o>i&&(u=u.removeBefore(r,h,o-c)),u&&p<l&&(u=u.removeAfter(r,h,p-c)),c&&(o-=c,a-=c)}return e.__ownerID?(e.size=a-o,e._origin=o,e._capacity=a,e._level=h,e._root=u,e._tail=f,e.__hash=void 0,e.__altered=!0,e):Si(o,a,h,u,f)}function Ni(e){return e<At?0:e-1>>>bt<<bt}var $i,Ri=function(e){function t(e){return null==e?Mi():Nn(e)?e:Mi().withMutations(function(t){var n=Ft(e);yr(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Mi()},t.prototype.set=function(e,t){return Ti(this,e,t)},t.prototype.remove=function(e){return Ti(this,e,It)},t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Oi(t,n,e,this.__hash):0===this.size?Mi():(this.__ownerID=e,this._map=t,this._list=n,this)},t}(Kr);function Oi(e,t,n,r){var i=Object.create(Ri.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function Mi(){return $i||($i=Oi(oi(),Ii()))}function Ti(e,t,n){var r,i,s=e._map,o=e._list,a=s.get(t),h=void 0!==a;if(n===It){if(!h)return e;o.size>=At&&o.size>=2*s.size?(r=(i=o.filter(function(e,t){return void 0!==e&&a!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=s.remove(t),i=a===o.size-1?o.pop():o.set(a,void 0))}else if(h){if(n===o.get(a)[1])return e;r=s,i=o.set(a,[t,n])}else r=s.set(t,o.size),i=o.set(o.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Oi(r,i)}Ri.isOrderedMap=Nn,Ri.prototype[Jt]=!0,Ri.prototype.delete=Ri.prototype.remove;var Di="@@__IMMUTABLE_STACK__@@";function Li(e){return Boolean(e&&e[Di])}var Vi=function(e){function t(e){return null==e?Wi():Li(e)?e:Wi().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=Ct(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):ji(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Li(t))return t;yr(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):ji(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Wi()},t.prototype.slice=function(t,n){if($t(t,n,this.size))return this;var r=Rt(t,this.size);if(Ot(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,s=this._head;r--;)s=s.next;return this.__ownerID?(this.size=i,this._head=s,this.__hash=void 0,this.__altered=!0,this):ji(i,s)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?ji(this.size,this._head,e,this.__hash):0===this.size?Wi():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new En(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new En(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new an(function(){if(r){var t=r.value;return r=r.next,hn(e,n++,t)}return{value:void 0,done:!0}})},t}(qt);Vi.isStack=Li;var Bi,zi=Vi.prototype;function ji(e,t,n,r){var i=Object.create(zi);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Wi(){return Bi||(Bi=ji(0))}zi[Di]=!0,zi.shift=zi.pop,zi.unshift=zi.push,zi.unshiftAll=zi.pushAll,zi.withMutations=Fr,zi.wasAltered=Hr,zi.asImmutable=Gr,zi["@@transducer/init"]=zi.asMutable=qr,zi["@@transducer/step"]=function(e,t){return e.unshift(t)},zi["@@transducer/result"]=function(e){return e.asImmutable()};var Ui="@@__IMMUTABLE_SET__@@";function Fi(e){return Boolean(e&&e[Ui])}function qi(e){return Fi(e)&&Zt(e)}function Gi(e,t){if(e===t)return!0;if(!Lt(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||Bt(e)!==Bt(t)||jt(e)!==jt(t)||Zt(e)!==Zt(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!Wt(e);if(Zt(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&Rn(i[1],e)&&(n||Rn(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var s=e;e=t,t=s}var o=!0,a=t.__iterate(function(t,r){if(n?!e.has(t):i?!Rn(t,e.get(r,It)):!Rn(e.get(r,It),t))return o=!1,!1});return o&&e.size===a}function Hi(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Ki(e){if(!e||"object"!=typeof e)return e;if(!Lt(e)){if(!Er(e))return e;e=gn(e)}if(Bt(e)){var t={};return e.__iterate(function(e,n){t[n]=Ki(e)}),t}var n=[];return e.__iterate(function(e){n.push(Ki(e))}),n}var Yi=function(e){function t(t){return null==t?es():Fi(t)&&!Zt(t)?t:es().withMutations(function(n){var r=e(t);yr(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(Ft(e).keySeq())},t.intersect=function(e){return(e=Ut(e).toArray()).length?Qi.intersect.apply(t(e.pop()),e):es()},t.union=function(e){return(e=Ut(e).toArray()).length?Qi.union.apply(t(e.pop()),e):es()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Ji(this,this._map.set(e,e))},t.prototype.remove=function(e){return Ji(this,this._map.remove(e))},t.prototype.clear=function(){return Ji(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=[],i=[];return this.forEach(function(s){var o=e.call(t,s,s,n);o!==s&&(r.push(s),i.push(o))}),this.withMutations(function(e){r.forEach(function(t){return e.remove(t)}),i.forEach(function(t){return e.add(t)})})},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(n){for(var r=0;r<t.length;r++)e(t[r]).forEach(function(e){return n.add(e)})}):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return xs(sr(this,e))},t.prototype.sortBy=function(e,t){return xs(sr(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(Gt);Yi.isSet=Fi;var Xi,Qi=Yi.prototype;function Ji(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Zi(e,t){var n=Object.create(Qi);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function es(){return Xi||(Xi=Zi(oi()))}Qi[Ui]=!0,Qi.delete=Qi.remove,Qi.merge=Qi.concat=Qi.union,Qi.withMutations=Fr,Qi.asImmutable=Gr,Qi["@@transducer/init"]=Qi.asMutable=qr,Qi["@@transducer/step"]=function(e,t){return e.add(t)},Qi["@@transducer/result"]=function(e){return e.asImmutable()},Qi.__empty=es,Qi.__make=Zi;var ts,ns=function(e){function t(e,n,r){if(!(this instanceof t))return new t(e,n,r);if(gr(0!==r,"Cannot step a Range by 0"),e=e||0,void 0===n&&(n=1/0),r=void 0===r?1:Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(ts)return ts;ts=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+Ct(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return $t(e,n,this.size)?this:(e=Rt(e,this.size),(n=Ot(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,s=0;s!==n&&!1!==e(i,t?n-++s:s++,this);)i+=t?-r:r;return s},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,s=0;return new an(function(){if(s===n)return{value:void 0,done:!0};var o=i;return i+=t?-r:r,hn(e,t?n-++s:s++,o)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:Gi(this,e)},t}(xn);function rs(e,t,n){for(var r=xr(t),i=0;i!==r.length;)if((e=Ar(e,r[i++],It))===It)return n;return e}function is(e,t){return rs(this,e,t)}function ss(e,t){return rs(e,t,It)!==It}function os(){yr(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e}Ut.isIterable=Lt,Ut.isKeyed=Bt,Ut.isIndexed=jt,Ut.isAssociative=Wt,Ut.isOrdered=Zt,Ut.Iterator=an,Hi(Ut,{toArray:function(){yr(this.size);var e=new Array(this.size||0),t=Bt(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new Yn(this)},toJS:function(){return Ki(this)},toKeyedSeq:function(){return new Kn(this,!0)},toMap:function(){return Kr(this.toKeyedSeq())},toObject:os,toOrderedMap:function(){return Ri(this.toKeyedSeq())},toOrderedSet:function(){return xs(Bt(this)?this.valueSeq():this)},toSet:function(){return Yi(Bt(this)?this.valueSeq():this)},toSetSeq:function(){return new Xn(this)},toSeq:function(){return jt(this)?this.toIndexedSeq():Bt(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vi(Bt(this)?this.valueSeq():this)},toList:function(){return xi(Bt(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return ur(this,function(e,t){var n=Bt(e),r=[e].concat(t).map(function(e){return Lt(e)?n&&(e=Ft(e)):e=n?In(e):wn(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&Bt(i)||jt(e)&&jt(i))return i}var s=new En(r);return n?s=s.toKeyedSeq():jt(e)||(s=s.toSetSeq()),(s=s.flatten(!0)).size=r.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),s}(this,e))},includes:function(e){return this.some(function(t){return Rn(t,e)})},entries:function(){return this.__iterator(nn)},every:function(e,t){yr(this.size);var n=!0;return this.__iterate(function(r,i,s){if(!e.call(t,r,i,s))return n=!1,!1}),n},filter:function(e,t){return ur(this,tr(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return yr(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){yr(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(en)},map:function(e,t){return ur(this,Zn(this,e,t))},reduce:function(e,t,n){return cs(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return cs(this,e,t,n,arguments.length<2,!0)},reverse:function(){return ur(this,er(this,!0))},slice:function(e,t){return ur(this,nr(this,e,t,!0))},some:function(e,t){return!this.every(ds(e),t)},sort:function(e){return ur(this,sr(this,e))},values:function(){return this.__iterator(tn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return kt(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Kr().asMutable();return e.__iterate(function(i,s){r.update(t.call(n,i,s,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return Gi(this,e)},entrySeq:function(){var e=this;if(e._cache)return new En(e._cache);var t=e.toSeq().map(ps).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(ds(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,s){if(e.call(t,n,i,s))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(Nt,null,e)},flatMap:function(e,t){return ur(this,function(e,t,n){var r=lr(e);return e.toSeq().map(function(i,s){return r(t.call(n,i,s,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return ur(this,ir(this,e,!0))},fromEntrySeq:function(){return new Qn(this)},get:function(e,t){return this.find(function(t,n){return Rn(n,e)},void 0,t)},getIn:is,groupBy:function(e,t){return function(e,t,n){var r=Bt(e),i=(Zt(e)?Ri():Kr()).asMutable();e.__iterate(function(s,o){i.update(t.call(n,s,o,e),function(e){return(e=e||[]).push(r?[o,s]:s),e})});var s=lr(e);return i.map(function(t){return ur(e,s(t))}).asImmutable()}(this,e,t)},has:function(e){return this.get(e,It)!==It},hasIn:function(e){return ss(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:Ut(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:Ut(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return Rn(t,e)})},keySeq:function(){return this.toSeq().map(ls).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return or(this,e)},maxBy:function(e,t){return or(this,t,e)},min:function(e){return or(this,e?fs(e):gs)},minBy:function(e,t){return or(this,t?fs(t):gs,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return ur(this,rr(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(ds(e),t)},sortBy:function(e,t){return ur(this,sr(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return ur(this,function(e,t,n){var r=pr(e);return r.__iterateUncached=function(r,i){var s=this;if(i)return this.cacheResult().__iterate(r,i);var o=0;return e.__iterate(function(e,i,a){return t.call(n,e,i,a)&&++o&&r(e,i,s)}),o},r.__iteratorUncached=function(r,i){var s=this;if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(nn,i),a=!0;return new an(function(){if(!a)return{value:void 0,done:!0};var e=o.next();if(e.done)return e;var i=e.value,h=i[0],u=i[1];return t.call(n,u,h,s)?r===nn?e:hn(r,h,u,e):(a=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(ds(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=Zt(e),n=Bt(e),r=t?1:0;return function(e,t){return t=On(t,3432918353),t=On(t<<15|t>>>-15,461845907),t=On(t<<13|t>>>-13,5),t=On((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Mn((t=On(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+ys(Dn(e),Dn(t))|0}:function(e,t){r=r+ys(Dn(e),Dn(t))|0}:t?function(e){r=31*r+Dn(e)|0}:function(e){r=r+Dn(e)|0}),r)}(this))}});var as=Ut.prototype;as[Dt]=!0,as[on]=as.values,as.toJSON=as.toArray,as.__toStringMapper=_r,as.inspect=as.toSource=function(){return this.toString()},as.chain=as.flatMap,as.contains=as.includes,Hi(Ft,{flip:function(){return ur(this,Jn(this))},mapEntries:function(e,t){var n=this,r=0;return ur(this,this.toSeq().map(function(i,s){return e.call(t,[s,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return ur(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var hs=Ft.prototype;hs[Vt]=!0,hs[on]=as.entries,hs.toJSON=os,hs.__toStringMapper=function(e,t){return _r(t)+": "+_r(e)},Hi(qt,{toKeyedSeq:function(){return new Kn(this,!1)},filter:function(e,t){return ur(this,tr(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return ur(this,er(this,!1))},slice:function(e,t){return ur(this,nr(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=Rt(e,e<0?this.count():this.size);var r=this.slice(0,e);return ur(this,1===n?r:r.concat(mr(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return ur(this,ir(this,e,!1))},get:function(e,t){return(e=Ct(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=Ct(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return ur(this,function(e,t){var n=pr(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,s=0;return e.__iterate(function(e){return(!s||!1!==n(t,s++,i))&&!1!==n(e,s++,i)},r),s},n.__iteratorUncached=function(n,r){var i,s=e.__iterator(tn,r),o=0;return new an(function(){return(!i||o%2)&&(i=s.next()).done?i:o%2?hn(n,o++,t):hn(n,o++,i.value,i)})},n}(this,e))},interleave:function(){var e=[this].concat(mr(arguments)),t=hr(this.toSeq(),xn.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),ur(this,n)},keySeq:function(){return ns(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return ur(this,rr(this,e,t,!1))},zip:function(){return ur(this,hr(this,ms,[this].concat(mr(arguments))))},zipAll:function(){return ur(this,hr(this,ms,[this].concat(mr(arguments)),!0))},zipWith:function(e){var t=mr(arguments);return t[0]=this,ur(this,hr(this,e,t))}});var us=qt.prototype;function cs(e,t,n,r,i,s){return yr(e.size),e.__iterate(function(e,s,o){i?(i=!1,n=e):n=t.call(r,n,e,s,o)},s),n}function ls(e,t){return t}function ps(e,t){return[t,e]}function ds(e){return function(){return!e.apply(this,arguments)}}function fs(e){return function(){return-e.apply(this,arguments)}}function ms(){return mr(arguments)}function gs(e,t){return e<t?1:e>t?-1:0}function ys(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}us[zt]=!0,us[Jt]=!0,Hi(Gt,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),Gt.prototype.has=as.includes,Gt.prototype.contains=Gt.prototype.includes,Hi(yn,Ft.prototype),Hi(xn,qt.prototype),Hi(vn,Gt.prototype);var xs=function(e){function t(e){return null==e?bs():qi(e)?e:bs().withMutations(function(t){var n=Gt(e);yr(n.size),n.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(Ft(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Yi);xs.isOrderedSet=qi;var vs,Es=xs.prototype;function _s(e,t){var n=Object.create(Es);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function bs(){return vs||(vs=_s(Mi()))}Es[Jt]=!0,Es.zip=us.zip,Es.zipWith=us.zipWith,Es.__empty=bs,Es.__make=_s;var As=function(e,t){var n,r=function(s){var o=this;if(s instanceof r)return s;if(!(this instanceof r))return new r(s);if(!n){n=!0;var a=Object.keys(e),h=i._indices={};i._name=t,i._keys=a,i._defaultValues=e;for(var u=0;u<a.length;u++){var c=a[u];h[c]=u,i[c]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+Ps(this)+' with property "'+c+'" since that property name is part of the Record API.'):Cs(i,c)}}this.__ownerID=void 0,this._values=xi().withMutations(function(e){e.setSize(o._keys.length),Ft(s).forEach(function(t,n){e.set(o._indices[n],t===o._defaultValues[n]?void 0:t)})})},i=r.prototype=Object.create(Is);return i.constructor=r,t&&(r.displayName=t),r};As.prototype.toString=function(){for(var e,t=Ps(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)t+=(r?", ":"")+(e=n[r])+": "+_r(this.get(e));return t+" }"},As.prototype.equals=function(e){return this===e||e&&this._keys===e._keys&&ks(this).equals(ks(e))},As.prototype.hashCode=function(){return ks(this).hashCode()},As.prototype.has=function(e){return this._indices.hasOwnProperty(e)},As.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return void 0===r?this._defaultValues[e]:r},As.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return ws(this,n)}return this},As.prototype.remove=function(e){return this.set(e)},As.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:ws(this,e)},As.prototype.wasAltered=function(){return this._values.wasAltered()},As.prototype.toSeq=function(){return ks(this)},As.prototype.toJS=function(){return Ki(this)},As.prototype.entries=function(){return this.__iterator(nn)},As.prototype.__iterator=function(e,t){return ks(this).__iterator(e,t)},As.prototype.__iterate=function(e,t){return ks(this).__iterate(e,t)},As.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?ws(this,t,e):(this.__ownerID=e,this._values=t,this)},As.isRecord=Xt,As.getDescriptiveName=Ps;var Ss,Is=As.prototype;function ws(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function Ps(e){return e.constructor.displayName||e.constructor.name||"Record"}function ks(e){return In(e._keys.map(function(t){return[t,e.get(t)]}))}function Cs(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){gr(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}function Ns(e,t){return Bt(t)?t.toMap():t.toList()}Is[Yt]=!0,Is.delete=Is.remove,Is.deleteIn=Is.removeIn=$r,Is.getIn=is,Is.hasIn=as.hasIn,Is.merge=Tr,Is.mergeWith=Dr,Is.mergeIn=Wr,Is.mergeDeep=zr,Is.mergeDeepWith=jr,Is.mergeDeepIn=Ur,Is.setIn=Cr,Is.update=Or,Is.updateIn=Mr,Is.withMutations=Fr,Is.asMutable=qr,Is.asImmutable=Gr,Is[on]=Is.entries,Is.toJSON=Is.toObject=as.toObject,Is.inspect=Is.toSource=function(){return this.toString()};var $s,Rs={version:"4.0.0-rc.11",Collection:Ut,Iterable:Ut,Seq:gn,Map:Kr,OrderedMap:Ri,List:xi,Stack:Vi,Set:Yi,OrderedSet:xs,Record:As,Range:ns,Repeat:function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(Ss)return Ss;Ss=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return Rn(this._value,e)},t.prototype.slice=function(e,n){var r=this.size;return $t(e,n,r)?this:new t(this._value,Ot(n,r)-Rt(e,r))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return Rn(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return Rn(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},t.prototype.__iterator=function(e,t){var n=this,r=this.size,i=0;return new an(function(){return i===r?{value:void 0,done:!0}:hn(e,t?r-++i:i++,n._value)})},t.prototype.equals=function(e){return e instanceof t?Rn(this._value,e._value):Gi(e)},t}(xn),is:Rn,fromJS:function(e,t){return function e(t,n,r,i,s,o){var a=Array.isArray(r)?xn:vr(r)?yn:null;if(a){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),s&&""!==i&&s.push(i);var h=n.call(o,i,a(r).map(function(i,o){return e(t,n,i,o,s,r)}),s&&s.slice());return t.pop(),s&&s.pop(),h}return r}([],t||Ns,e,"",t&&t.length>2?[]:void 0,{"":e})},hash:Dn,isImmutable:Qt,isCollection:Lt,isKeyed:Bt,isIndexed:jt,isAssociative:Wt,isOrdered:Zt,isValueObject:$n,isSeq:Kt,isList:yi,isMap:Cn,isOrderedMap:Nn,isStack:Li,isSet:Fi,isOrderedSet:qi,isRecord:Xt,get:Ar,getIn:rs,has:br,hasIn:ss,merge:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Br(e,t)},mergeDeep:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Vr(e,t)},mergeWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Br(t,n,e)},mergeDeepWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Vr(t,n,e)},remove:Ir,removeIn:Nr,set:wr,setIn:kr,update:Rr,updateIn:Pr};!function(e){e[e.IGNORED_LABELS=0]="IGNORED_LABELS",e[e.ACCESSED_NODES=1]="ACCESSED_NODES",e[e.ARGUMENTS_VARIABLES=2]="ARGUMENTS_VARIABLES",e[e.ASSIGNED_NODES=3]="ASSIGNED_NODES",e[e.IGNORE_BREAK_STATEMENTS=4]="IGNORE_BREAK_STATEMENTS",e[e.IGNORE_RETURN_AWAIT_YIELD=5]="IGNORE_RETURN_AWAIT_YIELD",e[e.NODES_CALLED_AT_PATH_WITH_OPTIONS=6]="NODES_CALLED_AT_PATH_WITH_OPTIONS",e[e.REPLACED_VARIABLE_INITS=7]="REPLACED_VARIABLE_INITS",e[e.RETURN_EXPRESSIONS_ACCESSED_AT_PATH=8]="RETURN_EXPRESSIONS_ACCESSED_AT_PATH",e[e.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH=9]="RETURN_EXPRESSIONS_ASSIGNED_AT_PATH",e[e.RETURN_EXPRESSIONS_CALLED_AT_PATH=10]="RETURN_EXPRESSIONS_CALLED_AT_PATH"}($s||($s={}));const Os={};class Ms{static create(){return new this(Rs.Map())}constructor(e){this.optionValues=e}addAccessedNodeAtPath(e,t){return this.setIn([$s.ACCESSED_NODES,t,...e,Os],!0)}addAccessedReturnExpressionAtPath(e,t){return this.setIn([$s.RETURN_EXPRESSIONS_ACCESSED_AT_PATH,t,...e,Os],!0)}addAssignedNodeAtPath(e,t){return this.setIn([$s.ASSIGNED_NODES,t,...e,Os],!0)}addAssignedReturnExpressionAtPath(e,t){return this.setIn([$s.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH,t,...e,Os],!0)}addCalledNodeAtPathWithOptions(e,t,n){return this.setIn([$s.NODES_CALLED_AT_PATH_WITH_OPTIONS,t,...e,Os,n],!0)}addCalledReturnExpressionAtPath(e,t){return this.setIn([$s.RETURN_EXPRESSIONS_CALLED_AT_PATH,t,...e,Os],!0)}getArgumentsVariables(){return this.get($s.ARGUMENTS_VARIABLES)||[]}getHasEffectsWhenCalledOptions(){return this.setIgnoreReturnAwaitYield().setIgnoreBreakStatements(!1).setIgnoreNoLabels()}getReplacedVariableInit(e){return this.optionValues.getIn([$s.REPLACED_VARIABLE_INITS,e])}hasNodeBeenAccessedAtPath(e,t){return this.optionValues.getIn([$s.ACCESSED_NODES,t,...e,Os])}hasNodeBeenAssignedAtPath(e,t){return this.optionValues.getIn([$s.ASSIGNED_NODES,t,...e,Os])}hasNodeBeenCalledAtPathWithOptions(e,t,n){const r=this.optionValues.getIn([$s.NODES_CALLED_AT_PATH_WITH_OPTIONS,t,...e,Os]);return r&&r.find((e,t)=>t.equals(n))}hasReturnExpressionBeenAccessedAtPath(e,t){return this.optionValues.getIn([$s.RETURN_EXPRESSIONS_ACCESSED_AT_PATH,t,...e,Os])}hasReturnExpressionBeenAssignedAtPath(e,t){return this.optionValues.getIn([$s.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH,t,...e,Os])}hasReturnExpressionBeenCalledAtPath(e,t){return this.optionValues.getIn([$s.RETURN_EXPRESSIONS_CALLED_AT_PATH,t,...e,Os])}ignoreBreakStatements(){return this.get($s.IGNORE_BREAK_STATEMENTS)}ignoreLabel(e){return this.optionValues.getIn([$s.IGNORED_LABELS,e])}ignoreReturnAwaitYield(){return this.get($s.IGNORE_RETURN_AWAIT_YIELD)}replaceVariableInit(e,t){return this.setIn([$s.REPLACED_VARIABLE_INITS,e],t)}setArgumentsVariables(e){return this.set($s.ARGUMENTS_VARIABLES,e)}setIgnoreBreakStatements(e=!0){return this.set($s.IGNORE_BREAK_STATEMENTS,e)}setIgnoreLabel(e){return this.setIn([$s.IGNORED_LABELS,e],!0)}setIgnoreNoLabels(){return this.remove($s.IGNORED_LABELS)}setIgnoreReturnAwaitYield(e=!0){return this.set($s.IGNORE_RETURN_AWAIT_YIELD,e)}get(e){return this.optionValues.get(e)}remove(e){return new Ms(this.optionValues.remove(e))}set(e,t){return new Ms(this.optionValues.set(e,t))}setIn(e,t){return new Ms(this.optionValues.setIn(e,t))}}const Ts={Literal:[],Program:["body"]};const Ds=Ms.create();class Ls{constructor(e,t,n){this.keys=Ts[e.type]||function(e){return Ts[e.type]=Object.keys(e).filter(t=>"object"==typeof e[t]),Ts[e.type]}(e),this.parent=t,this.context=t.context,this.createScope(n),this.parseNode(e),this.initialise(),this.context.magicString.addSourcemapLocation(this.start),this.context.magicString.addSourcemapLocation(this.end)}bind(){for(const e of this.keys){const t=this[e];if(null!==t&&"annotations"!==e)if(Array.isArray(t))for(const e of t)null!==e&&e.bind();else t.bind()}}createScope(e){this.scope=e}declare(e,t){}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return Se}getReturnExpressionWhenCalledAtPath(e,t,n){return Ie}hasEffects(e){for(const t of this.keys){const n=this[t];if(null!==n&&"annotations"!==t)if(Array.isArray(n)){for(const t of n)if(null!==t&&t.hasEffects(e))return!0}else if(n.hasEffects(e))return!0}return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>0}hasEffectsWhenAssignedAtPath(e,t){return!0}hasEffectsWhenCalledAtPath(e,t,n){return!0}include(e){this.included=!0;for(const t of this.keys){const n=this[t];if(null!==n&&"annotations"!==t)if(Array.isArray(n))for(const t of n)null!==t&&t.include(e);else n.include(e)}}includeWithAllDeclaredVariables(e){this.include(e)}initialise(){this.included=!1}insertSemicolon(e){";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}locate(){const e=_t(this.context.code,this.start,{offsetLine:1});return e.file=this.context.fileName,e.toString=(()=>JSON.stringify(e)),e}parseNode(e){for(const t of Object.keys(e)){if(this.hasOwnProperty(t))continue;const n=e[t];if("object"!=typeof n||null===n||"annotations"===t)this[t]=n;else if(Array.isArray(n)){this[t]=[];for(const e of n)this[t].push(null===e?null:new(this.context.nodeConstructors[e.type]||this.context.nodeConstructors.UnknownNode)(e,this,this.scope))}else this[t]=new(this.context.nodeConstructors[n.type]||this.context.nodeConstructors.UnknownNode)(n,this,this.scope)}}render(e,t){for(const n of this.keys){const r=this[n];if(null!==r&&"annotations"!==n)if(Array.isArray(r))for(const n of r)null!==n&&n.render(e,t);else r.render(e,t)}}shouldBeIncluded(){return this.included||this.hasEffects(Ds)}toString(){return this.context.code.slice(this.start,this.end)}}class Vs extends Ls{createScope(e){this.scope=new Et(e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}hasEffectsWhenAssignedAtPath(e,t){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return this.body.hasEffectsWhenCalledAtPath(e,t,n)||null!==this.superClass&&this.superClass.hasEffectsWhenCalledAtPath(e,t,n)}initialise(){this.included=!1,null!==this.id&&this.id.declare("class",this)}}class Bs extends Vs{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new this.context.nodeConstructors.Identifier(e.id,this,this.scope.parent)),super.parseNode(e)}render(e,t){"system"===t.format&&this.id&&this.id.variable.exportName&&e.appendLeft(this.end,` exports('${this.id.variable.exportName}', ${this.id.variable.getName()});`),super.render(e,t)}}const zs=(e,t)=>{const n=parseInt(e[0],10);return n<t.getArgumentsVariables().length&&t.getArgumentsVariables()[n]||Ie};class js extends xt{constructor(e,t){super("arguments",null,Ie,t),this.parameters=e}deoptimizePath(e){const t=parseInt(e[0],10);e.length>0&&t>=0&&this.parameters[t]&&this.parameters[t].deoptimizePath(e.slice(1))}hasEffectsWhenAccessedAtPath(e,t){return e.length>1&&zs(e,t).hasEffectsWhenAccessedAtPath(e.slice(1),t)}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||this.included||zs(e,t).hasEffectsWhenAssignedAtPath(e.slice(1),t)}hasEffectsWhenCalledAtPath(e,t,n){return 0===e.length||zs(e,n).hasEffectsWhenCalledAtPath(e.slice(1),t,n)}}class Ws extends xt{constructor(e){super("this",null,null,e)}_getInit(e){return e.getReplacedVariableInit(this)||Ie}getLiteralValueAtPath(){return Se}hasEffectsWhenAccessedAtPath(e,t){return this._getInit(t).hasEffectsWhenAccessedAtPath(e,t)||super.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return this._getInit(t).hasEffectsWhenAssignedAtPath(e,t)||super.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return this._getInit(n).hasEffectsWhenCalledAtPath(e,t,n)||super.hasEffectsWhenCalledAtPath(e,t,n)}}class Us extends Et{constructor(e,t){super(e),this.parameters=[],this.context=t,this.hoistedBodyVarScope=new Et(this)}addParameterDeclaration(e){const t=e.name;let n;return t in this.hoistedBodyVarScope.variables?(n=this.hoistedBodyVarScope.variables[t]).addDeclaration(e,null):n=new xt(t,e,Ie,this.context),this.variables[t]=n,this.parameters.push(n),n}getParameterVariables(){return this.parameters}}class Fs extends Us{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=Ie;for(const e of this.returnExpressions)e.deoptimizePath(be)}}}class qs extends Fs{constructor(e,t){super(e,t),this.variables.arguments=new js(super.getParameterVariables(),t),this.variables.this=new Ws(t)}findLexicalBoundary(){return this}getOptionsWhenCalledWith({args:e,withNew:t},n){return n.replaceVariableInit(this.variables.this,t?new Ue:Ie).setArgumentsVariables(e.map((e,t)=>super.getParameterVariables()[t]||e))}}class Gs extends Ls{createScope(e){this.scope=new qs(e,this.context)}deoptimizePath(e){1===e.length&&("prototype"===e[0]?this.isPrototypeDeoptimized=!0:e[0]===Ee&&(this.isPrototypeDeoptimized=!0,this.scope.getReturnExpression().deoptimizePath(be)))}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.scope.getReturnExpression():Ie}hasEffects(e){return null!==this.id&&this.id.hasEffects(e)}hasEffectsWhenAccessedAtPath(e){return!(e.length<=1)&&(e.length>2||"prototype"!==e[0]||this.isPrototypeDeoptimized)}hasEffectsWhenAssignedAtPath(e){return!(e.length<=1)&&(e.length>2||"prototype"!==e[0]||this.isPrototypeDeoptimized)}hasEffectsWhenCalledAtPath(e,t,n){if(e.length>0)return!0;const r=this.scope.getOptionsWhenCalledWith(t,n);for(const e of this.params)if(e.hasEffects(r))return!0;return this.body.hasEffects(r)}include(e){this.scope.variables.arguments.include(),super.include(e)}initialise(){this.included=!1,this.isPrototypeDeoptimized=!1,null!==this.id&&this.id.declare("function",this);for(const e of this.params)e.declare("parameter",Ie);this.body.addImplicitReturnExpressionToScope()}parseNode(e){this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope.hoistedBodyVarScope),super.parseNode(e)}}Gs.prototype.preventChildBlockScope=!0;class Hs extends Gs{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new this.context.nodeConstructors.Identifier(e.id,this,this.scope.parent)),super.parseNode(e)}}const Ks=/\s/;class Ys extends Ls{include(e){super.include(e),e&&this.context.includeVariable(this.variable)}initialise(){this.included=!1;const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context),this.context.addExport(this)}render(e,t,{start:n,end:r}=Y){const i=function(e,t=0){for(t=le(e,"default",t)+7;Ks.test(e[t]);)t++;return t}(e.original,this.start);if(this.declaration instanceof Hs)this.renderNamedDeclaration(e,i,"function",null===this.declaration.id,t);else if(this.declaration instanceof Bs)this.renderNamedDeclaration(e,i,"class",null===this.declaration.id,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void("system"===t.format&&this.variable.exportName?e.overwrite(n,r,`exports('${this.variable.exportName}', ${this.variable.getName()});`):he(this,e,n,r));if(!this.variable.included)return e.remove(this.start,i),this.declaration.render(e,t,{isCalleeOfRenderedParent:!1,renderedParentType:Z}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,i,t)}this.declaration.render(e,t)}renderNamedDeclaration(e,t,n,r,i){const s=this.variable.getName();e.remove(this.start,t),r&&e.appendLeft(function(e,t,n=0){const r=le(e,t,n)+t.length;e=e.slice(r,le(e,"{",r));const i=le(e,"*");return-1===i?r:r+i+1}(e.original,n,t),` ${s}`),"system"===i.format&&this.declaration instanceof Bs&&this.variable.exportName&&e.appendLeft(this.end,` exports('${this.variable.exportName}', ${s});`)}renderVariableDeclaration(e,t,n){const r="system"===n.format&&this.variable.exportName?`exports('${this.variable.exportName}', `:"";e.overwrite(this.start,t,`${n.varOrConst} ${this.variable.getName()} = ${r}`);const i=59===e.original.charCodeAt(this.end-1);r?e.appendRight(i?this.end-1:this.end,")"+(i?"":";")):i||e.appendLeft(this.end,";")}}Ys.prototype.needsBoundaries=!0;class Xs extends Ls{addExportedVariables(e){null!==this.variable&&this.variable.exportName&&e.push(this.variable)}bind(){this.bound||(this.bound=!0,null===this.variable&&function e(t,n){if("MemberExpression"===t.type)return!t.computed&&e(t.object,t);if("Identifier"===t.type)switch(n.type){case"MemberExpression":return n.computed||t===n.object;case"MethodDefinition":return n.computed;case"Property":return n.computed||t===n.value;case"ExportSpecifier":return t===n.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}return!1}(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)),null!==this.variable&&this.variable.isLocal&&null!==this.variable.additionalInitializers&&this.variable.consolidateInitializers())}declare(e,t){switch(e){case"var":case"function":this.variable=this.scope.addDeclaration(this,this.context,t,!0);break;case"let":case"const":case"class":this.variable=this.scope.addDeclaration(this,this.context,t,!1);break;case"parameter":this.variable=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Unexpected identifier kind ${e}.`)}}deoptimizePath(e){this.bound||this.bind(),null!==this.variable&&(0===e.length&&this.name in this.context.importDescriptions&&!this.scope.contains(this.name)&&this.disallowImportReassignment(),this.variable.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.bound||this.bind(),null!==this.variable?this.variable.getLiteralValueAtPath(e,t,n):Se}getReturnExpressionWhenCalledAtPath(e,t,n){return this.bound||this.bind(),null!==this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n):Ie}hasEffectsWhenAccessedAtPath(e,t){return null!==this.variable&&this.variable.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return!this.variable||this.variable.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return!this.variable||this.variable.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included||(this.included=!0,null!==this.variable&&this.context.includeVariable(this.variable))}initialise(){this.included=!1,this.bound=!1,this.variable||(this.variable=null)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r,isShorthandProperty:i}=Y){if(this.variable){const t=this.variable.getName();t!==this.name&&(e.overwrite(this.start,this.end,t,{contentOnly:!0,storeName:!0}),i&&e.prependRight(this.start,`${this.name}: `)),"eval"===t&&n===Q&&r&&e.appendRight(this.start,"0, ")}}disallowImportReassignment(){this.context.error({code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment to import '${this.name}'`},this.start)}}class Qs extends xt{constructor(e,t,n){super(e,t,t.declaration,n),this.originalId=null,this.originalVariable=null;const r=t.declaration;(r instanceof Hs||r instanceof Bs)&&r.id?(this.hasId=!0,this.originalId=r.id):r instanceof Xs&&(this.originalId=r)}addReference(e){this.hasId||(this.name=e.name)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getName(){const e=this.getOriginalVariable();return e===this?super.getName():e.getName()}getOriginalVariable(){if(null===this.originalVariable)if(!this.originalId||!this.hasId&&this.originalId.variable.isReassigned)this.originalVariable=this;else{const e=this.originalId.variable;this.originalVariable=e instanceof Qs?e.getOriginalVariable():e}return this.originalVariable}setRenderNames(e,t){const n=this.getOriginalVariable();n===this?super.setRenderNames(e,t):n.setRenderNames(e,t)}setSafeName(e){const t=this.getOriginalVariable();t===this?super.setSafeName(e):t.setSafeName(e)}}Qs.prototype.getBaseVariableName=Qs.prototype.getName,Qs.prototype.isDefault=!0;const Js="_missingExportShim",Zs="_interopDefault";class eo extends Qe{constructor(e){super(Js),this.module=e}}const to={},no="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),ro="Int8x16 Int16x8 Int32x4 Float32x4 Float64x2".split(" "),io="abs add and bool check div equal extractLane fromFloat32x4 fromFloat32x4Bits fromFloat64x2 fromFloat64x2Bits fromInt16x8Bits fromInt32x4 fromInt32x4Bits fromInt8x16Bits greaterThan greaterThanOrEqual lessThan lessThanOrEqual load max maxNum min minNum mul neg not notEqual or reciprocalApproximation reciprocalSqrtApproximation replaceLane select selectBits shiftLeftByScalar shiftRightArithmeticByScalar shiftRightLogicalByScalar shuffle splat sqrt store sub swizzle xor".split(" "),so=[];ro.forEach(e=>{io.forEach(t=>{so.push(`SIMD.${e}.${t}`)})}),["Array.isArray","Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","Object","Object.create","Object.getNotifier","Object.getOwn","Object.getOwnPropertyDescriptor","Object.getOwnPropertyNames","Object.getOwnPropertySymbols","Object.getPrototypeOf","Object.is","Object.isExtensible","Object.isFrozen","Object.isSealed","Object.keys","Boolean","Number","Number.isFinite","Number.isInteger","Number.isNaN","Number.isSafeInteger","Number.parseFloat","Number.parseInt","Symbol","Symbol.for","Symbol.keyFor","Math.abs","Math.acos","Math.acosh","Math.asin","Math.asinh","Math.atan","Math.atan2","Math.atanh","Math.cbrt","Math.ceil","Math.clz32","Math.cos","Math.cosh","Math.exp","Math.expm1","Math.floor","Math.fround","Math.hypot","Math.imul","Math.log","Math.log10","Math.log1p","Math.log2","Math.max","Math.min","Math.pow","Math.random","Math.round","Math.sign","Math.sin","Math.sinh","Math.sqrt","Math.tan","Math.tanh","Math.trunc","Date","Date.UTC","Date.now","Date.parse","String","String.fromCharCode","String.fromCodePoint","String.raw","RegExp","Map","Set","WeakMap","WeakSet","ArrayBuffer","ArrayBuffer.isView","DataView","Promise.all","Promise.race","Promise.resolve","Intl.Collator","Intl.Collator.supportedLocalesOf","Intl.DateTimeFormat","Intl.DateTimeFormat.supportedLocalesOf","Intl.NumberFormat","Intl.NumberFormat.supportedLocalesOf"].concat(no,no.map(e=>`${e}.from`),no.map(e=>`${e}.of`),ro.map(e=>`SIMD.${e}`),so).forEach(e=>to[e]=!0);class oo extends Qe{hasEffectsWhenAccessedAtPath(e){return e.length>0&&!this.isPureFunctionMember(e)&&!("Reflect"===this.name&&1===e.length)}hasEffectsWhenCalledAtPath(e){return!to[[this.name,...e].join(".")]}isPureFunctionMember(e){return to[[this.name,...e].join(".")]||e.length>=1&&to[[this.name,...e.slice(0,-1)].join(".")]||e.length>=2&&to[[this.name,...e.slice(0,-2)].join(".")]&&"prototype"===e[e.length-2]}}const ao=Object.assign(Object.create(null),{await:!0,break:!0,case:!0,catch:!0,class:!0,const:!0,continue:!0,debugger:!0,default:!0,delete:!0,do:!0,else:!0,enum:!0,eval:!0,export:!0,extends:!0,false:!0,finally:!0,for:!0,function:!0,if:!0,implements:!0,import:!0,in:!0,instanceof:!0,interface:!0,let:!0,new:!0,null:!0,package:!0,private:!0,protected:!0,public:!0,return:!0,static:!0,super:!0,switch:!0,this:!0,throw:!0,true:!0,try:!0,typeof:!0,undefined:!0,var:!0,void:!0,while:!0,with:!0,yield:!0}),ho={},uo={exports:!0},co={amd:{formatGlobals:uo,forbiddenNames:ao},cjs:{forbiddenNames:ao,formatGlobals:{exports:!0,module:!0,[Zs]:!0}},es:{formatGlobals:ho,forbiddenNames:ao},iife:{formatGlobals:uo,forbiddenNames:ao},system:{forbiddenNames:Object.assign(Object.create(null),ao,uo),formatGlobals:ho},umd:{formatGlobals:uo,forbiddenNames:ao}};class lo extends Qe{constructor(e){super(e.getModuleName()),this.memberVariables=Object.create(null),this.containsExternalNamespace=!1,this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module;for(const e of this.context.getExports().concat(this.context.getReexports()))"*"===e[0]&&e.length>1&&(this.containsExternalNamespace=!0),this.memberVariables[e]=this.context.traceExport(e)}addReference(e){this.references.push(e),this.name=e.name}deoptimizePath(){for(const e in this.memberVariables)this.memberVariables[e].deoptimizePath(be)}include(){if(!this.included){this.containsExternalNamespace&&this.context.error({code:"NAMESPACE_CANNOT_CONTAIN_EXTERNAL",id:this.module.id,message:`Cannot create an explicit namespace object for module "${this.context.getModuleName()}" because it contains a reexported external namespace`},void 0),this.included=!0;for(const e of this.references)if(e.context.getModuleExecIndex()<=this.context.getModuleExecIndex()){this.referencedEarly=!0;break}if(this.context.preserveModules)for(const e of Object.keys(this.memberVariables))this.memberVariables[e].include();else for(const e of Object.keys(this.memberVariables))this.context.includeVariable(this.memberVariables[e])}}renderBlock(e){const t=e.compact?"":" ",n=e.compact?"":"\n",r=e.indent,i=Object.keys(this.memberVariables).map(n=>{const i=this.memberVariables[n];if(this.referencedEarly||i.isReassigned)return`${r}get ${n}${t}()${t}{${t}return ${i.getName()}${e.compact?"":";"}${t}}`;const s=ao[n]?`'${n}'`:n;return`${r}${s}: ${i.getName()}`}),s=this.getName(),o=e.freeze?"/*#__PURE__*/Object.freeze":"";let a=`${e.varOrConst} ${s} = ${e.namespaceToStringTag?`{${n}${i.join(`,${n}`)}${n}};`:`${o}({${n}${i.join(`,${n}`)}${n}});`}`;return e.namespaceToStringTag&&(a+=`${n}if${t}(typeof Symbol${t}!==${t}'undefined'${t}&&${t}Symbol.toStringTag)${n}`,a+=`${r}Object.defineProperty(${s},${t}Symbol.toStringTag,${t}{${t}value:${t}'Module'${t}});${n}`,a+=`else${n||" "}`,a+=`${r}Object.defineProperty(${s},${t}'toString',${t}{${t}value:${t}function${t}()${t}{${t}return${t}'[object Module]'${e.compact?";":""}${t}}${t}});${n}`,a+=`${o}(${s});`),"system"===e.format&&this.exportName&&(a+=`${n}exports('${this.exportName}',${t}${s});`),a}renderFirst(){return this.referencedEarly}}lo.prototype.isNamespace=!0;const po="Object.defineProperty(exports, '__esModule', { value: true });",fo="Object.defineProperty(exports,'__esModule',{value:true});";function mo(e,t,n,r,i,s,o="return "){const a=i?"":" ",h=i?"":"\n";if(!n){let n;return e.some(e=>"default"===e.exported&&(n=e.local,!0)),n||t.some(e=>!!e.reexports&&e.reexports.some(t=>"default"===t.reexported&&(n=e.namedExportsMode?`${e.name}.${t.imported}`:e.name,!0))),`${o}${n};`}let u="";return t.forEach(({name:e,reexports:t})=>{t&&n&&t.forEach(t=>{"*"===t.reexported&&(!i&&u&&(u+="\n"),u+=`Object.keys(${e}).forEach(function${a}(key)${a}{${h}`+`${s}Object.defineProperty(exports,${a}key,${a}{${h}`+`${s}${s}enumerable:${a}true,${h}`+`${s}${s}get:${a}function${a}()${a}{${h}`+`${s}${s}${s}return ${e}[key];${h}`+`${s}${s}}${h}${s}});${h}});`)})}),t.forEach(({name:e,imports:t,reexports:o,isChunk:c,namedExportsMode:l})=>{o&&n&&o.forEach(n=>{if("default"!==n.imported||c)if("*"!==n.imported){u&&!i&&(u+="\n");const t="default"!==n.imported||l?`${e}.${n.imported}`:e;u+=n.needsLiveBinding?`Object.defineProperty(exports,${a}'${n.reexported}',${a}{${h}`+`${s}enumerable:${a}true,${h}`+`${s}get:${a}function${a}()${a}{${h}`+`${s}${s}return ${t};${h}${s}}${h}});`:`exports.${n.reexported}${a}=${a}${t};`}else"*"!==n.reexported&&(u&&!i&&(u+="\n"),u+=`exports.${n.reexported}${a}=${a}${e};`);else{const s=t&&t.some(e=>"default"!==e.imported)||o&&o.some(e=>"default"!==e.imported&&"*"!==e.imported),h=o&&o.some(e=>"default"===e.imported&&"default"===e.reexported);u&&!i&&(u+="\n"),u+=s||h?`exports.${n.reexported}${a}=${a}${e}${!1!==r?"__default":".default"};`:`exports.${n.reexported}${a}=${a}${e};`}})}),e.forEach(e=>{const t=`exports.${e.exported}`,n=e.local;t!==n&&(u&&!i&&(u+="\n"),u+=`${t}${a}=${a}${n};`)}),u}function go(e,t,n){return e.map(({name:e,exportsNames:r,exportsDefault:i,namedExportsMode:s})=>{if(s)return i&&!1!==t.interop?r?t.compact?`${n} ${e}__default='default'in ${e}?${e}['default']:${e};`:`${n} ${e}__default = 'default' in ${e} ? ${e}['default'] : ${e};`:t.compact?`${e}=${e}&&${e}.hasOwnProperty('default')?${e}['default']:${e};`:`${e} = ${e} && ${e}.hasOwnProperty('default') ? ${e}['default'] : ${e};`:null}).filter(Boolean).join(t.compact?"":"\n")}const yo={assert:!0,buffer:!0,console:!0,constants:!0,domain:!0,events:!0,http:!0,https:!0,os:!0,path:!0,process:!0,punycode:!0,querystring:!0,stream:!0,string_decoder:!0,timers:!0,tty:!0,url:!0,util:!0,vm:!0,zlib:!0};function xo(e,t){const n=t.map(({id:e})=>e).filter(e=>e in yo);n.length&&e({code:"MISSING_NODE_BUILTINS",message:`Creating a browser bundle that depends on Node.js built-in ${1===n.length?`module ('${n[0]}')`:`modules (${n.slice(0,-1).map(e=>`'${e}'`).join(", ")} and '${n.slice(-1)}')`}. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins`,modules:n})}function vo(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}function Eo(e,t,n){let r=e.split("\n");const i=Math.max(0,t-3);let s=Math.min(t+2,r.length);for(r=r.slice(i,s);!/\S/.test(r[r.length-1]);)r.pop(),s-=1;const o=String(s).length;return r.map((e,r)=>{const s=i+r+1===t;let a=String(r+i+1);for(;a.length<o;)a=` ${a}`;if(s){const t=function(e){let t="";for(;e--;)t+=" ";return t}(o+2+vo(e.slice(0,n)).length)+"^";return`${a}: ${vo(e)}\n${t}`}return`${a}: ${vo(e)}`}).join("\n")}function _o(e){const t=ct(e);return t.substr(0,t.length-pt(e).length)}function bo(e){return"undefined"!=typeof process&&at(e)?dt(process.cwd(),e):e}function Ao(e){return!("/"===e[0]||"."===e[1]&&("/"===e[2]||"."===e[2]&&"/"===e[3]))}function So(e,t){throw e instanceof Error==!1&&(e=Object.assign(new Error(e.message),e)),t&&Object.assign(e,t),e}function Io(e,t,n,r){if(void 0!==t.line&&void 0!==t.column){const{line:n,column:i}=t;e.loc={file:r,line:n,column:i}}else{e.pos=t;const{line:i,column:s}=_t(n,t,{offsetLine:1});e.loc={file:r,line:i,column:s}}if(void 0===e.frame){const{line:t,column:r}=e.loc;e.frame=Eo(n,t,r)}}var wo;function Po(e,t,n){return{code:wo.INVALID_CHUNK,message:`Cannot assign ${bo(e)} to the "${t}" chunk as it is already in the "${n}" chunk.`}}function ko(e,t,n){return{code:wo.NAMESPACE_CONFLICT,message:`Conflicting namespaces: ${bo(t.id)} re-exports '${e}' from both ${bo(t.exportsAll[e])} and ${bo(n.exportsAll[e])} (will be ignored)`,name:e,reexporter:t.id,sources:[t.exportsAll[e],n.exportsAll[e]]}}!function(e){e.ASSET_NOT_FINALISED="ASSET_NOT_FINALISED",e.ASSET_NOT_FOUND="ASSET_NOT_FOUND",e.ASSET_SOURCE_ALREADY_SET="ASSET_SOURCE_ALREADY_SET",e.ASSET_SOURCE_MISSING="ASSET_SOURCE_MISSING",e.BAD_LOADER="BAD_LOADER",e.CHUNK_NOT_FOUND="CHUNK_NOT_FOUND",e.CHUNK_NOT_GENERATED="CHUNK_NOT_GENERATED",e.INVALID_ASSET_NAME="INVALID_ASSET_NAME",e.INVALID_CHUNK="INVALID_CHUNK",e.INVALID_EXTERNAL_ID="INVALID_EXTERNAL_ID",e.INVALID_OPTION="INVALID_OPTION",e.INVALID_PLUGIN_HOOK="INVALID_PLUGIN_HOOK",e.INVALID_ROLLUP_PHASE="INVALID_ROLLUP_PHASE",e.NAMESPACE_CONFLICT="NAMESPACE_CONFLICT",e.UNRESOLVED_ENTRY="UNRESOLVED_ENTRY",e.UNRESOLVED_IMPORT="UNRESOLVED_IMPORT"}(wo||(wo={}));const Co=/^[a-zA-Z$_][a-zA-Z0-9$_]*$/;function No(e){return Co.test(e)?`.${e}`:`['${e}']`}function $o(e){return e.split(".").map(No).join("")}function Ro(e,t,n,r,i){const s=r?"":" ",o=e.split(".");n&&(o[0]=("function"==typeof n?n(o[0]):n[o[0]])||o[0]);const a=o.pop();let h=t,u=o.map(e=>(h+=No(e),`${h}${s}=${s}${h}${s}||${s}{}`)).concat(`${h}${No(a)}`).join(`,${s}`).concat(`${s}=${s}${i}`);return o.length>0&&(u=`(${u})`),u}function Oo(e){let t=e.length;for(;t--;){const n=e[t];if(n.exportsDefault||n.exportsNames)return e.slice(0,t+1)}return[]}const Mo=e=>`this${$o(e)}`;const To=(e,t,n,r,i)=>e?`${i}${r}${t} _starExcludes${n}=${n}{${n}${Array.from(e).join(`:${n}1,${n}`)}${e.size?`:${n}1`:""}${n}};`:"",Do=(e,t,n,r)=>e.length?`${r}${n}var ${e.join(`,${t}`)};`:"";function Lo(e,t,n,r){return 0===e.length?"":1===e.length?`${n}${n}${n}exports('${e[0].name}',${t}${e[0].value});${r}${r}`:`${n}${n}${n}exports({${r}`+e.map(({name:e,value:r})=>`${n}${n}${n}${n}${e}:${t}${r}`).join(`,${r}`)+`${r}${n}${n}${n}});${r}${r}`}const Vo=(e,t,n,r)=>Lo(e.filter(e=>e.hoisted||e.uninitialized).map(e=>({name:e.exported,value:e.uninitialized?"void 0":e.local})),t,n,r),Bo=(e,t,n,r)=>Lo(e.filter(e=>e.local===Js).map(e=>({name:e.exported,value:Js})),t,n,r);function zo(e,t){return e?`${t}${$o(e)}`:"null"}var jo={system:function(e,{dependencies:t,exports:n,indentString:r,intro:i,outro:s,usesTopLevelAwait:o,varOrConst:a},h){const u=h.compact?"":"\n",c=h.compact?"":" ",l=t.map(e=>`'${e.id}'`),p=[];let d;const f=[];t.forEach(({imports:e,reexports:i})=>{const s=[];if(e&&e.forEach(e=>{p.push(e.local),"*"===e.imported?s.push(`${e.local}${c}=${c}module;`):s.push(`${e.local}${c}=${c}module.${e.imported};`)}),i){let e=!1;i.length>1||1===i.length&&("*"===i[0].reexported||"*"===i[0].imported)?(i.forEach(i=>{"*"===i.reexported&&(d||(d=function({dependencies:e,exports:t}){const n=new Set(t.map(e=>e.exported));return n.has("default")||n.add("default"),e.forEach(({reexports:e})=>{e&&e.forEach(e=>{"*"===e.imported||n.has(e.reexported)||n.add(e.reexported)})}),n}({dependencies:t,exports:n})),e||(s.push(`${a} _setter${c}=${c}{};`),e=!0),s.push(`for${c}(var _$p${c}in${c}module)${c}{`),s.push(`${r}if${c}(!_starExcludes[_$p])${c}_setter[_$p]${c}=${c}module[_$p];`),s.push("}"))}),i.forEach(e=>{"*"===e.imported&&"*"!==e.reexported&&s.push(`exports('${e.reexported}',${c}module);`)}),i.forEach(t=>{"*"!==t.reexported&&"*"!==t.imported&&(e||(s.push(`${a} _setter${c}=${c}{};`),e=!0),s.push(`_setter.${t.reexported}${c}=${c}module.${t.imported};`))}),e&&s.push("exports(_setter);")):i.forEach(e=>{s.push(`exports('${e.reexported}',${c}module.${e.imported});`)})}f.push(s.join(`${u}${r}${r}${r}`))});let m=`System.register(${h.name?`'${h.name}',${c}`:""}[`+l.join(`,${c}`)+`],${c}function${c}(exports,${c}module)${c}{${u}${r}'use strict';`+To(d,a,c,r,u)+Do(p,c,r,u)+`${u}${r}return${c}{${f.length?`${u}${r}${r}setters:${c}[${f.map(e=>e?`function${c}(module)${c}{${u}${r}${r}${r}${e}${u}${r}${r}}`:`function${c}()${c}{}`).join(`,${c}`)}],`:""}${u}`;m+=`${r}${r}execute:${c}${o?`async${c}`:""}function${c}()${c}{${u}${u}`+Vo(n,c,r,u);const g=`${u}${u}`+Bo(n,c,r,u)+`${r}${r}}${u}${r}}${h.compact?"":";"}${u}});`;return i&&e.prepend(i),s&&e.append(s),e.indent(`${r}${r}${r}`).append(g).prepend(m)},amd:function(e,{dependencies:t,dynamicImport:n,exports:r,hasExports:i,indentString:s,intro:o,isEntryModuleFacade:a,namedExportsMode:h,needsAmdModule:u,outro:c,varOrConst:l,warn:p},d){xo(p,t);const f=t.map(e=>`'${function(e){return"."===e[0]&&e.endsWith(".js")?e.slice(0,-3):e}(e.id)}'`),m=t.map(e=>e.name),g=d.compact?"":"\n",y=d.compact?"":" ";h&&i&&(m.unshift("exports"),f.unshift("'exports'")),n&&(m.unshift("require"),f.unshift("'require'")),u&&(m.unshift("module"),f.unshift("'module'"));const x=d.amd||{},v=(x.id?`'${x.id}',${y}`:"")+(f.length?`[${f.join(`,${y}`)}],${y}`:""),E=!1!==d.strict?`${y}'use strict';`:"",_=`${x.define||"define"}(${v}function${y}(${m.join(`,${y}`)})${y}{${E}${g}${g}`,b=go(t,d,l);b&&e.prepend(b+g+g),o&&e.prepend(o);const A=mo(r,t,h,d.interop,d.compact,s);return A&&e.append(g+g+A),h&&i&&a&&d.esModule&&e.append(`${g}${g}${d.compact?fo:po}`),c&&e.append(c),e.indent(s).append(g+g+"});").prepend(_)},cjs:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,isEntryModuleFacade:o,namedExportsMode:a,outro:h,varOrConst:u},c){const l=c.compact?"":"\n",p=c.compact?"":" ";s=(!1===c.strict?s:`'use strict';${l}${l}${s}`)+(a&&r&&o&&c.esModule?`${c.compact?fo:po}${l}${l}`:"");let d=!1;const f=!1!==c.interop;let m,g=!1;m="";for(const{id:e,namedExportsMode:n,isChunk:r,name:i,reexports:s,imports:o,exportsNames:a,exportsDefault:h}of t)s||o?(m+=c.compact&&g?",":`${m?`;${l}`:""}${u} `,g=!0,f&&!r&&h&&n?(d=!0,m+=a?`${i}${p}=${p}require('${e}')${c.compact?",":`;\n${u} `}${i}__default${p}=${p}${Zs}(${i})`:`${i}${p}=${p}${Zs}(require('${e}'))`):m+=`${i}${p}=${p}require('${e}')`):(m&&(m+=!c.compact||g?`;${l}`:","),g=!1,m+=`require('${e}')`);if(m&&(m+=";"),d){const e=c.compact?"e":"ex";s+=`function ${Zs}${p}(${e})${p}{${p}return${p}`+`(${e}${p}&&${p}(typeof ${e}${p}===${p}'object')${p}&&${p}'default'${p}in ${e})${p}`+`?${p}${e}['default']${p}:${p}${e}${c.compact?"":"; "}}${l}${l}`}m&&(s+=m+l+l);const y=mo(n,t,a,c.interop,c.compact,i,`module.exports${p}=${p}`);return e.prepend(s),y&&e.append(l+l+y),h&&e.append(h),e},es:function(e,{intro:t,outro:n,dependencies:r,exports:i},s){const o=s.compact?"":" ",a=s.compact?"":"\n",h=r.map(({id:e,reexports:t,imports:n,name:r})=>{if(!t&&!n)return`import${o}'${e}';`;let i="";if(n){const t=n.find(e=>"default"===e.imported),r=n.find(e=>"*"===e.imported);r&&(i+=`import${o}*${o}as ${r.local} from${o}'${e}';`,n.length>1&&(i+=a)),t&&1===n.length?i+=`import ${t.local} from${o}'${e}';`:(!r||n.length>1)&&(i+=`import ${t?`${t.local},${o}`:""}{${o}${n.filter(e=>e!==t&&e!==r).map(e=>e.imported===e.local?e.imported:`${e.imported} as ${e.local}`).join(`,${o}`)}${o}}${o}from${o}'${e}';`)}if(t){n&&(i+=a);const s=t.find(e=>"*"===e.reexported),h=t.find(e=>"*"===e.imported&&"*"!==e.reexported);if(s){if(i+=`export${o}*${o}from${o}'${e}';`,1===t.length)return i;i+=a}if(h){if(n&&n.some(e=>"*"===e.imported&&e.local===r)||(i+=`import${o}*${o}as ${r} from${o}'${e}';${a}`),i+=`export${o}{${o}${r===h.reexported?r:`${r} as ${h.reexported}`} };`,t.length===(s?2:1))return i;i+=a}i+=`export${o}{${o}${t.filter(e=>e!==s&&e!==h).map(e=>e.imported===e.reexported?e.imported:`${e.imported} as ${e.reexported}`).join(`,${o}`)}${o}}${o}from${o}'${e}';`}return i}).join(a);h&&(t+=h+a+a),t&&e.prepend(t);const u=[],c=[];return i.forEach(e=>{"default"===e.exported?u.push(`export default ${e.local};`):c.push(e.exported===e.local?e.local:`${e.local} as ${e.exported}`)}),c.length&&u.push(`export${o}{${o}${c.join(`,${o}`)}${o}};`),u.length&&e.append(a+a+u.join(a).trim()),n&&e.append(n),e.trim()},iife:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,namedExportsMode:o,outro:a,varOrConst:h,warn:u},c){const l=c.compact?"":" ",p=c.compact?"":"\n",{extend:d,name:f}=c,m=f&&-1!==f.indexOf("."),g=!d&&!m;var y;f&&g&&(rt(y=f)||tt[y]||nt.test(y))&&So({code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name (${f}) is not legal JS identifier. If you need this you can try --extend option`}),xo(u,t);const x=Oo(t),v=x.map(e=>e.globalName||"null"),E=x.map(e=>e.name);r&&!f&&So({code:"INVALID_OPTION",message:'You must supply "output.name" for IIFE bundles.'}),o&&r&&(d?(v.unshift(`${Mo(f)}${l}=${l}${Mo(f)}${l}||${l}{}`),E.unshift("exports")):(v.unshift("{}"),E.unshift("exports")));const _=!1!==c.strict?`${i}'use strict';${p}${p}`:"";let b=`(function${l}(${E.join(`,${l}`)})${l}{${p}${_}`;!r||d&&o||(b=(g?`${h} ${f}`:Mo(f))+`${l}=${l}${b}`),m&&r&&(b=function(e,t,n,r){const i=e.split(".");n&&(i[0]=("function"==typeof n?n(i[0]):n[i[0]])||i[0]);const s=r?"":" ";i.pop();let o=t;return i.map(e=>(o+=No(e),`${o}${s}=${s}${o}${s}||${s}{}${r?"":";"}`)).join(r?",":"\n")+(r&&i.length?";":"\n")}(f,"this",c.globals,c.compact)+b);let A=`${p}${p}}(${v.join(`,${l}`)}));`;!d&&o&&r&&(A=`${p}${p}${i}return exports;${A}`);const S=go(t,c,h);S&&e.prepend(S+p+p),s&&e.prepend(s);const I=mo(n,t,o,c.interop,c.compact,i);return I&&e.append(p+p+I),a&&e.append(a),e.indent(i).prepend(b).append(A)},umd:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,namedExportsMode:o,outro:a,varOrConst:h,warn:u},c){const l=c.compact?"":" ",p=c.compact?"":"\n",d=c.compact?"f":"factory",f=c.compact?"g":"global";r&&!c.name&&So({code:"INVALID_OPTION",message:'You must supply "output.name" for UMD bundles.'}),xo(u,t);const m=t.map(e=>`'${e.id}'`),g=t.map(e=>`require('${e.id}')`),y=Oo(t),x=y.map(e=>zo(e.globalName,f)),v=y.map(e=>e.name);o&&(r||!0===c.noConflict)&&(m.unshift("'exports'"),g.unshift("exports"),x.unshift(Ro(c.name,f,c.globals,c.compact,`${c.extend?`${zo(c.name,f)}${l}||${l}`:""}{}`)),v.unshift("exports"));const E=c.amd||{},_=(E.id?`'${E.id}',${l}`:"")+(m.length?`[${m.join(`,${l}`)}],${l}`:""),b=E.define||"define",A=!o&&r?`module.exports${l}=${l}`:"",S=!1!==c.strict?`${l}'use strict';${p}`:"";let I;if(!0===c.noConflict){const e=c.compact?"e":"exports";let t;!o&&r?t=`var ${e}${l}=${l}${Ro(c.name,f,c.globals,c.compact,`${d}(${x.join(`,${l}`)})`)};`:o&&(t=`var ${e}${l}=${l}${x.shift()};${p}`+`${i}${i}${d}(${[e].concat(x).join(`,${l}`)});`),I=`(function${l}()${l}{${p}`+`${i}${i}var current${l}=${l}${function(e,t,n){const r=e.split(".");let i=t;return r.map(e=>(i+=No(e),i)).join(`${n}&&${n}`)}(c.name,f,l)};${p}`+`${i}${i}${t}${p}`+`${i}${i}${e}.noConflict${l}=${l}function${l}()${l}{${l}`+`${zo(c.name,f)}${l}=${l}current;${l}return ${e}${c.compact?"":"; "}};${p}`+`${i}}())`}else I=`${d}(${x.join(`,${l}`)})`,!o&&r&&(I=Ro(c.name,f,c.globals,c.compact,I));const w=r||!0===c.noConflict&&o||x.length>0,P=w?`this,${l}`:"",k=w?`(${f}${l}=${l}${f}${l}||${l}self,${l}`:"",C=w?")":"",N=`(function${l}(${w?`${f},${l}`:""}${d})${l}{${p}`+(w?`${i}typeof exports${l}===${l}'object'${l}&&${l}typeof module${l}!==${l}'undefined'${l}?`+`${l}${A}${d}(${g.join(`,${l}`)})${l}:${p}`:"")+`${i}typeof ${b}${l}===${l}'function'${l}&&${l}${b}.amd${l}?${l}${b}(${_}${d})${l}:${p}`+`${i}${k}${I}${C};${p}`+`}(${P}function${l}(${v.join(", ")})${l}{${S}${p}`,$=p+p+"}));",R=go(t,c,h);R&&e.prepend(R+p+p),s&&e.prepend(s);const O=mo(n,t,o,c.interop,c.compact,i);return O&&e.append(p+p+O),o&&r&&c.esModule&&e.append(p+p+(c.compact?fo:po)),a&&e.append(a),e.trim().indent(i).append($).prepend(N)}};const Wo={ArrayPattern(e,t){for(const n of t.elements)n&&Wo[n.type](e,n)},AssignmentPattern(e,t){Wo[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const n of t.properties)"RestElement"===n.type?Wo.RestElement(e,n):Wo[n.value.type](e,n.value)},RestElement(e,t){Wo[t.argument.type](e,t.argument)}},Uo=function(e){const t=[];return Wo[e.type](t,e),t};class Fo extends Et{addDeclaration(e,t,n=null,r=!1){return r?this.parent.addDeclaration(e,t,Ie,!0):super.addDeclaration(e,t,n,!1)}}class qo extends Ls{addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&e.type===oe||this.scope.addReturnExpression(Ie)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new Fo(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e){this.included=!0;for(const t of this.body)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){this.body.length?de(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class Go extends Ls{createScope(e){this.scope=new Fs(e,this.context)}deoptimizePath(e){1===e.length&&e[0]===Ee&&this.scope.getReturnExpression().deoptimizePath(be)}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.scope.getReturnExpression():Ie}hasEffects(e){return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}hasEffectsWhenAssignedAtPath(e,t){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){if(e.length>0)return!0;for(const e of this.params)if(e.hasEffects(n))return!0;return this.body.hasEffects(n)}initialise(){this.included=!1;for(const e of this.params)e.declare("parameter",Ie);this.body instanceof qo?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(e){e.body.type===X&&(this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope.hoistedBodyVarScope)),super.parseNode(e)}}function Ho(e){return 1===e.length?`exports('${e[0].safeExportName||e[0].exportName}', ${e[0].getName()});`:`exports({${e.map(e=>`${e.safeExportName||e.exportName}: ${e.getName()}`).join(", ")}});`}Go.prototype.preventChildBlockScope=!0;const Ko={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>Math.pow(e,t),"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>e<t,"<<":(e,t)=>e<<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,in:()=>Se,instanceof:()=>Se,"|":(e,t)=>e|t};const Yo={};class Xo{constructor(e=Rs.Map()){this.entityPaths=e}isTracked(e,t){return this.entityPaths.getIn([e,...t,Yo])}track(e,t){return new Xo(this.entityPaths.setIn([e,...t,Yo],!0))}}const Qo=new Xo;class Jo extends Us{addDeclaration(e,t,n=null,r=!1){return r?this.parent.addDeclaration(e,t,n,!0):super.addDeclaration(e,t,n,!1)}}class Zo extends Ls{createScope(e){this.scope=new Jo(e,this.context)}initialise(){this.included=!1,this.param&&this.param.declare("parameter",Ie)}parseNode(e){this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope),super.parseNode(e)}}Zo.prototype.preventChildBlockScope=!0;class ea{constructor(e){this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getLiteralValueAtPath(){return Se}getReturnExpressionWhenCalledAtPath(e,t,n){return new ea(this.expressions.map(r=>r.getReturnExpressionWhenCalledAtPath(e,t,n)))}hasEffectsWhenAccessedAtPath(e,t){for(const n of this.expressions)if(n.hasEffectsWhenAccessedAtPath(e,t))return!0;return!1}hasEffectsWhenAssignedAtPath(e,t){for(const n of this.expressions)if(n.hasEffectsWhenAssignedAtPath(e,t))return!0;return!1}hasEffectsWhenCalledAtPath(e,t,n){for(const r of this.expressions)if(r.hasEffectsWhenCalledAtPath(e,t,n))return!0;return!1}include(){}}class ta extends Ls{hasEffects(){return!1}initialise(){this.included=!1,this.context.addExport(this)}render(e,t,{start:n,end:r}=Y){e.remove(n,r)}}ta.prototype.needsBoundaries=!0;class na extends Ls{bind(){null!==this.declaration&&this.declaration.bind()}hasEffects(e){return null!==this.declaration&&this.declaration.hasEffects(e)}initialise(){this.included=!1,this.context.addExport(this)}render(e,t,{start:n,end:r}=Y){null===this.declaration?e.remove(n,r):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{start:n,end:r}))}}na.prototype.needsBoundaries=!0;const ra=e=>{switch(e.format){case"cjs":{const t=e.compact?"":" ";return{interopLeft:`Promise.resolve({${t}default:${t}require(`,interopRight:`)${t}})`,left:"Promise.resolve(require(",right:"))"}}case"amd":{const t=e.compact?"":" ",n=e.compact?"c":"resolve",r=e.compact?"e":"reject";return{interopLeft:`new Promise(function${t}(${n},${t}${r})${t}{${t}require([`,interopRight:`],${t}function${t}(m)${t}{${t}${n}({${t}default:${t}m${t}})${t}},${t}${r})${t}})`,left:`new Promise(function${t}(${n},${t}${r})${t}{${t}require([`,right:`],${t}${n},${t}${r})${t}})`}}case"system":return{left:"module.import(",right:")"};case"es":return{left:`${e.dynamicImportFunction||"import"}(`,right:")"}}};class ia extends Ls{bind(){}hasEffects(){return!1}initialise(){this.included=!1,this.context.addImport(this)}render(e,t,{start:n,end:r}=Y){e.remove(n,r)}}ia.prototype.needsBoundaries=!0;class sa extends Ls{getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.context.code.charCodeAt(this.start)||"bigint"==typeof this.value?Se:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Ie:Xe(this.members,e[0])}hasEffectsWhenAccessedAtPath(e){return null===this.value?e.length>0:e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>0}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Ye(this.members,e[0],this.included,t,n)}initialise(){this.included=!1,this.members=function(e){switch(typeof e){case"boolean":return Ge;case"number":return He;case"string":return Ke;default:return Object.create(null)}}(this.value)}render(e,t){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function oa(e){return e.computed?function(e){if(e instanceof sa)return String(e.value);return null}(e.property):e.property.name}class aa extends Ls{constructor(){super(...arguments),this.variable=null}addExportedVariables(){}bind(){if(this.bound)return;this.bound=!0;const e=function e(t){const n=t.propertyKey,r=t.object;if("string"==typeof n){if(r instanceof Xs)return[{key:r.name,pos:r.start},{key:n,pos:t.property.start}];if(r instanceof aa){const i=e(r);return i&&[...i,{key:n,pos:t.property.start}]}}return null}(this),t=e&&this.scope.findVariable(e[0].key);if(t&&t.isNamespace){const n=this.resolveNamespaceVariables(t,e.slice(1));n?"string"==typeof n?this.replacement=n:(n.isExternal&&n.module&&n.module.suggestName(e[0].key),this.variable=n,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let n=1;n<e.length;n++)t+="."+e[n].key;return t}(e),n)):super.bind()}else super.bind(),null===this.propertyKey&&this.analysePropertyKey()}deoptimizeCache(){for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}deoptimizePath(e){this.bound||this.bind(),0===e.length&&this.disallowNamespaceReassignment(),this.variable?this.variable.deoptimizePath(e):(null===this.propertyKey&&this.analysePropertyKey(),this.object.deoptimizePath([this.propertyKey,...e]))}getLiteralValueAtPath(e,t,n){return null!==this.variable?this.variable.getLiteralValueAtPath(e,t,n):(null===this.propertyKey&&this.analysePropertyKey(),this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([this.propertyKey,...e],t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return null!==this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n):(null===this.propertyKey&&this.analysePropertyKey(),this.expressionsToBeDeoptimized.push(n),this.object.getReturnExpressionWhenCalledAtPath([this.propertyKey,...e],t,n))}hasEffects(e){return this.property.hasEffects(e)||this.object.hasEffects(e)||this.context.propertyReadSideEffects&&this.object.hasEffectsWhenAccessedAtPath([this.propertyKey],e)}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null!==this.variable?this.variable.hasEffectsWhenAccessedAtPath(e,t):this.object.hasEffectsWhenAccessedAtPath([this.propertyKey,...e],t))}hasEffectsWhenAssignedAtPath(e,t){return null!==this.variable?this.variable.hasEffectsWhenAssignedAtPath(e,t):this.object.hasEffectsWhenAssignedAtPath([this.propertyKey,...e],t)}hasEffectsWhenCalledAtPath(e,t,n){return null!==this.variable?this.variable.hasEffectsWhenCalledAtPath(e,t,n):this.object.hasEffectsWhenCalledAtPath([this.propertyKey,...e],t,n)}include(e){this.included||(this.included=!0,null!==this.variable&&this.context.includeVariable(this.variable)),this.object.include(e),this.property.include(e)}initialise(){this.included=!1,this.propertyKey=oa(this),this.variable=null,this.bound=!1,this.replacement=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=Y){const i=n===Q&&r;if(this.variable||this.replacement){let t=this.variable?this.variable.getName():this.replacement;i&&(t="0, "+t),e.overwrite(this.start,this.end,t,{contentOnly:!0,storeName:!0})}else i&&e.appendRight(this.start,"0, "),super.render(e,t)}analysePropertyKey(){this.propertyKey=Ee;const e=this.property.getLiteralValueAtPath(_e,Qo,this);this.propertyKey=e===Se?Ee:String(e)}disallowNamespaceReassignment(){this.object instanceof Xs&&this.scope.findVariable(this.object.name).isNamespace&&this.context.error({code:"ILLEGAL_NAMESPACE_REASSIGNMENT",message:`Illegal reassignment to import '${this.object.name}'`},this.start)}resolveNamespaceVariables(e,t){if(0===t.length)return e;if(!e.isNamespace)return null;const n=t[0].key,r=e.isExternal?e.module.getVariableForExportName(n):e.context.traceExport(n);if(!r){const r=e.isExternal?e.module.id:e.context.fileName;return this.context.warn({code:"MISSING_EXPORT",exporter:bo(r),importer:bo(this.context.fileName),message:`'${n}' is not exported by '${bo(r)}'`,missing:n,url:"https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-"},t[0].pos),"undefined"}return this.resolveNamespaceVariables(r,t.slice(1))}}const ha="ROLLUP_ASSET_URL_",ua="ROLLUP_CHUNK_URL_";class ca extends Ls{bind(){super.bind(),this.argument.deoptimizePath([Ee,Ee])}}class la extends Ls{hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e){this.included=!0;for(const t of this.body)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){this.body.length?de(this.body,e,this.start,this.end,t):super.render(e,t)}}class pa extends Ls{getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Se:this.quasis[0].value.cooked}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class da extends Et{constructor(e,t){super(e),this.context=t,this.variables.this=new xt("this",null,we,t)}addExportDefaultDeclaration(e,t,n){return this.variables.default=new Qs(e,t,n)}addNamespaceMemberAccess(e,t){t instanceof oo&&(this.accessedOutsideVariables[t.name]=t)}deconflict(e){for(const t of this.children)t.deconflict(e)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables[e]||this.accessedOutsideVariables[e];if(t)return t;const n=this.context.traceVariable(e)||this.parent.findVariable(e);return n instanceof oo&&(this.accessedOutsideVariables[e]=n),n}}const fa={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Se,typeof:e=>typeof e,void:()=>void 0,"~":e=>~e};function ma(e){return null!==e.renderBaseName&&null!==e.exportName&&e.isReassigned}const ga={ArrayExpression:class extends Ls{bind(){super.bind();for(const e of this.elements)null!==e&&e.deoptimizePath(be)}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Ie:Xe(qe,e[0])}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Ye(qe,e[0],this.included,t,n)}},ArrayPattern:class extends Ls{addExportedVariables(e){for(const t of this.elements)null!==t&&t.addExportedVariables(e)}declare(e,t){for(const t of this.elements)null!==t&&t.declare(e,Ie)}deoptimizePath(e){if(0===e.length)for(const t of this.elements)null!==t&&t.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){if(e.length>0)return!0;for(const e of this.elements)if(null!==e&&e.hasEffectsWhenAssignedAtPath(_e,t))return!0;return!1}},ArrowFunctionExpression:Go,AssignmentExpression:class extends Ls{bind(){super.bind(),this.left.deoptimizePath(_e),this.right.deoptimizePath(be)}hasEffects(e){return this.right.hasEffects(e)||this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(_e,e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.right.hasEffectsWhenAccessedAtPath(e,t)}render(e,t){if(this.left.render(e,t),this.right.render(e,t),"system"===t.format)if(this.left.variable&&this.left.variable.exportName)e.prependLeft(e.original.indexOf("=",this.left.end)+1,` exports('${this.left.variable.exportName}',`),e.appendLeft(this.right.end,")");else if("addExportedVariables"in this.left){const t=[];this.left.addExportedVariables(t),t.length>0&&(e.prependRight(this.start,`function (v) {${Ho(t)} return v;} (`),e.appendLeft(this.end,")"))}}},AssignmentPattern:class extends Ls{addExportedVariables(e){this.left.addExportedVariables(e)}bind(){super.bind(),this.left.deoptimizePath(_e),this.right.deoptimizePath(be)}declare(e,t){this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){return e.length>0||this.left.hasEffectsWhenAssignedAtPath(_e,t)}render(e,t,{isShorthandProperty:n}=Y){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}},AwaitExpression:class extends Ls{hasEffects(e){return super.hasEffects(e)||!e.ignoreReturnAwaitYield()}include(e){if(super.include(e),!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof Gs||e instanceof Go)return}while(e=e.parent);this.context.usesTopLevelAwait=!0}}render(e,t){super.render(e,t)}},BinaryExpression:class extends Ls{getLiteralValueAtPath(e,t,n){if(e.length>0)return Se;const r=this.left.getLiteralValueAtPath(_e,t,n);if(r===Se)return Se;const i=this.right.getLiteralValueAtPath(_e,t,n);if(i===Se)return Se;const s=Ko[this.operator];return s?s(r,i):Se}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}},BlockStatement:qo,BreakStatement:class extends Ls{hasEffects(e){return super.hasEffects(e)||!e.ignoreBreakStatements()||null!==this.label&&!e.ignoreLabel(this.label.name)}},CallExpression:class extends Ls{bind(){super.bind(),this.callee instanceof Xs&&(this.scope.findVariable(this.callee.name).isNamespace&&this.context.error({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${this.callee.name}')`},this.start),"eval"===this.callee.name&&this.context.warn({code:"EVAL",message:"Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification",url:"https://rollupjs.org/guide/en#avoiding-eval"},this.start)),null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(_e,Qo,this));for(const e of this.arguments)e.deoptimizePath(be)}deoptimizeCache(){if(this.returnExpression!==Ie){this.returnExpression=Ie;for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&!this.context.deoptimizationTracker.track(this,e)&&(null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(_e,Qo,this)),this.returnExpression.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(_e,t,this)),this.returnExpression===Ie||t.isTracked(this.returnExpression,e)?Se:(this.expressionsToBeDeoptimized.push(n),this.returnExpression.getLiteralValueAtPath(e,t.track(this.returnExpression,e),n))}getReturnExpressionWhenCalledAtPath(e,t,n){return null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(_e,t,this)),this.returnExpression===Ie||t.isTracked(this.returnExpression,e)?Ie:(this.expressionsToBeDeoptimized.push(n),this.returnExpression.getReturnExpressionWhenCalledAtPath(e,t.track(this.returnExpression,e),n))}hasEffects(e){for(const t of this.arguments)if(t.hasEffects(e))return!0;return(!this.context.annotations||!this.annotatedPure)&&(this.callee.hasEffects(e)||this.callee.hasEffectsWhenCalledAtPath(_e,this.callOptions,e.getHasEffectsWhenCalledOptions()))}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&!t.hasReturnExpressionBeenAccessedAtPath(e,this)&&this.returnExpression.hasEffectsWhenAccessedAtPath(e,t.addAccessedReturnExpressionAtPath(e,this))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||!t.hasReturnExpressionBeenAssignedAtPath(e,this)&&this.returnExpression.hasEffectsWhenAssignedAtPath(e,t.addAssignedReturnExpressionAtPath(e,this))}hasEffectsWhenCalledAtPath(e,t,n){return!n.hasReturnExpressionBeenCalledAtPath(e,this)&&this.returnExpression.hasEffectsWhenCalledAtPath(e,t,n.addCalledReturnExpressionAtPath(e,this))}include(e){super.include(e),this.returnExpression.included||this.returnExpression.include(!1)}initialise(){this.included=!1,this.returnExpression=null,this.callOptions=ve.create({args:this.arguments,callIdentifier:this,withNew:!1}),this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n}=Y){super.render(e,t),n===Z&&this.callee.type===ee&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}},CatchClause:Zo,ClassBody:class extends Ls{hasEffectsWhenCalledAtPath(e,t,n){return e.length>0||null!==this.classConstructor&&this.classConstructor.hasEffectsWhenCalledAtPath(_e,t,n)}initialise(){this.included=!1;for(const e of this.body)if("constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}},ClassDeclaration:Bs,ClassExpression:class extends Vs{},ConditionalExpression:class extends Ls{bind(){super.bind(),this.isBranchResolutionAnalysed||this.analyseBranchResolution()}deoptimizeCache(){if(null!==this.usedBranch){this.usedBranch=null,this.unusedBranch.deoptimizePath(be);for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&(this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e)):this.usedBranch.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?Se:(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getLiteralValueAtPath(e,t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?new ea([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,n),this.alternate.getReturnExpressionWhenCalledAtPath(e,t,n)]):(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getReturnExpressionWhenCalledAtPath(e,t,n))}hasEffects(e){return!!this.test.hasEffects(e)||(null===this.usedBranch?this.consequent.hasEffects(e)||this.alternate.hasEffects(e):this.usedBranch.hasEffects(e))}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null===this.usedBranch?this.consequent.hasEffectsWhenAccessedAtPath(e,t)||this.alternate.hasEffectsWhenAccessedAtPath(e,t):this.usedBranch.hasEffectsWhenAccessedAtPath(e,t))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||(null===this.usedBranch?this.consequent.hasEffectsWhenAssignedAtPath(e,t)||this.alternate.hasEffectsWhenAssignedAtPath(e,t):this.usedBranch.hasEffectsWhenAssignedAtPath(e,t))}hasEffectsWhenCalledAtPath(e,t,n){return null===this.usedBranch?this.consequent.hasEffectsWhenCalledAtPath(e,t,n)||this.alternate.hasEffectsWhenCalledAtPath(e,t,n):this.usedBranch.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0,e||null===this.usedBranch||this.test.shouldBeIncluded()?(this.test.include(e),this.consequent.include(e),this.alternate.include(e)):this.usedBranch.include(e)}initialise(){this.included=!1,this.isBranchResolutionAnalysed=!1,this.usedBranch=null,this.unusedBranch=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=Y){this.test.included?super.render(e,t):(e.remove(this.start,this.usedBranch.start),e.remove(this.usedBranch.end,this.end),ue(this,e),this.usedBranch.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}))}analyseBranchResolution(){this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(_e,Qo,this);e!==Se&&(e?(this.usedBranch=this.consequent,this.unusedBranch=this.alternate):(this.usedBranch=this.alternate,this.unusedBranch=this.consequent))}},DoWhileStatement:class extends Ls{hasEffects(e){return this.test.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}},EmptyStatement:class extends Ls{hasEffects(){return!1}},ExportAllDeclaration:ta,ExportDefaultDeclaration:Ys,ExportNamedDeclaration:na,ExpressionStatement:class extends Ls{initialise(){this.included=!1,this.directive&&"use strict"!==this.directive&&this.parent.type===ie&&this.context.warn({code:"MODULE_LEVEL_DIRECTIVE",message:`Module level directives cause errors when bundled, '${this.directive}' was ignored.`},this.start)}render(e,t){super.render(e,t),this.included&&this.insertSemicolon(e)}shouldBeIncluded(){return this.directive&&"use strict"!==this.directive?this.parent.type!==ie:super.shouldBeIncluded()}},ForInStatement:class extends Ls{bind(){this.left.bind(),this.left.deoptimizePath(_e),this.right.bind(),this.body.bind()}createScope(e){this.scope=new Fo(e)}hasEffects(e){return this.left&&(this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(_e,e))||this.right&&this.right.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}include(e){this.included=!0,this.left.includeWithAllDeclaredVariables(e),this.left.deoptimizePath(_e),this.right.include(e),this.body.include(e)}render(e,t){this.left.render(e,t,ce),this.right.render(e,t,ce),this.body.render(e,t)}},ForOfStatement:class extends Ls{bind(){this.left.bind(),this.left.deoptimizePath(_e),this.right.bind(),this.body.bind()}createScope(e){this.scope=new Fo(e)}hasEffects(e){return this.left&&(this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(_e,e))||this.right&&this.right.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}include(e){this.included=!0,this.left.includeWithAllDeclaredVariables(e),this.left.deoptimizePath(_e),this.right.include(e),this.body.include(e)}render(e,t){this.left.render(e,t,ce),this.right.render(e,t,ce),this.body.render(e,t)}},ForStatement:class extends Ls{createScope(e){this.scope=new Fo(e)}hasEffects(e){return this.init&&this.init.hasEffects(e)||this.test&&this.test.hasEffects(e)||this.update&&this.update.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}render(e,t){this.init&&this.init.render(e,t,ce),this.test&&this.test.render(e,t,ce),this.update&&this.update.render(e,t,ce),this.body.render(e,t)}},FunctionDeclaration:Hs,FunctionExpression:class extends Gs{},Identifier:Xs,IfStatement:class extends Ls{bind(){super.bind(),this.isTestValueAnalysed||(this.testValue=Se,this.isTestValueAnalysed=!0,this.testValue=this.test.getLiteralValueAtPath(_e,Qo,this))}deoptimizeCache(){this.testValue=Se}hasEffects(e){return!!this.test.hasEffects(e)||(this.testValue===Se?this.consequent.hasEffects(e)||null!==this.alternate&&this.alternate.hasEffects(e):this.testValue?this.consequent.hasEffects(e):null!==this.alternate&&this.alternate.hasEffects(e))}include(e){if(this.included=!0,e)return this.test.include(!0),this.consequent.include(!0),void(null!==this.alternate&&this.alternate.include(!0));const t=this.testValue===Se;(t||this.test.shouldBeIncluded())&&this.test.include(!1),(t||this.testValue)&&this.consequent.shouldBeIncluded()&&this.consequent.include(!1),null===this.alternate||!t&&this.testValue||!this.alternate.shouldBeIncluded()||this.alternate.include(!1)}initialise(){this.included=!1,this.isTestValueAnalysed=!1}render(e,t){if(this.test.included||(this.testValue?null!==this.alternate&&this.alternate.included:this.consequent.included))this.test.included?this.test.render(e,t):e.overwrite(this.test.start,this.test.end,this.testValue?"true":"false"),this.consequent.included?this.consequent.render(e,t):e.overwrite(this.consequent.start,this.consequent.end,";"),null!==this.alternate&&(this.alternate.included?this.alternate.render(e,t):e.remove(this.consequent.end,this.alternate.end));else{const n=this.testValue?this.consequent:this.alternate;e.remove(this.start,n.start),e.remove(n.end,this.end),ue(this,e),n.render(e,t)}}},Import:class extends Ls{include(){this.included=!0,this.context.includeDynamicImport(this)}initialise(){this.included=!1,this.resolutionNamespace=void 0,this.resolutionInterop=!1,this.context.addDynamicImport(this)}render(e,t){if(this.resolutionNamespace){const n=t.compact?"":" ",r=t.compact?"":";";return void e.overwrite(this.parent.start,this.parent.end,`Promise.resolve().then(function${n}()${n}{${n}return ${this.resolutionNamespace}${r}${n}})`)}const n=ra(t);if(n){const t=this.resolutionInterop&&n.interopLeft||n.left,r=le(e.original,"(",this.parent.callee.end)+1;e.overwrite(this.parent.start,r,t);const i=this.resolutionInterop&&n.interopRight||n.right;e.overwrite(this.parent.end-1,this.parent.end,i)}}renderFinalResolution(e,t,n){this.included&&("amd"===n&&t.startsWith("'.")&&t.endsWith(".js'")&&(t=t.slice(0,-4)+"'"),e.overwrite(this.parent.arguments[0].start,this.parent.arguments[0].end,t))}setResolution(e,t){this.resolutionInterop=e,this.resolutionNamespace=t}},ImportDeclaration:ia,LabeledStatement:class extends Ls{hasEffects(e){return this.body.hasEffects(e.setIgnoreLabel(this.label.name).setIgnoreBreakStatements())}},Literal:sa,LogicalExpression:class extends Ls{bind(){super.bind(),this.isBranchResolutionAnalysed||this.analyseBranchResolution()}deoptimizeCache(){if(null!==this.usedBranch){this.usedBranch=null,this.unusedBranch.deoptimizePath(be);for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&(this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?(this.left.deoptimizePath(e),this.right.deoptimizePath(e)):this.usedBranch.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?Se:(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getLiteralValueAtPath(e,t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?new ea([this.left.getReturnExpressionWhenCalledAtPath(e,t,n),this.right.getReturnExpressionWhenCalledAtPath(e,t,n)]):(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getReturnExpressionWhenCalledAtPath(e,t,n))}hasEffects(e){return null===this.usedBranch?this.left.hasEffects(e)||this.right.hasEffects(e):this.usedBranch.hasEffects(e)}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null===this.usedBranch?this.left.hasEffectsWhenAccessedAtPath(e,t)||this.right.hasEffectsWhenAccessedAtPath(e,t):this.usedBranch.hasEffectsWhenAccessedAtPath(e,t))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||(null===this.usedBranch?this.left.hasEffectsWhenAssignedAtPath(e,t)||this.right.hasEffectsWhenAssignedAtPath(e,t):this.usedBranch.hasEffectsWhenAssignedAtPath(e,t))}hasEffectsWhenCalledAtPath(e,t,n){return null===this.usedBranch?this.left.hasEffectsWhenCalledAtPath(e,t,n)||this.right.hasEffectsWhenCalledAtPath(e,t,n):this.usedBranch.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0,e||null===this.usedBranch||this.unusedBranch.shouldBeIncluded()?(this.left.include(e),this.right.include(e)):this.usedBranch.include(e)}initialise(){this.included=!1,this.isBranchResolutionAnalysed=!1,this.usedBranch=null,this.unusedBranch=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=Y){this.left.included&&this.right.included?super.render(e,t):(e.remove(this.start,this.usedBranch.start),e.remove(this.usedBranch.end,this.end),ue(this,e),this.usedBranch.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}))}analyseBranchResolution(){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(_e,Qo,this);e!==Se&&(("||"===this.operator?e:!e)?(this.usedBranch=this.left,this.unusedBranch=this.right):(this.usedBranch=this.right,this.unusedBranch=this.left))}},MemberExpression:aa,MetaProperty:class extends Ls{hasEffectsWhenAccessedAtPath(e){return e.length>1}initialise(){"import"===this.meta.name&&this.context.addImportMeta(this),this.included=!1}renderFinalMechanism(e,t,n,r){if(!this.included)return!1;const i=this.parent,s=i instanceof aa&&"string"==typeof i.propertyKey?i.propertyKey:null;if(s&&(s.startsWith(ha)||s.startsWith(ua))){let o,a=null,h=null;s.startsWith(ha)?(a=s.substr(ha.length),o=this.context.getAssetFileName(a)):(h=s.substr(ua.length),o=this.context.getChunkFileName(h));const u=ut(dt(lt(t),o));let c;return null!==a&&(c=r.hookFirstSync("resolveAssetUrl",[{assetFileName:o,chunkId:t,format:n,moduleId:this.context.module.id,relativeAssetPath:u}])),c||(c=r.hookFirstSync("resolveFileUrl",[{assetReferenceId:a,chunkId:t,chunkReferenceId:h,fileName:o,format:n,moduleId:this.context.module.id,relativePath:u}])),e.overwrite(i.start,i.end,c),!0}const o=r.hookFirstSync("resolveImportMeta",[s,{chunkId:t,format:n,moduleId:this.context.module.id}]);return"string"==typeof o&&(i instanceof aa?e.overwrite(i.start,i.end,o):e.overwrite(this.start,this.end,o),!0)}},MethodDefinition:class extends Ls{hasEffects(e){return this.key.hasEffects(e)}hasEffectsWhenCalledAtPath(e,t,n){return e.length>0||this.value.hasEffectsWhenCalledAtPath(_e,t,n)}},NewExpression:class extends Ls{bind(){super.bind();for(const e of this.arguments)e.deoptimizePath(be)}hasEffects(e){for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotatedPure&&this.callee.hasEffectsWhenCalledAtPath(_e,this.callOptions,e.getHasEffectsWhenCalledOptions())}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}initialise(){this.included=!1,this.callOptions=ve.create({args:this.arguments,callIdentifier:this,withNew:!0})}},ObjectExpression:class extends Ls{bind(){super.bind(),null===this.propertyMap&&this.buildPropertyMap()}deoptimizeCache(){this.hasUnknownDeoptimizedProperty||this.deoptimizeAllProperties()}deoptimizePath(e){if(this.hasUnknownDeoptimizedProperty)return;if(null===this.propertyMap&&this.buildPropertyMap(),0===e.length)return void this.deoptimizeAllProperties();const t=e[0];if(1===e.length){if("string"!=typeof t)return void this.deoptimizeAllProperties();if(!this.deoptimizedPaths[t]&&(this.deoptimizedPaths[t]=!0,this.expressionsToBeDeoptimized[t]))for(const e of this.expressionsToBeDeoptimized[t])e.deoptimizeCache()}const n=1===e.length?be:e.slice(1);for(const e of"string"==typeof t?this.propertyMap[t]?this.propertyMap[t].propertiesRead:[]:this.properties)e.deoptimizePath(n)}getLiteralValueAtPath(e,t,n){null===this.propertyMap&&this.buildPropertyMap();const r=e[0];return 0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]?Se:1!==e.length||this.propertyMap[r]||Fe[r]||0!==this.unmatchablePropertiesRead.length?!this.propertyMap[r]||null===this.propertyMap[r].exactMatchRead||this.propertyMap[r].propertiesRead.length>1?Se:(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n],this.propertyMap[r].exactMatchRead.getLiteralValueAtPath(e.slice(1),t,n)):void(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n])}getReturnExpressionWhenCalledAtPath(e,t,n){null===this.propertyMap&&this.buildPropertyMap();const r=e[0];return 0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]?Ie:1!==e.length||!Fe[r]||0!==this.unmatchablePropertiesRead.length||this.propertyMap[r]&&null!==this.propertyMap[r].exactMatchRead?!this.propertyMap[r]||null===this.propertyMap[r].exactMatchRead||this.propertyMap[r].propertiesRead.length>1?Ie:(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n],this.propertyMap[r].exactMatchRead.getReturnExpressionWhenCalledAtPath(e.slice(1),t,n)):Xe(Fe,r)}hasEffectsWhenAccessedAtPath(e,t){if(0===e.length)return!1;const n=e[0];if(e.length>1&&(this.hasUnknownDeoptimizedProperty||"string"!=typeof n||this.deoptimizedPaths[n]||!this.propertyMap[n]||null===this.propertyMap[n].exactMatchRead))return!0;const r=e.slice(1);for(const e of"string"!=typeof n?this.properties:this.propertyMap[n]?this.propertyMap[n].propertiesRead:[])if(e.hasEffectsWhenAccessedAtPath(r,t))return!0;return!1}hasEffectsWhenAssignedAtPath(e,t){if(0===e.length)return!1;const n=e[0];if(e.length>1&&(this.hasUnknownDeoptimizedProperty||"string"!=typeof n||this.deoptimizedPaths[n]||!this.propertyMap[n]||null===this.propertyMap[n].exactMatchRead))return!0;const r=e.slice(1);for(const i of"string"!=typeof n?this.properties:e.length>1?this.propertyMap[n].propertiesRead:this.propertyMap[n]?this.propertyMap[n].propertiesSet:[])if(i.hasEffectsWhenAssignedAtPath(r,t))return!0;return!1}hasEffectsWhenCalledAtPath(e,t,n){const r=e[0];if(0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]||(this.propertyMap[r]?!this.propertyMap[r].exactMatchRead:e.length>1||!Fe[r]))return!0;const i=e.slice(1);for(const e of this.propertyMap[r]?this.propertyMap[r].propertiesRead:[])if(e.hasEffectsWhenCalledAtPath(i,t,n))return!0;return!(1!==e.length||!Fe[r])&&Ye(Fe,r,this.included,t,n)}initialise(){this.included=!1,this.hasUnknownDeoptimizedProperty=!1,this.deoptimizedPaths=Object.create(null),this.propertyMap=null,this.expressionsToBeDeoptimized=Object.create(null)}render(e,t,{renderedParentType:n}=Y){super.render(e,t),n===Z&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}buildPropertyMap(){this.propertyMap=Object.create(null),this.unmatchablePropertiesRead=[],this.unmatchablePropertiesWrite=[];for(let e=this.properties.length-1;e>=0;e--){const t=this.properties[e];if(t instanceof ca){this.unmatchablePropertiesRead.push(t);continue}const n="get"!==t.kind,r="set"!==t.kind;let i;if(t.computed){const e=t.key.getLiteralValueAtPath(_e,Qo,this);if(e===Se){r?this.unmatchablePropertiesRead.push(t):this.unmatchablePropertiesWrite.push(t);continue}i=String(e)}else i=t.key instanceof Xs?t.key.name:String(t.key.value);const s=this.propertyMap[i];s?(r&&null===s.exactMatchRead&&(s.exactMatchRead=t,s.propertiesRead.push(t,...this.unmatchablePropertiesRead)),n&&!r&&null===s.exactMatchWrite&&(s.exactMatchWrite=t,s.propertiesSet.push(t,...this.unmatchablePropertiesWrite))):this.propertyMap[i]={exactMatchRead:r?t:null,exactMatchWrite:n?t:null,propertiesRead:r?[t,...this.unmatchablePropertiesRead]:[],propertiesSet:n&&!r?[t,...this.unmatchablePropertiesWrite]:[]}}}deoptimizeAllProperties(){this.hasUnknownDeoptimizedProperty=!0;for(const e of this.properties)e.deoptimizePath(be);for(const e of Object.keys(this.expressionsToBeDeoptimized))for(const t of this.expressionsToBeDeoptimized[e])t.deoptimizeCache()}},ObjectPattern:class extends Ls{addExportedVariables(e){for(const t of this.properties)t.type===se?t.value.addExportedVariables(e):t.argument.addExportedVariables(e)}declare(e,t){for(const n of this.properties)n.declare(e,t)}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){if(e.length>0)return!0;for(const e of this.properties)if(e.hasEffectsWhenAssignedAtPath(_e,t))return!0;return!1}},Program:la,Property:class extends Ls{constructor(){super(...arguments),this.declarationInit=null}bind(){super.bind(),"get"===this.kind&&null===this.returnExpression&&this.updateReturnExpression(),null!==this.declarationInit&&this.declarationInit.deoptimizePath([Ee,Ee])}declare(e,t){this.declarationInit=t,this.value.declare(e,Ie)}deoptimizeCache(){throw new Error("Unexpected deoptimization")}deoptimizePath(e){"get"===this.kind?e.length>0&&(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.deoptimizePath(e)):"set"!==this.kind&&this.value.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return"set"===this.kind?Se:"get"===this.kind?(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.getLiteralValueAtPath(e,t,n)):this.value.getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n){return"set"===this.kind?Ie:"get"===this.kind?(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.getReturnExpressionWhenCalledAtPath(e,t,n)):this.value.getReturnExpressionWhenCalledAtPath(e,t,n)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenAccessedAtPath(e,t){return"get"===this.kind?this.value.hasEffectsWhenCalledAtPath(_e,this.accessorCallOptions,t.getHasEffectsWhenCalledOptions())||e.length>0&&this.returnExpression.hasEffectsWhenAccessedAtPath(e,t):this.value.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return"get"===this.kind?0===e.length||this.returnExpression.hasEffectsWhenAssignedAtPath(e,t):"set"===this.kind?e.length>0||this.value.hasEffectsWhenCalledAtPath(_e,this.accessorCallOptions,t.getHasEffectsWhenCalledOptions()):this.value.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return"get"===this.kind?this.returnExpression.hasEffectsWhenCalledAtPath(e,t,n):this.value.hasEffectsWhenCalledAtPath(e,t,n)}initialise(){this.included=!1,this.returnExpression=null,this.accessorCallOptions=ve.create({callIdentifier:this,withNew:!1})}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}updateReturnExpression(){this.returnExpression=Ie,this.returnExpression=this.value.getReturnExpressionWhenCalledAtPath(_e,Qo,this)}},RestElement:class extends Ls{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e){this.argument.addExportedVariables(e)}bind(){super.bind(),null!==this.declarationInit&&this.declarationInit.deoptimizePath([Ee,Ee])}declare(e,t){this.argument.declare(e,Ie),this.declarationInit=t}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(_e)}hasEffectsWhenAssignedAtPath(e,t){return e.length>0||this.argument.hasEffectsWhenAssignedAtPath(_e,t)}},ReturnStatement:class extends Ls{hasEffects(e){return!e.ignoreReturnAwaitYield()||null!==this.argument&&this.argument.hasEffects(e)}initialise(){this.included=!1,this.scope.addReturnExpression(this.argument||Ie)}render(e,t){this.argument&&(this.argument.render(e,t),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends Ls{deoptimizePath(e){e.length>0&&this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,n)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.expressions[this.expressions.length-1].hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||this.expressions[this.expressions.length-1].hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return this.expressions[this.expressions.length-1].hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0;for(let t=0;t<this.expressions.length-1;t++){const n=this.expressions[t];(e||n.shouldBeIncluded())&&n.include(e)}this.expressions[this.expressions.length-1].include(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=Y){let i,s=0,o=0;for(const{node:a,start:h,end:u}of fe(this.expressions,e,this.start,this.end))a.included?(o++,0===s&&(s=h),i=u,a===this.expressions[this.expressions.length-1]&&1===o?a.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}):a.render(e,t)):he(a,e,h,u);o>1&&n&&(e.prependRight(s,"("),e.appendLeft(i,")"))}},SpreadElement:ca,SwitchCase:class extends Ls{include(e){this.included=!0,this.test&&this.test.include(e);for(const t of this.consequent)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){if(this.consequent.length){this.test&&this.test.render(e,t);const n=this.test?this.test.end:le(e.original,"default",this.start)+7,r=le(e.original,":",n)+1;de(this.consequent,e,r,this.end,t)}else super.render(e,t)}},SwitchStatement:class extends Ls{createScope(e){this.scope=new Fo(e)}hasEffects(e){return super.hasEffects(e.setIgnoreBreakStatements())}},TaggedTemplateExpression:class extends Ls{bind(){super.bind(),this.tag.type===te&&(this.scope.findVariable(this.tag.name).isNamespace&&this.context.error({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${this.tag.name}')`},this.start),"eval"===this.tag.name&&this.context.warn({code:"EVAL",message:"Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification",url:"https://rollupjs.org/guide/en#avoiding-eval"},this.start))}hasEffects(e){return super.hasEffects(e)||this.tag.hasEffectsWhenCalledAtPath(_e,this.callOptions,e.getHasEffectsWhenCalledOptions())}initialise(){this.included=!1,this.callOptions=ve.create({callIdentifier:this,withNew:!1})}},TemplateElement:class extends Ls{hasEffects(e){return!1}},TemplateLiteral:pa,ThisExpression:class extends Ls{bind(){super.bind(),this.variable=this.scope.findVariable("this")}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.variable.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return this.variable.hasEffectsWhenAssignedAtPath(e,t)}initialise(){this.included=!1,this.variable=null,this.alias=this.scope.findLexicalBoundary()instanceof da?this.context.moduleContext:null,"undefined"===this.alias&&this.context.warn({code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:"https://rollupjs.org/guide/en#error-this-is-undefined"},this.start)}render(e,t){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends Ls{hasEffects(e){return!0}},TryStatement:Ls,UnaryExpression:class extends Ls{bind(){super.bind(),"delete"===this.operator&&this.argument.deoptimizePath(_e)}getLiteralValueAtPath(e,t,n){if(e.length>0)return Se;const r=this.argument.getLiteralValueAtPath(_e,t,n);return r===Se?Se:fa[this.operator](r)}hasEffects(e){return this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsWhenAssignedAtPath(_e,e)}hasEffectsWhenAccessedAtPath(e,t){return"void"===this.operator?e.length>0:e.length>1}},UnknownNode:class extends Ls{hasEffects(e){return!0}include(){super.include(!0)}},UpdateExpression:class extends Ls{bind(){super.bind(),this.argument.deoptimizePath(_e),this.argument instanceof Xs&&(this.scope.findVariable(this.argument.name).isReassigned=!0)}hasEffects(e){return this.argument.hasEffects(e)||this.argument.hasEffectsWhenAssignedAtPath(_e,e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}render(e,t){this.argument.render(e,t);const n=this.argument.variable;if("system"===t.format&&n&&n.exportName){const t=n.getName();if(this.prefix)e.overwrite(this.start,this.end,`exports('${n.exportName}', ${this.operator}${t})`);else{let r;switch(this.operator){case"++":r=`${t} + 1`;break;case"--":r=`${t} - 1`}e.overwrite(this.start,this.end,`(exports('${n.exportName}', ${r}), ${t}${this.operator})`)}}}},VariableDeclaration:class extends Ls{deoptimizePath(e){for(const e of this.declarations)e.deoptimizePath(_e)}hasEffectsWhenAssignedAtPath(e,t){return!1}include(e){this.included=!0;for(const t of this.declarations)(e||t.shouldBeIncluded())&&t.include(e)}includeWithAllDeclaredVariables(e){this.included=!0;for(const t of this.declarations)t.include(e)}initialise(){this.included=!1;for(const e of this.declarations)e.declareDeclarator(this.kind)}render(e,t,n=Y){if(function(e){for(const t of e){if(!t.included)return!1;if(t.id.type===te){if(t.id.variable.exportName)return!1}else{const e=[];if(t.id.addExportedVariables(e),e.length>0)return!1}}return!0}(this.declarations)){for(const n of this.declarations)n.render(e,t);n.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t,n)}renderDeclarationEnd(e,t,n,r,i,s,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),s&&(t+=";"),null!==n?(10!==e.original.charCodeAt(r-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(r--,13===e.original.charCodeAt(r)&&r--),r===n+1?e.overwrite(n,i,t):(e.overwrite(n,n+1,t),e.remove(r,i))):e.appendLeft(i,t),o.length>0&&e.appendLeft(i," "+Ho(o))}renderReplacedDeclarations(e,t,{start:n=this.start,end:r=this.end,isNoStatement:i}){const s=fe(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let o,a,h=(a=/\n\s*$/.test(e.slice(this.start,s[0].start))?this.start+this.kind.length:s[0].start)-1;e.remove(this.start,h);let u,c,l=!1,p=!1,d="";const f=[];for(const{node:n,start:r,separator:i,contentEnd:m,end:g}of s)!n.included||n.id instanceof Xs&&ma(n.id.variable)&&null===n.init?e.remove(r,g):(u="",c="",n.id instanceof Xs&&ma(n.id.variable)?(p&&(d+=";"),l=!1):("system"===t.format&&null!==n.init&&(n.id.type!==te?n.id.addExportedVariables(f):n.id.variable.exportName&&(e.prependLeft(e.original.indexOf("=",n.id.end)+1,` exports('${n.id.variable.safeExportName||n.id.variable.exportName}',`),c+=")")),l?d+=",":(p&&(d+=";"),u+=`${this.kind} `,l=!0)),a===h+1?e.overwrite(h,a,d+u):(e.overwrite(h,h+1,d),e.appendLeft(a,u)),n.render(e,t),o=m,a=g,p=!0,h=i,d=c);p?this.renderDeclarationEnd(e,d,h,o,a,!i,f):e.remove(n,r)}},VariableDeclarator:class extends Ls{declareDeclarator(e){this.id.declare(e,this.init||we)}deoptimizePath(e){this.id.deoptimizePath(e)}render(e,t){null===this.init||this.init.included?super.render(e,t):(e.remove(this.id.end,this.end),this.id.render(e,t))}},WhileStatement:class extends Ls{hasEffects(e){return this.test.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}},YieldExpression:class extends Ls{bind(){super.bind(),null!==this.argument&&this.argument.deoptimizePath(be)}hasEffects(e){return!e.ignoreReturnAwaitYield()||null!==this.argument&&this.argument.hasEffects(e)}render(e,t){this.argument&&(this.argument.render(e,t),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}};function ya(e,t,n){n(e,t)}function xa(e,t,n){}var va={};function Ea(e,t,n=e.type){let r=t.commentNodes[t.commentIndex];for(;r&&e.start>=r.end;)_a(e,r),r=t.commentNodes[++t.commentIndex];r&&r.end<=e.end&&va[n](e,t,Ea)}function _a(e,t){e.annotations?e.annotations.push(t):e.annotations=[t],"ExpressionStatement"===e.type&&(e=e.expression),"CallExpression"!==e.type&&"NewExpression"!==e.type||(e.annotatedPure=!0)}va.Program=va.BlockStatement=function(e,t,n){for(var r=0,i=e.body;r<i.length;r+=1){n(i[r],t,"Statement")}},va.Statement=ya,va.EmptyStatement=xa,va.ExpressionStatement=va.ParenthesizedExpression=function(e,t,n){return n(e.expression,t,"Expression")},va.IfStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Statement"),e.alternate&&n(e.alternate,t,"Statement")},va.LabeledStatement=function(e,t,n){return n(e.body,t,"Statement")},va.BreakStatement=va.ContinueStatement=xa,va.WithStatement=function(e,t,n){n(e.object,t,"Expression"),n(e.body,t,"Statement")},va.SwitchStatement=function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0,i=e.cases;r<i.length;r+=1){var s=i[r];s.test&&n(s.test,t,"Expression");for(var o=0,a=s.consequent;o<a.length;o+=1){n(a[o],t,"Statement")}}},va.SwitchCase=function(e,t,n){e.test&&n(e.test,t,"Expression");for(var r=0,i=e.consequent;r<i.length;r+=1){n(i[r],t,"Statement")}},va.ReturnStatement=va.YieldExpression=va.AwaitExpression=function(e,t,n){e.argument&&n(e.argument,t,"Expression")},va.ThrowStatement=va.SpreadElement=function(e,t,n){return n(e.argument,t,"Expression")},va.TryStatement=function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,"Statement")},va.CatchClause=function(e,t,n){e.param&&n(e.param,t,"Pattern"),n(e.body,t,"Statement")},va.WhileStatement=va.DoWhileStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.body,t,"Statement")},va.ForStatement=function(e,t,n){e.init&&n(e.init,t,"ForInit"),e.test&&n(e.test,t,"Expression"),e.update&&n(e.update,t,"Expression"),n(e.body,t,"Statement")},va.ForInStatement=va.ForOfStatement=function(e,t,n){n(e.left,t,"ForInit"),n(e.right,t,"Expression"),n(e.body,t,"Statement")},va.ForInit=function(e,t,n){"VariableDeclaration"===e.type?n(e,t):n(e,t,"Expression")},va.DebuggerStatement=xa,va.FunctionDeclaration=function(e,t,n){return n(e,t,"Function")},va.VariableDeclaration=function(e,t,n){for(var r=0,i=e.declarations;r<i.length;r+=1){n(i[r],t)}},va.VariableDeclarator=function(e,t,n){n(e.id,t,"Pattern"),e.init&&n(e.init,t,"Expression")},va.Function=function(e,t,n){e.id&&n(e.id,t,"Pattern");for(var r=0,i=e.params;r<i.length;r+=1){n(i[r],t,"Pattern")}n(e.body,t,e.expression?"Expression":"Statement")},va.Pattern=function(e,t,n){"Identifier"===e.type?n(e,t,"VariablePattern"):"MemberExpression"===e.type?n(e,t,"MemberPattern"):n(e,t)},va.VariablePattern=xa,va.MemberPattern=ya,va.RestElement=function(e,t,n){return n(e.argument,t,"Pattern")},va.ArrayPattern=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Pattern")}},va.ObjectPattern=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];"Property"===s.type?(s.computed&&n(s.key,t,"Expression"),n(s.value,t,"Pattern")):"RestElement"===s.type&&n(s.argument,t,"Pattern")}},va.Expression=ya,va.ThisExpression=va.Super=va.MetaProperty=xa,va.ArrayExpression=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Expression")}},va.ObjectExpression=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){n(i[r],t)}},va.FunctionExpression=va.ArrowFunctionExpression=va.FunctionDeclaration,va.SequenceExpression=function(e,t,n){for(var r=0,i=e.expressions;r<i.length;r+=1){n(i[r],t,"Expression")}},va.TemplateLiteral=function(e,t,n){for(var r=0,i=e.quasis;r<i.length;r+=1){n(i[r],t)}for(var s=0,o=e.expressions;s<o.length;s+=1){n(o[s],t,"Expression")}},va.TemplateElement=xa,va.UnaryExpression=va.UpdateExpression=function(e,t,n){n(e.argument,t,"Expression")},va.BinaryExpression=va.LogicalExpression=function(e,t,n){n(e.left,t,"Expression"),n(e.right,t,"Expression")},va.AssignmentExpression=va.AssignmentPattern=function(e,t,n){n(e.left,t,"Pattern"),n(e.right,t,"Expression")},va.ConditionalExpression=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Expression"),n(e.alternate,t,"Expression")},va.NewExpression=va.CallExpression=function(e,t,n){if(n(e.callee,t,"Expression"),e.arguments)for(var r=0,i=e.arguments;r<i.length;r+=1){n(i[r],t,"Expression")}},va.MemberExpression=function(e,t,n){n(e.object,t,"Expression"),e.computed&&n(e.property,t,"Expression")},va.ExportNamedDeclaration=va.ExportDefaultDeclaration=function(e,t,n){e.declaration&&n(e.declaration,t,"ExportNamedDeclaration"===e.type||e.declaration.id?"Statement":"Expression"),e.source&&n(e.source,t,"Expression")},va.ExportAllDeclaration=function(e,t,n){n(e.source,t,"Expression")},va.ImportDeclaration=function(e,t,n){for(var r=0,i=e.specifiers;r<i.length;r+=1){n(i[r],t)}n(e.source,t,"Expression")},va.ImportSpecifier=va.ImportDefaultSpecifier=va.ImportNamespaceSpecifier=va.Identifier=va.Literal=xa,va.TaggedTemplateExpression=function(e,t,n){n(e.tag,t,"Expression"),n(e.quasi,t,"Expression")},va.ClassDeclaration=va.ClassExpression=function(e,t,n){return n(e,t,"Class")},va.Class=function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression"),n(e.body,t)},va.ClassBody=function(e,t,n){for(var r=0,i=e.body;r<i.length;r+=1){n(i[r],t)}},va.MethodDefinition=va.Property=function(e,t,n){e.computed&&n(e.key,t,"Expression"),n(e.value,t,"Expression")};const ba=/[@#]__PURE__/,Aa=e=>ba.test(e.text);let Sa="sourceMa";Sa+="ppingURL";const Ia=new RegExp(`^#\\s+${Sa}=.+\\n?`),wa=()=>{};let Pa=()=>0,ka=()=>0,Ca=()=>0,Na={};const $a=e=>1e3*e[0]+e[1]/1e6;function Ra(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function Oa(e,t=3){e=Ra(e,t),Na.hasOwnProperty(e)||(Na[e]={memory:0,startMemory:void 0,startTime:void 0,time:0,totalMemory:0});const n=Ca();Na[e].startTime=Pa(),Na[e].startMemory=n}function Ma(e,t=3){if(e=Ra(e,t),Na.hasOwnProperty(e)){const t=Ca();Na[e].time+=ka(Na[e].startTime),Na[e].totalMemory=Math.max(Na[e].totalMemory,t),Na[e].memory+=t-Na[e].startMemory}}function Ta(){const e={};return Object.keys(Na).forEach(t=>{e[t]=[Na[t].time,Na[t].memory,Na[t].totalMemory]}),e}let Da=wa,La=wa;const Va={load:!0,ongenerate:!0,onwrite:!0,resolveDynamicImport:!0,resolveId:!0,transform:!0,transformBundle:!0};function Ba(e,t){const n={};for(const r of Object.keys(e))if(!0===Va[r]){let i=`plugin ${t}`;e.name&&(i+=` (${e.name})`),i+=` - ${r}`,n[r]=function(){Da(i,4);const t=e[r].apply(this===n?e:this,arguments);return La(i,4),t&&"function"==typeof t.then&&(Da(`${i} (async)`,4),t.then(()=>La(`${i} (async)`,4))),t}}else n[r]=e[r];return n}function za(e){e.perf?(Na={},"undefined"!=typeof process&&"function"==typeof process.hrtime?(Pa=process.hrtime.bind(process),ka=(e=>$a(process.hrtime(e)))):"undefined"!=typeof performance&&"function"==typeof performance.now&&(Pa=performance.now.bind(performance),ka=(e=>performance.now()-e)),"undefined"!=typeof process&&"function"==typeof process.memoryUsage&&(Ca=(()=>process.memoryUsage().heapUsed)),Da=Oa,La=Ma,e.plugins=e.plugins.map(Ba)):(Da=wa,La=wa)}const ja={ecmaVersion:2019,preserveParens:!1,sourceType:"module"};function Wa(e,t,n,r){t.error({code:"MISSING_EXPORT",message:`'${e}' is not exported by ${bo(n)}`,url:"https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-"},r)}const Ua={identifier:null,localName:Js};class Fa{constructor(e,t,n,r){this.chunkAlias=null,this.comments=[],this.dependencies=[],this.dynamicallyImportedBy=[],this.dynamicDependencies=[],this.dynamicImports=[],this.entryPointsHash=new Uint8Array(10),this.execIndex=1/0,this.exportAllModules=null,this.exportAllSources=[],this.exports=Object.create(null),this.exportsAll=Object.create(null),this.exportShimVariable=new eo(this),this.facadeChunk=null,this.importDescriptions=Object.create(null),this.importMetas=[],this.imports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.manualChunkAlias=null,this.reexports=Object.create(null),this.sources=[],this.usesTopLevelAwait=!1,this.namespaceVariable=void 0,this.id=t,this.graph=e,this.excludeFromSourcemap=/\0/.test(t),this.context=e.getModuleContext(t),this.moduleSideEffects=n,this.isEntryPoint=r}basename(){const e=ct(this.id),t=pt(this.id);return it(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){if(void 0!==t){e.pos=t;let n=_t(this.code,t,{offsetLine:1});try{n=function(e,t){const n=e.filter(e=>e.mappings);for(;n.length>0;){const e=n.pop(),r=e.mappings[t.line-1];let i=!1;if(void 0!==r)for(const n of r)if(n[0]>=t.column){if(n.length<4)break;t={column:n[3],line:n[2]+1,name:e.names[n[4]],source:e.sources[n[1]]},i=!0;break}if(!i)throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,n)}catch(e){this.warn({code:"SOURCEMAP_ERROR",loc:{column:n.column,file:this.id,line:n.line},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:t},void 0)}e.loc={column:n.column,file:this.id,line:n.line},e.frame=Eo(this.originalCode,n.line,n.column)}So(e)}getAllExports(){const e=Object.assign(Object.create(null),this.exports,this.reexports);return this.exportAllModules.forEach(t=>{if(t.isExternal)e[`*${t.id}`]=!0;else for(const n of t.getAllExports())"default"!==n&&(e[n]=!0)}),Object.keys(e)}getDynamicImportExpressions(){return this.dynamicImports.map(({node:e})=>{const t=e.parent.arguments[0];if(t instanceof pa){if(0===t.expressions.length&&1===t.quasis.length)return t.quasis[0].value.cooked}else{if(!(t instanceof sa))return t;if("string"==typeof t.value)return t.value}})}getExports(){return Object.keys(this.exports)}getOrCreateNamespace(){return this.namespaceVariable||(this.namespaceVariable=new lo(this.astContext))}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set;for(const t in this.reexports)e.add(t);for(const t of this.exportAllModules)if(t instanceof mt)e.add(`*${t.id}`);else for(const n of t.getExports().concat(t.getReexports()))"default"!==n&&e.add(n);return this.transitiveReexports=Array.from(e)}getRenderedExports(){const e=[],t=[];for(const n in this.exports){const r=this.getVariableForExportName(n);(r&&r.included?e:t).push(n)}return{renderedExports:e,removedExports:t}}getTransitiveDependencies(){return this.dependencies.concat(this.getReexports().map(e=>this.getVariableForExportName(e).module))}getVariableForExportName(e,t){if("*"===e[0]){if(1===e.length)return this.getOrCreateNamespace();return this.graph.moduleById.get(e.slice(1)).getVariableForExportName("*")}const n=this.reexports[e];if(n){const e=n.module.getVariableForExportName(n.localName);return e||Wa(n.localName,this,n.module.id,n.start),e}const r=this.exports[e];if(r){if(r===Ua)return this.exportShimVariable;const e=r.localName;return this.traceVariable(e)||this.graph.scope.findVariable(e)}if("default"!==e)for(let t=0;t<this.exportAllModules.length;t+=1){const n=this.exportAllModules[t].getVariableForExportName(e,!0);if(n)return n}if(this.graph.shimMissingExports&&!t)return this.shimMissingExport(e),this.exportShimVariable}include(){this.ast.shouldBeIncluded()&&this.ast.include(!1)}includeAllExports(){this.isExecuted||(this.graph.needsTreeshakingPass=!0,gt(this));for(const e of this.getExports()){const t=this.getVariableForExportName(e);t.deoptimizePath(be),t.included||(t.include(),this.graph.needsTreeshakingPass=!0)}for(const e of this.getReexports()){const t=this.getVariableForExportName(e);t.isExternal?t.reexported=t.module.reexported=!0:t.included||(t.include(),t.deoptimizePath(be),this.graph.needsTreeshakingPass=!0)}}includeAllInBundle(){this.ast.include(!0)}isIncluded(){return this.ast.included||this.namespaceVariable&&this.namespaceVariable.included}linkDependencies(){for(const e of this.sources){const t=this.resolvedIds[e].id;if(t){const e=this.graph.moduleById.get(t);this.dependencies.push(e)}}for(const{resolution:e}of this.dynamicImports)(e instanceof Fa||e instanceof mt)&&this.dynamicDependencies.push(e);this.addModulesToSpecifiers(this.importDescriptions),this.addModulesToSpecifiers(this.reexports),this.exportAllModules=this.exportAllSources.map(e=>{const t=this.resolvedIds[e].id;return this.graph.moduleById.get(t)})}render(e){const t=this.magicString.clone();return this.ast.render(t,e),this.usesTopLevelAwait=this.astContext.usesTopLevelAwait,t}setSource({ast:e,code:t,customTransformCache:n,moduleSideEffects:r,originalCode:i,originalSourcemap:s,resolvedIds:o,sourcemapChain:a,transformDependencies:h}){var u;this.code=t,this.originalCode=i,this.originalSourcemap=s,this.sourcemapChain=a,this.transformDependencies=h,this.customTransformCache=n,"boolean"==typeof r&&(this.moduleSideEffects=r),Da("generate ast",3),this.esTreeAst=e||function(e,t,n){try{return t.parse(e.code,Object.assign({},ja,n,{onComment:(t,n,r,i)=>e.comments.push({block:t,text:n,start:r,end:i})}))}catch(t){let n=t.message.replace(/ \(\d+:\d+\)$/,"");e.id.endsWith(".json")?n+=" (Note that you need rollup-plugin-json to import JSON files)":e.id.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),e.error({code:"PARSE_ERROR",message:n},t.pos)}}(this,this.graph.acornParser,this.graph.acornOptions),u=this.comments,Ea(this.esTreeAst,{commentIndex:0,commentNodes:u.filter(Aa)}),La("generate ast",3),this.resolvedIds=o||Object.create(null);const c=this.id;this.magicString=new G(t,{filename:this.excludeFromSourcemap?null:c,indentExclusionRanges:[]}),this.removeExistingSourceMap(),Da("analyse ast",3),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),annotations:this.graph.treeshake&&this.graph.treeshakingOptions.annotations,code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:c,getAssetFileName:this.graph.pluginDriver.getAssetFileName,getChunkFileName:this.graph.moduleLoader.getChunkFileName.bind(this.graph.moduleLoader),getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeDynamicImport:this.includeDynamicImport.bind(this),includeVariable:this.includeVariable.bind(this),isCrossChunkImport:e=>e.module.chunk!==this.chunk,magicString:this.magicString,module:this,moduleContext:this.context,nodeConstructors:ga,preserveModules:this.graph.preserveModules,propertyReadSideEffects:!this.graph.treeshake||this.graph.treeshakingOptions.propertyReadSideEffects,traceExport:this.getVariableForExportName.bind(this),traceVariable:this.traceVariable.bind(this),treeshake:this.graph.treeshake,usesTopLevelAwait:!1,warn:this.warn.bind(this)},this.scope=new da(this.graph.scope,this.astContext),this.ast=new la(this.esTreeAst,{type:"Module",context:this.astContext},this.scope),La("analyse ast",3)}toJSON(){return{ast:this.esTreeAst,code:this.code,customTransformCache:this.customTransformCache,dependencies:this.dependencies.map(e=>e.id),id:this.id,moduleSideEffects:this.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,transformAssets:this.transformAssets,transformDependencies:this.transformDependencies}}traceVariable(e){if(e in this.scope.variables)return this.scope.variables[e];if(e in this.importDescriptions){const t=this.importDescriptions[e],n=t.module;if(!n.isExternal&&"*"===t.name)return n.getOrCreateNamespace();const r=n.getVariableForExportName(t.name);return r||Wa(t.name,this,n.id,t.start),r}return null}warn(e,t){if(void 0!==t){e.pos=t;const{line:n,column:r}=_t(this.code,t,{offsetLine:1});e.loc={file:this.id,line:n,column:r},e.frame=Eo(this.code,n,r)}e.id=this.id,this.graph.warn(e)}addDynamicImport(e){this.dynamicImports.push({node:e,resolution:void 0})}addExport(e){const t=e.source&&e.source.value;if(t)if(-1===this.sources.indexOf(t)&&this.sources.push(t),e.type===J)this.exportAllSources.push(t);else for(const n of e.specifiers){const e=n.exported.name;(this.exports[e]||this.reexports[e])&&this.error({code:"DUPLICATE_EXPORT",message:`A module cannot have multiple exports with the same name ('${e}')`},n.start),this.reexports[e]={localName:n.local.name,module:null,source:t,start:n.start}}else if(e instanceof Ys)this.exports.default&&this.error({code:"DUPLICATE_EXPORT",message:"A module can only have one default export"},e.start),this.exports.default={identifier:e.variable.getAssignedVariableName(),localName:"default"};else if(e.declaration){const t=e.declaration;if(t.type===ae)for(const e of t.declarations)for(const t of Uo(e.id))this.exports[t]={identifier:null,localName:t};else{const e=t.id.name;this.exports[e]={identifier:null,localName:e}}}else for(const t of e.specifiers){const e=t.local.name,n=t.exported.name;(this.exports[n]||this.reexports[n])&&this.error({code:"DUPLICATE_EXPORT",message:`A module cannot have multiple exports with the same name ('${n}')`},t.start),this.exports[n]={identifier:null,localName:e}}}addImport(e){const t=e.source.value;-1===this.sources.indexOf(t)&&this.sources.push(t);for(const n of e.specifiers){const e=n.local.name;this.importDescriptions[e]&&this.error({code:"DUPLICATE_IMPORT",message:`Duplicated import '${e}'`},n.start);const r=n.type===ne,i=n.type===re,s=r?"default":i?"*":n.imported.name;this.importDescriptions[e]={source:t,start:n.start,name:s,module:null}}}addImportMeta(e){this.importMetas.push(e)}addModulesToSpecifiers(e){for(const t of Object.keys(e)){const n=e[t],r=this.resolvedIds[n.source].id;n.module=this.graph.moduleById.get(r)}}includeDynamicImport(e){const t=this.dynamicImports.find(t=>t.node===e).resolution;t instanceof Fa&&(t.dynamicallyImportedBy.push(this),t.includeAllExports())}includeVariable(e){const t=e.module;e.included||(e.include(),this.graph.needsTreeshakingPass=!0),t&&t!==this&&this.imports.add(e)}removeExistingSourceMap(){for(const e of this.comments)!e.block&&Ia.test(e.text)&&this.magicString.remove(e.start,e.end)}shimMissingExport(e){this.exports[e]||(this.graph.warn({code:"SHIMMED_EXPORT",exporter:bo(this.id),exportName:e,message:`Missing export "${e}" has been shimmed in module ${bo(this.id)}.`}),this.exports[e]=Ua)}}class qa{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,n){return{line:e,column:t,name:n,source:this}}}class Ga{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=[],n=[],r=[];for(const i of this.mappings){const s=[];for(const r of i){const i=this.sources[r[1]];if(!i)continue;const o=i.traceSegment(r[2],r[3],this.names[r[4]]);if(o){let i=e.lastIndexOf(o.source.filename);-1===i?(i=e.length,e.push(o.source.filename),t[i]=o.source.content):null==t[i]?t[i]=o.source.content:null!=o.source.content&&t[i]!==o.source.content&&So({message:`Multiple conflicting contents for sourcemap source ${o.source.filename}`});const a=[r[0],i,o.line,o.column];if(o.name){let e=n.indexOf(o.name);-1===e&&(e=n.length,n.push(o.name)),a[4]=e}s.push(a)}}r.push(s)}return{sources:e,sourcesContent:t,names:n,mappings:r}}traceSegment(e,t,n){const r=this.mappings[e];if(!r)return null;let i=0,s=r.length-1;for(;i<=s;){const e=i+s>>1,o=r[e];if(o[0]===t){const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],this.names[o[4]]||n):null}o[0]>t?s=e-1:i=e+1}return null}}const Ha={amd:Xa,cjs:Xa,es:Ya,iife:Xa,system:Ya,umd:Xa};function Ka(e,t,n,r,i,s,o){const{forbiddenNames:a,formatGlobals:h}=co[i];Object.assign(r,a),Object.assign(r,h),function(e,t){const n=Object.assign({},...t.map(e=>e.scope.accessedOutsideVariables));for(const t of Object.keys(n)){const r=n[t];r.included&&(e[t]=!0)}}(r,e),function(e,t){for(const n of t){const t=n.scope.variables;for(const n of Object.keys(t)){const r=t[n];r.included&&!(r.renderBaseName||r instanceof Qs&&r.getOriginalVariable()!==r)&&r.setRenderNames(null,xe(r.name,e))}const r=n.getOrCreateNamespace();r.included&&r.setRenderNames(null,xe(r.name,e))}}(r,e),Ha[i](r,n,t,s,o);for(const t of e)t.scope.deconflict(a)}function Ya(e,t,n,r){for(const n of t){const t=n.module,i=n.name;let s;s=t instanceof mt&&("*"===i||"default"===i)?"default"===i&&r&&t.exportsNamespace?t.variableName+"__default":t.variableName:i,n.setRenderNames(null,xe(s,e))}}function Xa(e,t,n,r,i){for(const t of n)t.variableName=xe(t.variableName,e);for(const e of t){const t=e.module;if(t instanceof mt){const n=e.name;"default"===n&&r&&(t.exportsNamespace||t.exportsNames)?e.setRenderNames(null,t.variableName+"__default"):"*"===n||"default"===n?e.setRenderNames(null,t.variableName):e.setRenderNames(t.variableName,null)}else{const n=t.chunk;"default"===n.exportMode||i&&e.isNamespace?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,n.getVariableExportName(e))}}}const Qa=(e,t)=>e.execIndex>t.execIndex?1:-1;function Ja(e){e.sort(Qa)}function Za(e,t,n){const r=[bo(e)];let i=t;for(;i!==e&&(r.push(bo(i)),i=n[i]););return r.push(r[0]),r.reverse(),r}function eh(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),r=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===r.length)return null;if(n.length>=r.length)return"\t";const i=r.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(" ")}function th(e,t,n){return Ao(e)||So({code:"INVALID_PATTERN",message:`Invalid output pattern "${e}" for ${t}, cannot be an absolute or relative URL or path.`}),e.replace(/\[(\w+)\]/g,(e,r)=>{const i=n(r);return void 0===i&&So({code:"INVALID_PATTERN_REPLACEMENT",message:`"${r}" is not a valid substitution name in output option ${t} pattern.`}),Ao(i)||So({code:"INVALID_PATTERN_REPLACEMENT",message:`Invalid replacement "${i}" for "${r}" in ${t} pattern, must be a plain path name.`}),i})}function nh(e,t){if(e in t==!1)return e;const n=pt(e);e=e.substr(0,e.length-n.length);let r,i=1;for(;t[r=e+ ++i+n];);return r}function rh(e){return e.replace(/[\0?*]/g,"_")}function ih(e,t,n,r){let i;return"function"==typeof t?i=t(e.id):t&&(i=t[e.id]),i||(r?(n.warn({code:"MISSING_GLOBAL_NAME",guess:e.variableName,message:`No name was provided for external module '${e.id}' in output.globals – guessing '${e.variableName}'`,source:e.id}),e.variableName):void 0)}function sh(e){return!e.isEmpty||e.entryModules.length>0||null!==e.manualChunkAlias}class oh{constructor(e,t){this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.hasDynamicImport=!1,this.id=void 0,this.indentString=void 0,this.manualChunkAlias=null,this.usedModules=void 0,this.dependencies=void 0,this.dynamicDependencies=void 0,this.exportNames=Object.create(null),this.exports=new Set,this.imports=new Set,this.needsExportsShim=!1,this.renderedDeclarations=void 0,this.renderedHash=void 0,this.renderedModuleSources=void 0,this.renderedSource=null,this.renderedSourceLength=void 0,this.sortedExportNames=null,this.graph=e,this.orderedModules=t,this.execIndex=t.length>0?t[0].execIndex:1/0,this.isEmpty=!0;for(const e of t)this.isEmpty&&e.isIncluded()&&(this.isEmpty=!1),e.manualChunkAlias&&(this.manualChunkAlias=e.manualChunkAlias),e.chunk=this,(e.isEntryPoint||e.dynamicallyImportedBy.some(e=>-1===t.indexOf(e)))&&this.entryModules.push(e);const n=this.entryModules[0];this.variableName=n?it(ct(n.chunkAlias||n.manualChunkAlias||_o(n.id))):"__chunk_"+ ++e.curChunkIndex}generateEntryExportsOrMarkAsTainted(){const e=this.entryModules.map(e=>({map:this.getVariableExportNamesForModule(e),module:e}));for(const{map:t}of e)for(const e of t.keys())this.exports.add(e);e:for(const{map:t,module:n}of e){if(!this.graph.preserveModules){if(this.manualChunkAlias&&n.chunkAlias&&this.manualChunkAlias!==n.chunkAlias)continue e;for(const e of this.exports)if(!t.has(e))continue e}this.facadeModule=n;for(const[e,n]of t)for(const t of n)this.exportNames[t]=e;return}}generateId(e,t,n,r,i){this.id=nh(th(e,t,e=>{switch(e){case"format":return"es"===r.format?"esm":r.format;case"hash":return this.computeContentHashWithDependencies(n,r);case"name":return this.getChunkName()}}),i)}generateIdPreserveModules(e,t){const n=rh(this.orderedModules[0].id);this.id=nh(ut(at(this.orderedModules[0].id)?dt(e,n):"_virtual/"+ct(n)),t)}generateInternalExports(e){if(null!==this.facadeModule)return;const t="system"===e.format||"es"===e.format||e.compact;let n,r=0;if(this.exportNames=Object.create(null),this.sortedExportNames=null,t)for(const e of this.exports){do{49===(n=ye(++r)).charCodeAt(0)&&(n=ye(r+=9*Math.pow(64,n.length-1)))}while(ao[n]);this.exportNames[n]=e}else for(const e of this.exports){for(r=0,n=e.name;this.exportNames[n];)n=e.name+"$"+ ++r;this.exportNames[n]=e}}getChunkName(){return this.chunkName||(this.chunkName=this.computeChunkName())}getDynamicImportIds(){return this.dynamicDependencies.map(e=>e.id).filter(Boolean)}getExportNames(){return this.sortedExportNames||(this.sortedExportNames=Object.keys(this.exportNames).sort())}getImportIds(){return this.dependencies.map(e=>e.id)}getRenderedHash(){if(this.renderedHash)return this.renderedHash;if(!this.renderedSource)return"";const e=C();return e.update(this.renderedSource.toString()),e.update(this.getExportNames().map(e=>{const t=this.exportNames[e];return`${bo(t.module.id).replace(/\\/g,"/")}:${t.name}:${e}`}).join(",")),this.renderedHash=e.digest("hex")}getRenderedSourceLength(){return void 0!==this.renderedSourceLength?this.renderedSourceLength:this.renderedSourceLength=this.renderedSource.length()}getVariableExportName(e){if(this.graph.preserveModules&&e instanceof lo)return"*";for(const t of Object.keys(this.exportNames))if(this.exportNames[t]===e)return t}link(){const e=new Set,t=new Set;for(const n of this.orderedModules)this.addChunksFromDependencies(n.getTransitiveDependencies(),e),this.addChunksFromDependencies(n.dynamicDependencies,t),this.setUpModuleImports(n);this.dependencies=Array.from(e),this.dynamicDependencies=Array.from(t)}merge(e,t,n,r){if(null!==this.facadeModule||null!==e.facadeModule)throw new Error("Internal error: Code splitting chunk merges not supported for facades");for(const t of e.orderedModules)t.chunk=this,this.orderedModules.push(t);for(const t of e.imports)this.imports.has(t)||t.module.chunk===this||this.imports.add(t);for(const t of e.exports)this.exports.has(t)||this.exports.add(t);const i=this.exportNames;this.generateInternalExports(n);const s=(e,t)=>{if(e.imports)for(const n of e.imports)n.imported=this.getVariableExportName(t[n.imported]);if(e.reexports)for(const n of e.reexports)n.imported=this.getVariableExportName(t[n.imported])},o=(e,t)=>{t.imports&&(e.imports?e.imports=e.imports.concat(t.imports):e.imports=t.imports),t.reexports&&(e.reexports?e.reexports=e.reexports.concat(t.reexports):e.reexports=t.reexports),!e.exportsNames&&t.exportsNames&&(e.exportsNames=!0),!e.exportsDefault&&t.exportsDefault&&(e.exportsDefault=!0),e.name=this.variableName};for(const n of t){let t=void 0;for(let r=0;r<n.dependencies.length;r++){const a=n.dependencies[r];if(a!==e&&a!==this||!t)a===e?(n.dependencies[r]=this,s(t=n.renderedDeclarations.dependencies[r],e.exportNames)):a===this&&s(t=n.renderedDeclarations.dependencies[r],i);else{const h=n.renderedDeclarations.dependencies[r];s(h,a===e?e.exportNames:i),o(t,h),n.renderedDeclarations.dependencies.splice(r,1),n.dependencies.splice(r--,1)}}}this.preRender(n,r)}preRender(e,t){Da("render modules",3);const n=new K({separator:e.compact?"":"\n\n"});this.usedModules=[],this.indentString=e.compact?"":function(e,t){if(!0!==t.indent)return t.indent||"";for(let t=0;t<e.length;t++){const n=eh(e[t].originalCode);if(null!==n)return n}return"\t"}(this.orderedModules,e);const r=e.compact?"":"\n",i=e.compact?"":" ",s={compact:e.compact,dynamicImportFunction:e.dynamicImportFunction,format:e.format,freeze:!1!==e.freeze,indent:this.indentString,namespaceToStringTag:!0===e.namespaceToStringTag,varOrConst:e.preferConst?"const":"var"};for(const{module:e}of this.imports){const t=e instanceof Fa?e.chunk:e;-1===this.dependencies.indexOf(t)&&this.dependencies.push(t)}if(!this.graph.preserveModules&&null!==this.facadeModule)for(const e of this.dependencies)e instanceof oh&&this.inlineChunkDependencies(e,!0);for(let e=0;e<this.dependencies.length;e++){const t=this.dependencies[e];t instanceof oh&&t.isEmpty&&(this.dependencies.splice(e--,1),this.inlineChunkDependencies(t,!1))}Ja(this.dependencies),this.setIdentifierRenderResolutions(e),this.prepareDynamicImports();let o="";this.renderedModules=Object.create(null),this.renderedModuleSources=[];for(let t=0;t<this.orderedModules.length;t++){const i=this.orderedModules[t],a=i.render(s);a.trim(),e.compact&&-1!==a.lastLine().indexOf("//")&&a.append("\n"),this.renderedModuleSources.push(a);const{renderedExports:h,removedExports:u}=i.getRenderedExports();this.renderedModules[i.id]={originalLength:i.originalCode.length,removedExports:u,renderedExports:h,renderedLength:a.length()};const c=i.getOrCreateNamespace();if((c.included||!a.isEmpty())&&(n.addSource(a),this.usedModules.push(i),c.included&&!this.graph.preserveModules)){const e=c.renderBlock(s);c.renderFirst()?o+=r+e:n.addSource(new G(e))}}o&&n.prepend(o+r+r),this.needsExportsShim&&n.prepend(`${r}${s.varOrConst} ${Js}${i}=${i}void 0;${r}${r}`),e.compact?this.renderedSource=n:this.renderedSource=n.trim(),this.renderedSourceLength=void 0,this.renderedHash=void 0,0===this.getExportNames().length&&0===this.getImportIds().length&&this.isEmpty&&this.graph.warn({code:"EMPTY_BUNDLE",message:"Generated an empty bundle"}),this.setExternalRenderPaths(e,t),this.renderedDeclarations={dependencies:this.getChunkDependencyDeclarations(e),exports:"none"===this.exportMode?[]:this.getChunkExportDeclarations()},La("render modules",3)}render(e,t,n){if(Da("render format",3),!this.renderedSource)throw new Error("Internal error: Chunk render called before preRender");const r=jo[e.format];r||So({code:"INVALID_OPTION",message:`Invalid format: ${e.format} - valid options are ${Object.keys(jo).join(", ")}.`}),e.dynamicImportFunction&&"es"!==e.format&&this.graph.warn({code:"INVALID_OPTION",message:'"output.dynamicImportFunction" is ignored for formats other than "esm".'});for(let e=0;e<this.dependencies.length;e++){const t=this.dependencies[e];if(t instanceof mt&&!t.renormalizeRenderPath)continue;const n=this.renderedDeclarations.dependencies[e],r=t instanceof mt?n.id:t.id;let i=this.id?ut(dt(lt(this.id),r)):r;i.startsWith("../")||(i="./"+i),t instanceof oh&&(n.namedExportsMode="default"!==t.exportMode),n.id=i}this.finaliseDynamicImports(e.format);const i=this.finaliseImportMetas(e),s=0!==this.renderedDeclarations.exports.length||this.renderedDeclarations.dependencies.some(e=>e.reexports&&0!==e.reexports.length),o=this.orderedModules.some(e=>e.usesTopLevelAwait);o&&"es"!==e.format&&"system"!==e.format&&So({code:"INVALID_TLA_FORMAT",message:`Module format ${e.format} does not support top-level await. Use the "es" or "system" output formats rather.`});const a=r(this.renderedSource,{dependencies:this.renderedDeclarations.dependencies,dynamicImport:this.hasDynamicImport,exports:this.renderedDeclarations.exports,hasExports:s,indentString:this.indentString,intro:t.intro,isEntryModuleFacade:null!==this.facadeModule&&this.facadeModule.isEntryPoint,namedExportsMode:"default"!==this.exportMode,needsAmdModule:i,outro:t.outro,usesTopLevelAwait:o,varOrConst:e.preferConst?"const":"var",warn:this.graph.warn.bind(this.graph)},e);t.banner&&a.prepend(t.banner),t.footer&&a.append(t.footer);const h=a.toString();La("render format",3);let u=null;const c=[];return function({graph:e,chunk:t,renderChunk:n,code:r,sourcemapChain:i,options:s}){const o=(e,t,n)=>{if(null==t)return e;"string"==typeof t&&(t={code:t,map:void 0});const r="string"==typeof t.map?JSON.parse(t.map):t.map;return r&&"string"==typeof r.mappings&&(r.mappings=O(r.mappings)),null!==r&&i.push(r||{missing:!0,plugin:n.name}),t.code};let a=!1,h=!0;return e.pluginDriver.hookReduceArg0("renderChunk",[r,n,s],o).then(n=>(h=!1,e.pluginDriver.hookReduceArg0("transformChunk",[n,s,t],o))).then(n=>(a=!0,e.pluginDriver.hookReduceArg0("transformBundle",[n,s,t],o))).catch(e=>{if(h)throw e;So(e,{code:a?"BAD_BUNDLE_TRANSFORMER":"BAD_CHUNK_TRANSFORMER",message:`Error transforming ${(a?"bundle":"chunk")+(e.plugin?` with '${e.plugin}' plugin`:"")}: ${e.message}`,plugin:e.plugin})})}({chunk:this,code:h,graph:this.graph,options:e,renderChunk:n,sourcemapChain:c}).then(t=>{if(e.sourcemap){let t;if(Da("sourcemap",3),t=e.file?ft(e.sourcemapFile||e.file):e.dir?ft(e.dir,this.id):ft(this.id),this.graph.pluginDriver.hasLoadersOrTransforms){const n=a.generateDecodedMap({});u=function(e,t,n,r,i,s){function o(t,n){return n.missing&&(e.graph.warn({code:"SOURCEMAP_BROKEN",message:`Sourcemap is likely to be incorrect: a plugin${n.plugin?` ('${n.plugin}')`:""} was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:n.plugin,url:"https://rollupjs.org/guide/en#warning-sourcemap-is-likely-to-be-incorrect"}),n={mappings:"",names:[]}),new Ga(n,[t])}const a=r.filter(e=>!e.excludeFromSourcemap).map(e=>{let t,n=e.sourcemapChain;const r=e.originalSourcemap;if(r){const i=r.sources,s=r.sourcesContent||[];if(null==i||i.length<=1&&null==i[0])t=new qa(e.id,s[0]),n=[r].concat(n);else{const n=lt(e.id)||".",o=r.sourceRoot||".",a=i.map((e,t)=>new qa(ft(n,o,e),s[t]));t=new Ga(r,a)}}else t=new qa(e.id,e.originalCode);return t=n.reduce(o,t)});let h=new Ga(n,a);h=i.reduce(o,h);let{sources:u,sourcesContent:c,names:l,mappings:p}=h.traceMappings();if(t){const e=lt(t);u=u.map(t=>dt(e,t)),t=ct(t)}return new L({file:t,sources:u,sourcesContent:c=s?null:c,names:l,mappings:p})}(this,t,n,this.usedModules,c,e.sourcemapExcludeSources)}else u=a.generateMap({file:t,includeContent:!e.sourcemapExcludeSources});u.sources=u.sources.map(t=>ut(e.sourcemapPathTransform?e.sourcemapPathTransform(t):t)),La("sourcemap",3)}return!0!==e.compact&&"\n"!==t[t.length-1]&&(t+="\n"),{code:t,map:u}})}turnIntoFacade(e){this.dependencies=[e.chunk],this.dynamicDependencies=[],this.facadeModule=e,e.facadeChunk=this;for(const t of e.getAllExports()){const n=e.getVariableForExportName(t);this.exports.add(n),this.exportNames[t]=n}}visitDependencies(e){const t=[this],n=new Set;for(const r of t)if(e(r),!(r instanceof mt))for(const e of r.dependencies.concat(r.dynamicDependencies))n.has(e)||(n.add(e),t.push(e))}visitStaticDependenciesUntilCondition(e){const t=new Set;return function n(r){if(!t.has(r)){if(t.add(r),r instanceof oh)for(const e of r.dependencies)if(n(e))return!0;return!0===e(r)}}(this)}addChunksFromDependencies(e,t){for(const n of e){if(n.chunk===this)continue;let e;if(n instanceof Fa)e=n.chunk;else{if(!n.used&&!n.moduleSideEffects)continue;e=n}t.add(e)}}computeChunkName(){if(this.manualChunkAlias)return rh(this.manualChunkAlias);if(null!==this.facadeModule)return rh(this.facadeModule.chunkAlias||_o(this.facadeModule.id));for(const e of this.orderedModules)if(e.chunkAlias)return rh(e.chunkAlias);return"chunk"}computeContentHashWithDependencies(e,t){const n=C();return n.update([e.intro,e.outro,e.banner,e.footer].map(e=>e||"").join(":")),n.update(t.format),this.visitDependencies(e=>{e instanceof mt?n.update(":"+e.renderPath):n.update(e.getRenderedHash())}),n.digest("hex").substr(0,8)}finaliseDynamicImports(e){for(let t=0;t<this.orderedModules.length;t++){const n=this.orderedModules[t],r=this.renderedModuleSources[t];for(const{node:t,resolution:i}of n.dynamicImports)if(i)if(i instanceof Fa){if(i.chunk!==this&&sh(i.chunk)){const n=i.facadeChunk||i.chunk;let s=ut(dt(lt(this.id),n.id));s.startsWith("../")||(s="./"+s),t.renderFinalResolution(r,`'${s}'`,e)}}else if(i instanceof mt){let n=i.id;i.renormalizeRenderPath&&((n=ut(dt(lt(this.id),i.renderPath))).startsWith("../")||(n="./"+n)),t.renderFinalResolution(r,`'${n}'`,e)}else t.renderFinalResolution(r,i,e)}}finaliseImportMetas(e){let t=!1;for(let n=0;n<this.orderedModules.length;n++){const r=this.orderedModules[n],i=this.renderedModuleSources[n];for(const n of r.importMetas)n.renderFinalMechanism(i,this.id,e.format,this.graph.pluginDriver)&&(t=!0)}return t}getChunkDependencyDeclarations(e){const t=new Map;for(let e of this.getExportNames()){let n,r,i=!1;if("*"===e[0])n=this.graph.moduleById.get(e.substr(1)),r=e="*";else{const t=this.exportNames[e],s=t.module;if(!s||s.chunk===this)continue;s instanceof Fa?(n=s.chunk,r=s.chunk.getVariableExportName(t),i=t.isReassigned):(n=s,r=t.name,i=!0)}let s=t.get(n);s||t.set(n,s=[]),s.push({imported:r,reexported:e,needsLiveBinding:i})}const n=new Set,r=[];for(const i of this.dependencies){const s=[];for(const e of this.imports){const t=e instanceof Qs?e.getOriginalVariable():e;if((e.module instanceof Fa?e.module.chunk===i:e.module===i)&&!n.has(t)){n.add(t);const r=e.getName(),i=e.module instanceof mt?e.name:e.module.chunk.getVariableExportName(e);s.push({local:r,imported:i})}}const o=t.get(i);let a,h,u=!0;i instanceof mt?(a=i.exportsNames||i.exportsNamespace,h="default"in i.declarations):(a=!0,h=!1,u="default"!==i.exportMode);let c=void 0,l=void 0;i instanceof mt&&(c=i.renderPath,"umd"!==e.format&&"iife"!==e.format||(l=ih(i,e.globals,this.graph,a||h))),r.push({exportsDefault:h,exportsNames:a,globalName:l,id:c,imports:s.length>0?s:null,isChunk:!i.isExternal,name:i.variableName,namedExportsMode:u,reexports:o})}return r}getChunkExportDeclarations(){const e=[];for(const t of this.getExportNames()){if("*"===t[0])continue;const n=this.exportNames[t],r=n.module;if(r&&r.chunk!==this)continue;let i=!1,s=!1;if(n instanceof xt){n.init===we&&(s=!0);for(const e of n.declarations)if(e.parent instanceof Hs||e instanceof Ys&&e.declaration instanceof Hs){i=!0;break}}else n instanceof oo&&(i=!0);const o=n.getName();e.push({exported:"*"===t?o:t,hoisted:i,local:o,uninitialized:s})}return e}getVariableExportNamesForModule(e){const t=new Map;for(const n of e.getAllExports()){const r=e.getVariableForExportName(n);if(!r||!r.included&&!r.isExternal)continue;const i=t.get(r);i?i.push(n):t.set(r,[n]);const s=r.module;s&&s.chunk&&s.chunk!==this&&s.chunk.exports.add(r)}return t}inlineChunkDependencies(e,t){for(const n of e.dependencies)if(n instanceof mt)-1===this.dependencies.indexOf(n)&&this.dependencies.push(n);else{if(n===this||-1!==this.dependencies.indexOf(n))continue;n.isEmpty||this.dependencies.push(n),t&&this.inlineChunkDependencies(n,!0)}}prepareDynamicImports(){for(const e of this.orderedModules)for(const{node:t,resolution:n}of e.dynamicImports)if(n)if(n instanceof Fa)if(n.chunk===this){const e=n.getOrCreateNamespace();t.setResolution(!1,e.getName())}else t.setResolution(!1);else t.setResolution(!1)}setExternalRenderPaths(e,t){for(const n of this.dependencies.concat(this.dynamicDependencies))n instanceof mt&&n.setRenderPath(e,t)}setIdentifierRenderResolutions(e){for(const t of this.getExportNames()){const n=this.exportNames[t];n&&(n instanceof eo&&(this.needsExportsShim=!0),n.exportName=t,"es"===e.format||"system"===e.format||!n.isReassigned||n.isId||n instanceof Qs&&n.hasId?n.setRenderNames(null,null):n.setRenderNames("exports",t))}const t=Object.create(null);this.needsExportsShim&&(t[Js]=!0),Ka(this.orderedModules,this.dependencies,this.imports,t,e.format,!1!==e.interop,this.graph.preserveModules)}setUpModuleImports(e){for(const t of e.imports)t.module.chunk!==this&&(this.imports.add(t),t.module instanceof Fa&&t.module.chunk.exports.add(t));if(e.getOrCreateNamespace().included)for(const t of Object.keys(e.reexports)){const n=e.reexports[t],r=n.module.getVariableForExportName(n.localName);r.module.chunk!==this&&(this.imports.add(r),r.module instanceof Fa&&r.module.chunk.exports.add(r))}for(const{node:t,resolution:n}of e.dynamicImports)t.included&&(this.hasDynamicImport=!0,n instanceof Fa&&n.chunk===this&&n.getOrCreateNamespace().include())}}var ah={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},hh="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",uh={5:hh,6:hh+" const class extends export import super"},ch=/^in(stanceof)?$/,lh="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ph="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",dh=new RegExp("["+lh+"]"),fh=new RegExp("["+lh+ph+"]");lh=ph=null;var mh=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],gh=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function yh(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}}function xh(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&dh.test(String.fromCharCode(e)):!1!==t&&yh(e,mh)))}function vh(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&fh.test(String.fromCharCode(e)):!1!==t&&(yh(e,mh)||yh(e,gh)))))}var Eh=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function _h(e,t){return new Eh(e,{beforeExpr:!0,binop:t})}var bh={beforeExpr:!0},Ah={startsExpr:!0},Sh={};function Ih(e,t){return void 0===t&&(t={}),t.keyword=e,Sh[e]=new Eh(e,t)}var wh={num:new Eh("num",Ah),regexp:new Eh("regexp",Ah),string:new Eh("string",Ah),name:new Eh("name",Ah),eof:new Eh("eof"),bracketL:new Eh("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Eh("]"),braceL:new Eh("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Eh("}"),parenL:new Eh("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Eh(")"),comma:new Eh(",",bh),semi:new Eh(";",bh),colon:new Eh(":",bh),dot:new Eh("."),question:new Eh("?",bh),arrow:new Eh("=>",bh),template:new Eh("template"),invalidTemplate:new Eh("invalidTemplate"),ellipsis:new Eh("...",bh),backQuote:new Eh("`",Ah),dollarBraceL:new Eh("${",{beforeExpr:!0,startsExpr:!0}),eq:new Eh("=",{beforeExpr:!0,isAssign:!0}),assign:new Eh("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Eh("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Eh("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:_h("||",1),logicalAND:_h("&&",2),bitwiseOR:_h("|",3),bitwiseXOR:_h("^",4),bitwiseAND:_h("&",5),equality:_h("==/!=/===/!==",6),relational:_h("</>/<=/>=",7),bitShift:_h("<</>>/>>>",8),plusMin:new Eh("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:_h("%",10),star:_h("*",10),slash:_h("/",10),starstar:new Eh("**",{beforeExpr:!0}),_break:Ih("break"),_case:Ih("case",bh),_catch:Ih("catch"),_continue:Ih("continue"),_debugger:Ih("debugger"),_default:Ih("default",bh),_do:Ih("do",{isLoop:!0,beforeExpr:!0}),_else:Ih("else",bh),_finally:Ih("finally"),_for:Ih("for",{isLoop:!0}),_function:Ih("function",Ah),_if:Ih("if"),_return:Ih("return",bh),_switch:Ih("switch"),_throw:Ih("throw",bh),_try:Ih("try"),_var:Ih("var"),_const:Ih("const"),_while:Ih("while",{isLoop:!0}),_with:Ih("with"),_new:Ih("new",{beforeExpr:!0,startsExpr:!0}),_this:Ih("this",Ah),_super:Ih("super",Ah),_class:Ih("class",Ah),_extends:Ih("extends",bh),_export:Ih("export"),_import:Ih("import"),_null:Ih("null",Ah),_true:Ih("true",Ah),_false:Ih("false",Ah),_in:Ih("in",{beforeExpr:!0,binop:7}),_instanceof:Ih("instanceof",{beforeExpr:!0,binop:7}),_typeof:Ih("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Ih("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Ih("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Ph=/\r\n?|\n|\u2028|\u2029/,kh=new RegExp(Ph.source,"g");function Ch(e,t){return 10===e||13===e||!t&&(8232===e||8233===e)}var Nh=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,$h=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Rh=Object.prototype,Oh=Rh.hasOwnProperty,Mh=Rh.toString;function Th(e,t){return Oh.call(e,t)}var Dh=Array.isArray||function(e){return"[object Array]"===Mh.call(e)};function Lh(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var Vh=function(e,t){this.line=e,this.column=t};Vh.prototype.offset=function(e){return new Vh(this.line,this.column+e)};var Bh=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function zh(e,t){for(var n=1,r=0;;){kh.lastIndex=r;var i=kh.exec(e);if(!(i&&i.index<t))return new Vh(n,t-r);++n,r=i.index+i[0].length}}var jh={ecmaVersion:9,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function Wh(e){var t={};for(var n in jh)t[n]=e&&Th(e,n)?e[n]:jh[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),Dh(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return Dh(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,s,o,a){var h={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(h.loc=new Bh(this,o,a)),e.ranges&&(h.range=[i,s]),t.push(h)}}(t,t.onComment)),t}var Uh=2,Fh=1|Uh,qh=4,Gh=8;function Hh(e,t){return Uh|(e?qh:0)|(t?Gh:0)}var Kh=function(e,t,n){this.options=e=Wh(e),this.sourceFile=e.sourceFile,this.keywords=Lh(uh[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=ah[i]);i--);"module"===e.sourceType&&(r+=" await")}this.reservedWords=Lh(r);var s=(r?r+" ":"")+ah.strict;this.reservedWordsStrict=Lh(s),this.reservedWordsStrictBind=Lh(s+" "+ah.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Ph).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=wh.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},Yh={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};Kh.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Yh.inFunction.get=function(){return(this.currentVarScope().flags&Uh)>0},Yh.inGenerator.get=function(){return(this.currentVarScope().flags&Gh)>0},Yh.inAsync.get=function(){return(this.currentVarScope().flags&qh)>0},Yh.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},Yh.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Yh.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Kh.prototype.inNonArrowFunction=function(){return(this.currentThisScope().flags&Uh)>0},Kh.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},Kh.parse=function(e,t){return new this(t,e).parse()},Kh.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},Kh.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(Kh.prototype,Yh);var Xh=Kh.prototype,Qh=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/;function Jh(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Xh.strictDirective=function(e){for(;;){$h.lastIndex=e,e+=$h.exec(this.input)[0].length;var t=Qh.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2]))return!0;e+=t[0].length,$h.lastIndex=e,e+=$h.exec(this.input)[0].length,";"===this.input[e]&&e++}},Xh.eat=function(e){return this.type===e&&(this.next(),!0)},Xh.isContextual=function(e){return this.type===wh.name&&this.value===e&&!this.containsEsc},Xh.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Xh.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Xh.canInsertSemicolon=function(){return this.type===wh.eof||this.type===wh.braceR||Ph.test(this.input.slice(this.lastTokEnd,this.start))},Xh.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Xh.semicolon=function(){this.eat(wh.semi)||this.insertSemicolon()||this.unexpected()},Xh.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Xh.expect=function(e){this.eat(e)||this.unexpected()},Xh.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},Xh.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},Xh.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},Xh.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Xh.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var Zh=Kh.prototype;Zh.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==wh.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var s=i[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var eu={kind:"loop"},tu={kind:"switch"};Zh.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;$h.lastIndex=this.pos;var t=$h.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r)return!0;if(e)return!1;if(123===r)return!0;if(xh(r,!0)){for(var i=n+1;vh(this.input.charCodeAt(i),!0);)++i;var s=this.input.slice(n,i);if(!ch.test(s))return!0}return!1},Zh.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;$h.lastIndex=this.pos;var e=$h.exec(this.input),t=this.pos+e[0].length;return!(Ph.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!==this.input.length&&vh(this.input.charAt(t+8)))},Zh.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=wh._var,r="let"),i){case wh._break:case wh._continue:return this.parseBreakContinueStatement(s,i.keyword);case wh._debugger:return this.parseDebuggerStatement(s);case wh._do:return this.parseDoStatement(s);case wh._for:return this.parseForStatement(s);case wh._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case wh._class:return e&&this.unexpected(),this.parseClass(s,!0);case wh._if:return this.parseIfStatement(s);case wh._return:return this.parseReturnStatement(s);case wh._switch:return this.parseSwitchStatement(s);case wh._throw:return this.parseThrowStatement(s);case wh._try:return this.parseTryStatement(s);case wh._const:case wh._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case wh._while:return this.parseWhileStatement(s);case wh._with:return this.parseWithStatement(s);case wh.braceL:return this.parseBlock(!0,s);case wh.semi:return this.parseEmptyStatement(s);case wh._export:case wh._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===wh._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var o=this.value,a=this.parseExpression();return i===wh.name&&"Identifier"===a.type&&this.eat(wh.colon)?this.parseLabeledStatement(s,o,a,e):this.parseExpressionStatement(s,a)}},Zh.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(wh.semi)||this.insertSemicolon()?e.label=null:this.type!==wh.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},Zh.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},Zh.parseDoStatement=function(e){return this.next(),this.labels.push(eu),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(wh._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(wh.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Zh.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(eu),this.enterScope(0),this.expect(wh.parenL),this.type===wh.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===wh._var||this.type===wh._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),!(this.type===wh._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==r.declarations.length||"var"!==i&&r.declarations[0].init?(t>-1&&this.unexpected(t),this.parseFor(e,r)):(this.options.ecmaVersion>=9&&(this.type===wh._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r))}var s=new Jh,o=this.parseExpression(!0,s);return this.type===wh._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===wh._in?t>-1&&this.unexpected(t):e.await=t>-1),this.toAssignable(o,!1,s),this.checkLVal(o),this.parseForIn(e,o)):(this.checkExpressionErrors(s,!0),t>-1&&this.unexpected(t),this.parseFor(e,o))},Zh.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,ru|(n?0:iu),!1,t)},Zh.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(wh._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Zh.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(wh.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Zh.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(wh.braceL),this.labels.push(tu),this.enterScope(0);for(var n=!1;this.type!==wh.braceR;)if(this.type===wh._case||this.type===wh._default){var r=this.type===wh._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(wh.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},Zh.parseThrowStatement=function(e){return this.next(),Ph.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var nu=[];Zh.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===wh._catch){var t=this.startNode();if(this.next(),this.eat(wh.parenL)){t.param=this.parseBindingAtom();var n="Identifier"===t.param.type;this.enterScope(n?32:0),this.checkLVal(t.param,n?4:2),this.expect(wh.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(wh._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Zh.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Zh.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(eu),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Zh.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},Zh.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Zh.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i<s.length;i+=1){s[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var o=this.type.isLoop?"loop":this.type===wh._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var h=this.labels[a];if(h.statementStart!==e.start)break;h.statementStart=this.start,h.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},Zh.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Zh.parseBlock=function(e,t){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(wh.braceL),e&&this.enterScope(0);!this.eat(wh.braceR);){var n=this.parseStatement(null);t.body.push(n)}return e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Zh.parseFor=function(e,t){return e.init=t,this.expect(wh.semi),e.test=this.type===wh.semi?null:this.parseExpression(),this.expect(wh.semi),e.update=this.type===wh.parenR?null:this.parseExpression(),this.expect(wh.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Zh.parseForIn=function(e,t){var n=this.type===wh._in?"ForInStatement":"ForOfStatement";return this.next(),"ForInStatement"===n&&("AssignmentPattern"===t.type||"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(this.strict||"Identifier"!==t.declarations[0].id.type))&&this.raise(t.start,"Invalid assignment in for-in loop head"),e.left=t,e.right="ForInStatement"===n?this.parseExpression():this.parseMaybeAssign(),this.expect(wh.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n)},Zh.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(wh.eq)?r.init=this.parseMaybeAssign(t):"const"!==n||this.type===wh._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===r.id.type||t&&(this.type===wh._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(wh.comma))break}return e},Zh.parseVarId=function(e,t){"const"!==t&&"let"!==t||!this.isContextual("let")||this.raiseRecoverable(this.start,"let is disallowed as a lexically bound name"),e.id=this.parseBindingAtom(),this.checkLVal(e.id,"var"===t?1:2,!1)};var ru=1,iu=2;Zh.parseFunction=function(e,t,n,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===wh.star&&t&iu&&this.unexpected(),e.generator=this.eat(wh.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&ru&&(e.id=4&t&&this.type!==wh.name?null:this.parseIdent(),!e.id||t&iu||this.checkLVal(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Hh(e.async,e.generator)),t&ru||(e.id=this.type===wh.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,t&ru?"FunctionDeclaration":"FunctionExpression")},Zh.parseFunctionParams=function(e){this.expect(wh.parenL),e.params=this.parseBindingList(wh.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Zh.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),i=!1;for(r.body=[],this.expect(wh.braceL);!this.eat(wh.braceR);){var s=this.parseClassElement(null!==e.superClass);s&&(r.body.push(s),"MethodDefinition"===s.type&&"constructor"===s.kind&&(i&&this.raise(s.start,"Duplicate constructor in the same class"),i=!0))}return e.body=this.finishNode(r,"ClassBody"),this.strict=n,this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Zh.parseClassElement=function(e){var t=this;if(this.eat(wh.semi))return null;var n=this.startNode(),r=function(e,r){void 0===r&&(r=!1);var i=t.start,s=t.startLoc;return!!t.eatContextual(e)&&(!(t.type===wh.parenL||r&&t.canInsertSemicolon())||(n.key&&t.unexpected(),n.computed=!1,n.key=t.startNodeAt(i,s),n.key.name=e,t.finishNode(n.key,"Identifier"),!1))};n.kind="method",n.static=r("static");var i=this.eat(wh.star),s=!1;i||(this.options.ecmaVersion>=8&&r("async",!0)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(wh.star)):r("get")?n.kind="get":r("set")&&(n.kind="set")),n.key||this.parsePropertyName(n);var o=n.key,a=!1;return n.computed||n.static||!("Identifier"===o.type&&"constructor"===o.name||"Literal"===o.type&&"constructor"===o.value)?n.static&&"Identifier"===o.type&&"prototype"===o.name&&this.raise(o.start,"Classes may not have a static property named prototype"):("method"!==n.kind&&this.raise(o.start,"Constructor can't have get/set modifier"),i&&this.raise(o.start,"Constructor can't be a generator"),s&&this.raise(o.start,"Constructor can't be an async method"),n.kind="constructor",a=e),this.parseClassMethod(n,i,s,a),"get"===n.kind&&0!==n.value.params.length&&this.raiseRecoverable(n.value.start,"getter should have no params"),"set"===n.kind&&1!==n.value.params.length&&this.raiseRecoverable(n.value.start,"setter should have exactly one param"),"set"===n.kind&&"RestElement"===n.value.params[0].type&&this.raiseRecoverable(n.value.params[0].start,"Setter cannot use rest params"),n},Zh.parseClassMethod=function(e,t,n,r){return e.value=this.parseMethod(t,n,r),this.finishNode(e,"MethodDefinition")},Zh.parseClassId=function(e,t){this.type===wh.name?(e.id=this.parseIdent(),t&&this.checkLVal(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Zh.parseClassSuper=function(e){e.superClass=this.eat(wh._extends)?this.parseExprSubscripts():null},Zh.parseExport=function(e,t){if(this.next(),this.eat(wh.star))return this.expectContextual("from"),this.type!==wh.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(wh._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===wh._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,4|ru,!1,n)}else if(this.type===wh._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==wh.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,o=e.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local),this.checkLocalExport(a.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},Zh.checkExport=function(e,t,n){e&&(Th(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},Zh.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var o=0,a=t.elements;o<a.length;o+=1){var h=a[o];h&&this.checkPatternExport(e,h)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===n&&this.checkPatternExport(e,t.expression)},Zh.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},Zh.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Zh.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(wh.braceL);!this.eat(wh.braceR);){if(n)n=!1;else if(this.expect(wh.comma),this.afterTrailingComma(wh.braceR))break;var r=this.startNode();r.local=this.parseIdent(!0),r.exported=this.eatContextual("as")?this.parseIdent(!0):r.local,this.checkExport(e,r.exported.name,r.exported.start),t.push(this.finishNode(r,"ExportSpecifier"))}return t},Zh.parseImport=function(e){return this.next(),this.type===wh.string?(e.specifiers=nu,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===wh.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},Zh.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===wh.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,2),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(wh.comma))return e}if(this.type===wh.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLVal(r.local,2),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(wh.braceL);!this.eat(wh.braceR);){if(t)t=!1;else if(this.expect(wh.comma),this.afterTrailingComma(wh.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLVal(i.local,2),e.push(this.finishNode(i,"ImportSpecifier"))}return e},Zh.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},Zh.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var su=Kh.prototype;su.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.toAssignable(s,t),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},su.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},su.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},su.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==wh.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},su.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case wh.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(wh.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case wh.braceL:return this.parseObj(!0)}return this.parseIdent()},su.parseBindingList=function(e,t,n){for(var r=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(wh.comma),t&&this.type===wh.comma)r.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===wh.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),r.push(s),this.type===wh.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),r.push(o)}return r},su.parseBindingListItem=function(e){return e},su.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(wh.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},su.checkLVal=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(Th(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),0!==t&&5!==t&&this.declareName(e.name,t,e.start);break;case"MemberExpression":t&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.checkLVal(s,t,n)}break;case"Property":this.checkLVal(e.value,t,n);break;case"ArrayPattern":for(var o=0,a=e.elements;o<a.length;o+=1){var h=a[o];h&&this.checkLVal(h,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var ou=Kh.prototype;ou.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===s&&(t.proto&&(n&&n.doubleProto<0?n.doubleProto=i.start:this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var o=t[r="$"+r];if(o)("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(i.start,"Redefinition of property");else o=t[r]={init:!1,get:!1,set:!1};o[s]=!0}}},ou.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===wh.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(wh.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},ou.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,s=-1,o=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,o=t.shorthandAssign,t.parenthesizedAssign=t.trailingComma=t.shorthandAssign=-1):(t=new Jh,r=!0);var a=this.start,h=this.startLoc;this.type!==wh.parenL&&this.type!==wh.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,a,h)),this.type.isAssign){var c=this.startNodeAt(a,h);return c.operator=this.value,c.left=this.type===wh.eq?this.toAssignable(u,!1,t):u,r||Jh.call(t),t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),o>-1&&(t.shorthandAssign=o),u},ou.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(wh.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(wh.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},ou.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},ou.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==wh._in)&&s>r){var o=this.type===wh.logicalOR||this.type===wh.logicalAND,a=this.value;this.next();var h=this.start,u=this.startLoc,c=this.parseExprOp(this.parseMaybeUnary(null,!1),h,u,s,i),l=this.buildBinary(t,n,e,c,a,o);return this.parseExprOp(l,t,n,r,i)}return e},ou.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},ou.parseMaybeUnary=function(e,t){var n,r=this.start,i=this.startLoc;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))n=this.parseAwait(),t=!0;else if(this.type.prefix){var s=this.startNode(),o=this.type===wh.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(s,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var a=this.startNodeAt(r,i);a.operator=this.value,a.prefix=!1,a.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(a,"UpdateExpression")}}return!t&&this.eat(wh.starstar)?this.buildBinary(r,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},ou.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},ou.parseSubscripts=function(e,t,n,r){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(e.start,e.end);;){var s=this.parseSubscript(e,t,n,r,i);if(s===e||"ArrowFunctionExpression"===s.type)return s;e=s}},ou.parseSubscript=function(e,t,n,r,i){var s=this.eat(wh.bracketL);if(s||this.eat(wh.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=s?this.parseExpression():this.parseIdent(!0),o.computed=!!s,s&&this.expect(wh.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!r&&this.eat(wh.parenL)){var a=new Jh,h=this.yieldPos,u=this.awaitPos,c=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var l=this.parseExprList(wh.parenR,this.options.ecmaVersion>=8,!1,a);if(i&&!this.canInsertSemicolon()&&this.eat(wh.arrow))return this.checkPatternErrors(a,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=u,this.awaitIdentPos=c,this.parseArrowExpression(this.startNodeAt(t,n),l,!0);this.checkExpressionErrors(a,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=u||this.awaitPos,this.awaitIdentPos=c||this.awaitIdentPos;var p=this.startNodeAt(t,n);p.callee=e,p.arguments=l,e=this.finishNode(p,"CallExpression")}else if(this.type===wh.backQuote){var d=this.startNodeAt(t,n);d.tag=e,d.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(d,"TaggedTemplateExpression")}return e},ou.parseExprAtom=function(e){this.type===wh.slash&&this.readRegexp();var t,n=this.potentialArrowAt===this.start;switch(this.type){case wh._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),t=this.startNode(),this.next(),this.type!==wh.parenL||this.allowDirectSuper||this.raise(t.start,"super() call outside constructor of a subclass"),this.type!==wh.dot&&this.type!==wh.bracketL&&this.type!==wh.parenL&&this.unexpected(),this.finishNode(t,"Super");case wh._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case wh.name:var r=this.start,i=this.startLoc,s=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(wh._function))return this.parseFunction(this.startNodeAt(r,i),0,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(wh.arrow))return this.parseArrowExpression(this.startNodeAt(r,i),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===wh.name&&!s)return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(wh.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,i),[o],!0)}return o;case wh.regexp:var a=this.value;return(t=this.parseLiteral(a.value)).regex={pattern:a.pattern,flags:a.flags},t;case wh.num:case wh.string:return this.parseLiteral(this.value);case wh._null:case wh._true:case wh._false:return(t=this.startNode()).value=this.type===wh._null?null:this.type===wh._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case wh.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case wh.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(wh.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case wh.braceL:return this.parseObj(!1,e);case wh._function:return t=this.startNode(),this.next(),this.parseFunction(t,0);case wh._class:return this.parseClass(this.startNode(),!1);case wh._new:return this.parseNew();case wh.backQuote:return this.parseTemplate();default:this.unexpected()}},ou.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},ou.parseParenExpression=function(){this.expect(wh.parenL);var e=this.parseExpression();return this.expect(wh.parenR),e},ou.parseParenAndDistinguishExpression=function(e){var t,n=this.start,r=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o=this.start,a=this.startLoc,h=[],u=!0,c=!1,l=new Jh,p=this.yieldPos,d=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==wh.parenR;){if(u?u=!1:this.expect(wh.comma),i&&this.afterTrailingComma(wh.parenR,!0)){c=!0;break}if(this.type===wh.ellipsis){s=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===wh.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}h.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var f=this.start,m=this.startLoc;if(this.expect(wh.parenR),e&&!this.canInsertSemicolon()&&this.eat(wh.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=d,this.parseParenArrowList(n,r,h);h.length&&!c||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(l,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=d||this.awaitPos,h.length>1?((t=this.startNodeAt(o,a)).expressions=h,this.finishNodeAt(t,"SequenceExpression",f,m)):t=h[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var g=this.startNodeAt(n,r);return g.expression=t,this.finishNode(g,"ParenthesizedExpression")}return t},ou.parseParenItem=function(e){return e},ou.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var au=[];ou.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(wh.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),("target"!==e.property.name||n)&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inNonArrowFunction()||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),r,i,!0),this.eat(wh.parenL)?e.arguments=this.parseExprList(wh.parenR,this.options.ecmaVersion>=8,!1):e.arguments=au,this.finishNode(e,"NewExpression")},ou.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===wh.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===wh.backQuote,this.finishNode(n,"TemplateElement")},ou.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===wh.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(wh.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(wh.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},ou.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===wh.name||this.type===wh.num||this.type===wh.string||this.type===wh.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===wh.star)&&!Ph.test(this.input.slice(this.lastTokEnd,this.start))},ou.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(wh.braceR);){if(r)r=!1;else if(this.expect(wh.comma),this.afterTrailingComma(wh.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},ou.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(wh.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===wh.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(this.type===wh.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),o.argument=this.parseMaybeAssign(!1,t),this.type===wh.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(wh.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(wh.star),this.parsePropertyName(o,t)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t,a),this.finishNode(o,"Property")},ou.parsePropertyValue=function(e,t,n,r,i,s,o,a){if((n||r)&&this.type===wh.colon&&this.unexpected(),this.eat(wh.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===wh.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===wh.comma||this.type===wh.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===wh.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var h="get"===e.kind?0:1;if(e.value.params.length!==h){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},ou.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(wh.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(wh.bracketR),e.key;e.computed=!1}return e.key=this.type===wh.num||this.type===wh.string?this.parseExprAtom():this.parseIdent(!0)},ou.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},ou.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Hh(t,r.generator)|(n?128:0)),this.expect(wh.parenL),r.params=this.parseBindingList(wh.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},ou.parseArrowExpression=function(e,t,n){var r=this.yieldPos,i=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(16|Hh(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1),this.yieldPos=r,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")},ou.parseFunctionBody=function(e,t,n){var r=t&&this.type!==wh.braceL,i=this.strict,s=!1;if(r)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var a=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!i&&!s&&!t&&!n&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=a}this.exitScope(),this.strict&&e.id&&this.checkLVal(e.id,5),this.strict=i},ou.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){if("Identifier"!==n[t].type)return!1}return!0},ou.checkParams=function(e,t){for(var n={},r=0,i=e.params;r<i.length;r+=1){var s=i[r];this.checkLVal(s,1,t?null:n)}},ou.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(wh.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===wh.comma?o=null:this.type===wh.ellipsis?(o=this.parseSpread(r),r&&this.type===wh.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},ou.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;(this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},ou.parseIdent=function(e,t){var n=this.startNode();return e&&"never"===this.options.allowReserved&&(e=!1),this.type===wh.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(),this.finishNode(n,"Identifier"),e||(this.checkUnreserved(n),"await"!==n.name||this.awaitIdentPos||(this.awaitIdentPos=n.start)),n},ou.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===wh.semi||this.canInsertSemicolon()||this.type!==wh.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(wh.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},ou.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var hu=Kh.prototype;hu.raise=function(e,t){var n=zh(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},hu.raiseRecoverable=hu.raise,hu.curPosition=function(){if(this.options.locations)return new Vh(this.curLine,this.pos-this.lineStart)};var uu=Kh.prototype,cu=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};uu.enterScope=function(e){this.scopeStack.push(new cu(e))},uu.exitScope=function(){this.scopeStack.pop()},uu.treatFunctionsAsVarInScope=function(e){return e.flags&Uh||!this.inModule&&1&e.flags},uu.declareName=function(e,t,n){var r=!1;if(2===t){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){r=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],a.flags&Fh)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},uu.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},uu.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},uu.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Fh)return t}},uu.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Fh&&!(16&t.flags))return t}};var lu=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Bh(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},pu=Kh.prototype;function du(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}pu.startNode=function(){return new lu(this,this.start,this.startLoc)},pu.startNodeAt=function(e,t){return new lu(this,e,t)},pu.finishNode=function(e,t){return du.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},pu.finishNodeAt=function(e,t,n,r){return du.call(this,e,t,n,r)};var fu=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},mu={b_stat:new fu("{",!1),b_expr:new fu("{",!0),b_tmpl:new fu("${",!1),p_stat:new fu("(",!1),p_expr:new fu("(",!0),q_tmpl:new fu("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new fu("function",!1),f_expr:new fu("function",!0),f_expr_gen:new fu("function",!0,!1,null,!0),f_gen:new fu("function",!1,!1,null,!0)},gu=Kh.prototype;gu.initialContext=function(){return[mu.b_stat]},gu.braceIsBlock=function(e){var t=this.curContext();return t===mu.f_expr||t===mu.f_stat||(e!==wh.colon||t!==mu.b_stat&&t!==mu.b_expr?e===wh._return||e===wh.name&&this.exprAllowed?Ph.test(this.input.slice(this.lastTokEnd,this.start)):e===wh._else||e===wh.semi||e===wh.eof||e===wh.parenR||e===wh.arrow||(e===wh.braceL?t===mu.b_stat:e!==wh._var&&e!==wh._const&&e!==wh.name&&!this.exprAllowed):!t.isExpr)},gu.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},gu.updateContext=function(e){var t,n=this.type;n.keyword&&e===wh.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},wh.parenR.updateContext=wh.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===mu.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},wh.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?mu.b_stat:mu.b_expr),this.exprAllowed=!0},wh.dollarBraceL.updateContext=function(){this.context.push(mu.b_tmpl),this.exprAllowed=!0},wh.parenL.updateContext=function(e){var t=e===wh._if||e===wh._for||e===wh._with||e===wh._while;this.context.push(t?mu.p_stat:mu.p_expr),this.exprAllowed=!0},wh.incDec.updateContext=function(){},wh._function.updateContext=wh._class.updateContext=function(e){!e.beforeExpr||e===wh.semi||e===wh._else||e===wh._return&&Ph.test(this.input.slice(this.lastTokEnd,this.start))||(e===wh.colon||e===wh.braceL)&&this.curContext()===mu.b_stat?this.context.push(mu.f_stat):this.context.push(mu.f_expr),this.exprAllowed=!1},wh.backQuote.updateContext=function(){this.curContext()===mu.q_tmpl?this.context.pop():this.context.push(mu.q_tmpl),this.exprAllowed=!1},wh.star.updateContext=function(e){if(e===wh._function){var t=this.context.length-1;this.context[t]===mu.f_expr?this.context[t]=mu.f_expr_gen:this.context[t]=mu.f_gen}this.exprAllowed=!0},wh.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==wh.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var yu="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",xu={9:yu,10:yu+" Extended_Pictographic"},vu="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Eu="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",_u={9:Eu,10:Eu+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"},bu={};function Au(e){var t=bu[e]={binary:Lh(xu[e]+" "+vu),nonBinary:{General_Category:Lh(vu),Script:Lh(_u[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}Au(9),Au(10);var Su=Kh.prototype,Iu=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":""),this.unicodeProperties=bu[e.options.ecmaVersion>=10?10:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function wu(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function Pu(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function ku(e){return e>=65&&e<=90||e>=97&&e<=122}function Cu(e){return ku(e)||95===e}function Nu(e){return Cu(e)||$u(e)}function $u(e){return e>=48&&e<=57}function Ru(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ou(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Mu(e){return e>=48&&e<=55}Iu.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchN=r&&this.parser.options.ecmaVersion>=9},Iu.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Iu.prototype.at=function(e){var t=this.source,n=t.length;if(e>=n)return-1;var r=t.charCodeAt(e);return!this.switchU||r<=55295||r>=57344||e+1>=n?r:(r<<10)+t.charCodeAt(e+1)-56613888},Iu.prototype.nextIndex=function(e){var t=this.source,n=t.length;if(e>=n)return n;var r=t.charCodeAt(e);return!this.switchU||r<=55295||r>=57344||e+1>=n?e+1:e+2},Iu.prototype.current=function(){return this.at(this.pos)},Iu.prototype.lookahead=function(){return this.at(this.nextIndex(this.pos))},Iu.prototype.advance=function(){this.pos=this.nextIndex(this.pos)},Iu.prototype.eat=function(e){return this.current()===e&&(this.advance(),!0)},Su.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=0;r<n.length;r++){var i=n.charAt(r);-1===t.indexOf(i)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(i,r+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},Su.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},Su.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];-1===e.groupNames.indexOf(r)&&e.raise("Invalid named capture referenced")}},Su.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},Su.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Su.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!(e.switchU?!this.regexp_eatAtom(e):!this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},Su.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Su.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Su.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Su.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},Su.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Su.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Su.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},Su.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Su.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Su.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Su.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!Pu(t)&&(e.lastIntValue=t,e.advance(),!0)},Su.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!Pu(n);)e.advance();return e.pos!==t},Su.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},Su.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},Su.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Su.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=wu(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=wu(e.lastIntValue);return!0}return!1},Su.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return xh(e,!0)||36===e||95===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},Su.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return vh(e,!0)||36===e||95===e||8204===e||8205===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},Su.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Su.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Su.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Su.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Su.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Su.regexp_eatZero=function(e){return 48===e.current()&&!$u(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Su.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Su.regexp_eatControlLetter=function(e){var t=e.current();return!!ku(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Su.regexp_eatRegExpUnicodeEscapeSequence=function(e){var t,n=e.pos;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(e.switchU&&r>=55296&&r<=56319){var i=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=1024*(r-55296)+(s-56320)+65536,!0}e.pos=i,e.lastIntValue=r}return!0}if(e.switchU&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((t=e.lastIntValue)>=0&&t<=1114111))return!0;e.switchU&&e.raise("Invalid unicode escape"),e.pos=n}return!1},Su.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},Su.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},Su.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},Su.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i),!0}return!1},Su.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){Th(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},Su.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},Su.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Cu(t=e.current());)e.lastStringValue+=wu(t),e.advance();return""!==e.lastStringValue},Su.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Nu(t=e.current());)e.lastStringValue+=wu(t),e.advance();return""!==e.lastStringValue},Su.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Su.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},Su.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},Su.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||Mu(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},Su.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Su.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!$u(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},Su.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Su.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;$u(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},Su.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Ru(n=e.current());)e.lastIntValue=16*e.lastIntValue+Ou(n),e.advance();return e.pos!==t},Su.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},Su.regexp_eatOctalDigit=function(e){var t=e.current();return Mu(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Su.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Ru(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Ou(i),e.advance()}return!0};var Tu=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Bh(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Du=Kh.prototype;function Lu(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Du.next=function(){this.options.onToken&&this.options.onToken(new Tu(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Du.getToken=function(){return this.next(),new Tu(this)},"undefined"!=typeof Symbol&&(Du[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===wh.eof,value:t}}}}),Du.curContext=function(){return this.context[this.context.length-1]},Du.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(wh.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Du.readToken=function(e){return xh(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Du.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},Du.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(-1===r&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(kh.lastIndex=n;(e=kh.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,r),n,this.pos,t,this.curPosition())},Du.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Ch(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Du.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&Nh.test(String.fromCharCode(e))))break e;++this.pos}}},Du.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Du.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(wh.ellipsis)):(++this.pos,this.finishToken(wh.dot))},Du.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(wh.assign,2):this.finishOp(wh.slash,1)},Du.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?wh.star:wh.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=wh.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(wh.assign,n+1):this.finishOp(r,n)},Du.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?wh.logicalOR:wh.logicalAND,2):61===t?this.finishOp(wh.assign,2):this.finishOp(124===e?wh.bitwiseOR:wh.bitwiseAND,1)},Du.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(wh.assign,2):this.finishOp(wh.bitwiseXOR,1)},Du.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!Ph.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(wh.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(wh.assign,2):this.finishOp(wh.plusMin,1)},Du.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(wh.assign,n+1):this.finishOp(wh.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(wh.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Du.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(wh.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(wh.arrow)):this.finishOp(61===e?wh.eq:wh.prefix,1)},Du.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(wh.parenL);case 41:return++this.pos,this.finishToken(wh.parenR);case 59:return++this.pos,this.finishToken(wh.semi);case 44:return++this.pos,this.finishToken(wh.comma);case 91:return++this.pos,this.finishToken(wh.bracketL);case 93:return++this.pos,this.finishToken(wh.bracketR);case 123:return++this.pos,this.finishToken(wh.braceL);case 125:return++this.pos,this.finishToken(wh.braceR);case 58:return++this.pos,this.finishToken(wh.colon);case 63:return++this.pos,this.finishToken(wh.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(wh.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(wh.prefix,1)}this.raise(this.pos,"Unexpected character '"+Lu(e)+"'")},Du.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Du.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Ph.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Iu(this));a.reset(n,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var h=null;try{h=new RegExp(i,o)}catch(e){}return this.finishToken(wh.regexp,{pattern:i,flags:o,value:h})},Du.readInt=function(e,t){for(var n=this.pos,r=0,i=0,s=null==t?1/0:t;i<s;++i){var o=this.input.charCodeAt(this.pos),a=void 0;if((a=o>=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=e)break;++this.pos,r=r*e+a}return this.pos===n||null!=t&&this.pos-n!==t?null:r},Du.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),xh(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(wh.num,t)},Du.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number"),n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1);var r=this.input.charCodeAt(this.pos);46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),xh(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var i=this.input.slice(t,this.pos),s=n?parseInt(i,8):parseFloat(i);return this.finishToken(wh.num,s)},Du.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Du.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(Ch(r,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(wh.string,t)};var Vu={};Du.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Vu)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Du.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Vu;this.raise(e,t)},Du.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==wh.template&&this.type!==wh.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(wh.template,e)):36===n?(this.pos+=2,this.finishToken(wh.dollarBraceL)):(++this.pos,this.finishToken(wh.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ch(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Du.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(wh.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Du.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Lu(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),"0"===n&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Ch(t)?"":String.fromCharCode(t)}},Du.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Du.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(vh(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?xh:vh)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=Lu(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},Du.readWord=function(){var e=this.readWord1(),t=wh.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=Sh[e]),this.finishToken(t,e)};var Bu=function(e){return e&&e.default||e}(Object.freeze({version:"6.1.1",parse:function(e,t){return Kh.parse(e,t)},parseExpressionAt:function(e,t,n){return Kh.parseExpressionAt(e,t,n)},tokenizer:function(e,t){return Kh.tokenizer(e,t)},Parser:Kh,defaultOptions:jh,Position:Vh,SourceLocation:Bh,getLineInfo:zh,Node:lu,TokenType:Eh,tokTypes:wh,keywordTypes:Sh,TokContext:fu,tokContexts:mu,isIdentifierChar:vh,isIdentifierStart:xh,Token:Tu,isNewLine:Ch,lineBreak:Ph,lineBreakG:kh,nonASCIIwhitespace:Nh}));const zu=Bu.tokTypes,ju=Bu.isIdentifierStart;var Wu=function(e){return class extends e{parseLiteral(e){const t=super.parseLiteral(e);return 110==t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=this.getNumberInput(t.start,t.end)),t}readRadixNumber(e){let t=this.pos;this.pos+=2;let n=this.readInt(e);if(null===n&&this.raise(this.start+2,`Expected number in radix ${e}`),110==this.input.charCodeAt(this.pos)){let e=this.getNumberInput(t,this.pos);n="undefined"!=typeof BigInt?BigInt(e):null,++this.pos}else ju(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");return this.finishToken(zu.num,n)}readNumber(e){let t=this.pos;if(e)return super.readNumber(e);if(48===this.input.charCodeAt(t)&&110!==this.input.charCodeAt(t+1))return super.readNumber(e);if(null===this.readInt(10)&&this.raise(t,"Invalid number"),110!=this.input.charCodeAt(this.pos))return this.pos=t,super.readNumber(e);let n=this.getNumberInput(t,this.pos),r="undefined"!=typeof BigInt?BigInt(n):null;return++this.pos,this.finishToken(zu.num,r)}getNumberInput(e,t){return super.getNumberInput?super.getNumberInput(e,t):this.input.slice(e,t)}}};const Uu="Import";function Fu(e){return class extends e{parseStatement(e,t,n){return this.type===wh._import&&function(){return/^(\s|\/\/.*|\/\*[^]*?\*\/)*\(/.test(this.input.slice(this.pos))}.call(this)?this.parseExpressionStatement(this.startNode(),this.parseExpression()):super.parseStatement(e,t,n)}parseExprAtom(e){return this.type===wh._import?function(){const e=this.startNode();return this.next(),this.type!==wh.parenL&&this.unexpected(),this.finishNode(e,Uu)}.call(this):super.parseExprAtom(e)}}}wh._import.startsExpr=!0;const qu=Bu.tokTypes,Gu=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Hu=e=>{Gu.lastIndex=e.pos;let t=Gu.exec(e.input),n=e.pos+t[0].length;return"."===e.input.slice(n,n+1)};var Ku=function(e){return class extends e{parseExprAtom(e){if(this.type!==qu._import||!Hu(this))return super.parseExprAtom(e);this.options.allowImportExportEverywhere||this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'");let t=this.startNode();return t.meta=this.parseIdent(!0),this.expect(qu.dot),t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is import.meta"),this.containsEsc&&this.raiseRecoverable(t.property.start,'"meta" in import.meta must not contain escape sequences'),this.finishNode(t,"MetaProperty")}parseStatement(e,t,n){if(this.type!==qu._import||!Hu(this))return super.parseStatement(e,t,n);let r=this.startNode(),i=this.parseExpression();return this.parseExpressionStatement(r,i)}}};class Yu extends Qe{constructor(){super("undefined")}getLiteralValueAtPath(){}}class Xu extends vt{constructor(){super(),this.variables.undefined=new Yu}findVariable(e){return this.variables[e]?this.variables[e]:this.variables[e]=new oo(e)}}const Qu=()=>({paths:Object.create(null),tracked:!1,unknownPath:null});class Ju{constructor(){this.entityPaths=new Map}track(e,t){let n=this.entityPaths.get(e);n||(n=Qu(),this.entityPaths.set(e,n));let r,i=0;for(;i<t.length;){const e=t[i];"string"==typeof e?(r=n.paths[e])||(r=Qu(),n.paths[e]=r):(r=n.unknownPath)||(r=Qu(),n.unknownPath=r),n=r,i++}const s=n.tracked;return n.tracked=!0,s}}function Zu(e,t,n){let r;do{const e=C();r?e.update(r):e.update(n),r=e.digest("hex").substr(0,8)}while(t.has(r));return t.set(r,e),r}function ec(e,t,n){return void 0===e.source&&So(function(e){return{code:wo.ASSET_SOURCE_MISSING,message:`Plugin error creating asset "${e.name}" - no asset source set.`}}(e)),e.fileName?e.fileName:nh(th(n,"assetFileNames",t=>{switch(t){case"hash":const n=C();return n.update(t),n.update(":"),n.update(e.source),n.digest("hex").substr(0,8);case"name":return e.name.substr(0,e.name.length-pt(e.name).length);case"extname":return pt(e.name);case"ext":return pt(e.name).substr(1)}}),t)}function tc(e,t,n){return{emitAsset(r,i){"string"==typeof r&&Ao(r)||So(function(e){return{code:wo.INVALID_ASSET_NAME,message:`Plugin error creating asset, name "${e}" is not a plain (non relative or absolute URL) string name.`}}(r));const s={name:r,source:i,fileName:void 0};return t&&void 0!==i&&nc(s,t,n),Zu(s,e,r)},setAssetSource(r,i){const s=e.get(r);return s?void 0!==s.source?So(function(e){return{code:wo.ASSET_SOURCE_ALREADY_SET,message:`Plugin error - Unable to set the source for asset "${e.name}", source already set.`}}(s)):"string"==typeof i||i?(s.source=i,void(t&&nc(s,t,n))):So(function(e){return{code:wo.ASSET_SOURCE_MISSING,message:`Plugin error creating asset "${e.name}", setAssetSource call without a source.`}}(s)):So(function(e){return{code:wo.ASSET_NOT_FOUND,message:`Plugin error - Unable to set the source for unknown asset "${e}".`}}(r))},getAssetFileName(t){const n=e.get(t);return n?void 0===n.fileName?So(function(e){return{code:wo.ASSET_NOT_FINALISED,message:`Plugin error - Unable to get file name for asset "${e.name}". Ensure that the source is set and that generate is called first.`}}(n)):n.fileName:So(function(e){return{code:wo.ASSET_NOT_FOUND,message:`Plugin error - Unable to get file name for unknown asset "${e}".`}}(t))}}}function nc(e,t,n){const r=ec(e,t,n);e.fileName=r,t[r]={fileName:r,isAsset:!0,source:e.source}}var rc;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(rc||(rc={}));const ic=e=>(...t)=>{throw new Error(`Cannot use fs.${e} inside browser`)},sc=ic("lstatSync"),oc=ic("readdirSync"),ac=ic("readFileSync"),hc=ic("realpathSync"),uc=ic("writeFile");function cc(e,t){try{const n=sc(e);if(!t&&n.isSymbolicLink())return cc(hc(e),t);if(t&&n.isSymbolicLink()||n.isFile()){const t=ct(e);if(-1!==oc(lt(e)).indexOf(t))return e}}catch(e){}}function lc(e){return function(t,n){return"undefined"==typeof process&&So({code:"MISSING_PROCESS",message:"It looks like you're using Rollup in a non-Node.js environment. This means you must supply a plugin with custom resolveId and load functions",url:"https://rollupjs.org/guide/en#a-simple-example"}),void 0===n||at(t)||"."===t[0]?function(e,t){let n=cc(e,t);return n||((n=cc(e+".mjs",t))?n:n=cc(e+".js",t))}(ft(n?lt(n):ft(),t),e):null}}const pc=(e,t="URL")=>`new ${t}(${e}).href`,dc=e=>`(document.currentScript && document.currentScript.src || new URL('${e}', document.baseURI).href)`,fc=e=>(t,n)=>{const r=e(n);return null===t?`({ url: ${r} })`:"url"===t?r:"undefined"},mc={amd:fc(()=>pc("module.uri, document.baseURI")),cjs:fc(e=>`(typeof document === 'undefined' ? ${pc("'file:' + __filename","(require('u' + 'rl').URL)")} : ${dc(e)})`),iife:fc(e=>dc(e)),system:e=>null===e?"module.meta":`module.meta.${e}`,umd:fc(e=>`(typeof document === 'undefined' ? ${pc("'file:' + __filename","(require('u' + 'rl').URL)")} : ${dc(e)})`)},gc=e=>pc(`(document.currentScript && document.currentScript.src || document.baseURI) + '/../${e}'`),yc={amd:e=>pc(`module.uri + '/../${e}', document.baseURI`),cjs:e=>`(typeof document === 'undefined' ? ${pc(`'file:' + __dirname + '/${e}'`,"(require('u' + 'rl').URL)")} : ${gc(e)})`,es:e=>pc(`'${e}', import.meta.url`),iife:e=>gc(e),system:e=>pc(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' ? ${pc(`'file:' + __dirname + '/${e}'`,"(require('u' + 'rl').URL)")} : ${gc(e)})`},xc={ongenerate:"generateBundle",onwrite:"generateBundle",transformBundle:"renderChunk",transformChunk:"renderChunk"};function vc(e,n,r,i){const s=[...n.plugins||[],(o=n.preserveSymlinks,{name:"Rollup Core",resolveId:lc(o),load:e=>ac(e,"utf-8"),resolveFileUrl:({relativePath:e,format:t})=>yc[t](e),resolveImportMeta(e,{chunkId:t,format:n}){const r=mc[n]&&mc[n](e,t);if(r)return r}})];var o;const{emitAsset:a,getAssetFileName:h,setAssetSource:u}=tc(e.assetsById),c={};let l=!1;const p=s.map((n,s)=>{let o,p=!0;if("string"!=typeof n.cacheKey&&("string"!=typeof n.name||c[n.name]?p=!1:c[n.name]=!0),!l&&(n.load||n.transform||n.transformBundle||n.transformChunk)&&(l=!0),r)if(p){const e=n.cacheKey||n.name;o=function(e){return{has(t){const n=e[t];return!!n&&(n[0]=0,!0)},get(t){const n=e[t];if(n)return n[0]=0,n[1]},set(t,n){e[t]=[0,n]},delete:t=>delete e[t]}}(r[e]||(r[e]=Object.create(null)))}else o=bc(n.name);else o=Ec;let d=!1;function f(e,t){return d||(m.warn({code:"PLUGIN_WATCHER_DEPRECATED",message:"this.watcher usage is deprecated in plugins. Use the watchChange plugin hook and this.addWatchFile() instead."}),d=!0),i.on(e,t)}const m={addWatchFile(t){e.phase>=rc.GENERATE&&this.error({code:wo.INVALID_ROLLUP_PHASE,message:"Cannot call addWatchFile after the build has finished."}),e.watchFiles[t]=!0},cache:o,emitAsset:a,emitChunk(t,n){return e.phase>rc.LOAD_AND_PARSE&&this.error({code:wo.INVALID_ROLLUP_PHASE,message:"Cannot call emitChunk after module loading has finished."}),e.moduleLoader.addEntryModuleAndGetReferenceId({alias:n&&n.name||null,unresolvedId:t})},error:e=>("string"==typeof e&&(e={message:e}),e.code&&(e.pluginCode=e.code),e.code="PLUGIN_ERROR",e.plugin=n.name||`Plugin at position ${s+1}`,So(e)),isExternal:(t,n,r=!1)=>e.moduleLoader.isExternal(t,n,r),getAssetFileName:h,getChunkFileName:t=>e.moduleLoader.getChunkFileName(t),getModuleInfo(t){const n=e.moduleById.get(t);if(null==n)throw new Error(`Unable to find module ${t}`);return{hasModuleSideEffects:n.moduleSideEffects,id:n.id,importedIds:n instanceof mt?[]:n.sources.map(e=>n.resolvedIds[e].id),isEntry:n instanceof Fa&&n.isEntryPoint,isExternal:n instanceof mt}},meta:{rollupVersion:t},get moduleIds(){return e.moduleById.keys()},parse:e.contextParse,resolveId:(t,n)=>e.moduleLoader.resolveId(t,n).then(e=>e&&e.id),resolve:(t,n,r)=>e.moduleLoader.resolveId(t,n,r&&r.skipSelf?s:null),setAssetSource:u,warn(t){"string"==typeof t&&(t={message:t}),t.code&&(t.pluginCode=t.code),t.code="PLUGIN_WARNING",t.plugin=n.name||`Plugin at position ${s+1}`,e.warn(t)},watcher:i?Object.assign({},i,{addListener:f,on:f}):void 0};return m});function d(e,t,n,r=!1,i){const o=s[n];let a=p[n];const h=o[e];if(!h)return;const u=xc[e];if(u&&a.warn(Ac(e,u,o,n)),i&&(!(a=i(a,o))||a===p[n]))throw new Error("Internal Rollup error: hookContext must return a new context object.");try{if("function"!=typeof h){if(r)return h;So({code:"INVALID_PLUGIN_HOOK",message:`Error running plugin hook ${e} for ${o.name||`Plugin at position ${n+1}`}, expected a function hook.`})}return h.apply(a,t)}catch(t){"string"==typeof t&&(t={message:t}),"PLUGIN_ERROR"!==t.code&&(t.code&&(t.pluginCode=t.code),t.code="PLUGIN_ERROR"),t.plugin=o.name||`Plugin at position ${n+1}`,t.hook=e,So(t)}}function f(e,t,n,r=!1,i){const o=s[n];let a=p[n];const h=o[e];if(!h)return;const u=xc[e];if(u&&a.warn(Ac(e,u,o,n)),i&&(!(a=i(a,o))||a===p[n]))throw new Error("Internal Rollup error: hookContext must return a new context object.");return Promise.resolve().then(()=>{if("function"!=typeof h){if(r)return h;So({code:"INVALID_PLUGIN_HOOK",message:`Error running plugin hook ${e} for ${o.name||`Plugin at position ${n+1}`}, expected a function hook.`})}return h.apply(a,t)}).catch(t=>{"string"==typeof t&&(t={message:t}),"PLUGIN_ERROR"!==t.code&&(t.code&&(t.pluginCode=t.code),t.code="PLUGIN_ERROR"),t.plugin=o.name||`Plugin at position ${n+1}`,t.hook=e,So(t)})}return{emitAsset:a,getAssetFileName:h,hasLoadersOrTransforms:l,hookSeq(e,t,n){let r=Promise.resolve();for(let i=0;i<s.length;i++)r=r.then(()=>f(e,t,i,!1,n));return r},hookSeqSync(e,t,n){for(let r=0;r<s.length;r++)d(e,t,r,!1,n)},hookFirst(e,t,n,r){let i=Promise.resolve();for(let o=0;o<s.length;o++)r!==o&&(i=i.then(r=>null!=r?r:f(e,t,o,!1,n)));return i},hookFirstSync(e,t,n){for(let r=0;r<s.length;r++){const i=d(e,t,r,!1,n);if(null!=i)return i}return null},hookParallel(e,t,n){const r=[];for(let i=0;i<s.length;i++){const s=f(e,t,i,!1,n);s&&r.push(s)}return Promise.all(r).then(()=>{})},hookReduceArg0(e,[t,...n],r,i){let o=Promise.resolve(t);for(let t=0;t<s.length;t++)o=o.then(o=>{const a=f(e,[o,...n],t,!1,i);return a?a.then(e=>r.call(p[t],o,e,s[t])):o});return o},hookReduceArg0Sync(e,[t,...n],r,i){for(let o=0;o<s.length;o++){const a=d(e,[t,...n],o,!1,i);t=r.call(p[o],t,a,s[o])}return t},hookReduceValue(e,t,n,r,i){let o=Promise.resolve(t);for(let t=0;t<s.length;t++)o=o.then(o=>{const a=f(e,n,t,!0,i);return a?a.then(e=>r.call(p[t],o,e,s[t])):o});return o}}}const Ec={has:()=>!1,get(){},set(){},delete:()=>!1};function _c(e){So(e?{code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`}:{code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."})}const bc=e=>({has:()=>(_c(e),!1),get(){_c(e)},set(){_c(e)},delete:()=>(_c(e),!1)});function Ac(e,t,n,r){return{code:e.toUpperCase()+"_HOOK_DEPRECATED",message:`The ${e} hook used by plugin ${n.name||`at position ${r+1}`} is deprecated. The ${t} hook should be used instead.`}}function Sc(e,t){return ht(t)?ft(e,"..",t):t}function Ic(e){if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>!t.startsWith("\0")&&e(t,...n)||!1;if(e){const t=new Set(Array.isArray(e)?e:e?[e]:[]);return e=>t.has(e)}return()=>!1}function wc(e,t,n){if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>!!t.startsWith("\0")||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}var r,i;e&&n.warn((r="treeshake.moduleSideEffects",i='please use one of false, "no-external", a function or an array',{code:wo.INVALID_OPTION,message:`Invalid value for option "${r}" - ${i}.`}));const s=Ic(t);return(e,t)=>!(t&&s(e))}class Pc{constructor(e,t,n,r,i,s,o){this.entriesByReferenceId=new Map,this.entryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.manualChunkModules={},this.loadEntryModule=(({alias:e,unresolvedId:t},n)=>this.pluginDriver.hookFirst("resolveId",[t,void 0]).then(r=>{if(!1===r||r&&"object"==typeof r&&r.external)return So(function(e){return{code:wo.UNRESOLVED_ENTRY,message:`Entry module cannot be external (${bo(e)}).`}}(t));const i=r&&"object"==typeof r?r.id:r;return"string"==typeof i?this.fetchModule(i,void 0,!0,n).then(t=>{if(null!==e){if(null!==t.chunkAlias&&t.chunkAlias!==e)return So(Po(t.id,e,t.chunkAlias));t.chunkAlias=e}return t}):So(function(e){return{code:wo.UNRESOLVED_ENTRY,message:`Could not resolve entry module (${bo(e)}).`}}(t))})),this.graph=e,this.modulesById=t,this.pluginDriver=n,this.isExternal=Ic(r),this.hasModuleSideEffects=wc(s,o,e),this.getManualChunk="function"==typeof i?i:()=>null}addEntryModuleAndGetReferenceId(e){const t={module:null,name:e.unresolvedId},n=Zu(t,this.entriesByReferenceId,e.unresolvedId);return this.addEntryModules([e],!1).then(({newEntryModules:[e]})=>{t.module=e}).catch(()=>{}),n}addEntryModules(e,t){const n=Promise.all(e.map(e=>this.loadEntryModule(e,!0))).then(e=>{for(const n of e){n.isUserDefinedEntryPoint=n.isUserDefinedEntryPoint||t,this.entryModules.find(e=>e.id===n.id)||this.entryModules.push(n)}return e});return this.awaitLoadModulesPromise(n).then(e=>({entryModules:this.entryModules,manualChunkModulesByAlias:this.manualChunkModules,newEntryModules:e}))}addManualChunks(e){const t=[];for(const n of Object.keys(e)){const r=e[n];for(const e of r)t.push({alias:null,unresolvedId:e,manualChunkAlias:n})}const n=Promise.all(t.map(e=>this.loadEntryModule(e,!1))).then(e=>{for(let n=0;n<e.length;n++)this.addToManualChunk(t[n].manualChunkAlias,e[n])});return this.awaitLoadModulesPromise(n)}getChunkFileName(e){const t=this.entriesByReferenceId.get(e);if(!t)return So((n=e,{code:wo.CHUNK_NOT_FOUND,message:`Plugin error - Unable to get file name for unknown chunk "${n}".`}));var n;const r=t.module&&(t.module.facadeChunk?t.module.facadeChunk.id:t.module.chunk.id);return r||So((i=t,{code:wo.CHUNK_NOT_GENERATED,message:`Plugin error - Unable to get file name for chunk "${i.name}". Ensure that generate is called first.`}));var i}resolveId(e,t,n){return Promise.resolve(this.isExternal(e,t,!1)?{id:e,external:!0}:this.pluginDriver.hookFirst("resolveId",[e,t],null,n)).then(n=>this.normalizeResolveIdResult(n,t,e))}addToManualChunk(e,t){null!==t.manualChunkAlias&&t.manualChunkAlias!==e&&So(Po(t.id,e,t.manualChunkAlias)),t.manualChunkAlias=e,this.manualChunkModules[e]||(this.manualChunkModules[e]=[]),this.manualChunkModules[e].push(t)}awaitLoadModulesPromise(e){this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]);const t=()=>{const e=this.latestLoadModulesPromise;return e.then(()=>{if(this.latestLoadModulesPromise!==e)return t()})};return t().then(()=>e)}fetchAllDependencies(e){const t=Promise.all(e.getDynamicImportExpressions().map((t,n)=>this.resolveDynamicImport(t,e.id).then(t=>{if(null===t)return;const r=e.dynamicImports[n];if("string"!=typeof t)return this.fetchResolvedDependency(bo(t.id),e.id,t).then(e=>{r.resolution=e});r.resolution=t})));return t.catch(()=>{}),Promise.all(e.sources.map(t=>this.resolveAndFetchDependency(e,t))).then(()=>t)}fetchModule(e,t,n,r){const i=this.modulesById.get(e);if(i){if(i instanceof mt)throw new Error(`Cannot fetch external module ${e}`);return i.isEntryPoint=i.isEntryPoint||r,Promise.resolve(i)}const s=new Fa(this.graph,e,n,r);this.modulesById.set(e,s);const o=this.getManualChunk(e);return"string"==typeof o&&this.addToManualChunk(o,s),Da("load modules",3),Promise.resolve(this.pluginDriver.hookFirst("load",[e])).catch(n=>{La("load modules",3);let r=`Could not load ${e}`;throw t&&(r+=` (imported by ${t})`),r+=`: ${n.message}`,new Error(r)}).then(t=>(La("load modules",3),"string"==typeof t?{code:t}:t&&"object"==typeof t&&"string"==typeof t.code?t:So(function(e){return{code:wo.BAD_LOADER,message:`Error loading ${bo(e)}: plugin load hook should return a string, a { code, map } object, or nothing/null`}}(e)))).then(t=>{const n=this.graph.cachedModules.get(e);if(n&&!n.customTransformCache&&n.originalCode===t.code){if(n.transformAssets)for(const e of n.transformAssets)this.pluginDriver.emitAsset(e.name,e.source);return n}return"boolean"==typeof t.moduleSideEffects&&(s.moduleSideEffects=t.moduleSideEffects),function(e,t,n){const r=n.id,i=[],s="string"==typeof t.map?JSON.parse(t.map):t.map;s&&"string"==typeof s.mappings&&(s.mappings=O(s.mappings));const o=e.pluginDriver.emitAsset,a=t.code;let h,u,c,l,p=t.ast,d=!1,f=null;const m=t.code;let g;return e.pluginDriver.hookReduceArg0("transform",[m,r],function(t,s,o){if(!d&&c.used&&(d=!0),d){if(s&&"object"==typeof s&&Array.isArray(s.dependencies))for(const t of s.dependencies){const n=ft(lt(r),t);e.watchFiles[n]||(e.watchFiles[n]=!0)}}else if(u.length&&(n.transformAssets=u),s&&"object"==typeof s&&Array.isArray(s.dependencies)){l.warnedTransformDependencies||this.warn({code:"TRANSFORM_DEPENDENCIES_DEPRECATED",message:'Returning "dependencies" from plugin transform hook is deprecated for using this.addWatchFile() instead.'}),l.warnedTransformDependencies=!0,h||(h=[]);for(const e of s.dependencies)h.push(ft(lt(r),e))}if("string"==typeof s)s={ast:void 0,code:s,map:void 0};else{if(!s||"object"!=typeof s)return t;"string"==typeof s.map&&(s.map=JSON.parse(s.map)),"boolean"==typeof s.moduleSideEffects&&(f=s.moduleSideEffects)}return s.map&&"string"==typeof s.map.mappings&&(s.map.mappings=O(s.map.mappings)),null!==s.map&&i.push(s.map||{missing:!0,plugin:o.name}),p=s.ast,s.code},(t,n)=>{let i;return(l=n).cacheKey?d=!0:c=function(e){const t={used:!1,cache:void 0};return t.cache={has:n=>(t.used=!0,e.has(n)),get:n=>(t.used=!0,e.get(n)),set:(n,r)=>(t.used=!0,e.set(n,r)),delete:n=>(t.used=!0,e.delete(n))},t}(t.cache),({assets:u,emitAsset:i}=function(e,t){const n=[];return{assets:n,emitAsset:(r,i)=>{const s=t(r,i),o=e.get(s);return n.push({fileName:void 0,name:o.name,source:o.source}),s}}}(e.assetsById,o)),Object.assign({},t,{cache:c?c.cache:t.cache,warn(e,n){"string"==typeof e&&(e={message:e}),n&&Io(e,n,m,r),e.id=r,e.hook="transform",t.warn(e)},error:(e,n)=>("string"==typeof e&&(e={message:e}),n&&Io(e,n,m,r),e.id=r,e.hook="transform",t.error(e)),emitAsset:i,addWatchFile(e){h||(h=[]),h.push(e),t.addWatchFile(e)},setAssetSource(e,n){if(t.setAssetSource(e,n),!d&&!g)try{this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitAsset with a source, or call setAssetSource in another hook."})}catch(e){g=e}}})}).catch(e=>{"string"==typeof e&&(e={message:e}),"PLUGIN_ERROR"!==e.code&&(e.code&&(e.pluginCode=e.code),e.code="PLUGIN_ERROR"),e.id=r,So(e)}).then(e=>{if(!d&&g)throw g;return{ast:p,code:e,customTransformCache:d,moduleSideEffects:f,originalCode:a,originalSourcemap:s,sourcemapChain:i,transformDependencies:h}})}(this.graph,t,s)}).then(t=>(s.setSource(t),this.modulesById.set(e,s),this.fetchAllDependencies(s).then(()=>{for(const e in s.exports)"default"!==e&&(s.exportsAll[e]=s.id);return s.exportAllSources.forEach(e=>{const t=s.resolvedIds[e].id,n=this.modulesById.get(t);if(!(n instanceof mt))for(const e in n.exportsAll)e in s.exportsAll?this.graph.warn(ko(e,s,n)):s.exportsAll[e]=n.exportsAll[e]}),s})))}fetchResolvedDependency(e,t,n){if(n.external){this.modulesById.has(n.id)||this.modulesById.set(n.id,new mt(this.graph,n.id,n.moduleSideEffects));const r=this.modulesById.get(n.id);return r instanceof mt?Promise.resolve(r):So(function(e,t){return{code:wo.INVALID_EXTERNAL_ID,message:`'${e}' is imported as an external by ${bo(t)}, but is already an existing non-external module id.`}}(e,t))}return this.fetchModule(n.id,t,n.moduleSideEffects,!1)}handleMissingImports(e,t,n){return null===e?(ht(t)&&So(function(e,t){return{code:wo.UNRESOLVED_IMPORT,message:`Could not resolve '${e}' from ${bo(t)}`}}(t,n)),this.graph.warn(function(e,t){return{code:wo.UNRESOLVED_IMPORT,importer:bo(t),message:`'${e}' is imported by ${bo(t)}, but could not be resolved – treating it as an external dependency`,source:e,url:"https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency"}}(t,n)),{id:t,external:!0,moduleSideEffects:!0}):e}normalizeResolveIdResult(e,t,n){let r="",i=!1,s=null;if(e)"object"==typeof e?(r=e.id,e.external&&(i=!0),"boolean"==typeof e.moduleSideEffects&&(s=e.moduleSideEffects)):(r=e,this.isExternal(r,t,!0)&&(i=!0)),i&&(r=Sc(t,r));else{if(r=Sc(t,n),!1!==e&&!this.isExternal(r,t,!0))return null;i=!0}return{external:i,id:r,moduleSideEffects:"boolean"==typeof s?s:this.hasModuleSideEffects(r,i)}}resolveAndFetchDependency(e,t){return Promise.resolve(e.resolvedIds[t]||this.resolveId(t,e.id).then(n=>this.handleMissingImports(n,t,e.id))).then(n=>(e.resolvedIds[t]=n,this.fetchResolvedDependency(t,e.id,n)))}resolveDynamicImport(e,t){return this.pluginDriver.hookFirst("resolveDynamicImport",[e,t]).then(n=>"string"!=typeof e?"string"==typeof n?n:n?Object.assign({external:!1,moduleSideEffects:!0},n):null:null==n?this.resolveId(e,t).then(n=>this.handleMissingImports(n,e,t)):this.handleMissingImports(this.normalizeResolveIdResult(n,t,e),e,t))}}const kc=97,Cc=48;function Nc(e){return e<10?String.fromCharCode(Cc+e):String.fromCharCode(kc+(e-10))}function $c(e){let t="";for(let n=0;n<e.length;n++){const r=e[n];t+=Nc(r>>4),t+=Nc(15&r)}return t}function Rc(e){const t=new Uint8Array(e);for(let e=0;e<t.length;e++)t[e]=512*Math.random();return t}function Oc(e){return"string"==typeof e?[{alias:null,unresolvedId:e}]:Array.isArray(e)?e.map(e=>({alias:null,unresolvedId:e})):Object.keys(e).map(t=>({alias:t,unresolvedId:e[t]}))}class Mc{constructor(e,t){if(this.assetsById=new Map,this.curChunkIndex=0,this.moduleById=new Map,this.needsTreeshakingPass=!1,this.phase=rc.LOAD_AND_PARSE,this.watchFiles=Object.create(null),this.externalModules=[],this.modules=[],this.curChunkIndex=0,this.deoptimizationTracker=new Ju,this.cachedModules=new Map,e.cache&&e.cache.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);if(!1!==e.cache){this.pluginCache=e.cache&&e.cache.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.keys(t))t[e][0]++}}if(this.preserveModules=e.preserveModules,this.cacheExpiry=e.experimentalCacheExpiry,this.treeshake=!1!==e.treeshake,this.treeshake&&(this.treeshakingOptions=e.treeshake?{annotations:!1!==e.treeshake.annotations,moduleSideEffects:e.treeshake.moduleSideEffects,propertyReadSideEffects:!1!==e.treeshake.propertyReadSideEffects,pureExternalModules:e.treeshake.pureExternalModules}:{annotations:!0,moduleSideEffects:!0,propertyReadSideEffects:!0,pureExternalModules:!1}),this.contextParse=((e,t={})=>this.acornParser.parse(e,Object.assign({},ja,t,this.acornOptions))),this.pluginDriver=vc(this,e,this.pluginCache,t),t){const e=e=>this.pluginDriver.hookSeqSync("watchChange",[e]);t.on("change",e),t.once("restart",()=>{t.removeListener("change",e)})}this.shimMissingExports=e.shimMissingExports,this.scope=new Xu,this.context=String(e.context);const n=e.moduleContext;if("function"==typeof n)this.getModuleContext=(e=>n(e)||this.context);else if("object"==typeof n){const e=new Map;for(const t in n)e.set(ft(t),n[t]);this.getModuleContext=(t=>e.get(t)||this.context)}else this.getModuleContext=(()=>this.context);this.onwarn=e.onwarn||function(){const e=Object.create(null);return t=>{const n=t.toString();n in e||(console.error(n),e[n]=!0)}}(),this.acornOptions=e.acorn||{};const r=[];r.push(Fu),r.push(Ku),r.push(Wu),e.experimentalTopLevelAwait&&(this.acornOptions.allowAwaitOutsideFunction=!0);const i=e.acornInjectPlugins;r.push(...Array.isArray(i)?i:i?[i]:[]),this.acornParser=Kh.extend(...r),this.moduleLoader=new Pc(this,this.moduleById,this.pluginDriver,e.external,"function"==typeof e.manualChunks&&e.manualChunks,this.treeshake?this.treeshakingOptions.moduleSideEffects:null,!!this.treeshake&&this.treeshakingOptions.pureExternalModules)}build(e,t,n){return Da("parse modules",2),Promise.all([this.moduleLoader.addEntryModules(Oc(e),!0),t&&"object"==typeof t&&this.moduleLoader.addManualChunks(t)]).then(([{entryModules:e,manualChunkModulesByAlias:t}])=>{if(0===e.length)throw new Error("You must supply options.input to rollup");for(const e of this.moduleById.values())e instanceof Fa?(this.modules.push(e),this.watchFiles[e.id]=!0):this.externalModules.push(e);if(La("parse modules",2),this.phase=rc.ANALYSE,Da("analyse dependency graph",2),this.link(e),La("analyse dependency graph",2),Da("mark included statements",2),n&&e.length>1)throw new Error("Internal Error: can only inline dynamic imports for single-file builds.");for(const t of e)t.includeAllExports();this.includeMarked(this.modules);for(const e of this.externalModules)e.warnUnusedImports();La("mark included statements",2),Da("generate chunks",2),this.preserveModules||n||function(e,t){let n,r,i;const s=new Set,o=[],a=e=>{n.manualChunkAlias?(e.manualChunkAlias=n.manualChunkAlias,e.entryPointsHash=r):function(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]^t[n]}(e.entryPointsHash,r);for(const t of e.dependencies)t instanceof mt||i.has(t.id)||(i.add(t.id),s.has(t.id)||t.manualChunkAlias||a(t));for(const{resolution:t}of e.dynamicImports)t instanceof Fa&&t.dynamicallyImportedBy.length>0&&!t.manualChunkAlias&&o.push(t)};if(t)for(const e of Object.keys(t))for(n of(r=Rc(10),t[e]))i=new Set(n.id),a(n);for(n of e)s.add(n.id),r=Rc(10),i=new Set(n.id),n.manualChunkAlias||a(n);for(n of o)s.has(n.id)||(s.add(n.id),r=Rc(10),i=new Set(n.id),a(n))}(e,t);let r=[];if(this.preserveModules)for(const e of this.modules){const t=new oh(this,[e]);!e.isEntryPoint&&t.isEmpty||(t.entryModules=[e]),r.push(t)}else{const e={};for(const t of this.modules){const n=$c(t.entryPointsHash),r=e[n];r?r.push(t):e[n]=[t]}for(const t in e){const n=e[t];Ja(n);const i=new oh(this,n);r.push(i)}}for(const e of r)e.link();r=r.filter(sh);for(const e of r)(this.preserveModules||e.entryModules.length>0)&&e.generateEntryExportsOrMarkAsTainted();const i=[];if(!this.preserveModules)for(const e of r)for(const t of e.entryModules)if(e.facadeModule!==t){const e=new oh(this,[]);e.turnIntoFacade(t),i.push(e)}return La("generate chunks",2),this.phase=rc.GENERATE,r.concat(i)})}finaliseAssets(e){const t=Object.create(null);return this.assetsById.forEach(n=>{void 0!==n.source&&nc(n,t,e)}),t}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let n=!0;for(const e of Object.keys(t))t[e][0]>=this.cacheExpiry?delete t[e]:n=!1;n&&delete this.pluginCache[e]}return{modules:this.modules.map(e=>e.toJSON()),plugins:this.pluginCache}}includeMarked(e){if(this.treeshake){let t=1;do{Da(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const t of e)t.isExecuted&&t.include();La(`treeshaking pass ${t++}`,3)}while(this.needsTreeshakingPass)}else for(const t of e)t.includeAllInBundle()}warn(e){e.toString=(()=>{let t="";return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${bo(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+=e.message}),this.onwarn(e)}link(e){for(const e of this.modules)e.linkDependencies();const{orderedModules:t,cyclePaths:n}=function(e){let t=0;const n=[],r={},i=[],s=[],o={},a=e=>{if(!r[e.id]){if(e instanceof mt)return e.execIndex=t++,void(r[e.id]=!0);for(const t of e.dependencies)t.id in o?r[t.id]||n.push(Za(t.id,e.id,o)):(o[t.id]=e.id,a(t));for(const{resolution:t}of e.dynamicImports)t instanceof Fa&&-1===s.indexOf(t)&&s.push(t);e.execIndex=t++,r[e.id]=!0,i.push(e)}};for(const t of e)o[t.id]||(o[t.id]=null,a(t));for(const e of s)o[e.id]||(o[e.id]=null,a(e));return{orderedModules:i,cyclePaths:n}}(e);for(const e of n)this.warn({code:"CIRCULAR_DEPENDENCY",importer:e[0],message:`Circular dependency: ${e.join(" -> ")}`});this.modules=t;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of Object.keys(e.importDescriptions)){const n=e.importDescriptions[t];"*"===n.name||n.module.getVariableForExportName(n.name)||e.warn({code:"NON_EXISTENT_EXPORT",message:`Non-existent export '${n.name}' is imported from ${bo(n.module.id)}`,name:n.name,source:n.module.id},n.start)}}}function Tc(e){switch(typeof e){case"function":return e();case"string":return e;default:return""}}const Dc=(e,t)=>t?`${e}\n${t}`:e,Lc=(e,t)=>t?`${e}\n\n${t}`:e;function Vc(e,t){So({code:"INVALID_EXPORT_OPTION",message:`'${e}' was specified for output.exports, but entry module has following exports: ${t.join(", ")}`})}function Bc(e,{exports:t,name:n,format:r}){const i=e.getExportNames();return"default"===t?1===i.length&&"default"===i[0]||Vc("default",i):"none"===t&&i.length&&Vc("none",i),t&&"auto"!==t||(0===i.length?t="none":1===i.length&&"default"===i[0]?t="default":(null!==e.facadeModule&&e.facadeModule.isEntryPoint&&"es"!==r&&-1!==i.indexOf("default")&&e.graph.warn({code:"MIXED_EXPORTS",message:`Using named and default exports together. Consumers of your bundle will have to use ${n||"bundle"}['default'] to access the default export, which may not be what you want. Use \`output.exports: 'named'\` to disable this warning`,url:"https://rollupjs.org/guide/en#output-exports"}),t="named")),/(?:default|named|none)/.test(t)||So({code:"INVALID_EXPORT_OPTION",message:"output.exports must be 'default', 'named', 'none', 'auto', or left unspecified (defaults to 'auto')",url:"https://rollupjs.org/guide/en#output-exports"}),t}const zc=(e,t)=>(n,r)=>void 0!==t[n]?t[n]:void 0!==e[n]?e[n]:r,jc=e=>e&&"object"!=typeof e?{}:e,Wc=(e,t,n)=>{const r=jc(t[n]),i=jc(e[n]);return void 0!==r?r&&i?Object.assign({},i,r):r:i},Uc=(e,t,n=(e=>{"string"==typeof e?console.warn(e):console.warn(e.message)}))=>t.silent?()=>{}:e.onwarn?t=>e.onwarn(t,n):n,Fc=(e,t)=>{const n=e.external;return"function"==typeof n?(e,...r)=>n(e,...r)||-1!==t.external.indexOf(e):("string"==typeof e.external?[n]:Array.isArray(n)?n:[]).concat(t.external)},qc={c:"config",d:"dir",e:"external",f:"format",g:"globals",h:"help",i:"input",m:"sourcemap",n:"name",o:"file",v:"version",w:"watch"};function Gc({config:e={},command:t={},defaultOnWarnHandler:n}){const r=function(e){const t=e.external&&"string"==typeof e.external?e.external.split(","):[];return Object.assign({},e,{external:t,globals:"string"==typeof e.globals?e.globals.split(",").reduce((e,n)=>{const[r,i]=n.split(":");return e[r]=i,-1===t.indexOf(r)&&t.push(r),e},Object.create(null)):void 0})}(t),i=function(e,t={external:[],globals:void 0},n){const r=zc(e,t),i={acorn:e.acorn,acornInjectPlugins:e.acornInjectPlugins,cache:r("cache"),chunkGroupingSize:r("chunkGroupingSize",5e3),context:e.context,experimentalCacheExpiry:r("experimentalCacheExpiry",10),experimentalOptimizeChunks:r("experimentalOptimizeChunks"),experimentalTopLevelAwait:r("experimentalTopLevelAwait"),external:Fc(e,t),inlineDynamicImports:r("inlineDynamicImports",!1),input:r("input",[]),manualChunks:r("manualChunks"),moduleContext:e.moduleContext,onwarn:Uc(e,t,n),perf:r("perf",!1),plugins:e.plugins,preserveModules:r("preserveModules"),preserveSymlinks:r("preserveSymlinks"),shimMissingExports:r("shimMissingExports"),treeshake:Wc(e,t,"treeshake"),watch:e.watch};i.cache&&i.cache.cache&&(i.cache=i.cache.cache);return i}(e,r,n);r.output&&Object.assign(r,r.output);const s=e.output,o=Array.isArray(s)?s:s?[s]:[];0===o.length&&o.push({});const a=o.map(e=>(function(e,t={}){const n=zc(e,t);let r=n("format");switch(r){case"esm":case"module":r="es";break;case"commonjs":r="cjs"}return{amd:Object.assign({},e.amd,t.amd),assetFileNames:n("assetFileNames"),banner:n("banner"),chunkFileNames:n("chunkFileNames"),compact:n("compact",!1),dir:n("dir"),dynamicImportFunction:n("dynamicImportFunction"),entryFileNames:n("entryFileNames"),esModule:n("esModule",!0),exports:n("exports"),extend:n("extend"),file:n("file"),footer:n("footer"),format:"esm"===r?"es":r,freeze:n("freeze",!0),globals:n("globals"),indent:n("indent",!0),interop:n("interop",!0),intro:n("intro"),name:n("name"),namespaceToStringTag:n("namespaceToStringTag",!1),noConflict:n("noConflict"),outro:n("outro"),paths:n("paths"),preferConst:n("preferConst"),sourcemap:n("sourcemap"),sourcemapExcludeSources:n("sourcemapExcludeSources"),sourcemapFile:n("sourcemapFile"),sourcemapPathTransform:n("sourcemapPathTransform"),strict:n("strict",!0)}})(e,r)),h=[],u=Object.keys(i);Hc(h,Object.keys(e),u,"input option",/^output$/);const c=Object.keys(a[0]);Hc(h,a.reduce((e,t)=>e.concat(Object.keys(t)),[]),c,"output option");const l=c.filter(e=>"sourcemapPathTransform"!==e);return Hc(h,Object.keys(r),u.concat(l,Object.keys(qc),"config","environment","silent"),"CLI flag",/^_|output|(config.*)$/),{inputOptions:i,optionError:h.length>0?h.join("\n"):null,outputOptions:a}}function Hc(e,t,n,r,i=/$./){const s=t.filter(e=>-1===n.indexOf(e)&&!i.test(e));s.length>0&&e.push(`Unknown ${r}: ${s.join(", ")}. Allowed options: ${n.sort().join(", ")}`)}const Kc={get(){throw new Error("bundle.generate(...) now returns a Promise instead of a { code, map } object")}};function Yc(e,n){return n.options&&n.options.call({meta:{rollupVersion:t}},e)||e}let Xc;function Qc(e){try{const t=function(e){if(!e)throw new Error("You must supply an options object to rollup");let{inputOptions:t,optionError:n}=Gc({config:e});n&&t.onwarn({message:n,code:"UNKNOWN_OPTION"});const r=t.plugins;return t.plugins=Array.isArray(r)?r.filter(Boolean):r?[r]:[],(t=t.plugins.reduce(Yc,t)).inlineDynamicImports?(t.preserveModules&&So({code:"INVALID_OPTION",message:'"preserveModules" does not support the "inlineDynamicImports" option.'}),t.manualChunks&&So({code:"INVALID_OPTION",message:'"manualChunks" option is not supported for "inlineDynamicImports".'}),t.experimentalOptimizeChunks&&So({code:"INVALID_OPTION",message:'"experimentalOptimizeChunks" option is not supported for "inlineDynamicImports".'}),(t.input instanceof Array&&t.input.length>1||"object"==typeof t.input&&Object.keys(t.input).length>1)&&So({code:"INVALID_OPTION",message:'Multiple inputs are not supported for "inlineDynamicImports".'})):t.preserveModules&&(t.manualChunks&&So({code:"INVALID_OPTION",message:'"preserveModules" does not support the "manualChunks" option.'}),t.experimentalOptimizeChunks&&So({code:"INVALID_OPTION",message:'"preserveModules" does not support the "experimentalOptimizeChunks" option.'})),t}(e);za(t);const n=new Mc(t,Xc);Xc=void 0;const r=!1!==e.cache;return delete t.cache,delete e.cache,Da("BUILD",1),n.pluginDriver.hookParallel("buildStart",[t]).then(()=>n.build(t.input,t.manualChunks,t.inlineDynamicImports)).then(e=>n.pluginDriver.hookParallel("buildEnd",[]).then(()=>e),e=>n.pluginDriver.hookParallel("buildEnd",[e]).then(()=>{throw e})).then(e=>{La("BUILD",1);let i=!1;function s(r){return function(e,t,n,r){if(!t)throw new Error("You must supply an options object");const i=Gc({config:{output:Object.assign({},t,t.output,e.output)}});if(i.optionError)throw new Error(i.optionError);const s=i.outputOptions[0],o=r.hookReduceArg0Sync("outputOptions",[s],(e,t)=>t||e);a=o,"es6"===a.format&&So({message:'The "es6" output format is deprecated – use "esm" instead',url:"https://rollupjs.org/guide/en#output-format"}),["amd","cjs","system","es","iife","umd"].indexOf(a.format)<0&&So({message:'You must specify "output.format", which can be one of "amd", "cjs", "system", "esm", "iife" or "umd".',url:"https://rollupjs.org/guide/en#output-format"}),"string"==typeof o.file&&("string"==typeof o.dir&&So({code:"INVALID_OPTION",message:'You must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks.'}),e.preserveModules&&So({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when using the "preserveModules" option.'}),"object"!=typeof e.input||Array.isArray(e.input)||So({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when providing named inputs.'}));var a;n&&("umd"!==o.format&&"iife"!==o.format||So({code:"INVALID_OPTION",message:"UMD and IIFE output formats are not supported for code-splitting builds."}),"string"==typeof o.file&&So({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when generating multiple chunks.'}));return o}(t,r,e.length>1,n.pluginDriver)}function o(r,s){Da("GENERATE",1);const o=r.assetFileNames||"assets/[name]-[hash][extname]",a=n.finaliseAssets(o),h=function(e){if(0===e.length)return"/";if(1===e.length)return lt(e[0]);const t=e.slice(1).reduce((e,t)=>{const n=t.split(/\/+|\\+/);let r;for(r=0;e[r]===n[r]&&r<Math.min(e.length,n.length);r++);return e.slice(0,r)},e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}(function(e){const t=[];for(const n of e)for(const e of n.entryModules)at(e.id)&&t.push(e.id);return t}(e));return n.pluginDriver.hookParallel("renderStart",[]).then(()=>(function(e,t){const n=e.pluginDriver;return Promise.all([n.hookReduceValue("banner",Tc(t.banner),[],Dc),n.hookReduceValue("footer",Tc(t.footer),[],Dc),n.hookReduceValue("intro",Tc(t.intro),[],Lc),n.hookReduceValue("outro",Tc(t.outro),[],Lc)]).then(([e,t,n,r])=>(n&&(n+="\n\n"),r&&(r=`\n\n${r}`),e.length&&(e+="\n"),t.length&&(t="\n"+t),{intro:n,outro:r,banner:e,footer:t})).catch(e=>{So({code:"ADDON_ERROR",message:`Could not retrieve ${e.hook}. Check configuration of ${e.plugin}.\n\tError Message: ${e.message}`})})})(n,r)).then(s=>{for(const n of e)t.preserveModules||n.generateInternalExports(r),n.facadeModule&&n.facadeModule.isEntryPoint&&(n.exportMode=Bc(n,r));for(const t of e)t.preRender(r,h);!i&&t.experimentalOptimizeChunks&&(!function(e,t,n,r){for(let i=0;i<e.length;i++){const s=e[i],o=[];if(s.visitStaticDependenciesUntilCondition(e=>{e instanceof oh&&o.push(e)}),o.length<2)continue;let a=1,h=!0,u=void 0,c=o[0],l=o[1];const p=e=>!(null!==e.facadeModule||null!==e.manualChunkAlias||!l||null!==l.facadeModule||e.getRenderedSourceLength()>n);do{if(h){p(c)&&(h=!1);continue}let s=n-u.getRenderedSourceLength()-c.getRenderedSourceLength();if(s<=0){p(c)||(h=!0);continue}const d=new Set;c.visitStaticDependenciesUntilCondition(e=>d.add(e));const f=new Set([c,u]);if(u.visitStaticDependenciesUntilCondition(e=>e!==c&&e!==u&&!d.has(e)&&(e instanceof mt||(s-=e.getRenderedSourceLength())<=0||void f.add(e)))){p(c)||(h=!0);continue}if(c.visitStaticDependenciesUntilCondition(e=>!f.has(e)&&(e instanceof mt||(s-=e.getRenderedSourceLength())<=0||void 0))){p(c)||(h=!0);continue}const m=e.indexOf(c);m<=i&&i--,e.splice(m,1),u.merge(c,e,t,r),o.splice(--a,1),c=u,l&&!p(l)&&(h=!0)}while(u=c,c=l,l=o[++a],c)}}(e,r,t.chunkGroupingSize,h),i=!0),function(e,t,n,r,i){const s={},[o,a]=e.reduce(([e,t],n)=>((n.facadeModule&&n.facadeModule.isUserDefinedEntryPoint?e:t).push(n),[e,t]),[[],[]]),h=o.concat(a);for(let e=0;e<h.length;e++){const o=h[e];if(n.file)o.id=ct(n.file);else if(t.preserveModules)o.generateIdPreserveModules(r,s);else{let e,t;o.facadeModule&&o.facadeModule.isUserDefinedEntryPoint?(e=n.entryFileNames||"[name].js",t="output.entryFileNames"):(e=n.chunkFileNames||"[name]-[hash].js",t="output.chunkFileNames"),o.generateId(e,t,i,n,s)}s[o.id]=!0}}(e,t,r,h,s);for(let t=0;t<e.length;t++){const n=e[t],r=n.facadeModule;a[n.id]={code:void 0,dynamicImports:n.getDynamicImportIds(),exports:n.getExportNames(),facadeModuleId:r&&r.id,fileName:n.id,imports:n.getImportIds(),isDynamicEntry:null!==r&&r.dynamicallyImportedBy.length>0,isEntry:null!==r&&r.isEntryPoint,map:void 0,modules:n.renderedModules,get name(){return n.getChunkName()}}}return Promise.all(e.map(e=>{const t=a[e.id];return e.render(r,s,t).then(e=>(t.code=e.code,t.map=e.map,n.pluginDriver.hookParallel("ongenerate",[Object.assign({bundle:t},r),t])))})).then(()=>{})}).catch(e=>n.pluginDriver.hookParallel("renderError",[e]).then(()=>{throw e})).then(()=>{const e=new Map(n.assetsById),t=tc(e,a,o);return n.pluginDriver.hookSeq("generateBundle",[r,a,s],e=>Object.assign({},e,t)).then(()=>{e.forEach(e=>{void 0===e.fileName&&nc(e,a,o)})})}).then(()=>(La("GENERATE",1),a))}const a={cache:r?n.getCache():void 0,generate:e=>{const t=o(s(e),!1).then(e=>el(e));return Object.defineProperty(t,"code",Kc),Object.defineProperty(t,"map",Kc),t},watchFiles:Object.keys(n.watchFiles),write:e=>{const r=s(e);return r.dir||r.file||So({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.'}),o(r,!0).then(e=>{let i=0;for(const t of Object.keys(e)){if(!e[t].isAsset&&++i>1)break}return i>1&&(r.sourcemapFile&&So({code:"INVALID_OPTION",message:'"output.sourcemapFile" is only supported for single-file builds.'}),"string"==typeof r.file&&So({code:"INVALID_OPTION",message:'When building multiple chunks, the "output.dir" option must be used, not "output.file".'+("string"!=typeof t.input||!0===t.inlineDynamicImports?"":' To inline dynamic imports, set the "inlineDynamicImports" option.')})),Promise.all(Object.keys(e).map(t=>(function(e,t,n,r){const i=ft(r.dir||lt(r.file),n.fileName);let s,o;if(tl(n))o=n.source;else if(o=n.code,r.sourcemap&&n.map){let e;"inline"===r.sourcemap?e=n.map.toUrl():(e=`${ct(n.fileName)}.map`,s=uc(`${i}.map`,n.map.toString())),o+=`//# ${Sa}=${e}\n`}return uc(i,o).then(()=>s).then(()=>!tl(n)&&e.pluginDriver.hookSeq("onwrite",[Object.assign({bundle:t},r),n])).then(()=>{})})(n,a,e[t],r))).then(()=>n.pluginDriver.hookParallel("writeBundle",[e])).then(()=>el(e))})}};return!0===t.perf&&(a.getTimings=Ta),a})}catch(e){return Promise.reject(e)}}var Jc;function Zc(e){return e.isAsset?Jc.ASSET:e.isEntry?Jc.ENTRY_CHUNK:Jc.SECONDARY_CHUNK}function el(e){return{output:Object.keys(e).map(t=>e[t]).sort((e,t)=>{const n=Zc(e),r=Zc(t);return n===r?0:n<r?-1:1})}}function tl(e){return!0===e.isAsset}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(Jc||(Jc={}));export{t as VERSION,Qc as rollup};

dist/rollup.browser.js

@@ -1,11 +1,11 @@
/*
@license
- Rollup.js v1.12.2
- Fri, 17 May 2019 12:41:59 GMT - commit a4fbc5374cb5fe43a2070855cea74cf7c0789543
+ Rollup.js v1.12.3
+ Sun, 19 May 2019 09:38:58 GMT - commit 455e99473173da50a6e3b30ed8bc9997f3f55afc
https://github.com/rollup/rollup
Released under the MIT License.
*/
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).rollup={})}(this,function(e){"use strict";var t,n="1.12.2",r=i;function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function s(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function h(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}i.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var u={inherits:(function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}(t={exports:{}},t.exports),t.exports),toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):s(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},toHex:function(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t},htonl:o,toHex32:function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=o(i)),n+=h(i.toString(16))}return n},zero2:a,zero8:h,join32:function(e,t,n,i){var s=n-t;r(s%4==0);for(var o=new Array(s/4),a=0,h=t;a<o.length;a++,h+=4){var u;u="big"===i?e[h]<<24|e[h+1]<<16|e[h+2]<<8|e[h+3]:e[h+3]<<24|e[h+2]<<16|e[h+1]<<8|e[h],o[a]=u>>>0}return o},split32:function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var s=e[r];"big"===t?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=255&s):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=255&s)}return n},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<<t|e>>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,n){return e+t+n>>>0},sum32_4:function(e,t,n,r){return e+t+n+r>>>0},sum32_5:function(e,t,n,r,i){return e+t+n+r+i>>>0},sum64:function(e,t,n,r){var i=e[t],s=r+e[t+1]>>>0,o=(s<r?1:0)+n+i;e[t]=o>>>0,e[t+1]=s},sum64_hi:function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},sum64_lo:function(e,t,n,r){return t+r>>>0},sum64_4_hi:function(e,t,n,r,i,s,o,a){var h=0,u=t;return h+=(u=u+r>>>0)<t?1:0,h+=(u=u+s>>>0)<s?1:0,e+n+i+o+(h+=(u=u+a>>>0)<a?1:0)>>>0},sum64_4_lo:function(e,t,n,r,i,s,o,a){return t+r+s+a>>>0},sum64_5_hi:function(e,t,n,r,i,s,o,a,h,u){var c=0,l=t;return c+=(l=l+r>>>0)<t?1:0,c+=(l=l+s>>>0)<s?1:0,c+=(l=l+a>>>0)<a?1:0,e+n+i+o+h+(c+=(l=l+u>>>0)<u?1:0)>>>0},sum64_5_lo:function(e,t,n,r,i,s,o,a,h,u){return t+r+s+a+u>>>0},rotr64_hi:function(e,t,n){return(t<<32-n|e>>>n)>>>0},rotr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0},shr64_hi:function(e,t,n){return e>>>n},shr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0}};function c(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var l=c;c.prototype.update=function(e,t){if(e=u.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=u.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},c.prototype.digest=function(e){return this.update(this._pad()),r(null===this.pending),this._digest(e)},c.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,s=8;s<this.padLength;s++)r[i++]=0;return r};var p={BlockHash:l},d=u.rotr32;function f(e,t,n){return e&t^~e&n}function m(e,t,n){return e&t^e&n^t&n}function g(e,t,n){return e^t^n}var y={ft_1:function(e,t,n,r){return 0===e?f(t,n,r):1===e||3===e?g(t,n,r):2===e?m(t,n,r):void 0},ch32:f,maj32:m,p32:g,s0_256:function(e){return d(e,2)^d(e,13)^d(e,22)},s1_256:function(e){return d(e,6)^d(e,11)^d(e,25)},g0_256:function(e){return d(e,7)^d(e,18)^e>>>3},g1_256:function(e){return d(e,17)^d(e,19)^e>>>10}},x=u.sum32,v=u.sum32_4,E=u.sum32_5,_=y.ch32,b=y.maj32,A=y.s0_256,S=y.s1_256,I=y.g0_256,w=y.g1_256,P=p.BlockHash,k=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function C(){if(!(this instanceof C))return new C;P.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=k,this.W=new Array(64)}u.inherits(C,P);var N=C;C.blockSize=512,C.outSize=256,C.hmacStrength=192,C.padLength=64,C.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i<n.length;i++)n[i]=v(w(n[i-2]),n[i-7],I(n[i-15]),n[i-16]);var s=this.h[0],o=this.h[1],a=this.h[2],h=this.h[3],u=this.h[4],c=this.h[5],l=this.h[6],p=this.h[7];for(r(this.k.length===n.length),i=0;i<n.length;i++){var d=E(p,S(u),_(u,c,l),this.k[i],n[i]),f=x(A(s),b(s,o,a));p=l,l=c,c=u,u=x(h,d),h=a,a=o,o=s,s=x(d,f)}this.h[0]=x(this.h[0],s),this.h[1]=x(this.h[1],o),this.h[2]=x(this.h[2],a),this.h[3]=x(this.h[3],h),this.h[4]=x(this.h[4],u),this.h[5]=x(this.h[5],c),this.h[6]=x(this.h[6],l),this.h[7]=x(this.h[7],p)},C.prototype._digest=function(e){return"hex"===e?u.toHex32(this.h,"big"):u.split32(this.h,"big")};for(var $={},R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",O=0;O<R.length;O++)$[R.charCodeAt(O)]=O;function M(e){for(var t=0,n=0,r=0,i=0,s=0,o=[],a=[],h=[],u=0,c=0,l=0,p=0,d=e.length;u<d;u++){var f=e.charCodeAt(u);if(44===f)h.length&&a.push(new Int32Array(h)),h=[],c=0;else if(59===f)h.length&&a.push(new Int32Array(h)),h=[],c=0,o.push(a),a=[],t=0;else{var m=$[f];if(void 0===m)throw new Error("Invalid character ("+String.fromCharCode(f)+")");var g=32&m;if(p+=(m&=31)<<l,g)l+=5;else{var y=1&p;p>>=1;var x=y?-p:p;0==c?(t+=x,h.push(t)):1===c?(n+=x,h.push(n)):2===c?(r+=x,h.push(r)):3===c?(i+=x,h.push(i)):4===c&&(s+=x,h.push(s)),c++,p=l=0}}}return h.length&&a.push(new Int32Array(h)),o.push(a),o}function T(e){var t="";e=e<0?-e<<1|1:e<<1;do{var n=31&e;(e>>=5)>0&&(n|=32),t+=R[n]}while(e>0);return t}var D=function(e,t,n){this.start=e,this.end=t,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,Object.defineProperties(this,{previous:{writable:!0,value:null},next:{writable:!0,value:null}})};D.prototype.appendLeft=function(e){this.outro+=e},D.prototype.appendRight=function(e){this.intro=this.intro+e},D.prototype.clone=function(){var e=new D(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e},D.prototype.contains=function(e){return this.start<e&&e<this.end},D.prototype.eachNext=function(e){for(var t=this;t;)e(t),t=t.next},D.prototype.eachPrevious=function(e){for(var t=this;t;)e(t),t=t.previous},D.prototype.edit=function(e,t,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this},D.prototype.prependLeft=function(e){this.outro=e+this.outro},D.prototype.prependRight=function(e){this.intro=e+this.intro},D.prototype.split=function(e){var t=e-this.start,n=this.original.slice(0,t),r=this.original.slice(t);this.original=n;var i=new D(e,this.end,r);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i},D.prototype.toString=function(){return this.intro+this.content+this.outro},D.prototype.trimEnd=function(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;var t=this.content.replace(e,"");return t.length?(t!==this.content&&this.split(this.start+t.length).edit("",void 0,!0),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)},D.prototype.trimStart=function(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;var t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.end-t.length),this.edit("",void 0,!0)),!0):(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0)};var L=function(){throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};"undefined"!=typeof window&&"function"==typeof window.btoa?L=function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"function"==typeof Buffer&&(L=function(e){return Buffer.from(e,"utf-8").toString("base64")});var V=function(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=function(e){for(var t=0,n=0,r=0,i=0,s="",o=0;o<e.length;o++){var a=e[o];if(o>0&&(s+=";"),0!==a.length){for(var h=0,u=[],c=0,l=a;c<l.length;c++){var p=l[c],d=T(p[0]-h);h=p[0],p.length>1&&(d+=T(p[1]-t)+T(p[2]-n)+T(p[3]-r),t=p[1],n=p[2],r=p[3]),5===p.length&&(d+=T(p[4]-i),i=p[4]),u.push(d)}s+=u.join(",")}}return s}(e.mappings)};function B(e){var t=e.split("\n"),n=t.filter(function(e){return/^\t+/.test(e)}),r=t.filter(function(e){return/^ {2,}/.test(e)});if(0===n.length&&0===r.length)return null;if(n.length>=r.length)return"\t";var i=r.reduce(function(e,t){var n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(" ")}function z(e,t){var n=e.split(/[\/\\]/),r=t.split(/[\/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length)for(var i=n.length;i--;)n[i]="..";return n.concat(r).join("/")}V.prototype.toString=function(){return JSON.stringify(this)},V.prototype.toUrl=function(){return"data:application/json;charset=utf-8;base64,"+L(this.toString())};var j=Object.prototype.toString;function W(e){return"[object Object]"===j.call(e)}function U(e){for(var t=e.split("\n"),n=[],r=0,i=0;r<t.length;r++)n.push(i),i+=t[r].length+1;return function(e){for(var t=0,r=n.length;t<r;){var i=t+r>>1;e<n[i]?r=i:t=i+1}var s=t-1;return{line:s,column:e-n[s]}}}var F=function(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null};F.prototype.addEdit=function(e,t,n,r){if(t.length){var i=[this.generatedCodeColumn,e,n.line,n.column];r>=0&&i.push(r),this.rawSegments.push(i)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null},F.prototype.addUneditedChunk=function(e,t,n,r,i){for(var s=t.start,o=!0;s<t.end;)(this.hires||o||i[s])&&this.rawSegments.push([this.generatedCodeColumn,e,r.line,r.column]),"\n"===n[s]?(r.line+=1,r.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0):(r.column+=1,this.generatedCodeColumn+=1),s+=1,o=!1;this.pending=[this.generatedCodeColumn,e,r.line,r.column]},F.prototype.advance=function(e){if(e){var t=e.split("\n");if(t.length>1){for(var n=0;n<t.length-1;n++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}};var q="\n",G={insertLeft:!1,insertRight:!1,storeName:!1},H=function(e,t){void 0===t&&(t={});var n=new D(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:{}},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:B(e)}}),this.byStart[0]=n,this.byEnd[e.length]=n};H.prototype.addSourcemapLocation=function(e){this.sourcemapLocations[e]=!0},H.prototype.append=function(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this},H.prototype.appendLeft=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this},H.prototype.appendRight=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this},H.prototype.clone=function(){for(var e=new H(this.original,{filename:this.filename}),t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;var r=t.next,i=r&&r.clone();i&&(n.next=i,i.previous=n,n=i),t=r}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),Object.keys(this.sourcemapLocations).forEach(function(t){e.sourcemapLocations[t]=!0}),e},H.prototype.generateDecodedMap=function(e){var t=this;e=e||{};var n=Object.keys(this.storedNames),r=new F(e.hires),i=U(this.original);return this.intro&&r.advance(this.intro),this.firstChunk.eachNext(function(e){var s=i(e.start);e.intro.length&&r.advance(e.intro),e.edited?r.addEdit(0,e.content,s,e.storeName?n.indexOf(e.original):-1):r.addUneditedChunk(0,e,t.original,s,t.sourcemapLocations),e.outro.length&&r.advance(e.outro)}),{file:e.file?e.file.split(/[\/\\]/).pop():null,sources:[e.source?z(e.file||"",e.source):null],sourcesContent:e.includeContent?[this.original]:[null],names:n,mappings:r.raw}},H.prototype.generateMap=function(e){return new V(this.generateDecodedMap(e))},H.prototype.getIndentString=function(){return null===this.indentStr?"\t":this.indentStr},H.prototype.indent=function(e,t){var n=/^[^\r\n]/gm;if(W(e)&&(t=e,e=void 0),""===(e=void 0!==e?e:this.indentStr||"\t"))return this;var r={};(t=t||{}).exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(function(e){for(var t=e[0];t<e[1];t+=1)r[t]=!0});var i=!1!==t.indentStart,s=function(t){return i?""+e+t:(i=!0,t)};this.intro=this.intro.replace(n,s);for(var o=0,a=this.firstChunk;a;){var h=a.end;if(a.edited)r[o]||(a.content=a.content.replace(n,s),a.content.length&&(i="\n"===a.content[a.content.length-1]));else for(o=a.start;o<h;){if(!r[o]){var u=this.original[o];"\n"===u?i=!0:"\r"!==u&&i&&(i=!1,o===a.start?a.prependRight(e):(this._splitChunk(a,o),(a=a.next).prependRight(e)))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(n,s),this},H.prototype.insert=function(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")},H.prototype.insertLeft=function(e,t){return G.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),G.insertLeft=!0),this.appendLeft(e,t)},H.prototype.insertRight=function(e,t){return G.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),G.insertRight=!0),this.prependRight(e,t)},H.prototype.move=function(e,t,n){if(n>=e&&n<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);var r=this.byStart[e],i=this.byEnd[t],s=r.previous,o=i.next,a=this.byStart[n];if(!a&&i===this.lastChunk)return this;var h=a?a.previous:this.lastChunk;return s&&(s.next=o),o&&(o.previous=s),h&&(h.next=r),a&&(a.previous=i),r.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=r.previous,this.lastChunk.next=null),r.previous=h,i.next=a||null,h||(this.firstChunk=r),a||(this.lastChunk=i),this},H.prototype.overwrite=function(e,t,n,r){if("string"!=typeof n)throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===r&&(G.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),G.storeName=!0),r={storeName:!0});var i=void 0!==r&&r.storeName,s=void 0!==r&&r.contentOnly;if(i){var o=this.original.slice(e,t);this.storedNames[o]=!0}var a=this.byStart[e],h=this.byEnd[t];if(a){if(t>a.end&&a.next!==this.byStart[a.end])throw new Error("Cannot overwrite across a split point");if(a.edit(n,i,s),a!==h){for(var u=a.next;u!==h;)u.edit("",!1),u=u.next;u.edit("",!1)}}else{var c=new D(e,t,"").edit(n,i);h.next=c,c.previous=h}return this},H.prototype.prepend=function(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this},H.prototype.prependLeft=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this},H.prototype.prependRight=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this},H.prototype.remove=function(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);for(var n=this.byStart[e];n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this},H.prototype.lastChar=function(){if(this.outro.length)return this.outro[this.outro.length-1];var e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""},H.prototype.lastLine=function(){var e=this.outro.lastIndexOf(q);if(-1!==e)return this.outro.substr(e+1);var t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(-1!==(e=n.outro.lastIndexOf(q)))return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(-1!==(e=n.content.lastIndexOf(q)))return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(-1!==(e=n.intro.lastIndexOf(q)))return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return-1!==(e=this.intro.lastIndexOf(q))?this.intro.substr(e+1)+t:this.intro+t},H.prototype.slice=function(e,t){for(void 0===e&&(e=0),void 0===t&&(t=this.original.length);e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;for(var n="",r=this.firstChunk;r&&(r.start>e||r.end<=e);){if(r.start<t&&r.end>=t)return n;r=r.next}if(r&&r.edited&&r.start!==e)throw new Error("Cannot use replaced character "+e+" as slice start anchor.");for(var i=r;r;){!r.intro||i===r&&r.start!==e||(n+=r.intro);var s=r.start<t&&r.end>=t;if(s&&r.edited&&r.end!==t)throw new Error("Cannot use replaced character "+t+" as slice end anchor.");var o=i===r?e-r.start:0,a=s?r.content.length+t-r.end:r.content.length;if(n+=r.content.slice(o,a),!r.outro||s&&r.end!==t||(n+=r.outro),s)break;r=r.next}return n},H.prototype.snip=function(e,t){var n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n},H.prototype._split=function(e){if(!this.byStart[e]&&!this.byEnd[e])for(var t=this.lastSearchedChunk,n=e>t.end;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}},H.prototype._splitChunk=function(e,t){if(e.edited&&e.content.length){var n=U(this.original)(t);throw new Error("Cannot split a chunk that has already been edited ("+n.line+":"+n.column+' – "'+e.original+'")')}var r=e.split(t);return this.byEnd[t]=e,this.byStart[t]=r,this.byEnd[r.end]=r,e===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=e,!0},H.prototype.toString=function(){for(var e=this.intro,t=this.firstChunk;t;)e+=t.toString(),t=t.next;return e+this.outro},H.prototype.isEmpty=function(){var e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0},H.prototype.length=function(){var e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t},H.prototype.trimLines=function(){return this.trim("[\\r\\n]")},H.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},H.prototype.trimEndAborted=function(e){var t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;var n=this.lastChunk;do{var r=n.end,i=n.trimEnd(t);if(n.end!==r&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),i)return!0;n=n.previous}while(n);return!1},H.prototype.trimEnd=function(e){return this.trimEndAborted(e),this},H.prototype.trimStartAborted=function(e){var t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;var n=this.firstChunk;do{var r=n.end,i=n.trimStart(t);if(n.end!==r&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),i)return!0;n=n.next}while(n);return!1},H.prototype.trimStart=function(e){return this.trimStartAborted(e),this};var K=Object.prototype.hasOwnProperty,Y=function(e){void 0===e&&(e={}),this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}};Y.prototype.addSource=function(e){if(e instanceof H)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!W(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","indentExclusionRanges","separator"].forEach(function(t){K.call(e,t)||(e[t]=e.content[t])}),void 0===e.separator&&(e.separator=this.separator),e.filename)if(K.call(this.uniqueSourceIndexByFilename,e.filename)){var t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error("Illegal source: same filename ("+e.filename+"), different contents")}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this},Y.prototype.append=function(e,t){return this.addSource({content:new H(e),separator:t&&t.separator||""}),this},Y.prototype.clone=function(){var e=new Y({intro:this.intro,separator:this.separator});return this.sources.forEach(function(t){e.addSource({filename:t.filename,content:t.content.clone(),separator:t.separator})}),e},Y.prototype.generateDecodedMap=function(e){var t=this;void 0===e&&(e={});var n=[];this.sources.forEach(function(e){Object.keys(e.content.storedNames).forEach(function(e){~n.indexOf(e)||n.push(e)})});var r=new F(e.hires);return this.intro&&r.advance(this.intro),this.sources.forEach(function(e,i){i>0&&r.advance(t.separator);var s=e.filename?t.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=U(o.original);o.intro&&r.advance(o.intro),o.firstChunk.eachNext(function(t){var i=a(t.start);t.intro.length&&r.advance(t.intro),e.filename?t.edited?r.addEdit(s,t.content,i,t.storeName?n.indexOf(t.original):-1):r.addUneditedChunk(s,t,o.original,i,o.sourcemapLocations):r.advance(t.content),t.outro.length&&r.advance(t.outro)}),o.outro&&r.advance(o.outro)}),{file:e.file?e.file.split(/[\/\\]/).pop():null,sources:this.uniqueSources.map(function(t){return e.file?z(e.file,t.filename):t.filename}),sourcesContent:this.uniqueSources.map(function(t){return e.includeContent?t.content:null}),names:n,mappings:r.raw}},Y.prototype.generateMap=function(e){return new V(this.generateDecodedMap(e))},Y.prototype.getIndentString=function(){var e={};return this.sources.forEach(function(t){var n=t.content.indentStr;null!==n&&(e[n]||(e[n]=0),e[n]+=1)}),Object.keys(e).sort(function(t,n){return e[t]-e[n]})[0]||"\t"},Y.prototype.indent=function(e){var t=this;if(arguments.length||(e=this.getIndentString()),""===e)return this;var n=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach(function(r,i){var s=void 0!==r.separator?r.separator:t.separator,o=n||i>0&&/\r?\n$/.test(s);r.content.indent(e,{exclude:r.indentExclusionRanges,indentStart:o}),n="\n"===r.content.lastChar()}),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,function(t,n){return n>0?e+t:t})),this},Y.prototype.prepend=function(e){return this.intro=e+this.intro,this},Y.prototype.toString=function(){var e=this,t=this.sources.map(function(t,n){var r=void 0!==t.separator?t.separator:e.separator;return(n>0?r:"")+t.content.toString()}).join("");return this.intro+t},Y.prototype.isEmpty=function(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some(function(e){return!e.content.isEmpty()})},Y.prototype.length=function(){return this.sources.reduce(function(e,t){return e+t.content.length()},this.intro.length)},Y.prototype.trimLines=function(){return this.trim("[\\r\\n]")},Y.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},Y.prototype.trimStart=function(e){var t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){var n,r=0;do{if(!(n=this.sources[r++]))break}while(!n.content.trimStartAborted(e))}return this},Y.prototype.trimEnd=function(e){var t,n=new RegExp((e||"\\s")+"+$"),r=this.sources.length-1;do{if(!(t=this.sources[r--])){this.intro=this.intro.replace(n,"");break}}while(!t.content.trimEndAborted(e));return this};const X="BlockStatement",Q="CallExpression",J="ClassDeclaration",Z="ExportAllDeclaration",ee="ExportDefaultDeclaration",te="ExpressionStatement",ne="FunctionDeclaration",re="FunctionExpression",ie="Identifier",se="ImportDefaultSpecifier",oe="ImportNamespaceSpecifier",ae="Literal",he="MemberExpression",ue="Program",ce="Property",le="ReturnStatement",pe="TemplateLiteral",de="VariableDeclaration";class fe{static create(e){return new this(e)}constructor({withNew:e=!1,args:t=[],callIdentifier:n}={}){this.withNew=e,this.args=t,this.callIdentifier=n}equals(e){return e&&this.callIdentifier===e.callIdentifier}}const me={UNKNOWN_KEY:!0},ge=[],ye=[me];function xe(e,t=null){return Object.create(t,e)}const ve={UNKNOWN_VALUE:!0},Ee={deoptimizePath:()=>{},getLiteralValueAtPath:()=>ve,getReturnExpressionWhenCalledAtPath:()=>Ee,hasEffectsWhenAccessedAtPath:e=>e.length>0,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:()=>!0,include:()=>{},included:!0,toString:()=>"[[UNKNOWN]]"},_e={deoptimizePath:()=>{},getLiteralValueAtPath:()=>void 0,getReturnExpressionWhenCalledAtPath:()=>Ee,hasEffectsWhenAccessedAtPath:e=>e.length>0,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:()=>!0,include:()=>{},included:!0,toString:()=>"undefined"},be={value:{returns:null,returnsPrimitive:Ee,callsArgs:null,mutatesSelf:!0}},Ae={value:{returns:null,returnsPrimitive:Ee,callsArgs:[0],mutatesSelf:!1}};class Se{constructor(){this.included=!1}deoptimizePath(){}getLiteralValueAtPath(){return ve}getReturnExpressionWhenCalledAtPath(e){return 1===e.length?qe(ze,e[0]):Ee}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Fe(ze,e[0],this.included,t,n)}include(){this.included=!0}toString(){return"[[UNKNOWN ARRAY]]"}}const Ie={value:{callsArgs:null,mutatesSelf:!1,returns:Se,returnsPrimitive:null}},we={value:{callsArgs:null,mutatesSelf:!0,returns:Se,returnsPrimitive:null}},Pe={value:{callsArgs:[0],mutatesSelf:!1,returns:Se,returnsPrimitive:null}},ke={value:{callsArgs:[0],mutatesSelf:!0,returns:Se,returnsPrimitive:null}},Ce={deoptimizePath:()=>{},getLiteralValueAtPath:()=>ve,getReturnExpressionWhenCalledAtPath:e=>1===e.length?qe(je,e[0]):Ee,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:e=>{if(1===e.length){const t=e[0];return"string"!=typeof t||!je[t]}return!0},include:()=>{},included:!0,toString:()=>"[[UNKNOWN BOOLEAN]]"},Ne={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:Ce}},$e={value:{callsArgs:[0],mutatesSelf:!1,returns:null,returnsPrimitive:Ce}},Re={deoptimizePath:()=>{},getLiteralValueAtPath:()=>ve,getReturnExpressionWhenCalledAtPath:e=>1===e.length?qe(We,e[0]):Ee,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:e=>{if(1===e.length){const t=e[0];return"string"!=typeof t||!We[t]}return!0},include:()=>{},included:!0,toString:()=>"[[UNKNOWN NUMBER]]"},Oe={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:Re}},Me={value:{callsArgs:null,mutatesSelf:!0,returns:null,returnsPrimitive:Re}},Te={value:{callsArgs:[0],mutatesSelf:!1,returns:null,returnsPrimitive:Re}},De={deoptimizePath:()=>{},getLiteralValueAtPath:()=>ve,getReturnExpressionWhenCalledAtPath:e=>1===e.length?qe(Ue,e[0]):Ee,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:(e,t,n)=>1!==e.length||Fe(Ue,e[0],!0,t,n),include:()=>{},included:!0,toString:()=>"[[UNKNOWN STRING]]"},Le={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:De}};class Ve{constructor(){this.included=!1}deoptimizePath(){}getLiteralValueAtPath(){return ve}getReturnExpressionWhenCalledAtPath(e){return 1===e.length?qe(Be,e[0]):Ee}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Fe(Be,e[0],this.included,t,n)}include(){this.included=!0}toString(){return"[[UNKNOWN OBJECT]]"}}const Be=xe({hasOwnProperty:Ne,isPrototypeOf:Ne,propertyIsEnumerable:Ne,toLocaleString:Le,toString:Le,valueOf:{value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:Ee}}}),ze=xe({concat:Ie,copyWithin:we,every:$e,fill:we,filter:Pe,find:Ae,findIndex:Te,forEach:Ae,includes:Ne,indexOf:Oe,join:Le,lastIndexOf:Oe,map:Pe,pop:be,push:Me,reduce:Ae,reduceRight:Ae,reverse:we,shift:be,slice:Ie,some:$e,sort:ke,splice:we,unshift:Me},Be),je=xe({valueOf:Ne},Be),We=xe({toExponential:Le,toFixed:Le,toLocaleString:Le,toPrecision:Le,valueOf:Oe},Be),Ue=xe({charAt:Le,charCodeAt:Oe,codePointAt:Oe,concat:Le,endsWith:Ne,includes:Ne,indexOf:Oe,lastIndexOf:Oe,localeCompare:Oe,match:Ne,normalize:Le,padEnd:Le,padStart:Le,repeat:Le,replace:{value:{callsArgs:[1],mutatesSelf:!1,returns:null,returnsPrimitive:De}},search:Oe,slice:Le,split:Ie,startsWith:Ne,substr:Le,substring:Le,toLocaleLowerCase:Le,toLocaleUpperCase:Le,toLowerCase:Le,toUpperCase:Le,trim:Le,valueOf:Le},Be);function Fe(e,t,n,r,i){if("string"!=typeof t||!e[t])return!0;if(e[t].mutatesSelf&&n)return!0;if(!e[t].callsArgs)return!1;for(const n of e[t].callsArgs)if(r.args[n]&&r.args[n].hasEffectsWhenCalledAtPath(ge,fe.create({args:[],callIdentifier:{},withNew:!1}),i.getHasEffectsWhenCalledOptions()))return!0;return!1}function qe(e,t){return"string"==typeof t&&e[t]?null!==e[t].returnsPrimitive?e[t].returnsPrimitive:new e[t].returns:Ee}class Ge{constructor(e){this.exportName=null,this.included=!1,this.isId=!1,this.isReassigned=!1,this.reexported=!1,this.renderBaseName=null,this.renderName=null,this.safeExportName=null,this.name=e}addReference(e){}deoptimizePath(e){}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getLiteralValueAtPath(e,t,n){return ve}getName(){const e=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}.${e}`:e}getReturnExpressionWhenCalledAtPath(e,t,n){return Ee}hasEffectsWhenAccessedAtPath(e,t){return e.length>0}hasEffectsWhenAssignedAtPath(e,t){return!0}hasEffectsWhenCalledAtPath(e,t,n){return!0}include(){this.included=!0}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}setSafeName(e){this.renderName=e}toString(){return this.name}}class He extends Ge{constructor(e,t){super(t),this.module=e,this.isNamespace="*"===t,this.referenced=!1}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}include(){this.included||(this.included=!0,this.module.used=!0)}}He.prototype.isExternal=!0;const Ke="break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public".split(" "),Ye="Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" "),Xe=Object.create(null);Ke.concat(Ye).forEach(e=>Xe[e]=!0);const Qe=/[^$_a-zA-Z0-9]/g,Je=e=>/\d/.test(e[0]);function Ze(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(Qe,"_"),(Je(e)||Xe[e])&&(e=`_${e}`),e}const et=/^(?:\/|(?:[A-Za-z]:)?[\\|\/])/,tt=/^\.?\.\//;function nt(e){return et.test(e)}function rt(e){return tt.test(e)}function it(e){return e.replace(/\\/g,"/")}function st(e){return e.split(/(\/|\\)/).pop()}function ot(e){const t=/(\/|\\)[^\/\\]*$/.exec(e);if(!t)return".";const n=e.slice(0,-t[0].length);return n||"/"}function at(e){const t=/\.[^.]+$/.exec(st(e));return t?t[0]:""}function ht(e,t){const n=e.split(/[\/\\]/).filter(Boolean),r=t.split(/[\/\\]/).filter(Boolean);for(;n[0]&&r[0]&&n[0]===r[0];)n.shift(),r.shift();for(;"."===r[0]||".."===r[0];){".."===r.shift()&&n.pop()}for(;n.pop();)r.unshift("..");return r.join("/")}function ut(...e){let t=e.shift().split(/[\/\\]/);return e.forEach(e=>{if(nt(e))t=e.split(/[\/\\]/);else{const n=e.split(/[\/\\]/);for(;"."===n[0]||".."===n[0];){".."===n.shift()&&t.pop()}t.push.apply(t,n)}}),t.join("/")}class ct{constructor(e,t,n){this.exportsNames=!1,this.exportsNamespace=!1,this.isExternal=!0,this.mostCommonSuggestion=0,this.reexported=!1,this.renderPath=void 0,this.renormalizeRenderPath=!1,this.used=!1,this.graph=e,this.id=t,this.execIndex=1/0,this.moduleSideEffects=n;const r=t.split(/[\\\/]/);this.variableName=Ze(r.pop()),this.nameSuggestions=Object.create(null),this.declarations=Object.create(null),this.exportedVariables=new Map}getVariableForExportName(e,t){"default"!==e&&"*"!==e&&(this.exportsNames=!0),"*"===e&&(this.exportsNamespace=!0);let n=this.declarations[e];return n||(this.declarations[e]=n=new He(this,e),this.exportedVariables.set(n,e),n)}setRenderPath(e,t){return this.renderPath="",e.paths&&(this.renderPath="function"==typeof e.paths?e.paths(this.id):e.paths[this.id]),this.renderPath||(nt(this.id)?(this.renderPath=it(ht(t,this.id)),this.renormalizeRenderPath=!0):this.renderPath=this.id),this.renderPath}suggestName(e){this.nameSuggestions[e]||(this.nameSuggestions[e]=0),this.nameSuggestions[e]+=1,this.nameSuggestions[e]>this.mostCommonSuggestion&&(this.mostCommonSuggestion=this.nameSuggestions[e],this.variableName=e)}warnUnusedImports(){const e=Object.keys(this.declarations).filter(e=>{if("*"===e)return!1;const t=this.declarations[e];return!t.included&&!this.reexported&&!t.referenced});if(0===e.length)return;const t=1===e.length?`'${e[0]}' is`:`${e.slice(0,-1).map(e=>`'${e}'`).join(", ")} and '${e.slice(-1)}' are`;this.graph.warn({code:"UNUSED_EXTERNAL_IMPORT",message:`${t} imported from external module '${this.id}' but never used`,names:e,source:this.id})}}function lt(e){e.isExecuted=!0;const t=[e],n={};for(const e of t)for(const r of e.dependencies)r instanceof ct||r.isExecuted||!r.moduleSideEffects||n[r.id]||(r.isExecuted=!0,n[r.id]=!0,t.push(r))}const pt=7;class dt extends Ge{constructor(e,t,n,r){super(e),this.additionalInitializers=null,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.init=n,this.deoptimizationTracker=r.deoptimizationTracker,this.module=r.module}addDeclaration(e,t){this.declarations.push(e),null===this.additionalInitializers&&(this.additionalInitializers=null===this.init?[]:[this.init],this.init=Ee,this.isReassigned=!0),null!==t&&this.additionalInitializers.push(t)}consolidateInitializers(){if(null!==this.additionalInitializers){for(const e of this.additionalInitializers)e.deoptimizePath(ye);this.additionalInitializers=null}}deoptimizePath(e){if(!(e.length>pt||this.isReassigned||this.deoptimizationTracker.track(this,e)))if(0===e.length){if(!this.isReassigned){this.isReassigned=!0;for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache();this.init&&this.init.deoptimizePath(ye)}}else this.init&&this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.isReassigned||!this.init||e.length>pt||t.isTracked(this.init,e)?ve:(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath(e,t.track(this.init,e),n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isReassigned||!this.init||e.length>pt||t.isTracked(this.init,e)?Ee:(this.expressionsToBeDeoptimized.push(n),this.init.getReturnExpressionWhenCalledAtPath(e,t.track(this.init,e),n))}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(this.isReassigned||e.length>pt||this.init&&!t.hasNodeBeenAccessedAtPath(e,this.init)&&this.init.hasEffectsWhenAccessedAtPath(e,t.addAccessedNodeAtPath(e,this.init)))}hasEffectsWhenAssignedAtPath(e,t){return!!(this.included||e.length>pt)||0!==e.length&&(this.isReassigned||this.init&&!t.hasNodeBeenAssignedAtPath(e,this.init)&&this.init.hasEffectsWhenAssignedAtPath(e,t.addAssignedNodeAtPath(e,this.init)))}hasEffectsWhenCalledAtPath(e,t,n){return e.length>pt||(this.isReassigned||this.init&&!n.hasNodeBeenCalledAtPathWithOptions(e,this.init,t)&&this.init.hasEffectsWhenCalledAtPath(e,t,n.addCalledNodeAtPathWithOptions(e,this.init,t)))}include(){if(!this.included){this.included=!0,this.module.isExecuted||lt(this.module);for(const e of this.declarations){e.included||e.include(!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==ue);)t=t.parent}}}}dt.prototype.isLocal=!0;class ft extends dt{constructor(e,t,n){super(e,t,t.declaration,n),this.originalId=null;const r=t.declaration;r.type!==ne&&r.type!==J||!r.id?r.type===ie&&(this.originalId=r):(this.hasId=!0,this.originalId=r.id)}addReference(e){this.hasId||(this.name=e.name)}getName(){return this.referencesOriginal()?this.originalId.variable.getName():super.getName()}getOriginalVariable(){return this.originalId&&this.originalId.variable||null}getOriginalVariableName(){return this.originalId&&this.originalId.name||null}referencesOriginal(){return this.originalId&&(this.hasId||!this.originalId.variable.isReassigned)}setRenderNames(e,t){this.referencesOriginal()?this.originalId.variable.setRenderNames(e,t):super.setRenderNames(e,t)}setSafeName(e){this.referencesOriginal()?this.originalId.variable.setSafeName(e):super.setSafeName(e)}}ft.prototype.getBaseVariableName=ft.prototype.getName,ft.prototype.isDefault=!0;const mt="_missingExportShim",gt="_interopDefault";class yt extends Ge{constructor(e){super(mt),this.module=e}}const xt={},vt="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),Et="Int8x16 Int16x8 Int32x4 Float32x4 Float64x2".split(" "),_t="abs add and bool check div equal extractLane fromFloat32x4 fromFloat32x4Bits fromFloat64x2 fromFloat64x2Bits fromInt16x8Bits fromInt32x4 fromInt32x4Bits fromInt8x16Bits greaterThan greaterThanOrEqual lessThan lessThanOrEqual load max maxNum min minNum mul neg not notEqual or reciprocalApproximation reciprocalSqrtApproximation replaceLane select selectBits shiftLeftByScalar shiftRightArithmeticByScalar shiftRightLogicalByScalar shuffle splat sqrt store sub swizzle xor".split(" "),bt=[];Et.forEach(e=>{_t.forEach(t=>{bt.push(`SIMD.${e}.${t}`)})}),["Array.isArray","Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","Object","Object.create","Object.getNotifier","Object.getOwn","Object.getOwnPropertyDescriptor","Object.getOwnPropertyNames","Object.getOwnPropertySymbols","Object.getPrototypeOf","Object.is","Object.isExtensible","Object.isFrozen","Object.isSealed","Object.keys","Boolean","Number","Number.isFinite","Number.isInteger","Number.isNaN","Number.isSafeInteger","Number.parseFloat","Number.parseInt","Symbol","Symbol.for","Symbol.keyFor","Math.abs","Math.acos","Math.acosh","Math.asin","Math.asinh","Math.atan","Math.atan2","Math.atanh","Math.cbrt","Math.ceil","Math.clz32","Math.cos","Math.cosh","Math.exp","Math.expm1","Math.floor","Math.fround","Math.hypot","Math.imul","Math.log","Math.log10","Math.log1p","Math.log2","Math.max","Math.min","Math.pow","Math.random","Math.round","Math.sign","Math.sin","Math.sinh","Math.sqrt","Math.tan","Math.tanh","Math.trunc","Date","Date.UTC","Date.now","Date.parse","String","String.fromCharCode","String.fromCodePoint","String.raw","RegExp","Map","Set","WeakMap","WeakSet","ArrayBuffer","ArrayBuffer.isView","DataView","Promise.all","Promise.race","Promise.resolve","Intl.Collator","Intl.Collator.supportedLocalesOf","Intl.DateTimeFormat","Intl.DateTimeFormat.supportedLocalesOf","Intl.NumberFormat","Intl.NumberFormat.supportedLocalesOf"].concat(vt,vt.map(e=>`${e}.from`),vt.map(e=>`${e}.of`),Et.map(e=>`SIMD.${e}`),bt).forEach(e=>xt[e]=!0);class At extends Ge{hasEffectsWhenAccessedAtPath(e){return e.length>0&&!this.isPureFunctionMember(e)&&!("Reflect"===this.name&&1===e.length)}hasEffectsWhenCalledAtPath(e){return!xt[[this.name,...e].join(".")]}isPureFunctionMember(e){return xt[[this.name,...e].join(".")]||e.length>=1&&xt[[this.name,...e.slice(0,-1)].join(".")]||e.length>=2&&xt[[this.name,...e.slice(0,-2)].join(".")]&&"prototype"===e[e.length-2]}}const St=Object.assign(Object.create(null),{await:!0,break:!0,case:!0,catch:!0,class:!0,const:!0,continue:!0,debugger:!0,default:!0,delete:!0,do:!0,else:!0,enum:!0,eval:!0,export:!0,extends:!0,false:!0,finally:!0,for:!0,function:!0,if:!0,implements:!0,import:!0,in:!0,instanceof:!0,interface:!0,let:!0,new:!0,null:!0,package:!0,private:!0,protected:!0,public:!0,return:!0,static:!0,super:!0,switch:!0,this:!0,throw:!0,true:!0,try:!0,typeof:!0,undefined:!0,var:!0,void:!0,while:!0,with:!0,yield:!0}),It={},wt={exports:!0},Pt={amd:{formatGlobals:wt,forbiddenNames:St},cjs:{forbiddenNames:St,formatGlobals:{exports:!0,module:!0,[gt]:!0}},es:{formatGlobals:It,forbiddenNames:St},iife:{formatGlobals:wt,forbiddenNames:St},system:{forbiddenNames:Object.assign(Object.create(null),St,wt),formatGlobals:It},umd:{formatGlobals:wt,forbiddenNames:St}};class kt extends Ge{constructor(e){super(e.getModuleName()),this.memberVariables=Object.create(null),this.containsExternalNamespace=!1,this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module;for(const e of this.context.getExports().concat(this.context.getReexports()))"*"===e[0]&&e.length>1&&(this.containsExternalNamespace=!0),this.memberVariables[e]=this.context.traceExport(e)}addReference(e){this.references.push(e),this.name=e.name}deoptimizePath(){for(const e in this.memberVariables)this.memberVariables[e].deoptimizePath(ye)}include(){if(!this.included){this.containsExternalNamespace&&this.context.error({code:"NAMESPACE_CANNOT_CONTAIN_EXTERNAL",id:this.module.id,message:`Cannot create an explicit namespace object for module "${this.context.getModuleName()}" because it contains a reexported external namespace`},void 0),this.included=!0;for(const e of this.references)if(e.context.getModuleExecIndex()<=this.context.getModuleExecIndex()){this.referencedEarly=!0;break}if(this.context.preserveModules)for(const e of Object.keys(this.memberVariables))this.memberVariables[e].include();else for(const e of Object.keys(this.memberVariables))this.context.includeVariable(this.memberVariables[e])}}renderBlock(e){const t=e.compact?"":" ",n=e.compact?"":"\n",r=e.indent,i=Object.keys(this.memberVariables).map(n=>{const i=this.memberVariables[n];if(this.referencedEarly||i.isReassigned)return`${r}get ${n}${t}()${t}{${t}return ${i.getName()}${e.compact?"":";"}${t}}`;const s=St[n]?`'${n}'`:n;return`${r}${s}: ${i.getName()}`}),s=this.getName(),o=e.freeze?"/*#__PURE__*/Object.freeze":"";let a=`${e.varOrConst} ${s} = ${e.namespaceToStringTag?`{${n}${i.join(`,${n}`)}${n}};`:`${o}({${n}${i.join(`,${n}`)}${n}});`}`;return e.namespaceToStringTag&&(a+=`${n}if${t}(typeof Symbol${t}!==${t}'undefined'${t}&&${t}Symbol.toStringTag)${n}`,a+=`${r}Object.defineProperty(${s},${t}Symbol.toStringTag,${t}{${t}value:${t}'Module'${t}});${n}`,a+=`else${n||" "}`,a+=`${r}Object.defineProperty(${s},${t}'toString',${t}{${t}value:${t}function${t}()${t}{${t}return${t}'[object Module]'${e.compact?";":""}${t}}${t}});${n}`,a+=`${o}(${s});`),"system"===e.format&&this.exportName&&(a+=`${n}exports('${this.exportName}',${t}${s});`),a}renderFirst(){return this.referencedEarly}}kt.prototype.isNamespace=!0;const Ct="Object.defineProperty(exports, '__esModule', { value: true });",Nt="Object.defineProperty(exports,'__esModule',{value:true});";function $t(e,t,n,r,i,s,o="return "){const a=i?"":" ",h=i?"":"\n";if(!n){let n;return e.some(e=>"default"===e.exported&&(n=e.local,!0)),n||t.some(e=>!!e.reexports&&e.reexports.some(t=>"default"===t.reexported&&(n=e.namedExportsMode?`${e.name}.${t.imported}`:e.name,!0))),`${o}${n};`}let u="";return t.forEach(({name:e,reexports:t})=>{t&&n&&t.forEach(t=>{"*"===t.reexported&&(!i&&u&&(u+="\n"),u+=`Object.keys(${e}).forEach(function${a}(key)${a}{${h}`+`${s}Object.defineProperty(exports,${a}key,${a}{${h}`+`${s}${s}enumerable:${a}true,${h}`+`${s}${s}get:${a}function${a}()${a}{${h}`+`${s}${s}${s}return ${e}[key];${h}`+`${s}${s}}${h}${s}});${h}});`)})}),t.forEach(({name:e,imports:t,reexports:o,isChunk:c,namedExportsMode:l})=>{o&&n&&o.forEach(n=>{if("default"!==n.imported||c)if("*"!==n.imported){u&&!i&&(u+="\n");const t="default"!==n.imported||l?`${e}.${n.imported}`:e;u+=n.needsLiveBinding?`Object.defineProperty(exports,${a}'${n.reexported}',${a}{${h}`+`${s}enumerable:${a}true,${h}`+`${s}get:${a}function${a}()${a}{${h}`+`${s}${s}return ${t};${h}${s}}${h}});`:`exports.${n.reexported}${a}=${a}${t};`}else"*"!==n.reexported&&(u&&!i&&(u+="\n"),u+=`exports.${n.reexported}${a}=${a}${e};`);else{const s=t&&t.some(e=>"default"!==e.imported)||o&&o.some(e=>"default"!==e.imported&&"*"!==e.imported),h=o&&o.some(e=>"default"===e.imported&&"default"===e.reexported);u&&!i&&(u+="\n"),u+=s||h?`exports.${n.reexported}${a}=${a}${e}${!1!==r?"__default":".default"};`:`exports.${n.reexported}${a}=${a}${e};`}})}),e.forEach(e=>{const t=`exports.${e.exported}`,n=e.local;t!==n&&(u&&!i&&(u+="\n"),u+=`${t}${a}=${a}${n};`)}),u}function Rt(e,t,n){return e.map(({name:e,exportsNames:r,exportsDefault:i,namedExportsMode:s})=>{if(s)return i&&!1!==t.interop?r?t.compact?`${n} ${e}__default='default'in ${e}?${e}['default']:${e};`:`${n} ${e}__default = 'default' in ${e} ? ${e}['default'] : ${e};`:t.compact?`${e}=${e}&&${e}.hasOwnProperty('default')?${e}['default']:${e};`:`${e} = ${e} && ${e}.hasOwnProperty('default') ? ${e}['default'] : ${e};`:null}).filter(Boolean).join(t.compact?"":"\n")}const Ot={assert:!0,buffer:!0,console:!0,constants:!0,domain:!0,events:!0,http:!0,https:!0,os:!0,path:!0,process:!0,punycode:!0,querystring:!0,stream:!0,string_decoder:!0,timers:!0,tty:!0,url:!0,util:!0,vm:!0,zlib:!0};function Mt(e,t){const n=t.map(({id:e})=>e).filter(e=>e in Ot);n.length&&e({code:"MISSING_NODE_BUILTINS",message:`Creating a browser bundle that depends on Node.js built-in ${1===n.length?`module ('${n[0]}')`:`modules (${n.slice(0,-1).map(e=>`'${e}'`).join(", ")} and '${n.slice(-1)}')`}. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins`,modules:n})}function Tt(e,t,n){if("number"==typeof n)throw new Error("locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument");return function(e,t){void 0===t&&(t={});var n=t.offsetLine||0,r=t.offsetColumn||0,i=e.split("\n"),s=0,o=i.map(function(e,t){var n=s+e.length+1,r={start:s,end:n,line:t};return s=n,r}),a=0;function h(e,t){return e.start<=t&&t<e.end}function u(e,t){return{line:n+e.line,column:r+t-e.start,character:t}}return function(t,n){"string"==typeof t&&(t=e.indexOf(t,n||0));for(var r=o[a],i=t>=r.end?1:-1;r;){if(h(r,t))return u(r,t);r=o[a+=i]}}}(e,n)(t,n&&n.startIndex)}function Dt(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}function Lt(e,t,n){let r=e.split("\n");const i=Math.max(0,t-3);let s=Math.min(t+2,r.length);for(r=r.slice(i,s);!/\S/.test(r[r.length-1]);)r.pop(),s-=1;const o=String(s).length;return r.map((e,r)=>{const s=i+r+1===t;let a=String(r+i+1);for(;a.length<o;)a=` ${a}`;if(s){const t=function(e){let t="";for(;e--;)t+=" ";return t}(o+2+Dt(e.slice(0,n)).length)+"^";return`${a}: ${Dt(e)}\n${t}`}return`${a}: ${Dt(e)}`}).join("\n")}function Vt(e){const t=st(e);return t.substr(0,t.length-at(e).length)}function Bt(e){return"undefined"!=typeof process&&nt(e)?ht(process.cwd(),e):e}function zt(e){return!("/"===e[0]||"."===e[1]&&("/"===e[2]||"."===e[2]&&"/"===e[3]))}function jt(e,t){throw e instanceof Error==!1&&(e=Object.assign(new Error(e.message),e)),t&&Object.assign(e,t),e}function Wt(e,t,n,r){if(void 0!==t.line&&void 0!==t.column){const{line:n,column:i}=t;e.loc={file:r,line:n,column:i}}else{e.pos=t;const{line:i,column:s}=Tt(n,t,{offsetLine:1});e.loc={file:r,line:i,column:s}}if(void 0===e.frame){const{line:t,column:r}=e.loc;e.frame=Lt(n,t,r)}}var Ut;function Ft(e,t,n){return{code:Ut.INVALID_CHUNK,message:`Cannot assign ${Bt(e)} to the "${t}" chunk as it is already in the "${n}" chunk.`}}function qt(e,t,n){return{code:Ut.NAMESPACE_CONFLICT,message:`Conflicting namespaces: ${Bt(t.id)} re-exports '${e}' from both ${Bt(t.exportsAll[e])} and ${Bt(n.exportsAll[e])} (will be ignored)`,name:e,reexporter:t.id,sources:[t.exportsAll[e],n.exportsAll[e]]}}!function(e){e.ASSET_NOT_FINALISED="ASSET_NOT_FINALISED",e.ASSET_NOT_FOUND="ASSET_NOT_FOUND",e.ASSET_SOURCE_ALREADY_SET="ASSET_SOURCE_ALREADY_SET",e.ASSET_SOURCE_MISSING="ASSET_SOURCE_MISSING",e.BAD_LOADER="BAD_LOADER",e.CHUNK_NOT_FOUND="CHUNK_NOT_FOUND",e.CHUNK_NOT_GENERATED="CHUNK_NOT_GENERATED",e.INVALID_ASSET_NAME="INVALID_ASSET_NAME",e.INVALID_CHUNK="INVALID_CHUNK",e.INVALID_EXTERNAL_ID="INVALID_EXTERNAL_ID",e.INVALID_OPTION="INVALID_OPTION",e.INVALID_PLUGIN_HOOK="INVALID_PLUGIN_HOOK",e.INVALID_ROLLUP_PHASE="INVALID_ROLLUP_PHASE",e.NAMESPACE_CONFLICT="NAMESPACE_CONFLICT",e.UNRESOLVED_ENTRY="UNRESOLVED_ENTRY",e.UNRESOLVED_IMPORT="UNRESOLVED_IMPORT"}(Ut||(Ut={}));const Gt=/^[a-zA-Z$_][a-zA-Z0-9$_]*$/;function Ht(e){return Gt.test(e)?`.${e}`:`['${e}']`}function Kt(e){return e.split(".").map(Ht).join("")}function Yt(e,t,n,r,i){const s=r?"":" ",o=e.split(".");n&&(o[0]=("function"==typeof n?n(o[0]):n[o[0]])||o[0]);const a=o.pop();let h=t,u=o.map(e=>(h+=Ht(e),`${h}${s}=${s}${h}${s}||${s}{}`)).concat(`${h}${Ht(a)}`).join(`,${s}`).concat(`${s}=${s}${i}`);return o.length>0&&(u=`(${u})`),u}function Xt(e){let t=e.length;for(;t--;){const n=e[t];if(n.exportsDefault||n.exportsNames)return e.slice(0,t+1)}return[]}const Qt=e=>`this${Kt(e)}`;const Jt=(e,t,n,r,i)=>e?`${i}${r}${t} _starExcludes${n}=${n}{${n}${Array.from(e).join(`:${n}1,${n}`)}${e.size?`:${n}1`:""}${n}};`:"",Zt=(e,t,n,r)=>e.length?`${r}${n}var ${e.join(`,${t}`)};`:"";function en(e,t,n,r){return 0===e.length?"":1===e.length?`${n}${n}${n}exports('${e[0].name}',${t}${e[0].value});${r}${r}`:`${n}${n}${n}exports({${r}`+e.map(({name:e,value:r})=>`${n}${n}${n}${n}${e}:${t}${r}`).join(`,${r}`)+`${r}${n}${n}${n}});${r}${r}`}const tn=(e,t,n,r)=>en(e.filter(e=>e.hoisted||e.uninitialized).map(e=>({name:e.exported,value:e.uninitialized?"void 0":e.local})),t,n,r),nn=(e,t,n,r)=>en(e.filter(e=>e.local===mt).map(e=>({name:e.exported,value:mt})),t,n,r);function rn(e,t){return e?`${t}${Kt(e)}`:"null"}var sn={system:function(e,{dependencies:t,exports:n,indentString:r,intro:i,outro:s,usesTopLevelAwait:o,varOrConst:a},h){const u=h.compact?"":"\n",c=h.compact?"":" ",l=t.map(e=>`'${e.id}'`),p=[];let d;const f=[];t.forEach(({imports:e,reexports:i})=>{const s=[];if(e&&e.forEach(e=>{p.push(e.local),"*"===e.imported?s.push(`${e.local}${c}=${c}module;`):s.push(`${e.local}${c}=${c}module.${e.imported};`)}),i){let e=!1;i.length>1||1===i.length&&("*"===i[0].reexported||"*"===i[0].imported)?(i.forEach(i=>{"*"===i.reexported&&(d||(d=function({dependencies:e,exports:t}){const n=new Set(t.map(e=>e.exported));return n.has("default")||n.add("default"),e.forEach(({reexports:e})=>{e&&e.forEach(e=>{"*"===e.imported||n.has(e.reexported)||n.add(e.reexported)})}),n}({dependencies:t,exports:n})),e||(s.push(`${a} _setter${c}=${c}{};`),e=!0),s.push(`for${c}(var _$p${c}in${c}module)${c}{`),s.push(`${r}if${c}(!_starExcludes[_$p])${c}_setter[_$p]${c}=${c}module[_$p];`),s.push("}"))}),i.forEach(e=>{"*"===e.imported&&"*"!==e.reexported&&s.push(`exports('${e.reexported}',${c}module);`)}),i.forEach(t=>{"*"!==t.reexported&&"*"!==t.imported&&(e||(s.push(`${a} _setter${c}=${c}{};`),e=!0),s.push(`_setter.${t.reexported}${c}=${c}module.${t.imported};`))}),e&&s.push("exports(_setter);")):i.forEach(e=>{s.push(`exports('${e.reexported}',${c}module.${e.imported});`)})}f.push(s.join(`${u}${r}${r}${r}`))});let m=`System.register(${h.name?`'${h.name}',${c}`:""}[`+l.join(`,${c}`)+`],${c}function${c}(exports,${c}module)${c}{${u}${r}'use strict';`+Jt(d,a,c,r,u)+Zt(p,c,r,u)+`${u}${r}return${c}{${f.length?`${u}${r}${r}setters:${c}[${f.map(e=>e?`function${c}(module)${c}{${u}${r}${r}${r}${e}${u}${r}${r}}`:`function${c}()${c}{}`).join(`,${c}`)}],`:""}${u}`;m+=`${r}${r}execute:${c}${o?`async${c}`:""}function${c}()${c}{${u}${u}`+tn(n,c,r,u);const g=`${u}${u}`+nn(n,c,r,u)+`${r}${r}}${u}${r}}${h.compact?"":";"}${u}});`;return i&&e.prepend(i),s&&e.append(s),e.indent(`${r}${r}${r}`).append(g).prepend(m)},amd:function(e,{dependencies:t,dynamicImport:n,exports:r,hasExports:i,indentString:s,intro:o,isEntryModuleFacade:a,namedExportsMode:h,needsAmdModule:u,outro:c,varOrConst:l,warn:p},d){Mt(p,t);const f=t.map(e=>`'${function(e){return"."===e[0]&&e.endsWith(".js")?e.slice(0,-3):e}(e.id)}'`),m=t.map(e=>e.name),g=d.compact?"":"\n",y=d.compact?"":" ";h&&i&&(m.unshift("exports"),f.unshift("'exports'")),n&&(m.unshift("require"),f.unshift("'require'")),u&&(m.unshift("module"),f.unshift("'module'"));const x=d.amd||{},v=(x.id?`'${x.id}',${y}`:"")+(f.length?`[${f.join(`,${y}`)}],${y}`:""),E=!1!==d.strict?`${y}'use strict';`:"",_=`${x.define||"define"}(${v}function${y}(${m.join(`,${y}`)})${y}{${E}${g}${g}`,b=Rt(t,d,l);b&&e.prepend(b+g+g),o&&e.prepend(o);const A=$t(r,t,h,d.interop,d.compact,s);return A&&e.append(g+g+A),h&&i&&a&&d.esModule&&e.append(`${g}${g}${d.compact?Nt:Ct}`),c&&e.append(c),e.indent(s).append(g+g+"});").prepend(_)},cjs:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,isEntryModuleFacade:o,namedExportsMode:a,outro:h,varOrConst:u},c){const l=c.compact?"":"\n",p=c.compact?"":" ";s=(!1===c.strict?s:`'use strict';${l}${l}${s}`)+(a&&r&&o&&c.esModule?`${c.compact?Nt:Ct}${l}${l}`:"");let d=!1;const f=!1!==c.interop;let m,g=!1;m="";for(const{id:e,namedExportsMode:n,isChunk:r,name:i,reexports:s,imports:o,exportsNames:a,exportsDefault:h}of t)s||o?(m+=c.compact&&g?",":`${m?`;${l}`:""}${u} `,g=!0,f&&!r&&h&&n?(d=!0,m+=a?`${i}${p}=${p}require('${e}')${c.compact?",":`;\n${u} `}${i}__default${p}=${p}${gt}(${i})`:`${i}${p}=${p}${gt}(require('${e}'))`):m+=`${i}${p}=${p}require('${e}')`):(m&&(m+=!c.compact||g?`;${l}`:","),g=!1,m+=`require('${e}')`);if(m&&(m+=";"),d){const e=c.compact?"e":"ex";s+=`function ${gt}${p}(${e})${p}{${p}return${p}`+`(${e}${p}&&${p}(typeof ${e}${p}===${p}'object')${p}&&${p}'default'${p}in ${e})${p}`+`?${p}${e}['default']${p}:${p}${e}${c.compact?"":"; "}}${l}${l}`}m&&(s+=m+l+l);const y=$t(n,t,a,c.interop,c.compact,i,`module.exports${p}=${p}`);return e.prepend(s),y&&e.append(l+l+y),h&&e.append(h),e},es:function(e,{intro:t,outro:n,dependencies:r,exports:i},s){const o=s.compact?"":" ",a=s.compact?"":"\n",h=r.map(({id:e,reexports:t,imports:n,name:r})=>{if(!t&&!n)return`import${o}'${e}';`;let i="";if(n){const t=n.find(e=>"default"===e.imported),r=n.find(e=>"*"===e.imported);r&&(i+=`import${o}*${o}as ${r.local} from${o}'${e}';`,n.length>1&&(i+=a)),t&&1===n.length?i+=`import ${t.local} from${o}'${e}';`:(!r||n.length>1)&&(i+=`import ${t?`${t.local},${o}`:""}{${o}${n.filter(e=>e!==t&&e!==r).map(e=>e.imported===e.local?e.imported:`${e.imported} as ${e.local}`).join(`,${o}`)}${o}}${o}from${o}'${e}';`)}if(t){n&&(i+=a);const s=t.find(e=>"*"===e.reexported),h=t.find(e=>"*"===e.imported&&"*"!==e.reexported);if(s){if(i+=`export${o}*${o}from${o}'${e}';`,1===t.length)return i;i+=a}if(h){if(n&&n.some(e=>"*"===e.imported&&e.local===r)||(i+=`import${o}*${o}as ${r} from${o}'${e}';${a}`),i+=`export${o}{${o}${r===h.reexported?r:`${r} as ${h.reexported}`} };`,t.length===(s?2:1))return i;i+=a}i+=`export${o}{${o}${t.filter(e=>e!==s&&e!==h).map(e=>e.imported===e.reexported?e.imported:`${e.imported} as ${e.reexported}`).join(`,${o}`)}${o}}${o}from${o}'${e}';`}return i}).join(a);h&&(t+=h+a+a),t&&e.prepend(t);const u=[],c=[];return i.forEach(e=>{"default"===e.exported?u.push(`export default ${e.local};`):c.push(e.exported===e.local?e.local:`${e.local} as ${e.exported}`)}),c.length&&u.push(`export${o}{${o}${c.join(`,${o}`)}${o}};`),u.length&&e.append(a+a+u.join(a).trim()),n&&e.append(n),e.trim()},iife:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,namedExportsMode:o,outro:a,varOrConst:h,warn:u},c){const l=c.compact?"":" ",p=c.compact?"":"\n",{extend:d,name:f}=c,m=f&&-1!==f.indexOf("."),g=!d&&!m;var y;f&&g&&(Je(y=f)||Xe[y]||Qe.test(y))&&jt({code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name (${f}) is not legal JS identifier. If you need this you can try --extend option`}),Mt(u,t);const x=Xt(t),v=x.map(e=>e.globalName||"null"),E=x.map(e=>e.name);r&&!f&&jt({code:"INVALID_OPTION",message:'You must supply "output.name" for IIFE bundles.'}),o&&r&&(d?(v.unshift(`${Qt(f)}${l}=${l}${Qt(f)}${l}||${l}{}`),E.unshift("exports")):(v.unshift("{}"),E.unshift("exports")));const _=!1!==c.strict?`${i}'use strict';${p}${p}`:"";let b=`(function${l}(${E.join(`,${l}`)})${l}{${p}${_}`;!r||d&&o||(b=(g?`${h} ${f}`:Qt(f))+`${l}=${l}${b}`),m&&r&&(b=function(e,t,n,r){const i=e.split(".");n&&(i[0]=("function"==typeof n?n(i[0]):n[i[0]])||i[0]);const s=r?"":" ";i.pop();let o=t;return i.map(e=>(o+=Ht(e),`${o}${s}=${s}${o}${s}||${s}{}${r?"":";"}`)).join(r?",":"\n")+(r&&i.length?";":"\n")}(f,"this",c.globals,c.compact)+b);let A=`${p}${p}}(${v.join(`,${l}`)}));`;!d&&o&&r&&(A=`${p}${p}${i}return exports;${A}`);const S=Rt(t,c,h);S&&e.prepend(S+p+p),s&&e.prepend(s);const I=$t(n,t,o,c.interop,c.compact,i);return I&&e.append(p+p+I),a&&e.append(a),e.indent(i).prepend(b).append(A)},umd:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,namedExportsMode:o,outro:a,varOrConst:h,warn:u},c){const l=c.compact?"":" ",p=c.compact?"":"\n",d=c.compact?"f":"factory",f=c.compact?"g":"global";r&&!c.name&&jt({code:"INVALID_OPTION",message:'You must supply "output.name" for UMD bundles.'}),Mt(u,t);const m=t.map(e=>`'${e.id}'`),g=t.map(e=>`require('${e.id}')`),y=Xt(t),x=y.map(e=>rn(e.globalName,f)),v=y.map(e=>e.name);o&&(r||!0===c.noConflict)&&(m.unshift("'exports'"),g.unshift("exports"),x.unshift(Yt(c.name,f,c.globals,c.compact,`${c.extend?`${rn(c.name,f)}${l}||${l}`:""}{}`)),v.unshift("exports"));const E=c.amd||{},_=(E.id?`'${E.id}',${l}`:"")+(m.length?`[${m.join(`,${l}`)}],${l}`:""),b=E.define||"define",A=!o&&r?`module.exports${l}=${l}`:"",S=!1!==c.strict?`${l}'use strict';${p}`:"";let I;if(!0===c.noConflict){const e=c.compact?"e":"exports";let t;!o&&r?t=`var ${e}${l}=${l}${Yt(c.name,f,c.globals,c.compact,`${d}(${x.join(`,${l}`)})`)};`:o&&(t=`var ${e}${l}=${l}${x.shift()};${p}`+`${i}${i}${d}(${[e].concat(x).join(`,${l}`)});`),I=`(function${l}()${l}{${p}`+`${i}${i}var current${l}=${l}${function(e,t,n){const r=e.split(".");let i=t;return r.map(e=>(i+=Ht(e),i)).join(`${n}&&${n}`)}(c.name,f,l)};${p}`+`${i}${i}${t}${p}`+`${i}${i}${e}.noConflict${l}=${l}function${l}()${l}{${l}`+`${rn(c.name,f)}${l}=${l}current;${l}return ${e}${c.compact?"":"; "}};${p}`+`${i}}())`}else I=`${d}(${x.join(`,${l}`)})`,!o&&r&&(I=Yt(c.name,f,c.globals,c.compact,I));const w=r||!0===c.noConflict&&o||x.length>0,P=w?`this,${l}`:"",k=w?`(${f}${l}=${l}${f}${l}||${l}self,${l}`:"",C=w?")":"",N=`(function${l}(${w?`${f},${l}`:""}${d})${l}{${p}`+(w?`${i}typeof exports${l}===${l}'object'${l}&&${l}typeof module${l}!==${l}'undefined'${l}?`+`${l}${A}${d}(${g.join(`,${l}`)})${l}:${p}`:"")+`${i}typeof ${b}${l}===${l}'function'${l}&&${l}${b}.amd${l}?${l}${b}(${_}${d})${l}:${p}`+`${i}${k}${I}${C};${p}`+`}(${P}function${l}(${v.join(", ")})${l}{${S}${p}`,$=p+p+"}));",R=Rt(t,c,h);R&&e.prepend(R+p+p),s&&e.prepend(s);const O=$t(n,t,o,c.interop,c.compact,i);return O&&e.append(p+p+O),o&&r&&c.esModule&&e.append(p+p+(c.compact?Nt:Ct)),a&&e.append(a),e.trim().indent(i).append($).prepend(N)}};const on={ArrayPattern(e,t){for(const n of t.elements)n&&on[n.type](e,n)},AssignmentPattern(e,t){on[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const n of t.properties)"RestElement"===n.type?on.RestElement(e,n):on[n.value.type](e,n.value)},RestElement(e,t){on[t.argument.type](e,t.argument)}},an=function(e){const t=[];return on[e.type](t,e),t},hn=Object.create(null);function un(e,t,n,r){if(t.remove(n,r),e.annotations)for(const r of e.annotations){if(!(r.start<n))return;t.remove(r.start,r.end)}}function cn(e,t){if(e.annotations||e.parent.type!==te||(e=e.parent),e.annotations)for(const n of e.annotations)t.remove(n.start,n.end)}const ln={isNoStatement:!0};function pn(e,t,n=0){let r,i;for(r=e.indexOf(t,n);;){if(-1===(n=e.indexOf("/",n))||n>r)return r;if(i=e.charCodeAt(++n),++n,47===i){if(0===(n=e.indexOf("\n",n)+1))return-1;n>r&&(r=e.indexOf(t,n))}else 42===i&&(n=e.indexOf("*/",n)+2)>r&&(r=e.indexOf(t,n))}}function dn(e,t=0){let n,r;for(n=e.indexOf("\n",t);;){if(-1===(t=e.indexOf("/",t))||t>n)return n;if(47===(r=e.charCodeAt(++t)))return n;++t,42===r&&(t=e.indexOf("*/",t)+2)>n&&(n=e.indexOf("\n",t))}}function fn(e,t,n,r,i){if(0===e.length)return;let s,o,a,h,u=e[0],c=!u.included||u.needsBoundaries;c&&(h=n+dn(t.original.slice(n,u.start))+1);for(let n=1;n<=e.length;n++)s=u,o=h,a=c,c=void 0!==(u=e[n])&&(!u.included||u.needsBoundaries),a||c?(h=s.end+dn(t.original.slice(s.end,void 0===u?r:u.start))+1,s.included?a?s.render(t,i,{end:h,start:o}):s.render(t,i):un(s,t,o,h)):s.render(t,i)}function mn(e,t,n,r){const i=[];let s,o,a,h,u,c=n-1;for(let r=0;r<e.length;r++){for(o=e[r],void 0!==s&&(c=s.end+pn(t.original.slice(s.end,o.start),",")),a=h=c+2+dn(t.original.slice(c+1,o.start));32===(u=t.original.charCodeAt(a))||9===u||10===u||13===u;)a++;void 0!==s&&i.push({contentEnd:h,end:a,node:s,separator:c,start:n}),s=o,n=a}return i.push({contentEnd:r,end:r,node:s,separator:null,start:n}),i}const gn="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",yn=64;function xn(e){let t="";do{const n=e%yn;e=Math.floor(e/yn),t=gn[n]+t}while(0!==e);return t}function vn(e,t){let n=e,r=1;for(;t[n];)n=`${e}$${xn(r++)}`;return t[n]=!0,n}class En{constructor(){this.children=[],this.variables=Object.create(null)}addDeclaration(e,t,n=null,r){const i=e.name;return this.variables[i]?this.variables[i].addDeclaration(e,n):this.variables[i]=new dt(e.name,e,n||_e,t),this.variables[i]}contains(e){return e in this.variables}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class _n extends En{constructor(e){super(),this.accessedOutsideVariables=Object.create(null),this.parent=e,e.children.push(this)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables[e]=t,this.parent instanceof _n&&this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof _n&&this.parent.addReturnExpression(e)}contains(e){return e in this.variables||this.parent.contains(e)}deconflict(e){const t=Object.assign(Object.create(null),e);for(const e of Object.keys(this.accessedOutsideVariables)){const n=this.accessedOutsideVariables[e];n.included&&(t[n.getBaseVariableName()]=!0)}for(const e of Object.keys(this.variables)){const n=this.variables[e];n.included&&n.setSafeName(vn(e,t))}for(const t of this.children)t.deconflict(e)}findLexicalBoundary(){return this.parent instanceof _n?this.parent.findLexicalBoundary():this}findVariable(e){const t=this.variables[e]||this.accessedOutsideVariables[e];return t||(this.accessedOutsideVariables[e]=this.parent.findVariable(e))}}var bn=5,An=1<<bn,Sn=An-1,In={};function wn(e){e&&(e.value=!0)}function Pn(){}function kn(e){return void 0===e.size&&(e.size=e.__iterate(Nn)),e.size}function Cn(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?kn(e)+t:t}function Nn(){return!0}function $n(e,t,n){return(0===e&&!Tn(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function Rn(e,t){return Mn(e,t,0)}function On(e,t){return Mn(e,t,t)}function Mn(e,t,n){return void 0===e?n:Tn(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function Tn(e){return e<0||0===e&&1/e==-1/0}var Dn="@@__IMMUTABLE_ITERABLE__@@";function Ln(e){return Boolean(e&&e[Dn])}var Vn="@@__IMMUTABLE_KEYED__@@";function Bn(e){return Boolean(e&&e[Vn])}var zn="@@__IMMUTABLE_INDEXED__@@";function jn(e){return Boolean(e&&e[zn])}function Wn(e){return Bn(e)||jn(e)}var Un=function(e){return Ln(e)?e:mr(e)},Fn=function(e){function t(e){return Bn(e)?e:gr(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Un),qn=function(e){function t(e){return jn(e)?e:yr(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Un),Gn=function(e){function t(e){return Ln(e)&&!Wn(e)?e:xr(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Un);Un.Keyed=Fn,Un.Indexed=qn,Un.Set=Gn;var Hn="@@__IMMUTABLE_SEQ__@@";function Kn(e){return Boolean(e&&e[Hn])}var Yn="@@__IMMUTABLE_RECORD__@@";function Xn(e){return Boolean(e&&e[Yn])}function Qn(e){return Ln(e)||Xn(e)}var Jn="@@__IMMUTABLE_ORDERED__@@";function Zn(e){return Boolean(e&&e[Jn])}var er=0,tr=1,nr=2,rr="function"==typeof Symbol&&Symbol.iterator,ir="@@iterator",sr=rr||ir,or=function(e){this.next=e};function ar(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function hr(){return{value:void 0,done:!0}}function ur(e){return!!pr(e)}function cr(e){return e&&"function"==typeof e.next}function lr(e){var t=pr(e);return t&&t.call(e)}function pr(e){var t=e&&(rr&&e[rr]||e[ir]);if("function"==typeof t)return t}or.prototype.toString=function(){return"[Iterator]"},or.KEYS=er,or.VALUES=tr,or.ENTRIES=nr,or.prototype.inspect=or.prototype.toSource=function(){return this.toString()},or.prototype[sr]=function(){return this};var dr=Object.prototype.hasOwnProperty;function fr(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var mr=function(e){function t(e){return null==e?Ar():Qn(e)?e.toSeq():function(e){var t=wr(e);if(t)return t;if("object"==typeof e)return new Er(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var s=n[t?r-++i:i++];if(!1===e(s[1],s[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new or(function(){if(i===r)return{value:void 0,done:!0};var s=n[t?r-++i:i++];return ar(e,s[0],s[1])})}return this.__iteratorUncached(e,t)},t}(Un),gr=function(e){function t(e){return null==e?Ar().toKeyedSeq():Ln(e)?Bn(e)?e.toSeq():e.fromEntrySeq():Xn(e)?e.toSeq():Sr(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(mr),yr=function(e){function t(e){return null==e?Ar():Ln(e)?Bn(e)?e.entrySeq():e.toIndexedSeq():Xn(e)?e.toSeq().entrySeq():Ir(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(mr),xr=function(e){function t(e){return(Ln(e)&&!Wn(e)?e:yr(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(mr);mr.isSeq=Kn,mr.Keyed=gr,mr.Set=xr,mr.Indexed=yr,mr.prototype[Hn]=!0;var vr=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[Cn(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var s=t?r-++i:i++;if(!1===e(n[s],s,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new or(function(){if(i===r)return{value:void 0,done:!0};var s=t?r-++i:i++;return ar(e,s,n[s])})},t}(yr),Er=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return dr.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,s=0;s!==i;){var o=r[t?i-++s:s++];if(!1===e(n[o],o,this))break}return s},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,s=0;return new or(function(){if(s===i)return{value:void 0,done:!0};var o=r[t?i-++s:s++];return ar(e,o,n[o])})},t}(gr);Er.prototype[Jn]=!0;var _r,br=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=lr(this._collection),r=0;if(cr(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=lr(this._collection);if(!cr(n))return new or(hr);var r=0;return new or(function(){var t=n.next();return t.done?t:ar(e,r++,t.value)})},t}(yr);function Ar(){return _r||(_r=new vr([]))}function Sr(e){var t=Array.isArray(e)?new vr(e):ur(e)?new br(e):void 0;if(t)return t.fromEntrySeq();if("object"==typeof e)return new Er(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function Ir(e){var t=wr(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function wr(e){return fr(e)?new vr(e):ur(e)?new br(e):void 0}var Pr="@@__IMMUTABLE_MAP__@@";function kr(e){return Boolean(e&&e[Pr])}function Cr(e){return kr(e)&&Zn(e)}function Nr(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function $r(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(Nr(e)&&Nr(t)&&e.equals(t))}var Rr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Or(e){return e>>>1&1073741824|3221225471&e}var Mr=Object.prototype.valueOf;function Tr(e){switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return Or(t)}(e);case"string":return e.length>Ur?function(e){var t=Gr[e];void 0===t&&(t=Dr(e),qr===Fr&&(qr=0,Gr={}),qr++,Gr[e]=t);return t}(e):Dr(e);case"object":case"function":return null===e?1108378658:"function"==typeof e.hashCode?Or(e.hashCode(e)):(e.valueOf!==Mr&&"function"==typeof e.valueOf&&(e=e.valueOf(e)),function(e){var t;if(zr&&void 0!==(t=Br.get(e)))return t;if(void 0!==(t=e[Wr]))return t;if(!Vr){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Wr]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}t=++jr,1073741824&jr&&(jr=0);if(zr)Br.set(e,t);else{if(void 0!==Lr&&!1===Lr(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Vr)Object.defineProperty(e,Wr,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Wr]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Wr]=t}}return t}(e));case"undefined":return 1108378659;default:if("function"==typeof e.toString)return Dr(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function Dr(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Or(t)}var Lr=Object.isExtensible,Vr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();var Br,zr="function"==typeof WeakMap;zr&&(Br=new WeakMap);var jr=0,Wr="__immutablehash__";"function"==typeof Symbol&&(Wr=Symbol(Wr));var Ur=16,Fr=255,qr=0,Gr={},Hr=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=Zr(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=Jr(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(gr);Hr.prototype[Jn]=!0;var Kr=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&kn(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(tr,t),i=0;return t&&kn(this),new or(function(){var s=r.next();return s.done?s:ar(e,t?n.size-++i:i++,s.value,s)})},t}(yr),Yr=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(tr,t);return new or(function(){var t=n.next();return t.done?t:ar(e,t.value,t.value,t)})},t}(xr),Xr=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){ui(t);var r=Ln(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(tr,t);return new or(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){ui(r);var i=Ln(r);return ar(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(gr);function Qr(e){var t=li(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=pi,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===nr){var r=e.__iterator(t,n);return new or(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===tr?er:tr,n)},t}function Jr(e,t,n){var r=li(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var s=e.get(r,In);return s===In?i:t.call(n,s,r,e)},r.__iterateUncached=function(r,i){var s=this;return e.__iterate(function(e,i,o){return!1!==r(t.call(n,e,i,o),i,s)},i)},r.__iteratorUncached=function(r,i){var s=e.__iterator(nr,i);return new or(function(){var i=s.next();if(i.done)return i;var o=i.value,a=o[0];return ar(r,a,t.call(n,o[1],a,e),i)})},r}function Zr(e,t){var n=this,r=li(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=Qr(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=pi,r.__iterate=function(n,r){var i=this,s=0;return r&&kn(e),e.__iterate(function(e,o){return n(e,t?o:r?i.size-++s:s++,i)},!r)},r.__iterator=function(r,i){var s=0;i&&kn(e);var o=e.__iterator(nr,!i);return new or(function(){var e=o.next();if(e.done)return e;var a=e.value;return ar(r,t?a[0]:i?n.size-++s:s++,a[1],e)})},r}function ei(e,t,n,r){var i=li(e);return r&&(i.has=function(r){var i=e.get(r,In);return i!==In&&!!t.call(n,i,r,e)},i.get=function(r,i){var s=e.get(r,In);return s!==In&&t.call(n,s,r,e)?s:i}),i.__iterateUncached=function(i,s){var o=this,a=0;return e.__iterate(function(e,s,h){if(t.call(n,e,s,h))return a++,i(e,r?s:a-1,o)},s),a},i.__iteratorUncached=function(i,s){var o=e.__iterator(nr,s),a=0;return new or(function(){for(;;){var s=o.next();if(s.done)return s;var h=s.value,u=h[0],c=h[1];if(t.call(n,c,u,e))return ar(i,r?u:a++,c,s)}})},i}function ti(e,t,n,r){var i=e.size;if($n(t,n,i))return e;var s=Rn(t,i),o=On(n,i);if(s!=s||o!=o)return ti(e.toSeq().cacheResult(),t,n,r);var a,h=o-s;h==h&&(a=h<0?0:h);var u=li(e);return u.size=0===a?a:e.size&&a||void 0,!r&&Kn(e)&&a>=0&&(u.get=function(t,n){return(t=Cn(this,t))>=0&&t<a?e.get(t+s,n):n}),u.__iterateUncached=function(t,n){var i=this;if(0===a)return 0;if(n)return this.cacheResult().__iterate(t,n);var o=0,h=!0,u=0;return e.__iterate(function(e,n){if(!h||!(h=o++<s))return u++,!1!==t(e,r?n:u-1,i)&&u!==a}),u},u.__iteratorUncached=function(t,n){if(0!==a&&n)return this.cacheResult().__iterator(t,n);if(0===a)return new or(hr);var i=e.__iterator(t,n),o=0,h=0;return new or(function(){for(;o++<s;)i.next();if(++h>a)return{value:void 0,done:!0};var e=i.next();return r||t===tr||e.done?e:ar(t,h-1,t===er?void 0:e.value[1],e)})},u}function ni(e,t,n,r){var i=li(e);return i.__iterateUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterate(i,s);var a=!0,h=0;return e.__iterate(function(e,s,u){if(!a||!(a=t.call(n,e,s,u)))return h++,i(e,r?s:h-1,o)}),h},i.__iteratorUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterator(i,s);var a=e.__iterator(nr,s),h=!0,u=0;return new or(function(){var e,s,c;do{if((e=a.next()).done)return r||i===tr?e:ar(i,u++,i===er?void 0:e.value[1],e);var l=e.value;s=l[0],c=l[1],h&&(h=t.call(n,c,s,o))}while(h);return i===nr?e:ar(i,s,c,e)})},i}function ri(e,t,n){var r=li(e);return r.__iterateUncached=function(i,s){if(s)return this.cacheResult().__iterate(i,s);var o=0,a=!1;return function e(h,u){h.__iterate(function(s,h){return(!t||u<t)&&Ln(s)?e(s,u+1):(o++,!1===i(s,n?h:o-1,r)&&(a=!0)),!a},s)}(e,0),o},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var s=e.__iterator(r,i),o=[],a=0;return new or(function(){for(;s;){var e=s.next();if(!1===e.done){var h=e.value;if(r===nr&&(h=h[1]),t&&!(o.length<t)||!Ln(h))return n?e:ar(r,a++,h,e);o.push(s),s=h.__iterator(r,i)}else s=o.pop()}return{value:void 0,done:!0}})},r}function ii(e,t,n){t||(t=di);var r=Bn(e),i=0,s=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return s.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){s[t].length=2}:function(e,t){s[t]=e[1]}),r?gr(s):jn(e)?yr(s):xr(s)}function si(e,t,n){if(t||(t=di),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return oi(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return oi(t,e,n)?n:e})}function oi(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function ai(e,t,n,r){var i=li(e),s=new vr(n).map(function(e){return e.size});return i.size=r?s.max():s.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(tr,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var s=n.map(function(e){return e=Un(e),lr(i?e.reverse():e)}),o=0,a=!1;return new or(function(){var n;return a||(n=s.map(function(e){return e.next()}),a=r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),a?{value:void 0,done:!0}:ar(e,o++,t.apply(null,n.map(function(e){return e.value})))})},i}function hi(e,t){return e===t?e:Kn(e)?t:e.constructor(t)}function ui(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function ci(e){return Bn(e)?Fn:jn(e)?qn:Gn}function li(e){return Object.create((Bn(e)?gr:jn(e)?yr:xr).prototype)}function pi(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):mr.prototype.cacheResult.call(this)}function di(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function fi(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function mi(e,t){if(!e)throw new Error(t)}function gi(e){mi(e!==1/0,"Cannot perform this action with an infinite size.")}function yi(e){if(fr(e)&&"string"!=typeof e)return e;if(Zn(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function xi(e){return e&&("function"!=typeof e.constructor||"Object"===e.constructor.name)}function vi(e){return"object"==typeof e&&(Qn(e)||Array.isArray(e)||xi(e))}function Ei(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function _i(e,t){return Qn(e)?e.has(t):vi(e)&&dr.call(e,t)}function bi(e,t,n){return Qn(e)?e.get(t,n):_i(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function Ai(e){if(Array.isArray(e))return fi(e);var t={};for(var n in e)dr.call(e,n)&&(t[n]=e[n]);return t}function Si(e,t){if(!vi(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Qn(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!dr.call(e,t))return e;var n=Ai(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function Ii(e,t,n){if(!vi(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Qn(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(dr.call(e,t)&&n===e[t])return e;var r=Ai(e);return r[t]=n,r}function wi(e,t,n,r){r||(r=n,n=void 0);var i=function e(t,n,r,i,s,o){var a=n===In;if(i===r.length){var h=a?s:n,u=o(h);return u===h?n:u}if(!a&&!vi(n))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,i).map(Ei)+"]: "+n);var c=r[i];var l=a?In:bi(n,c,In);var p=e(l===In?t:Qn(l),l,r,i+1,s,o);return p===l?n:p===In?Si(n,c):Ii(a?t?ss():{}:n,c,p)}(Qn(e),e,yi(t),0,n,r);return i===In?n:i}function Pi(e,t,n){return wi(e,t,In,function(){return n})}function ki(e,t){return Pi(this,e,t)}function Ci(e,t){return wi(e,t,function(){return In})}function Ni(e){return Ci(this,e)}function $i(e,t,n,r){return wi(e,[t],n,r)}function Ri(e,t,n){return 1===arguments.length?e(this):$i(this,e,t,n)}function Oi(e,t,n){return wi(this,e,t,n)}function Mi(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Di(this,e)}function Ti(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return Di(this,t,e)}function Di(e,t,n){for(var r=[],i=0;i<t.length;i++){var s=Fn(t[i]);0!==s.size&&r.push(s)}return 0===r.length?e:0!==e.toSeq().size||e.__ownerID||1!==r.length?e.withMutations(function(e){for(var t=n?function(t,r){$i(e,r,In,function(e){return e===In?t:n(e,t,r)})}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)}):e.constructor(r[0])}function Li(e,t,n){return Vi(e,t,function(e){return function t(n,r,i){return vi(n)&&vi(r)?Vi(n,[r],t):e?e(n,r,i):r}}(n))}function Vi(e,t,n){if(!vi(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(Qn(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,s=r?qn:Fn,o=r?function(t){i===e&&(i=Ai(i)),i.push(t)}:function(t,r){var s=dr.call(i,r),o=s&&n?n(i[r],t,r):t;s&&o===i[r]||(i===e&&(i=Ai(i)),i[r]=o)},a=0;a<t.length;a++)s(t[a]).forEach(o);return i}function Bi(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Li(this,e)}function zi(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Li(this,t,e)}function ji(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return wi(this,e,ss(),function(e){return Vi(e,t)})}function Wi(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return wi(this,e,ss(),function(e){return Li(e,t)})}function Ui(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Fi(){return this.__ownerID?this:this.__ensureOwner(new Pn)}function qi(){return this.__ensureOwner()}function Gi(){return this.__altered}Kr.prototype.cacheResult=Hr.prototype.cacheResult=Yr.prototype.cacheResult=Xr.prototype.cacheResult=pi;var Hi=function(e){function t(t){return null==t?ss():kr(t)&&!Zn(t)?t:ss().withMutations(function(n){var r=e(t);gi(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return ss().withMutations(function(t){for(var n=0;n<e.length;n+=2){if(n+1>=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return os(this,e,t)},t.prototype.remove=function(e){return os(this,e,In)},t.prototype.deleteAll=function(e){var t=Un(e);return 0===t.size?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ss()},t.prototype.sort=function(e){return $s(ii(this,e))},t.prototype.sortBy=function(e,t){return $s(ii(this,t,e))},t.prototype.map=function(e,t){return this.withMutations(function(n){n.forEach(function(r,i){n.set(i,e.call(t,r,i,n))})})},t.prototype.__iterator=function(e,t){return new ts(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?is(this.size,this._root,e,this.__hash):0===this.size?ss():(this.__ownerID=e,this.__altered=!1,this)},t}(Fn);Hi.isMap=kr;var Ki=Hi.prototype;Ki[Pr]=!0,Ki.delete=Ki.remove,Ki.removeAll=Ki.deleteAll,Ki.setIn=ki,Ki.removeIn=Ki.deleteIn=Ni,Ki.update=Ri,Ki.updateIn=Oi,Ki.merge=Ki.concat=Mi,Ki.mergeWith=Ti,Ki.mergeDeep=Bi,Ki.mergeDeepWith=zi,Ki.mergeIn=ji,Ki.mergeDeepIn=Wi,Ki.withMutations=Ui,Ki.wasAltered=Gi,Ki.asImmutable=qi,Ki["@@transducer/init"]=Ki.asMutable=Fi,Ki["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Ki["@@transducer/result"]=function(e){return e.asImmutable()};var Yi=function(e,t){this.ownerID=e,this.entries=t};Yi.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if($r(n,i[s][0]))return i[s][1];return r},Yi.prototype.update=function(e,t,n,r,i,s,o){for(var a=i===In,h=this.entries,u=0,c=h.length;u<c&&!$r(r,h[u][0]);u++);var l=u<c;if(l?h[u][1]===i:a)return this;if(wn(o),(a||!l)&&wn(s),!a||1!==h.length){if(!l&&!a&&h.length>=ps)return function(e,t,n,r){e||(e=new Pn);for(var i=new Zi(e,Tr(n),[n,r]),s=0;s<t.length;s++){var o=t[s];i=i.update(e,0,void 0,o[0],o[1])}return i}(e,h,r,i);var p=e&&e===this.ownerID,d=p?h:fi(h);return l?a?u===c-1?d.pop():d[u]=d.pop():d[u]=[r,i]:d.push([r,i]),p?(this.entries=d,this):new Yi(e,d)}};var Xi=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};Xi.prototype.get=function(e,t,n,r){void 0===t&&(t=Tr(n));var i=1<<((0===e?t:t>>>e)&Sn),s=this.bitmap;return 0==(s&i)?r:this.nodes[cs(s&i-1)].get(e+bn,t,n,r)},Xi.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Tr(r));var a=(0===t?n:n>>>t)&Sn,h=1<<a,u=this.bitmap,c=0!=(u&h);if(!c&&i===In)return this;var l=cs(u&h-1),p=this.nodes,d=c?p[l]:void 0,f=as(d,e,t+bn,n,r,i,s,o);if(f===d)return this;if(!c&&f&&p.length>=ds)return function(e,t,n,r,i){for(var s=0,o=new Array(An),a=0;0!==n;a++,n>>>=1)o[a]=1&n?t[s++]:void 0;return o[r]=i,new Qi(e,s+1,o)}(e,p,u,a,f);if(c&&!f&&2===p.length&&hs(p[1^l]))return p[1^l];if(c&&f&&1===p.length&&hs(f))return f;var m=e&&e===this.ownerID,g=c?f?u:u^h:u|h,y=c?f?ls(p,l,f,m):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),s=0,o=0;o<r;o++)o===t&&(s=1),i[o]=e[o+s];return i}(p,l,m):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var s=new Array(i),o=0,a=0;a<i;a++)a===t?(s[a]=n,o=-1):s[a]=e[a+o];return s}(p,l,f,m);return m?(this.bitmap=g,this.nodes=y,this):new Xi(e,g,y)};var Qi=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};Qi.prototype.get=function(e,t,n,r){void 0===t&&(t=Tr(n));var i=(0===e?t:t>>>e)&Sn,s=this.nodes[i];return s?s.get(e+bn,t,n,r):r},Qi.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Tr(r));var a=(0===t?n:n>>>t)&Sn,h=i===In,u=this.nodes,c=u[a];if(h&&!c)return this;var l=as(c,e,t+bn,n,r,i,s,o);if(l===c)return this;var p=this.count;if(c){if(!l&&--p<fs)return function(e,t,n,r){for(var i=0,s=0,o=new Array(n),a=0,h=1,u=t.length;a<u;a++,h<<=1){var c=t[a];void 0!==c&&a!==r&&(i|=h,o[s++]=c)}return new Xi(e,i,o)}(e,u,p,a)}else p++;var d=e&&e===this.ownerID,f=ls(u,a,l,d);return d?(this.count=p,this.nodes=f,this):new Qi(e,p,f)};var Ji=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};Ji.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if($r(n,i[s][0]))return i[s][1];return r},Ji.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Tr(r));var a=i===In;if(n!==this.keyHash)return a?this:(wn(o),wn(s),us(this,e,t,n,[r,i]));for(var h=this.entries,u=0,c=h.length;u<c&&!$r(r,h[u][0]);u++);var l=u<c;if(l?h[u][1]===i:a)return this;if(wn(o),(a||!l)&&wn(s),a&&2===c)return new Zi(e,this.keyHash,h[1^u]);var p=e&&e===this.ownerID,d=p?h:fi(h);return l?a?u===c-1?d.pop():d[u]=d.pop():d[u]=[r,i]:d.push([r,i]),p?(this.entries=d,this):new Ji(e,this.keyHash,d)};var Zi=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};Zi.prototype.get=function(e,t,n,r){return $r(n,this.entry[0])?this.entry[1]:r},Zi.prototype.update=function(e,t,n,r,i,s,o){var a=i===In,h=$r(r,this.entry[0]);return(h?i===this.entry[1]:a)?this:(wn(o),a?void wn(s):h?e&&e===this.ownerID?(this.entry[1]=i,this):new Zi(e,this.keyHash,[r,i]):(wn(s),us(this,e,t,Tr(r),[r,i])))},Yi.prototype.iterate=Ji.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Xi.prototype.iterate=Qi.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var s=n[t?i-r:r];if(s&&!1===s.iterate(e,t))return!1}},Zi.prototype.iterate=function(e,t){return e(this.entry)};var es,ts=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&rs(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return ns(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return ns(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var s=n.nodes[this._reverse?i-r:r];if(s){if(s.entry)return ns(e,s.entry);t=this._stack=rs(s,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(or);function ns(e,t){return ar(e,t[0],t[1])}function rs(e,t){return{node:e,index:0,__prev:t}}function is(e,t,n,r){var i=Object.create(Ki);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function ss(){return es||(es=is(0))}function os(e,t,n){var r,i;if(e._root){var s={value:!1},o={value:!1};if(r=as(e._root,e.__ownerID,0,void 0,t,n,s,o),!o.value)return e;i=e.size+(s.value?n===In?-1:1:0)}else{if(n===In)return e;i=1,r=new Yi(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?is(i,r):ss()}function as(e,t,n,r,i,s,o,a){return e?e.update(t,n,r,i,s,o,a):s===In?e:(wn(a),wn(o),new Zi(t,r,[i,s]))}function hs(e){return e.constructor===Zi||e.constructor===Ji}function us(e,t,n,r,i){if(e.keyHash===r)return new Ji(t,r,[e.entry,i]);var s,o=(0===n?e.keyHash:e.keyHash>>>n)&Sn,a=(0===n?r:r>>>n)&Sn,h=o===a?[us(e,t,n+bn,r,i)]:(s=new Zi(t,r,i),o<a?[e,s]:[s,e]);return new Xi(t,1<<o|1<<a,h)}function cs(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function ls(e,t,n,r){var i=r?e:fi(e);return i[t]=n,i}var ps=An/4,ds=An/2,fs=An/4,ms="@@__IMMUTABLE_LIST__@@";function gs(e){return Boolean(e&&e[ms])}var ys=function(e){function t(t){var n=Ss();if(null==t)return n;if(gs(t))return t;var r=e(t),i=r.size;return 0===i?n:(gi(i),i>0&&i<An?As(0,i,bn,null,new vs(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=Cn(this,e))>=0&&e<this.size){var n=Ps(this,e+=this._origin);return n&&n.array[e&Sn]}return t},t.prototype.set=function(e,t){return function(e,t,n){if((t=Cn(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?ks(e,t).set(0,n):ks(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,s={value:!1};t>=Cs(e._capacity)?r=Is(r,e.__ownerID,0,t,n,s):i=Is(i,e.__ownerID,e._level,t,n,s);if(!s.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return As(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=bn,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Ss()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){ks(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return ks(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){ks(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return ks(this,1)},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],s=e("string"!=typeof i&&ur(i)?i:[i]);0!==s.size&&n.push(s)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(n[0])},t.prototype.setSize=function(e){return ks(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,r))})},t.prototype.slice=function(e,t){var n=this.size;return $n(e,t,n)?this:ks(this,Rn(e,n),On(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=bs(this,t);return new or(function(){var i=r();return i===_s?{value:void 0,done:!0}:ar(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=bs(this,t);(n=i())!==_s&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?As(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?Ss():(this.__ownerID=e,this.__altered=!1,this)},t}(qn);ys.isList=gs;var xs=ys.prototype;xs[ms]=!0,xs.delete=xs.remove,xs.merge=xs.concat,xs.setIn=ki,xs.deleteIn=xs.removeIn=Ni,xs.update=Ri,xs.updateIn=Oi,xs.mergeIn=ji,xs.mergeDeepIn=Wi,xs.withMutations=Ui,xs.wasAltered=Gi,xs.asImmutable=qi,xs["@@transducer/init"]=xs.asMutable=Fi,xs["@@transducer/step"]=function(e,t){return e.push(t)},xs["@@transducer/result"]=function(e){return e.asImmutable()};var vs=function(e,t){this.array=e,this.ownerID=t};vs.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&Sn;if(r>=this.array.length)return new vs([],e);var i,s=0===r;if(t>0){var o=this.array[r];if((i=o&&o.removeBefore(e,t-bn,n))===o&&s)return this}if(s&&!i)return this;var a=ws(this,e);if(!s)for(var h=0;h<r;h++)a.array[h]=void 0;return i&&(a.array[r]=i),a},vs.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&Sn;if(i>=this.array.length)return this;if(t>0){var s=this.array[i];if((r=s&&s.removeAfter(e,t-bn,n))===s&&i===this.array.length-1)return this}var o=ws(this,e);return o.array.splice(i+1),r&&(o.array[i]=r),o};var Es,_s={};function bs(e,t){var n=e._origin,r=e._capacity,i=Cs(r),s=e._tail;return o(e._root,e._level,0);function o(e,a,h){return 0===a?function(e,o){var a=o===i?s&&s.array:e&&e.array,h=o>n?0:n-o,u=r-o;u>An&&(u=An);return function(){if(h===u)return _s;var e=t?--u:h++;return a&&a[e]}}(e,h):function(e,i,s){var a,h=e&&e.array,u=s>n?0:n-s>>i,c=1+(r-s>>i);c>An&&(c=An);return function(){for(;;){if(a){var e=a();if(e!==_s)return e;a=null}if(u===c)return _s;var n=t?--c:u++;a=o(h&&h[n],i-bn,s+(n<<i))}}}(e,a,h)}}function As(e,t,n,r,i,s,o){var a=Object.create(xs);return a.size=t-e,a._origin=e,a._capacity=t,a._level=n,a._root=r,a._tail=i,a.__ownerID=s,a.__hash=o,a.__altered=!1,a}function Ss(){return Es||(Es=As(0,0,bn))}function Is(e,t,n,r,i,s){var o,a=r>>>n&Sn,h=e&&a<e.array.length;if(!h&&void 0===i)return e;if(n>0){var u=e&&e.array[a],c=Is(u,t,n-bn,r,i,s);return c===u?e:((o=ws(e,t)).array[a]=c,o)}return h&&e.array[a]===i?e:(s&&wn(s),o=ws(e,t),void 0===i&&a===o.array.length-1?o.array.pop():o.array[a]=i,o)}function ws(e,t){return t&&e&&t===e.ownerID?e:new vs(e?e.array.slice():[],t)}function Ps(e,t){if(t>=Cs(e._capacity))return e._tail;if(t<1<<e._level+bn){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&Sn],r-=bn;return n}}function ks(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new Pn,i=e._origin,s=e._capacity,o=i+t,a=void 0===n?s:n<0?s+n:i+n;if(o===i&&a===s)return e;if(o>=a)return e.clear();for(var h=e._level,u=e._root,c=0;o+c<0;)u=new vs(u&&u.array.length?[void 0,u]:[],r),c+=1<<(h+=bn);c&&(o+=c,i+=c,a+=c,s+=c);for(var l=Cs(s),p=Cs(a);p>=1<<h+bn;)u=new vs(u&&u.array.length?[u]:[],r),h+=bn;var d=e._tail,f=p<l?Ps(e,a-1):p>l?new vs([],r):d;if(d&&p>l&&o<s&&d.array.length){for(var m=u=ws(u,r),g=h;g>bn;g-=bn){var y=l>>>g&Sn;m=m.array[y]=ws(m.array[y],r)}m.array[l>>>bn&Sn]=d}if(a<s&&(f=f&&f.removeAfter(r,0,a)),o>=p)o-=p,a-=p,h=bn,u=null,f=f&&f.removeBefore(r,0,o);else if(o>i||p<l){for(c=0;u;){var x=o>>>h&Sn;if(x!==p>>>h&Sn)break;x&&(c+=(1<<h)*x),h-=bn,u=u.array[x]}u&&o>i&&(u=u.removeBefore(r,h,o-c)),u&&p<l&&(u=u.removeAfter(r,h,p-c)),c&&(o-=c,a-=c)}return e.__ownerID?(e.size=a-o,e._origin=o,e._capacity=a,e._level=h,e._root=u,e._tail=f,e.__hash=void 0,e.__altered=!0,e):As(o,a,h,u,f)}function Cs(e){return e<An?0:e-1>>>bn<<bn}var Ns,$s=function(e){function t(e){return null==e?Os():Cr(e)?e:Os().withMutations(function(t){var n=Fn(e);gi(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Os()},t.prototype.set=function(e,t){return Ms(this,e,t)},t.prototype.remove=function(e){return Ms(this,e,In)},t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Rs(t,n,e,this.__hash):0===this.size?Os():(this.__ownerID=e,this._map=t,this._list=n,this)},t}(Hi);function Rs(e,t,n,r){var i=Object.create($s.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function Os(){return Ns||(Ns=Rs(ss(),Ss()))}function Ms(e,t,n){var r,i,s=e._map,o=e._list,a=s.get(t),h=void 0!==a;if(n===In){if(!h)return e;o.size>=An&&o.size>=2*s.size?(r=(i=o.filter(function(e,t){return void 0!==e&&a!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=s.remove(t),i=a===o.size-1?o.pop():o.set(a,void 0))}else if(h){if(n===o.get(a)[1])return e;r=s,i=o.set(a,[t,n])}else r=s.set(t,o.size),i=o.set(o.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Rs(r,i)}$s.isOrderedMap=Cr,$s.prototype[Jn]=!0,$s.prototype.delete=$s.prototype.remove;var Ts="@@__IMMUTABLE_STACK__@@";function Ds(e){return Boolean(e&&e[Ts])}var Ls=function(e){function t(e){return null==e?js():Ds(e)?e:js().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=Cn(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):zs(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Ds(t))return t;gi(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):zs(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):js()},t.prototype.slice=function(t,n){if($n(t,n,this.size))return this;var r=Rn(t,this.size);if(On(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,s=this._head;r--;)s=s.next;return this.__ownerID?(this.size=i,this._head=s,this.__hash=void 0,this.__altered=!0,this):zs(i,s)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?zs(this.size,this._head,e,this.__hash):0===this.size?js():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new vr(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new vr(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new or(function(){if(r){var t=r.value;return r=r.next,ar(e,n++,t)}return{value:void 0,done:!0}})},t}(qn);Ls.isStack=Ds;var Vs,Bs=Ls.prototype;function zs(e,t,n,r){var i=Object.create(Bs);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function js(){return Vs||(Vs=zs(0))}Bs[Ts]=!0,Bs.shift=Bs.pop,Bs.unshift=Bs.push,Bs.unshiftAll=Bs.pushAll,Bs.withMutations=Ui,Bs.wasAltered=Gi,Bs.asImmutable=qi,Bs["@@transducer/init"]=Bs.asMutable=Fi,Bs["@@transducer/step"]=function(e,t){return e.unshift(t)},Bs["@@transducer/result"]=function(e){return e.asImmutable()};var Ws="@@__IMMUTABLE_SET__@@";function Us(e){return Boolean(e&&e[Ws])}function Fs(e){return Us(e)&&Zn(e)}function qs(e,t){if(e===t)return!0;if(!Ln(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||Bn(e)!==Bn(t)||jn(e)!==jn(t)||Zn(e)!==Zn(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!Wn(e);if(Zn(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&$r(i[1],e)&&(n||$r(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var s=e;e=t,t=s}var o=!0,a=t.__iterate(function(t,r){if(n?!e.has(t):i?!$r(t,e.get(r,In)):!$r(e.get(r,In),t))return o=!1,!1});return o&&e.size===a}function Gs(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Hs(e){if(!e||"object"!=typeof e)return e;if(!Ln(e)){if(!vi(e))return e;e=mr(e)}if(Bn(e)){var t={};return e.__iterate(function(e,n){t[n]=Hs(e)}),t}var n=[];return e.__iterate(function(e){n.push(Hs(e))}),n}var Ks=function(e){function t(t){return null==t?Zs():Us(t)&&!Zn(t)?t:Zs().withMutations(function(n){var r=e(t);gi(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(Fn(e).keySeq())},t.intersect=function(e){return(e=Un(e).toArray()).length?Xs.intersect.apply(t(e.pop()),e):Zs()},t.union=function(e){return(e=Un(e).toArray()).length?Xs.union.apply(t(e.pop()),e):Zs()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Qs(this,this._map.set(e,e))},t.prototype.remove=function(e){return Qs(this,this._map.remove(e))},t.prototype.clear=function(){return Qs(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=[],i=[];return this.forEach(function(s){var o=e.call(t,s,s,n);o!==s&&(r.push(s),i.push(o))}),this.withMutations(function(e){r.forEach(function(t){return e.remove(t)}),i.forEach(function(t){return e.add(t)})})},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(n){for(var r=0;r<t.length;r++)e(t[r]).forEach(function(e){return n.add(e)})}):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return xo(ii(this,e))},t.prototype.sortBy=function(e,t){return xo(ii(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(Gn);Ks.isSet=Us;var Ys,Xs=Ks.prototype;function Qs(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Js(e,t){var n=Object.create(Xs);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Zs(){return Ys||(Ys=Js(ss()))}Xs[Ws]=!0,Xs.delete=Xs.remove,Xs.merge=Xs.concat=Xs.union,Xs.withMutations=Ui,Xs.asImmutable=qi,Xs["@@transducer/init"]=Xs.asMutable=Fi,Xs["@@transducer/step"]=function(e,t){return e.add(t)},Xs["@@transducer/result"]=function(e){return e.asImmutable()},Xs.__empty=Zs,Xs.__make=Js;var eo,to=function(e){function t(e,n,r){if(!(this instanceof t))return new t(e,n,r);if(mi(0!==r,"Cannot step a Range by 0"),e=e||0,void 0===n&&(n=1/0),r=void 0===r?1:Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(eo)return eo;eo=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+Cn(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return $n(e,n,this.size)?this:(e=Rn(e,this.size),(n=On(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,s=0;s!==n&&!1!==e(i,t?n-++s:s++,this);)i+=t?-r:r;return s},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,s=0;return new or(function(){if(s===n)return{value:void 0,done:!0};var o=i;return i+=t?-r:r,ar(e,t?n-++s:s++,o)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:qs(this,e)},t}(yr);function no(e,t,n){for(var r=yi(t),i=0;i!==r.length;)if((e=bi(e,r[i++],In))===In)return n;return e}function ro(e,t){return no(this,e,t)}function io(e,t){return no(e,t,In)!==In}function so(){gi(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e}Un.isIterable=Ln,Un.isKeyed=Bn,Un.isIndexed=jn,Un.isAssociative=Wn,Un.isOrdered=Zn,Un.Iterator=or,Gs(Un,{toArray:function(){gi(this.size);var e=new Array(this.size||0),t=Bn(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new Kr(this)},toJS:function(){return Hs(this)},toKeyedSeq:function(){return new Hr(this,!0)},toMap:function(){return Hi(this.toKeyedSeq())},toObject:so,toOrderedMap:function(){return $s(this.toKeyedSeq())},toOrderedSet:function(){return xo(Bn(this)?this.valueSeq():this)},toSet:function(){return Ks(Bn(this)?this.valueSeq():this)},toSetSeq:function(){return new Yr(this)},toSeq:function(){return jn(this)?this.toIndexedSeq():Bn(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ls(Bn(this)?this.valueSeq():this)},toList:function(){return ys(Bn(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return hi(this,function(e,t){var n=Bn(e),r=[e].concat(t).map(function(e){return Ln(e)?n&&(e=Fn(e)):e=n?Sr(e):Ir(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&Bn(i)||jn(e)&&jn(i))return i}var s=new vr(r);return n?s=s.toKeyedSeq():jn(e)||(s=s.toSetSeq()),(s=s.flatten(!0)).size=r.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),s}(this,e))},includes:function(e){return this.some(function(t){return $r(t,e)})},entries:function(){return this.__iterator(nr)},every:function(e,t){gi(this.size);var n=!0;return this.__iterate(function(r,i,s){if(!e.call(t,r,i,s))return n=!1,!1}),n},filter:function(e,t){return hi(this,ei(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return gi(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){gi(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(er)},map:function(e,t){return hi(this,Jr(this,e,t))},reduce:function(e,t,n){return uo(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return uo(this,e,t,n,arguments.length<2,!0)},reverse:function(){return hi(this,Zr(this,!0))},slice:function(e,t){return hi(this,ti(this,e,t,!0))},some:function(e,t){return!this.every(po(e),t)},sort:function(e){return hi(this,ii(this,e))},values:function(){return this.__iterator(tr)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return kn(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Hi().asMutable();return e.__iterate(function(i,s){r.update(t.call(n,i,s,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return qs(this,e)},entrySeq:function(){var e=this;if(e._cache)return new vr(e._cache);var t=e.toSeq().map(lo).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(po(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,s){if(e.call(t,n,i,s))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(Nn,null,e)},flatMap:function(e,t){return hi(this,function(e,t,n){var r=ci(e);return e.toSeq().map(function(i,s){return r(t.call(n,i,s,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return hi(this,ri(this,e,!0))},fromEntrySeq:function(){return new Xr(this)},get:function(e,t){return this.find(function(t,n){return $r(n,e)},void 0,t)},getIn:ro,groupBy:function(e,t){return function(e,t,n){var r=Bn(e),i=(Zn(e)?$s():Hi()).asMutable();e.__iterate(function(s,o){i.update(t.call(n,s,o,e),function(e){return(e=e||[]).push(r?[o,s]:s),e})});var s=ci(e);return i.map(function(t){return hi(e,s(t))}).asImmutable()}(this,e,t)},has:function(e){return this.get(e,In)!==In},hasIn:function(e){return io(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:Un(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:Un(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return $r(t,e)})},keySeq:function(){return this.toSeq().map(co).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return si(this,e)},maxBy:function(e,t){return si(this,t,e)},min:function(e){return si(this,e?fo(e):go)},minBy:function(e,t){return si(this,t?fo(t):go,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return hi(this,ni(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(po(e),t)},sortBy:function(e,t){return hi(this,ii(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return hi(this,function(e,t,n){var r=li(e);return r.__iterateUncached=function(r,i){var s=this;if(i)return this.cacheResult().__iterate(r,i);var o=0;return e.__iterate(function(e,i,a){return t.call(n,e,i,a)&&++o&&r(e,i,s)}),o},r.__iteratorUncached=function(r,i){var s=this;if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(nr,i),a=!0;return new or(function(){if(!a)return{value:void 0,done:!0};var e=o.next();if(e.done)return e;var i=e.value,h=i[0],u=i[1];return t.call(n,u,h,s)?r===nr?e:ar(r,h,u,e):(a=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(po(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=Zn(e),n=Bn(e),r=t?1:0;return function(e,t){return t=Rr(t,3432918353),t=Rr(t<<15|t>>>-15,461845907),t=Rr(t<<13|t>>>-13,5),t=Rr((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Or((t=Rr(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+yo(Tr(e),Tr(t))|0}:function(e,t){r=r+yo(Tr(e),Tr(t))|0}:t?function(e){r=31*r+Tr(e)|0}:function(e){r=r+Tr(e)|0}),r)}(this))}});var oo=Un.prototype;oo[Dn]=!0,oo[sr]=oo.values,oo.toJSON=oo.toArray,oo.__toStringMapper=Ei,oo.inspect=oo.toSource=function(){return this.toString()},oo.chain=oo.flatMap,oo.contains=oo.includes,Gs(Fn,{flip:function(){return hi(this,Qr(this))},mapEntries:function(e,t){var n=this,r=0;return hi(this,this.toSeq().map(function(i,s){return e.call(t,[s,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return hi(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var ao=Fn.prototype;ao[Vn]=!0,ao[sr]=oo.entries,ao.toJSON=so,ao.__toStringMapper=function(e,t){return Ei(t)+": "+Ei(e)},Gs(qn,{toKeyedSeq:function(){return new Hr(this,!1)},filter:function(e,t){return hi(this,ei(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return hi(this,Zr(this,!1))},slice:function(e,t){return hi(this,ti(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=Rn(e,e<0?this.count():this.size);var r=this.slice(0,e);return hi(this,1===n?r:r.concat(fi(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return hi(this,ri(this,e,!1))},get:function(e,t){return(e=Cn(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=Cn(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return hi(this,function(e,t){var n=li(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,s=0;return e.__iterate(function(e){return(!s||!1!==n(t,s++,i))&&!1!==n(e,s++,i)},r),s},n.__iteratorUncached=function(n,r){var i,s=e.__iterator(tr,r),o=0;return new or(function(){return(!i||o%2)&&(i=s.next()).done?i:o%2?ar(n,o++,t):ar(n,o++,i.value,i)})},n}(this,e))},interleave:function(){var e=[this].concat(fi(arguments)),t=ai(this.toSeq(),yr.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),hi(this,n)},keySeq:function(){return to(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return hi(this,ni(this,e,t,!1))},zip:function(){return hi(this,ai(this,mo,[this].concat(fi(arguments))))},zipAll:function(){return hi(this,ai(this,mo,[this].concat(fi(arguments)),!0))},zipWith:function(e){var t=fi(arguments);return t[0]=this,hi(this,ai(this,e,t))}});var ho=qn.prototype;function uo(e,t,n,r,i,s){return gi(e.size),e.__iterate(function(e,s,o){i?(i=!1,n=e):n=t.call(r,n,e,s,o)},s),n}function co(e,t){return t}function lo(e,t){return[t,e]}function po(e){return function(){return!e.apply(this,arguments)}}function fo(e){return function(){return-e.apply(this,arguments)}}function mo(){return fi(arguments)}function go(e,t){return e<t?1:e>t?-1:0}function yo(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}ho[zn]=!0,ho[Jn]=!0,Gs(Gn,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),Gn.prototype.has=oo.includes,Gn.prototype.contains=Gn.prototype.includes,Gs(gr,Fn.prototype),Gs(yr,qn.prototype),Gs(xr,Gn.prototype);var xo=function(e){function t(e){return null==e?bo():Fs(e)?e:bo().withMutations(function(t){var n=Gn(e);gi(n.size),n.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(Fn(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Ks);xo.isOrderedSet=Fs;var vo,Eo=xo.prototype;function _o(e,t){var n=Object.create(Eo);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function bo(){return vo||(vo=_o(Os()))}Eo[Jn]=!0,Eo.zip=ho.zip,Eo.zipWith=ho.zipWith,Eo.__empty=bo,Eo.__make=_o;var Ao=function(e,t){var n,r=function(s){var o=this;if(s instanceof r)return s;if(!(this instanceof r))return new r(s);if(!n){n=!0;var a=Object.keys(e),h=i._indices={};i._name=t,i._keys=a,i._defaultValues=e;for(var u=0;u<a.length;u++){var c=a[u];h[c]=u,i[c]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+Po(this)+' with property "'+c+'" since that property name is part of the Record API.'):Co(i,c)}}this.__ownerID=void 0,this._values=ys().withMutations(function(e){e.setSize(o._keys.length),Fn(s).forEach(function(t,n){e.set(o._indices[n],t===o._defaultValues[n]?void 0:t)})})},i=r.prototype=Object.create(Io);return i.constructor=r,t&&(r.displayName=t),r};Ao.prototype.toString=function(){for(var e,t=Po(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)t+=(r?", ":"")+(e=n[r])+": "+Ei(this.get(e));return t+" }"},Ao.prototype.equals=function(e){return this===e||e&&this._keys===e._keys&&ko(this).equals(ko(e))},Ao.prototype.hashCode=function(){return ko(this).hashCode()},Ao.prototype.has=function(e){return this._indices.hasOwnProperty(e)},Ao.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return void 0===r?this._defaultValues[e]:r},Ao.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return wo(this,n)}return this},Ao.prototype.remove=function(e){return this.set(e)},Ao.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:wo(this,e)},Ao.prototype.wasAltered=function(){return this._values.wasAltered()},Ao.prototype.toSeq=function(){return ko(this)},Ao.prototype.toJS=function(){return Hs(this)},Ao.prototype.entries=function(){return this.__iterator(nr)},Ao.prototype.__iterator=function(e,t){return ko(this).__iterator(e,t)},Ao.prototype.__iterate=function(e,t){return ko(this).__iterate(e,t)},Ao.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?wo(this,t,e):(this.__ownerID=e,this._values=t,this)},Ao.isRecord=Xn,Ao.getDescriptiveName=Po;var So,Io=Ao.prototype;function wo(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function Po(e){return e.constructor.displayName||e.constructor.name||"Record"}function ko(e){return Sr(e._keys.map(function(t){return[t,e.get(t)]}))}function Co(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){mi(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}function No(e,t){return Bn(t)?t.toMap():t.toList()}Io[Yn]=!0,Io.delete=Io.remove,Io.deleteIn=Io.removeIn=Ni,Io.getIn=ro,Io.hasIn=oo.hasIn,Io.merge=Mi,Io.mergeWith=Ti,Io.mergeIn=ji,Io.mergeDeep=Bi,Io.mergeDeepWith=zi,Io.mergeDeepIn=Wi,Io.setIn=ki,Io.update=Ri,Io.updateIn=Oi,Io.withMutations=Ui,Io.asMutable=Fi,Io.asImmutable=qi,Io[sr]=Io.entries,Io.toJSON=Io.toObject=oo.toObject,Io.inspect=Io.toSource=function(){return this.toString()};var $o,Ro={version:"4.0.0-rc.11",Collection:Un,Iterable:Un,Seq:mr,Map:Hi,OrderedMap:$s,List:ys,Stack:Ls,Set:Ks,OrderedSet:xo,Record:Ao,Range:to,Repeat:function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(So)return So;So=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return $r(this._value,e)},t.prototype.slice=function(e,n){var r=this.size;return $n(e,n,r)?this:new t(this._value,On(n,r)-Rn(e,r))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return $r(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return $r(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},t.prototype.__iterator=function(e,t){var n=this,r=this.size,i=0;return new or(function(){return i===r?{value:void 0,done:!0}:ar(e,t?r-++i:i++,n._value)})},t.prototype.equals=function(e){return e instanceof t?$r(this._value,e._value):qs(e)},t}(yr),is:$r,fromJS:function(e,t){return function e(t,n,r,i,s,o){var a=Array.isArray(r)?yr:xi(r)?gr:null;if(a){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),s&&""!==i&&s.push(i);var h=n.call(o,i,a(r).map(function(i,o){return e(t,n,i,o,s,r)}),s&&s.slice());return t.pop(),s&&s.pop(),h}return r}([],t||No,e,"",t&&t.length>2?[]:void 0,{"":e})},hash:Tr,isImmutable:Qn,isCollection:Ln,isKeyed:Bn,isIndexed:jn,isAssociative:Wn,isOrdered:Zn,isValueObject:Nr,isSeq:Kn,isList:gs,isMap:kr,isOrderedMap:Cr,isStack:Ds,isSet:Us,isOrderedSet:Fs,isRecord:Xn,get:bi,getIn:no,has:_i,hasIn:io,merge:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Vi(e,t)},mergeDeep:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Li(e,t)},mergeWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Vi(t,n,e)},mergeDeepWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Li(t,n,e)},remove:Si,removeIn:Ci,set:Ii,setIn:Pi,update:$i,updateIn:wi};!function(e){e[e.IGNORED_LABELS=0]="IGNORED_LABELS",e[e.ACCESSED_NODES=1]="ACCESSED_NODES",e[e.ARGUMENTS_VARIABLES=2]="ARGUMENTS_VARIABLES",e[e.ASSIGNED_NODES=3]="ASSIGNED_NODES",e[e.IGNORE_BREAK_STATEMENTS=4]="IGNORE_BREAK_STATEMENTS",e[e.IGNORE_RETURN_AWAIT_YIELD=5]="IGNORE_RETURN_AWAIT_YIELD",e[e.NODES_CALLED_AT_PATH_WITH_OPTIONS=6]="NODES_CALLED_AT_PATH_WITH_OPTIONS",e[e.REPLACED_VARIABLE_INITS=7]="REPLACED_VARIABLE_INITS",e[e.RETURN_EXPRESSIONS_ACCESSED_AT_PATH=8]="RETURN_EXPRESSIONS_ACCESSED_AT_PATH",e[e.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH=9]="RETURN_EXPRESSIONS_ASSIGNED_AT_PATH",e[e.RETURN_EXPRESSIONS_CALLED_AT_PATH=10]="RETURN_EXPRESSIONS_CALLED_AT_PATH"}($o||($o={}));const Oo={};class Mo{static create(){return new this(Ro.Map())}constructor(e){this.optionValues=e}addAccessedNodeAtPath(e,t){return this.setIn([$o.ACCESSED_NODES,t,...e,Oo],!0)}addAccessedReturnExpressionAtPath(e,t){return this.setIn([$o.RETURN_EXPRESSIONS_ACCESSED_AT_PATH,t,...e,Oo],!0)}addAssignedNodeAtPath(e,t){return this.setIn([$o.ASSIGNED_NODES,t,...e,Oo],!0)}addAssignedReturnExpressionAtPath(e,t){return this.setIn([$o.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH,t,...e,Oo],!0)}addCalledNodeAtPathWithOptions(e,t,n){return this.setIn([$o.NODES_CALLED_AT_PATH_WITH_OPTIONS,t,...e,Oo,n],!0)}addCalledReturnExpressionAtPath(e,t){return this.setIn([$o.RETURN_EXPRESSIONS_CALLED_AT_PATH,t,...e,Oo],!0)}getArgumentsVariables(){return this.get($o.ARGUMENTS_VARIABLES)||[]}getHasEffectsWhenCalledOptions(){return this.setIgnoreReturnAwaitYield().setIgnoreBreakStatements(!1).setIgnoreNoLabels()}getReplacedVariableInit(e){return this.optionValues.getIn([$o.REPLACED_VARIABLE_INITS,e])}hasNodeBeenAccessedAtPath(e,t){return this.optionValues.getIn([$o.ACCESSED_NODES,t,...e,Oo])}hasNodeBeenAssignedAtPath(e,t){return this.optionValues.getIn([$o.ASSIGNED_NODES,t,...e,Oo])}hasNodeBeenCalledAtPathWithOptions(e,t,n){const r=this.optionValues.getIn([$o.NODES_CALLED_AT_PATH_WITH_OPTIONS,t,...e,Oo]);return r&&r.find((e,t)=>t.equals(n))}hasReturnExpressionBeenAccessedAtPath(e,t){return this.optionValues.getIn([$o.RETURN_EXPRESSIONS_ACCESSED_AT_PATH,t,...e,Oo])}hasReturnExpressionBeenAssignedAtPath(e,t){return this.optionValues.getIn([$o.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH,t,...e,Oo])}hasReturnExpressionBeenCalledAtPath(e,t){return this.optionValues.getIn([$o.RETURN_EXPRESSIONS_CALLED_AT_PATH,t,...e,Oo])}ignoreBreakStatements(){return this.get($o.IGNORE_BREAK_STATEMENTS)}ignoreLabel(e){return this.optionValues.getIn([$o.IGNORED_LABELS,e])}ignoreReturnAwaitYield(){return this.get($o.IGNORE_RETURN_AWAIT_YIELD)}replaceVariableInit(e,t){return this.setIn([$o.REPLACED_VARIABLE_INITS,e],t)}setArgumentsVariables(e){return this.set($o.ARGUMENTS_VARIABLES,e)}setIgnoreBreakStatements(e=!0){return this.set($o.IGNORE_BREAK_STATEMENTS,e)}setIgnoreLabel(e){return this.setIn([$o.IGNORED_LABELS,e],!0)}setIgnoreNoLabels(){return this.remove($o.IGNORED_LABELS)}setIgnoreReturnAwaitYield(e=!0){return this.set($o.IGNORE_RETURN_AWAIT_YIELD,e)}get(e){return this.optionValues.get(e)}remove(e){return new Mo(this.optionValues.remove(e))}set(e,t){return new Mo(this.optionValues.set(e,t))}setIn(e,t){return new Mo(this.optionValues.setIn(e,t))}}const To={Literal:[],Program:["body"]};const Do=Mo.create();class Lo{constructor(e,t,n){this.keys=To[e.type]||function(e){return To[e.type]=Object.keys(e).filter(t=>"object"==typeof e[t]),To[e.type]}(e),this.parent=t,this.context=t.context,this.createScope(n),this.parseNode(e),this.initialise(),this.context.magicString.addSourcemapLocation(this.start),this.context.magicString.addSourcemapLocation(this.end)}bind(){for(const e of this.keys){const t=this[e];if(null!==t&&"annotations"!==e)if(Array.isArray(t))for(const e of t)null!==e&&e.bind();else t.bind()}}createScope(e){this.scope=e}declare(e,t){}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return ve}getReturnExpressionWhenCalledAtPath(e,t,n){return Ee}hasEffects(e){for(const t of this.keys){const n=this[t];if(null!==n&&"annotations"!==t)if(Array.isArray(n)){for(const t of n)if(null!==t&&t.hasEffects(e))return!0}else if(n.hasEffects(e))return!0}return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>0}hasEffectsWhenAssignedAtPath(e,t){return!0}hasEffectsWhenCalledAtPath(e,t,n){return!0}include(e){this.included=!0;for(const t of this.keys){const n=this[t];if(null!==n&&"annotations"!==t)if(Array.isArray(n))for(const t of n)null!==t&&t.include(e);else n.include(e)}}includeWithAllDeclaredVariables(e){this.include(e)}initialise(){this.included=!1}insertSemicolon(e){";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}locate(){const e=Tt(this.context.code,this.start,{offsetLine:1});return e.file=this.context.fileName,e.toString=(()=>JSON.stringify(e)),e}parseNode(e){for(const t of Object.keys(e)){if(this.hasOwnProperty(t))continue;const n=e[t];if("object"!=typeof n||null===n||"annotations"===t)this[t]=n;else if(Array.isArray(n)){this[t]=[];for(const e of n)this[t].push(null===e?null:new(this.context.nodeConstructors[e.type]||this.context.nodeConstructors.UnknownNode)(e,this,this.scope))}else this[t]=new(this.context.nodeConstructors[n.type]||this.context.nodeConstructors.UnknownNode)(n,this,this.scope)}}render(e,t){for(const n of this.keys){const r=this[n];if(null!==r&&"annotations"!==n)if(Array.isArray(r))for(const n of r)null!==n&&n.render(e,t);else r.render(e,t)}}shouldBeIncluded(){return this.included||this.hasEffects(Do)}toString(){return this.context.code.slice(this.start,this.end)}}class Vo extends Lo{createScope(e){this.scope=new _n(e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}hasEffectsWhenAssignedAtPath(e,t){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return this.body.hasEffectsWhenCalledAtPath(e,t,n)||this.superClass&&this.superClass.hasEffectsWhenCalledAtPath(e,t,n)}initialise(){this.included=!1,null!==this.id&&this.id.declare("class",this)}}function Bo(e){return e.type===J}const zo=(e,t)=>{const n=parseInt(e[0],10);return n<t.getArgumentsVariables().length&&t.getArgumentsVariables()[n]||Ee};class jo extends dt{constructor(e,t){super("arguments",null,Ee,t),this.parameters=e}deoptimizePath(e){const t=parseInt(e[0],10);e.length>0&&t>=0&&this.parameters[t]&&this.parameters[t].deoptimizePath(e.slice(1))}hasEffectsWhenAccessedAtPath(e,t){return e.length>1&&zo(e,t).hasEffectsWhenAccessedAtPath(e.slice(1),t)}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||this.included||zo(e,t).hasEffectsWhenAssignedAtPath(e.slice(1),t)}hasEffectsWhenCalledAtPath(e,t,n){return 0===e.length||zo(e,n).hasEffectsWhenCalledAtPath(e.slice(1),t,n)}}class Wo extends dt{constructor(e){super("this",null,null,e)}_getInit(e){return e.getReplacedVariableInit(this)||Ee}getLiteralValueAtPath(){return ve}hasEffectsWhenAccessedAtPath(e,t){return this._getInit(t).hasEffectsWhenAccessedAtPath(e,t)||super.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return this._getInit(t).hasEffectsWhenAssignedAtPath(e,t)||super.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return this._getInit(n).hasEffectsWhenCalledAtPath(e,t,n)||super.hasEffectsWhenCalledAtPath(e,t,n)}}class Uo extends _n{constructor(e,t){super(e),this.parameters=[],this.context=t,this.hoistedBodyVarScope=new _n(this)}addParameterDeclaration(e){const t=e.name;let n;return t in this.hoistedBodyVarScope.variables?(n=this.hoistedBodyVarScope.variables[t]).addDeclaration(e,null):n=new dt(t,e,Ee,this.context),this.variables[t]=n,this.parameters.push(n),n}getParameterVariables(){return this.parameters}}class Fo extends Uo{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=Ee;for(const e of this.returnExpressions)e.deoptimizePath(ye)}}}class qo extends Fo{constructor(e,t){super(e,t),this.variables.arguments=new jo(super.getParameterVariables(),t),this.variables.this=new Wo(t)}findLexicalBoundary(){return this}getOptionsWhenCalledWith({args:e,withNew:t},n){return n.replaceVariableInit(this.variables.this,t?new Ve:Ee).setArgumentsVariables(e.map((e,t)=>super.getParameterVariables()[t]||e))}}class Go extends Lo{createScope(e){this.scope=new qo(e,this.context)}deoptimizePath(e){1===e.length&&("prototype"===e[0]?this.isPrototypeDeoptimized=!0:e[0]===me&&(this.isPrototypeDeoptimized=!0,this.scope.getReturnExpression().deoptimizePath(ye)))}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.scope.getReturnExpression():Ee}hasEffects(e){return this.id&&this.id.hasEffects(e)}hasEffectsWhenAccessedAtPath(e){return!(e.length<=1)&&(e.length>2||"prototype"!==e[0]||this.isPrototypeDeoptimized)}hasEffectsWhenAssignedAtPath(e){return!(e.length<=1)&&(e.length>2||"prototype"!==e[0]||this.isPrototypeDeoptimized)}hasEffectsWhenCalledAtPath(e,t,n){if(e.length>0)return!0;const r=this.scope.getOptionsWhenCalledWith(t,n);for(const e of this.params)if(e.hasEffects(r))return!0;return this.body.hasEffects(r)}include(e){this.scope.variables.arguments.include(),super.include(e)}initialise(){this.included=!1,this.isPrototypeDeoptimized=!1,null!==this.id&&this.id.declare("function",this);for(const e of this.params)e.declare("parameter",Ee);this.body.addImplicitReturnExpressionToScope()}parseNode(e){this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope.hoistedBodyVarScope),super.parseNode(e)}}Go.prototype.preventChildBlockScope=!0;const Ho=/\s/;class Ko extends Lo{include(e){super.include(e),e&&this.context.includeVariable(this.variable)}initialise(){this.included=!1,this.declarationName=this.declaration.id&&this.declaration.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context),this.context.addExport(this)}render(e,t,{start:n,end:r}=hn){const i=function(e,t=0){for(t=pn(e,"default",t)+7;Ho.test(e[t]);)t++;return t}(e.original,this.start);if(this.declaration.type===ne)this.renderNamedDeclaration(e,i,"function",null===this.declaration.id,t);else if(Bo(this.declaration))this.renderNamedDeclaration(e,i,"class",null===this.declaration.id,t);else{if(this.variable.referencesOriginal())return void("system"===t.format&&this.variable.exportName?e.overwrite(n,r,`exports('${this.variable.exportName}', ${this.variable.getName()});`):un(this,e,n,r));if(!this.variable.included)return e.remove(this.start,i),this.declaration.render(e,t,{isCalleeOfRenderedParent:!1,renderedParentType:te}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,i,t)}this.declaration.render(e,t)}renderNamedDeclaration(e,t,n,r,i){const s=this.variable.getName();e.remove(this.start,t),r&&e.appendLeft(function(e,t,n=0){const r=pn(e,t,n)+t.length;e=e.slice(r,pn(e,"{",r));const i=pn(e,"*");return-1===i?r:r+i+1}(e.original,n,t),` ${s}`),"system"===i.format&&Bo(this.declaration)&&this.variable.exportName&&e.appendLeft(this.end,` exports('${this.variable.exportName}', ${s});`)}renderVariableDeclaration(e,t,n){const r="system"===n.format&&this.variable.exportName?`exports('${this.variable.exportName}', `:"";e.overwrite(this.start,t,`${n.varOrConst} ${this.variable.getName()} = ${r}`);const i=59===e.original.charCodeAt(this.end-1);r?e.appendRight(i?this.end-1:this.end,")"+(i?"":";")):i||e.appendLeft(this.end,";")}}Ko.prototype.needsBoundaries=!0;class Yo extends _n{addDeclaration(e,t,n=null,r=!1){return r?this.parent.addDeclaration(e,t,Ee,!0):super.addDeclaration(e,t,n,!1)}}class Xo extends Lo{addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&e.type===le||this.scope.addReturnExpression(Ee)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new Yo(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0}include(e){this.included=!0;for(const t of this.body)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){this.body.length?fn(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class Qo extends Lo{createScope(e){this.scope=new Fo(e,this.context)}deoptimizePath(e){1===e.length&&e[0]===me&&this.scope.getReturnExpression().deoptimizePath(ye)}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.scope.getReturnExpression():Ee}hasEffects(e){return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}hasEffectsWhenAssignedAtPath(e,t){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){if(e.length>0)return!0;for(const e of this.params)if(e.hasEffects(n))return!0;return this.body.hasEffects(n)}initialise(){this.included=!1;for(const e of this.params)e.declare("parameter",Ee);this.body instanceof Xo?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(e){e.body.type===X&&(this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope.hoistedBodyVarScope)),super.parseNode(e)}}function Jo(e){return 1===e.length?`exports('${e[0].safeExportName||e[0].exportName}', ${e[0].getName()});`:`exports({${e.map(e=>`${e.safeExportName||e.exportName}: ${e.getName()}`).join(", ")}});`}Qo.prototype.preventChildBlockScope=!0;const Zo={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>Math.pow(e,t),"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>e<t,"<<":(e,t)=>e<<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,in:()=>ve,instanceof:()=>ve,"|":(e,t)=>e|t};const ea={};class ta{constructor(e=Ro.Map()){this.entityPaths=e}isTracked(e,t){return this.entityPaths.getIn([e,...t,ea])}track(e,t){return new ta(this.entityPaths.setIn([e,...t,ea],!0))}}const na=new ta;function ra(e){return e.type===ie}class ia extends Lo{addExportedVariables(e){this.variable.exportName&&e.push(this.variable)}bind(){this.bound||(this.bound=!0,null===this.variable&&function e(t,n){if("MemberExpression"===t.type)return!t.computed&&e(t.object,t);if("Identifier"===t.type)switch(n.type){case"MemberExpression":return n.computed||t===n.object;case"MethodDefinition":return n.computed;case"Property":return n.computed||t===n.value;case"ExportSpecifier":return t===n.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}return!1}(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)),null!==this.variable&&this.variable.isLocal&&null!==this.variable.additionalInitializers&&this.variable.consolidateInitializers())}declare(e,t){switch(e){case"var":case"function":this.variable=this.scope.addDeclaration(this,this.context,t,!0);break;case"let":case"const":case"class":this.variable=this.scope.addDeclaration(this,this.context,t,!1);break;case"parameter":this.variable=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Unexpected identifier kind ${e}.`)}}deoptimizePath(e){this.bound||this.bind(),null!==this.variable&&(0===e.length&&this.name in this.context.importDescriptions&&!this.scope.contains(this.name)&&this.disallowImportReassignment(),this.variable.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.bound||this.bind(),null!==this.variable?this.variable.getLiteralValueAtPath(e,t,n):ve}getReturnExpressionWhenCalledAtPath(e,t,n){return this.bound||this.bind(),null!==this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n):Ee}hasEffectsWhenAccessedAtPath(e,t){return this.variable&&this.variable.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return!this.variable||this.variable.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return!this.variable||this.variable.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included||(this.included=!0,null!==this.variable&&this.context.includeVariable(this.variable))}initialise(){this.included=!1,this.bound=!1,this.variable||(this.variable=null)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r,isShorthandProperty:i}=hn){if(this.variable){const t=this.variable.getName();t!==this.name&&(e.overwrite(this.start,this.end,t,{contentOnly:!0,storeName:!0}),i&&e.prependRight(this.start,`${this.name}: `)),"eval"===t&&n===Q&&r&&e.appendRight(this.start,"0, ")}}disallowImportReassignment(){this.context.error({code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment to import '${this.name}'`},this.start)}}class sa extends Uo{addDeclaration(e,t,n=null,r=!1){return r?this.parent.addDeclaration(e,t,n,!0):super.addDeclaration(e,t,n,!1)}}class oa extends Lo{createScope(e){this.scope=new sa(e,this.context)}initialise(){this.included=!1,this.param&&this.param.declare("parameter",Ee)}parseNode(e){this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope),super.parseNode(e)}}oa.prototype.preventChildBlockScope=!0;class aa{constructor(e){this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getLiteralValueAtPath(){return ve}getReturnExpressionWhenCalledAtPath(e,t,n){return new aa(this.expressions.map(r=>r.getReturnExpressionWhenCalledAtPath(e,t,n)))}hasEffectsWhenAccessedAtPath(e,t){for(const n of this.expressions)if(n.hasEffectsWhenAccessedAtPath(e,t))return!0;return!1}hasEffectsWhenAssignedAtPath(e,t){for(const n of this.expressions)if(n.hasEffectsWhenAssignedAtPath(e,t))return!0;return!1}hasEffectsWhenCalledAtPath(e,t,n){for(const r of this.expressions)if(r.hasEffectsWhenCalledAtPath(e,t,n))return!0;return!1}include(){}}class ha extends Lo{hasEffects(){return!1}initialise(){this.included=!1,this.context.addExport(this)}render(e,t,{start:n,end:r}=hn){e.remove(n,r)}}ha.prototype.needsBoundaries=!0;class ua extends Lo{bind(){null!==this.declaration&&this.declaration.bind()}hasEffects(e){return this.declaration&&this.declaration.hasEffects(e)}initialise(){this.included=!1,this.context.addExport(this)}render(e,t,{start:n,end:r}=hn){null===this.declaration?e.remove(n,r):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{start:n,end:r}))}}ua.prototype.needsBoundaries=!0;const ca=e=>{switch(e.format){case"cjs":{const t=e.compact?"":" ";return{interopLeft:`Promise.resolve({${t}default:${t}require(`,interopRight:`)${t}})`,left:"Promise.resolve(require(",right:"))"}}case"amd":{const t=e.compact?"":" ",n=e.compact?"c":"resolve",r=e.compact?"e":"reject";return{interopLeft:`new Promise(function${t}(${n},${t}${r})${t}{${t}require([`,interopRight:`],${t}function${t}(m)${t}{${t}${n}({${t}default:${t}m${t}})${t}},${t}${r})${t}})`,left:`new Promise(function${t}(${n},${t}${r})${t}{${t}require([`,right:`],${t}${n},${t}${r})${t}})`}}case"system":return{left:"module.import(",right:")"};case"es":return{left:`${e.dynamicImportFunction||"import"}(`,right:")"}}};class la extends Lo{bind(){}hasEffects(){return!1}initialise(){this.included=!1,this.context.addImport(this)}render(e,t,{start:n,end:r}=hn){e.remove(n,r)}}la.prototype.needsBoundaries=!0;class pa extends Lo{getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.context.code.charCodeAt(this.start)||"bigint"==typeof this.value?ve:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Ee:qe(this.members,e[0])}hasEffectsWhenAccessedAtPath(e){return null===this.value?e.length>0:e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>0}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Fe(this.members,e[0],this.included,t,n)}initialise(){this.included=!1,this.members=function(e){switch(typeof e){case"boolean":return je;case"number":return We;case"string":return Ue;default:return Object.create(null)}}(this.value)}render(e,t){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function da(e){return e.computed?function(e){if(e instanceof pa)return String(e.value);return null}(e.property):e.property.name}function fa(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof ia)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n.type===he){const r=fa(n);return r&&[...r,{key:t,pos:e.property.start}]}}return null}class ma extends Lo{constructor(){super(...arguments),this.variable=null}addExportedVariables(){}bind(){if(this.bound)return;this.bound=!0;const e=fa(this),t=e&&this.scope.findVariable(e[0].key);if(t&&t.isNamespace){const n=this.resolveNamespaceVariables(t,e.slice(1));n?"string"==typeof n?this.replacement=n:(n.isExternal&&n.module&&n.module.suggestName(e[0].key),this.variable=n,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let n=1;n<e.length;n++)t+="."+e[n].key;return t}(e),n)):super.bind()}else super.bind(),null===this.propertyKey&&this.analysePropertyKey()}deoptimizeCache(){for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}deoptimizePath(e){this.bound||this.bind(),0===e.length&&this.disallowNamespaceReassignment(),this.variable?this.variable.deoptimizePath(e):(null===this.propertyKey&&this.analysePropertyKey(),this.object.deoptimizePath([this.propertyKey,...e]))}getLiteralValueAtPath(e,t,n){return null!==this.variable?this.variable.getLiteralValueAtPath(e,t,n):(null===this.propertyKey&&this.analysePropertyKey(),this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([this.propertyKey,...e],t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return null!==this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n):(null===this.propertyKey&&this.analysePropertyKey(),this.expressionsToBeDeoptimized.push(n),this.object.getReturnExpressionWhenCalledAtPath([this.propertyKey,...e],t,n))}hasEffects(e){return this.property.hasEffects(e)||this.object.hasEffects(e)||this.context.propertyReadSideEffects&&this.object.hasEffectsWhenAccessedAtPath([this.propertyKey],e)}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null!==this.variable?this.variable.hasEffectsWhenAccessedAtPath(e,t):this.object.hasEffectsWhenAccessedAtPath([this.propertyKey,...e],t))}hasEffectsWhenAssignedAtPath(e,t){return null!==this.variable?this.variable.hasEffectsWhenAssignedAtPath(e,t):this.object.hasEffectsWhenAssignedAtPath([this.propertyKey,...e],t)}hasEffectsWhenCalledAtPath(e,t,n){return null!==this.variable?this.variable.hasEffectsWhenCalledAtPath(e,t,n):this.object.hasEffectsWhenCalledAtPath([this.propertyKey,...e],t,n)}include(e){this.included||(this.included=!0,null!==this.variable&&this.context.includeVariable(this.variable)),this.object.include(e),this.property.include(e)}initialise(){this.included=!1,this.propertyKey=da(this),this.variable=null,this.bound=!1,this.replacement=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=hn){const i=n===Q&&r;if(this.variable||this.replacement){let t=this.variable?this.variable.getName():this.replacement;i&&(t="0, "+t),e.overwrite(this.start,this.end,t,{contentOnly:!0,storeName:!0})}else i&&e.appendRight(this.start,"0, "),super.render(e,t)}analysePropertyKey(){this.propertyKey=me;const e=this.property.getLiteralValueAtPath(ge,na,this);this.propertyKey=e===ve?me:String(e)}disallowNamespaceReassignment(){this.object instanceof ia&&this.scope.findVariable(this.object.name).isNamespace&&this.context.error({code:"ILLEGAL_NAMESPACE_REASSIGNMENT",message:`Illegal reassignment to import '${this.object.name}'`},this.start)}resolveNamespaceVariables(e,t){if(0===t.length)return e;if(!e.isNamespace)return null;const n=t[0].key,r=e.isExternal?e.module.getVariableForExportName(n):e.context.traceExport(n);if(!r){const r=e.isExternal?e.module.id:e.context.fileName;return this.context.warn({code:"MISSING_EXPORT",exporter:Bt(r),importer:Bt(this.context.fileName),message:`'${n}' is not exported by '${Bt(r)}'`,missing:n,url:"https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-"},t[0].pos),"undefined"}return this.resolveNamespaceVariables(r,t.slice(1))}}const ga="ROLLUP_ASSET_URL_",ya="ROLLUP_CHUNK_URL_";class xa extends Lo{bind(){super.bind(),this.argument.deoptimizePath([me,me])}}class va extends Lo{hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0}include(e){this.included=!0;for(const t of this.body)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){this.body.length?fn(this.body,e,this.start,this.end,t):super.render(e,t)}}class Ea extends _n{constructor(e,t){super(e),this.context=t,this.variables.this=new dt("this",null,_e,t)}addExportDefaultDeclaration(e,t,n){return this.variables.default=new ft(e,t,n)}addNamespaceMemberAccess(e,t){t instanceof At&&(this.accessedOutsideVariables[t.name]=t)}deconflict(e){for(const t of this.children)t.deconflict(e)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables[e]||this.accessedOutsideVariables[e];if(t)return t;const n=this.context.traceVariable(e)||this.parent.findVariable(e);return n instanceof At&&(this.accessedOutsideVariables[e]=n),n}}const _a={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>ve,typeof:e=>typeof e,void:()=>void 0,"~":e=>~e};function ba(e){return e.renderBaseName&&e.exportName&&e.isReassigned}const Aa={ArrayExpression:class extends Lo{bind(){super.bind();for(const e of this.elements)null!==e&&e.deoptimizePath(ye)}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Ee:qe(ze,e[0])}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Fe(ze,e[0],this.included,t,n)}},ArrayPattern:class extends Lo{addExportedVariables(e){for(const t of this.elements)null!==t&&t.addExportedVariables(e)}declare(e,t){for(const t of this.elements)null!==t&&t.declare(e,Ee)}deoptimizePath(e){if(0===e.length)for(const t of this.elements)null!==t&&t.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){if(e.length>0)return!0;for(const e of this.elements)if(null!==e&&e.hasEffectsWhenAssignedAtPath(ge,t))return!0;return!1}},ArrowFunctionExpression:Qo,AssignmentExpression:class extends Lo{bind(){super.bind(),this.left.deoptimizePath(ge),this.right.deoptimizePath(ye)}hasEffects(e){return this.right.hasEffects(e)||this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(ge,e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.right.hasEffectsWhenAccessedAtPath(e,t)}render(e,t){if(this.left.render(e,t),this.right.render(e,t),"system"===t.format)if(this.left.variable&&this.left.variable.exportName)e.prependLeft(e.original.indexOf("=",this.left.end)+1,` exports('${this.left.variable.exportName}',`),e.appendLeft(this.right.end,")");else if("addExportedVariables"in this.left){const t=[];this.left.addExportedVariables(t),t.length>0&&(e.prependRight(this.start,`function (v) {${Jo(t)} return v;} (`),e.appendLeft(this.end,")"))}}},AssignmentPattern:class extends Lo{addExportedVariables(e){this.left.addExportedVariables(e)}bind(){super.bind(),this.left.deoptimizePath(ge),this.right.deoptimizePath(ye)}declare(e,t){this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){return e.length>0||this.left.hasEffectsWhenAssignedAtPath(ge,t)}render(e,t,{isShorthandProperty:n}=hn){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}},AwaitExpression:class extends Lo{hasEffects(e){return super.hasEffects(e)||!e.ignoreReturnAwaitYield()}include(e){if(super.include(e),!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof Go||e instanceof Qo)return}while(e=e.parent);this.context.usesTopLevelAwait=!0}}render(e,t){super.render(e,t)}},BinaryExpression:class extends Lo{getLiteralValueAtPath(e,t,n){if(e.length>0)return ve;const r=this.left.getLiteralValueAtPath(ge,t,n);if(r===ve)return ve;const i=this.right.getLiteralValueAtPath(ge,t,n);if(i===ve)return ve;const s=Zo[this.operator];return s?s(r,i):ve}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}},BlockStatement:Xo,BreakStatement:class extends Lo{hasEffects(e){return super.hasEffects(e)||!e.ignoreBreakStatements()||this.label&&!e.ignoreLabel(this.label.name)}},CallExpression:class extends Lo{bind(){super.bind(),this.callee instanceof ia&&(this.scope.findVariable(this.callee.name).isNamespace&&this.context.error({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${this.callee.name}')`},this.start),"eval"===this.callee.name&&this.context.warn({code:"EVAL",message:"Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification",url:"https://rollupjs.org/guide/en#avoiding-eval"},this.start)),null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(ge,na,this));for(const e of this.arguments)e.deoptimizePath(ye)}deoptimizeCache(){if(this.returnExpression!==Ee){this.returnExpression=Ee;for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&!this.context.deoptimizationTracker.track(this,e)&&(null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(ge,na,this)),this.returnExpression.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(ge,t,this)),this.returnExpression===Ee||t.isTracked(this.returnExpression,e)?ve:(this.expressionsToBeDeoptimized.push(n),this.returnExpression.getLiteralValueAtPath(e,t.track(this.returnExpression,e),n))}getReturnExpressionWhenCalledAtPath(e,t,n){return null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(ge,t,this)),this.returnExpression===Ee||t.isTracked(this.returnExpression,e)?Ee:(this.expressionsToBeDeoptimized.push(n),this.returnExpression.getReturnExpressionWhenCalledAtPath(e,t.track(this.returnExpression,e),n))}hasEffects(e){for(const t of this.arguments)if(t.hasEffects(e))return!0;return(!this.context.annotations||!this.annotatedPure)&&(this.callee.hasEffects(e)||this.callee.hasEffectsWhenCalledAtPath(ge,this.callOptions,e.getHasEffectsWhenCalledOptions()))}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&!t.hasReturnExpressionBeenAccessedAtPath(e,this)&&this.returnExpression.hasEffectsWhenAccessedAtPath(e,t.addAccessedReturnExpressionAtPath(e,this))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||!t.hasReturnExpressionBeenAssignedAtPath(e,this)&&this.returnExpression.hasEffectsWhenAssignedAtPath(e,t.addAssignedReturnExpressionAtPath(e,this))}hasEffectsWhenCalledAtPath(e,t,n){return!n.hasReturnExpressionBeenCalledAtPath(e,this)&&this.returnExpression.hasEffectsWhenCalledAtPath(e,t,n.addCalledReturnExpressionAtPath(e,this))}include(e){super.include(e),this.returnExpression.included||this.returnExpression.include(!1)}initialise(){this.included=!1,this.returnExpression=null,this.callOptions=fe.create({args:this.arguments,callIdentifier:this,withNew:!1}),this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n}=hn){super.render(e,t),n===te&&this.callee.type===re&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}},CatchClause:oa,ClassBody:class extends Lo{hasEffectsWhenCalledAtPath(e,t,n){return e.length>0||null!==this.classConstructor&&this.classConstructor.hasEffectsWhenCalledAtPath(ge,t,n)}initialise(){this.included=!1;for(const e of this.body)if("constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}},ClassDeclaration:class extends Vo{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new this.context.nodeConstructors.Identifier(e.id,this,this.scope.parent)),super.parseNode(e)}render(e,t){"system"===t.format&&this.id&&this.id.variable.exportName&&e.appendLeft(this.end,` exports('${this.id.variable.exportName}', ${this.id.variable.getName()});`),super.render(e,t)}},ClassExpression:class extends Vo{},ConditionalExpression:class extends Lo{bind(){super.bind(),this.isBranchResolutionAnalysed||this.analyseBranchResolution()}deoptimizeCache(){if(null!==this.usedBranch){this.usedBranch=null,this.unusedBranch.deoptimizePath(ye);for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&(this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e)):this.usedBranch.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?ve:(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getLiteralValueAtPath(e,t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?new aa([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,n),this.alternate.getReturnExpressionWhenCalledAtPath(e,t,n)]):(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getReturnExpressionWhenCalledAtPath(e,t,n))}hasEffects(e){return!!this.test.hasEffects(e)||(null===this.usedBranch?this.consequent.hasEffects(e)||this.alternate.hasEffects(e):this.usedBranch.hasEffects(e))}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null===this.usedBranch?this.consequent.hasEffectsWhenAccessedAtPath(e,t)||this.alternate.hasEffectsWhenAccessedAtPath(e,t):this.usedBranch.hasEffectsWhenAccessedAtPath(e,t))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||(null===this.usedBranch?this.consequent.hasEffectsWhenAssignedAtPath(e,t)||this.alternate.hasEffectsWhenAssignedAtPath(e,t):this.usedBranch.hasEffectsWhenAssignedAtPath(e,t))}hasEffectsWhenCalledAtPath(e,t,n){return null===this.usedBranch?this.consequent.hasEffectsWhenCalledAtPath(e,t,n)||this.alternate.hasEffectsWhenCalledAtPath(e,t,n):this.usedBranch.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0,e||null===this.usedBranch||this.test.shouldBeIncluded()?(this.test.include(e),this.consequent.include(e),this.alternate.include(e)):this.usedBranch.include(e)}initialise(){this.included=!1,this.isBranchResolutionAnalysed=!1,this.usedBranch=null,this.unusedBranch=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=hn){this.test.included?super.render(e,t):(e.remove(this.start,this.usedBranch.start),e.remove(this.usedBranch.end,this.end),cn(this,e),this.usedBranch.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}))}analyseBranchResolution(){this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(ge,na,this);e!==ve&&(e?(this.usedBranch=this.consequent,this.unusedBranch=this.alternate):(this.usedBranch=this.alternate,this.unusedBranch=this.consequent))}},DoWhileStatement:class extends Lo{hasEffects(e){return this.test.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}},EmptyStatement:class extends Lo{hasEffects(){return!1}},ExportAllDeclaration:ha,ExportDefaultDeclaration:Ko,ExportNamedDeclaration:ua,ExpressionStatement:class extends Lo{initialise(){this.included=!1,this.directive&&"use strict"!==this.directive&&this.parent.type===ue&&this.context.warn({code:"MODULE_LEVEL_DIRECTIVE",message:`Module level directives cause errors when bundled, '${this.directive}' was ignored.`},this.start)}render(e,t){super.render(e,t),this.included&&this.insertSemicolon(e)}shouldBeIncluded(){return this.directive&&"use strict"!==this.directive?this.parent.type!==ue:super.shouldBeIncluded()}},ForInStatement:class extends Lo{bind(){this.left.bind(),this.left.deoptimizePath(ge),this.right.bind(),this.body.bind()}createScope(e){this.scope=new Yo(e)}hasEffects(e){return this.left&&(this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(ge,e))||this.right&&this.right.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}include(e){this.included=!0,this.left.includeWithAllDeclaredVariables(e),this.left.deoptimizePath(ge),this.right.include(e),this.body.include(e)}render(e,t){this.left.render(e,t,ln),this.right.render(e,t,ln),this.body.render(e,t)}},ForOfStatement:class extends Lo{bind(){this.left.bind(),this.left.deoptimizePath(ge),this.right.bind(),this.body.bind()}createScope(e){this.scope=new Yo(e)}hasEffects(e){return this.left&&(this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(ge,e))||this.right&&this.right.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}include(e){this.included=!0,this.left.includeWithAllDeclaredVariables(e),this.left.deoptimizePath(ge),this.right.include(e),this.body.include(e)}render(e,t){this.left.render(e,t,ln),this.right.render(e,t,ln),this.body.render(e,t)}},ForStatement:class extends Lo{createScope(e){this.scope=new Yo(e)}hasEffects(e){return this.init&&this.init.hasEffects(e)||this.test&&this.test.hasEffects(e)||this.update&&this.update.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}render(e,t){this.init&&this.init.render(e,t,ln),this.test&&this.test.render(e,t,ln),this.update&&this.update.render(e,t,ln),this.body.render(e,t)}},FunctionDeclaration:class extends Go{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new this.context.nodeConstructors.Identifier(e.id,this,this.scope.parent)),super.parseNode(e)}},FunctionExpression:class extends Go{},Identifier:ia,IfStatement:class extends Lo{bind(){super.bind(),this.isTestValueAnalysed||(this.testValue=ve,this.isTestValueAnalysed=!0,this.testValue=this.test.getLiteralValueAtPath(ge,na,this))}deoptimizeCache(){this.testValue=ve}hasEffects(e){return!!this.test.hasEffects(e)||(this.testValue===ve?this.consequent.hasEffects(e)||null!==this.alternate&&this.alternate.hasEffects(e):this.testValue?this.consequent.hasEffects(e):null!==this.alternate&&this.alternate.hasEffects(e))}include(e){if(this.included=!0,e)return this.test.include(!0),this.consequent.include(!0),void(null!==this.alternate&&this.alternate.include(!0));const t=this.testValue===ve;(t||this.test.shouldBeIncluded())&&this.test.include(!1),(t||this.testValue)&&this.consequent.shouldBeIncluded()&&this.consequent.include(!1),null===this.alternate||!t&&this.testValue||!this.alternate.shouldBeIncluded()||this.alternate.include(!1)}initialise(){this.included=!1,this.isTestValueAnalysed=!1}render(e,t){if(this.test.included||(this.testValue?null!==this.alternate&&this.alternate.included:this.consequent.included))this.test.included?this.test.render(e,t):e.overwrite(this.test.start,this.test.end,this.testValue?"true":"false"),this.consequent.included?this.consequent.render(e,t):e.overwrite(this.consequent.start,this.consequent.end,";"),null!==this.alternate&&(this.alternate.included?this.alternate.render(e,t):e.remove(this.consequent.end,this.alternate.end));else{const n=this.testValue?this.consequent:this.alternate;e.remove(this.start,n.start),e.remove(n.end,this.end),cn(this,e),n.render(e,t)}}},Import:class extends Lo{include(){this.included=!0,this.context.includeDynamicImport(this)}initialise(){this.included=!1,this.resolutionNamespace=void 0,this.resolutionInterop=!1,this.context.addDynamicImport(this)}render(e,t){if(this.resolutionNamespace){const n=t.compact?"":" ",r=t.compact?"":";";return void e.overwrite(this.parent.start,this.parent.end,`Promise.resolve().then(function${n}()${n}{${n}return ${this.resolutionNamespace}${r}${n}})`)}const n=ca(t);if(n){const t=this.resolutionInterop&&n.interopLeft||n.left,r=pn(e.original,"(",this.parent.callee.end)+1;e.overwrite(this.parent.start,r,t);const i=this.resolutionInterop&&n.interopRight||n.right;e.overwrite(this.parent.end-1,this.parent.end,i)}}renderFinalResolution(e,t,n){this.included&&("amd"===n&&t.startsWith("'.")&&t.endsWith(".js'")&&(t=t.slice(0,-4)+"'"),e.overwrite(this.parent.arguments[0].start,this.parent.arguments[0].end,t))}setResolution(e,t){this.resolutionInterop=e,this.resolutionNamespace=t}},ImportDeclaration:la,LabeledStatement:class extends Lo{hasEffects(e){return this.body.hasEffects(e.setIgnoreLabel(this.label.name).setIgnoreBreakStatements())}},Literal:pa,LogicalExpression:class extends Lo{bind(){super.bind(),this.isBranchResolutionAnalysed||this.analyseBranchResolution()}deoptimizeCache(){if(null!==this.usedBranch){this.usedBranch=null,this.unusedBranch.deoptimizePath(ye);for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&(this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?(this.left.deoptimizePath(e),this.right.deoptimizePath(e)):this.usedBranch.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?ve:(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getLiteralValueAtPath(e,t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?new aa([this.left.getReturnExpressionWhenCalledAtPath(e,t,n),this.right.getReturnExpressionWhenCalledAtPath(e,t,n)]):(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getReturnExpressionWhenCalledAtPath(e,t,n))}hasEffects(e){return null===this.usedBranch?this.left.hasEffects(e)||this.right.hasEffects(e):this.usedBranch.hasEffects(e)}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null===this.usedBranch?this.left.hasEffectsWhenAccessedAtPath(e,t)||this.right.hasEffectsWhenAccessedAtPath(e,t):this.usedBranch.hasEffectsWhenAccessedAtPath(e,t))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||(null===this.usedBranch?this.left.hasEffectsWhenAssignedAtPath(e,t)||this.right.hasEffectsWhenAssignedAtPath(e,t):this.usedBranch.hasEffectsWhenAssignedAtPath(e,t))}hasEffectsWhenCalledAtPath(e,t,n){return null===this.usedBranch?this.left.hasEffectsWhenCalledAtPath(e,t,n)||this.right.hasEffectsWhenCalledAtPath(e,t,n):this.usedBranch.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0,e||null===this.usedBranch||this.unusedBranch.shouldBeIncluded()?(this.left.include(e),this.right.include(e)):this.usedBranch.include(e)}initialise(){this.included=!1,this.isBranchResolutionAnalysed=!1,this.usedBranch=null,this.unusedBranch=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=hn){this.left.included&&this.right.included?super.render(e,t):(e.remove(this.start,this.usedBranch.start),e.remove(this.usedBranch.end,this.end),cn(this,e),this.usedBranch.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}))}analyseBranchResolution(){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(ge,na,this);e!==ve&&(("||"===this.operator?e:!e)?(this.usedBranch=this.left,this.unusedBranch=this.right):(this.usedBranch=this.right,this.unusedBranch=this.left))}},MemberExpression:ma,MetaProperty:class extends Lo{hasEffectsWhenAccessedAtPath(e){return e.length>1}initialise(){"import"===this.meta.name&&this.context.addImportMeta(this),this.included=!1}renderFinalMechanism(e,t,n,r){if(!this.included)return!1;const i=this.parent,s=i instanceof ma&&"string"==typeof i.propertyKey?i.propertyKey:null;if(s&&(s.startsWith(ga)||s.startsWith(ya))){let o,a=null,h=null;s.startsWith(ga)?(a=s.substr(ga.length),o=this.context.getAssetFileName(a)):(h=s.substr(ya.length),o=this.context.getChunkFileName(h));const u=it(ht(ot(t),o));let c;return null!==a&&(c=r.hookFirstSync("resolveAssetUrl",[{assetFileName:o,chunkId:t,format:n,moduleId:this.context.module.id,relativeAssetPath:u}])),c||(c=r.hookFirstSync("resolveFileUrl",[{assetReferenceId:a,chunkId:t,chunkReferenceId:h,fileName:o,format:n,moduleId:this.context.module.id,relativePath:u}])),e.overwrite(i.start,i.end,c),!0}const o=r.hookFirstSync("resolveImportMeta",[s,{chunkId:t,format:n,moduleId:this.context.module.id}]);return"string"==typeof o&&(i instanceof ma?e.overwrite(i.start,i.end,o):e.overwrite(this.start,this.end,o),!0)}},MethodDefinition:class extends Lo{hasEffects(e){return this.key.hasEffects(e)}hasEffectsWhenCalledAtPath(e,t,n){return e.length>0||this.value.hasEffectsWhenCalledAtPath(ge,t,n)}},NewExpression:class extends Lo{bind(){super.bind();for(const e of this.arguments)e.deoptimizePath(ye)}hasEffects(e){for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotatedPure&&this.callee.hasEffectsWhenCalledAtPath(ge,this.callOptions,e.getHasEffectsWhenCalledOptions())}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}initialise(){this.included=!1,this.callOptions=fe.create({args:this.arguments,callIdentifier:this,withNew:!0})}},ObjectExpression:class extends Lo{bind(){super.bind(),null===this.propertyMap&&this.buildPropertyMap()}deoptimizeCache(){this.hasUnknownDeoptimizedProperty||this.deoptimizeAllProperties()}deoptimizePath(e){if(this.hasUnknownDeoptimizedProperty)return;if(null===this.propertyMap&&this.buildPropertyMap(),0===e.length)return void this.deoptimizeAllProperties();const t=e[0];if(1===e.length){if("string"!=typeof t)return void this.deoptimizeAllProperties();if(!this.deoptimizedPaths[t]&&(this.deoptimizedPaths[t]=!0,this.expressionsToBeDeoptimized[t]))for(const e of this.expressionsToBeDeoptimized[t])e.deoptimizeCache()}const n=1===e.length?ye:e.slice(1);for(const e of"string"==typeof t?this.propertyMap[t]?this.propertyMap[t].propertiesRead:[]:this.properties)e.deoptimizePath(n)}getLiteralValueAtPath(e,t,n){null===this.propertyMap&&this.buildPropertyMap();const r=e[0];return 0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]?ve:1!==e.length||this.propertyMap[r]||Be[r]||0!==this.unmatchablePropertiesRead.length?!this.propertyMap[r]||null===this.propertyMap[r].exactMatchRead||this.propertyMap[r].propertiesRead.length>1?ve:(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n],this.propertyMap[r].exactMatchRead.getLiteralValueAtPath(e.slice(1),t,n)):void(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n])}getReturnExpressionWhenCalledAtPath(e,t,n){null===this.propertyMap&&this.buildPropertyMap();const r=e[0];return 0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]?Ee:1!==e.length||!Be[r]||0!==this.unmatchablePropertiesRead.length||this.propertyMap[r]&&null!==this.propertyMap[r].exactMatchRead?!this.propertyMap[r]||null===this.propertyMap[r].exactMatchRead||this.propertyMap[r].propertiesRead.length>1?Ee:(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n],this.propertyMap[r].exactMatchRead.getReturnExpressionWhenCalledAtPath(e.slice(1),t,n)):qe(Be,r)}hasEffectsWhenAccessedAtPath(e,t){if(0===e.length)return!1;const n=e[0];if(e.length>1&&(this.hasUnknownDeoptimizedProperty||"string"!=typeof n||this.deoptimizedPaths[n]||!this.propertyMap[n]||null===this.propertyMap[n].exactMatchRead))return!0;const r=e.slice(1);for(const e of"string"!=typeof n?this.properties:this.propertyMap[n]?this.propertyMap[n].propertiesRead:[])if(e.hasEffectsWhenAccessedAtPath(r,t))return!0;return!1}hasEffectsWhenAssignedAtPath(e,t){if(0===e.length)return!1;const n=e[0];if(e.length>1&&(this.hasUnknownDeoptimizedProperty||"string"!=typeof n||this.deoptimizedPaths[n]||!this.propertyMap[n]||null===this.propertyMap[n].exactMatchRead))return!0;const r=e.slice(1);for(const i of"string"!=typeof n?this.properties:e.length>1?this.propertyMap[n].propertiesRead:this.propertyMap[n]?this.propertyMap[n].propertiesSet:[])if(i.hasEffectsWhenAssignedAtPath(r,t))return!0;return!1}hasEffectsWhenCalledAtPath(e,t,n){const r=e[0];if(0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]||(this.propertyMap[r]?!this.propertyMap[r].exactMatchRead:e.length>1||!Be[r]))return!0;const i=e.slice(1);for(const e of this.propertyMap[r]?this.propertyMap[r].propertiesRead:[])if(e.hasEffectsWhenCalledAtPath(i,t,n))return!0;return!(1!==e.length||!Be[r])&&Fe(Be,r,this.included,t,n)}initialise(){this.included=!1,this.hasUnknownDeoptimizedProperty=!1,this.deoptimizedPaths=Object.create(null),this.propertyMap=null,this.expressionsToBeDeoptimized=Object.create(null)}render(e,t,{renderedParentType:n}=hn){super.render(e,t),n===te&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}buildPropertyMap(){this.propertyMap=Object.create(null),this.unmatchablePropertiesRead=[],this.unmatchablePropertiesWrite=[];for(let e=this.properties.length-1;e>=0;e--){const t=this.properties[e];if(t instanceof xa){this.unmatchablePropertiesRead.push(t);continue}const n="get"!==t.kind,r="set"!==t.kind;let i;if(t.computed){const e=t.key.getLiteralValueAtPath(ge,na,this);if(e===ve){r?this.unmatchablePropertiesRead.push(t):this.unmatchablePropertiesWrite.push(t);continue}i=String(e)}else i=t.key instanceof ia?t.key.name:String(t.key.value);const s=this.propertyMap[i];s?(r&&null===s.exactMatchRead&&(s.exactMatchRead=t,s.propertiesRead.push(t,...this.unmatchablePropertiesRead)),n&&!r&&null===s.exactMatchWrite&&(s.exactMatchWrite=t,s.propertiesSet.push(t,...this.unmatchablePropertiesWrite))):this.propertyMap[i]={exactMatchRead:r?t:null,exactMatchWrite:n?t:null,propertiesRead:r?[t,...this.unmatchablePropertiesRead]:[],propertiesSet:n&&!r?[t,...this.unmatchablePropertiesWrite]:[]}}}deoptimizeAllProperties(){this.hasUnknownDeoptimizedProperty=!0;for(const e of this.properties)e.deoptimizePath(ye);for(const e of Object.keys(this.expressionsToBeDeoptimized))for(const t of this.expressionsToBeDeoptimized[e])t.deoptimizeCache()}},ObjectPattern:class extends Lo{addExportedVariables(e){for(const t of this.properties)t.type===ce?t.value.addExportedVariables(e):t.argument.addExportedVariables(e)}declare(e,t){for(const n of this.properties)n.declare(e,t)}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){if(e.length>0)return!0;for(const e of this.properties)if(e.hasEffectsWhenAssignedAtPath(ge,t))return!0;return!1}},Program:va,Property:class extends Lo{constructor(){super(...arguments),this.declarationInit=null}bind(){super.bind(),"get"===this.kind&&null===this.returnExpression&&this.updateReturnExpression(),null!==this.declarationInit&&this.declarationInit.deoptimizePath([me,me])}declare(e,t){this.declarationInit=t,this.value.declare(e,Ee)}deoptimizeCache(){throw new Error("Unexpected deoptimization")}deoptimizePath(e){"get"===this.kind?e.length>0&&(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.deoptimizePath(e)):"set"!==this.kind&&this.value.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return"set"===this.kind?ve:"get"===this.kind?(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.getLiteralValueAtPath(e,t,n)):this.value.getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n){return"set"===this.kind?Ee:"get"===this.kind?(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.getReturnExpressionWhenCalledAtPath(e,t,n)):this.value.getReturnExpressionWhenCalledAtPath(e,t,n)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenAccessedAtPath(e,t){return"get"===this.kind?this.value.hasEffectsWhenCalledAtPath(ge,this.accessorCallOptions,t.getHasEffectsWhenCalledOptions())||e.length>0&&this.returnExpression.hasEffectsWhenAccessedAtPath(e,t):this.value.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return"get"===this.kind?0===e.length||this.returnExpression.hasEffectsWhenAssignedAtPath(e,t):"set"===this.kind?e.length>0||this.value.hasEffectsWhenCalledAtPath(ge,this.accessorCallOptions,t.getHasEffectsWhenCalledOptions()):this.value.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return"get"===this.kind?this.returnExpression.hasEffectsWhenCalledAtPath(e,t,n):this.value.hasEffectsWhenCalledAtPath(e,t,n)}initialise(){this.included=!1,this.returnExpression=null,this.accessorCallOptions=fe.create({callIdentifier:this,withNew:!1})}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}updateReturnExpression(){this.returnExpression=Ee,this.returnExpression=this.value.getReturnExpressionWhenCalledAtPath(ge,na,this)}},RestElement:class extends Lo{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e){this.argument.addExportedVariables(e)}bind(){super.bind(),null!==this.declarationInit&&this.declarationInit.deoptimizePath([me,me])}declare(e,t){this.argument.declare(e,Ee),this.declarationInit=t}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(ge)}hasEffectsWhenAssignedAtPath(e,t){return e.length>0||this.argument.hasEffectsWhenAssignedAtPath(ge,t)}},ReturnStatement:class extends Lo{hasEffects(e){return!e.ignoreReturnAwaitYield()||this.argument&&this.argument.hasEffects(e)}initialise(){this.included=!1,this.scope.addReturnExpression(this.argument||Ee)}render(e,t){this.argument&&(this.argument.render(e,t),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends Lo{deoptimizePath(e){e.length>0&&this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,n)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.expressions[this.expressions.length-1].hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||this.expressions[this.expressions.length-1].hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return this.expressions[this.expressions.length-1].hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0;for(let t=0;t<this.expressions.length-1;t++){const n=this.expressions[t];(e||n.shouldBeIncluded())&&n.include(e)}this.expressions[this.expressions.length-1].include(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=hn){let i,s=0,o=0;for(const{node:a,start:h,end:u}of mn(this.expressions,e,this.start,this.end))a.included?(o++,0===s&&(s=h),i=u,a===this.expressions[this.expressions.length-1]&&1===o?a.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}):a.render(e,t)):un(a,e,h,u);o>1&&n&&(e.prependRight(s,"("),e.appendLeft(i,")"))}},SpreadElement:xa,SwitchCase:class extends Lo{include(e){this.included=!0,this.test&&this.test.include(e);for(const t of this.consequent)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){if(this.consequent.length){this.test&&this.test.render(e,t);const n=this.test?this.test.end:pn(e.original,"default",this.start)+7,r=pn(e.original,":",n)+1;fn(this.consequent,e,r,this.end,t)}else super.render(e,t)}},SwitchStatement:class extends Lo{createScope(e){this.scope=new Yo(e)}hasEffects(e){return super.hasEffects(e.setIgnoreBreakStatements())}},TaggedTemplateExpression:class extends Lo{bind(){super.bind(),this.tag.type===ie&&(this.scope.findVariable(this.tag.name).isNamespace&&this.context.error({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${this.tag.name}')`},this.start),"eval"===this.tag.name&&this.context.warn({code:"EVAL",message:"Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification",url:"https://rollupjs.org/guide/en#avoiding-eval"},this.start))}hasEffects(e){return super.hasEffects(e)||this.tag.hasEffectsWhenCalledAtPath(ge,this.callOptions,e.getHasEffectsWhenCalledOptions())}initialise(){this.included=!1,this.callOptions=fe.create({callIdentifier:this,withNew:!1})}},TemplateElement:class extends Lo{hasEffects(e){return!1}},TemplateLiteral:class extends Lo{getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?ve:this.quasis[0].value.cooked}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}},ThisExpression:class extends Lo{bind(){super.bind(),this.variable=this.scope.findVariable("this")}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.variable.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return this.variable.hasEffectsWhenAssignedAtPath(e,t)}initialise(){this.included=!1,this.variable=null,this.alias=this.scope.findLexicalBoundary()instanceof Ea?this.context.moduleContext:null,"undefined"===this.alias&&this.context.warn({code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:"https://rollupjs.org/guide/en#error-this-is-undefined"},this.start)}render(e,t){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends Lo{hasEffects(e){return!0}},TryStatement:Lo,UnaryExpression:class extends Lo{bind(){super.bind(),"delete"===this.operator&&this.argument.deoptimizePath(ge)}getLiteralValueAtPath(e,t,n){if(e.length>0)return ve;const r=this.argument.getLiteralValueAtPath(ge,t,n);return r===ve?ve:_a[this.operator](r)}hasEffects(e){return this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsWhenAssignedAtPath(ge,e)}hasEffectsWhenAccessedAtPath(e,t){return"void"===this.operator?e.length>0:e.length>1}},UnknownNode:class extends Lo{hasEffects(e){return!0}include(){super.include(!0)}},UpdateExpression:class extends Lo{bind(){super.bind(),this.argument.deoptimizePath(ge),ra(this.argument)&&(this.scope.findVariable(this.argument.name).isReassigned=!0)}hasEffects(e){return this.argument.hasEffects(e)||this.argument.hasEffectsWhenAssignedAtPath(ge,e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}render(e,t){this.argument.render(e,t);const n=this.argument.variable;if("system"===t.format&&n&&n.exportName){const t=n.getName();if(this.prefix)e.overwrite(this.start,this.end,`exports('${n.exportName}', ${this.operator}${t})`);else{let r;switch(this.operator){case"++":r=`${t} + 1`;break;case"--":r=`${t} - 1`}e.overwrite(this.start,this.end,`(exports('${n.exportName}', ${r}), ${t}${this.operator})`)}}}},VariableDeclaration:class extends Lo{deoptimizePath(e){for(const e of this.declarations)e.deoptimizePath(ge)}hasEffectsWhenAssignedAtPath(e,t){return!1}include(e){this.included=!0;for(const t of this.declarations)(e||t.shouldBeIncluded())&&t.include(e)}includeWithAllDeclaredVariables(e){this.included=!0;for(const t of this.declarations)t.include(e)}initialise(){this.included=!1;for(const e of this.declarations)e.declareDeclarator(this.kind)}render(e,t,n=hn){if(function(e){for(const t of e){if(!t.included)return!1;if(t.id.type===ie){if(t.id.variable.exportName)return!1}else{const e=[];if(t.id.addExportedVariables(e),e.length>0)return!1}}return!0}(this.declarations)){for(const n of this.declarations)n.render(e,t);n.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t,n)}renderDeclarationEnd(e,t,n,r,i,s,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),s&&(t+=";"),null!==n?(10!==e.original.charCodeAt(r-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(r--,13===e.original.charCodeAt(r)&&r--),r===n+1?e.overwrite(n,i,t):(e.overwrite(n,n+1,t),e.remove(r,i))):e.appendLeft(i,t),o.length>0&&e.appendLeft(i," "+Jo(o))}renderReplacedDeclarations(e,t,{start:n=this.start,end:r=this.end,isNoStatement:i}){const s=mn(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let o,a,h=(a=/\n\s*$/.test(e.slice(this.start,s[0].start))?this.start+this.kind.length:s[0].start)-1;e.remove(this.start,h);let u,c,l=!1,p=!1,d="";const f=[];for(const{node:n,start:r,separator:i,contentEnd:m,end:g}of s)!n.included||ra(n.id)&&ba(n.id.variable)&&null===n.init?e.remove(r,g):(u="",c="",ra(n.id)&&ba(n.id.variable)?(p&&(d+=";"),l=!1):("system"===t.format&&null!==n.init&&(n.id.type!==ie?n.id.addExportedVariables(f):n.id.variable.exportName&&(e.prependLeft(e.original.indexOf("=",n.id.end)+1,` exports('${n.id.variable.safeExportName||n.id.variable.exportName}',`),c+=")")),l?d+=",":(p&&(d+=";"),u+=`${this.kind} `,l=!0)),a===h+1?e.overwrite(h,a,d+u):(e.overwrite(h,h+1,d),e.appendLeft(a,u)),n.render(e,t),o=m,a=g,p=!0,h=i,d=c);p?this.renderDeclarationEnd(e,d,h,o,a,!i,f):e.remove(n,r)}},VariableDeclarator:class extends Lo{declareDeclarator(e){this.id.declare(e,this.init||_e)}deoptimizePath(e){this.id.deoptimizePath(e)}render(e,t){null===this.init||this.init.included?super.render(e,t):(e.remove(this.id.end,this.end),this.id.render(e,t))}},WhileStatement:class extends Lo{hasEffects(e){return this.test.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}},YieldExpression:class extends Lo{bind(){super.bind(),null!==this.argument&&this.argument.deoptimizePath(ye)}hasEffects(e){return!e.ignoreReturnAwaitYield()||this.argument&&this.argument.hasEffects(e)}render(e,t){this.argument&&(this.argument.render(e,t),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}};function Sa(e,t,n){n(e,t)}function Ia(e,t,n){}var wa={};function Pa(e,t,n=e.type){let r=t.commentNodes[t.commentIndex];for(;r&&e.start>=r.end;)ka(e,r),r=t.commentNodes[++t.commentIndex];r&&r.end<=e.end&&wa[n](e,t,Pa)}function ka(e,t){e.annotations?e.annotations.push(t):e.annotations=[t],"ExpressionStatement"===e.type&&(e=e.expression),"CallExpression"!==e.type&&"NewExpression"!==e.type||(e.annotatedPure=!0)}wa.Program=wa.BlockStatement=function(e,t,n){for(var r=0,i=e.body;r<i.length;r+=1){n(i[r],t,"Statement")}},wa.Statement=Sa,wa.EmptyStatement=Ia,wa.ExpressionStatement=wa.ParenthesizedExpression=function(e,t,n){return n(e.expression,t,"Expression")},wa.IfStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Statement"),e.alternate&&n(e.alternate,t,"Statement")},wa.LabeledStatement=function(e,t,n){return n(e.body,t,"Statement")},wa.BreakStatement=wa.ContinueStatement=Ia,wa.WithStatement=function(e,t,n){n(e.object,t,"Expression"),n(e.body,t,"Statement")},wa.SwitchStatement=function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0,i=e.cases;r<i.length;r+=1){var s=i[r];s.test&&n(s.test,t,"Expression");for(var o=0,a=s.consequent;o<a.length;o+=1){n(a[o],t,"Statement")}}},wa.SwitchCase=function(e,t,n){e.test&&n(e.test,t,"Expression");for(var r=0,i=e.consequent;r<i.length;r+=1){n(i[r],t,"Statement")}},wa.ReturnStatement=wa.YieldExpression=wa.AwaitExpression=function(e,t,n){e.argument&&n(e.argument,t,"Expression")},wa.ThrowStatement=wa.SpreadElement=function(e,t,n){return n(e.argument,t,"Expression")},wa.TryStatement=function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,"Statement")},wa.CatchClause=function(e,t,n){e.param&&n(e.param,t,"Pattern"),n(e.body,t,"Statement")},wa.WhileStatement=wa.DoWhileStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.body,t,"Statement")},wa.ForStatement=function(e,t,n){e.init&&n(e.init,t,"ForInit"),e.test&&n(e.test,t,"Expression"),e.update&&n(e.update,t,"Expression"),n(e.body,t,"Statement")},wa.ForInStatement=wa.ForOfStatement=function(e,t,n){n(e.left,t,"ForInit"),n(e.right,t,"Expression"),n(e.body,t,"Statement")},wa.ForInit=function(e,t,n){"VariableDeclaration"===e.type?n(e,t):n(e,t,"Expression")},wa.DebuggerStatement=Ia,wa.FunctionDeclaration=function(e,t,n){return n(e,t,"Function")},wa.VariableDeclaration=function(e,t,n){for(var r=0,i=e.declarations;r<i.length;r+=1){n(i[r],t)}},wa.VariableDeclarator=function(e,t,n){n(e.id,t,"Pattern"),e.init&&n(e.init,t,"Expression")},wa.Function=function(e,t,n){e.id&&n(e.id,t,"Pattern");for(var r=0,i=e.params;r<i.length;r+=1){n(i[r],t,"Pattern")}n(e.body,t,e.expression?"Expression":"Statement")},wa.Pattern=function(e,t,n){"Identifier"===e.type?n(e,t,"VariablePattern"):"MemberExpression"===e.type?n(e,t,"MemberPattern"):n(e,t)},wa.VariablePattern=Ia,wa.MemberPattern=Sa,wa.RestElement=function(e,t,n){return n(e.argument,t,"Pattern")},wa.ArrayPattern=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Pattern")}},wa.ObjectPattern=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];"Property"===s.type?(s.computed&&n(s.key,t,"Expression"),n(s.value,t,"Pattern")):"RestElement"===s.type&&n(s.argument,t,"Pattern")}},wa.Expression=Sa,wa.ThisExpression=wa.Super=wa.MetaProperty=Ia,wa.ArrayExpression=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Expression")}},wa.ObjectExpression=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){n(i[r],t)}},wa.FunctionExpression=wa.ArrowFunctionExpression=wa.FunctionDeclaration,wa.SequenceExpression=function(e,t,n){for(var r=0,i=e.expressions;r<i.length;r+=1){n(i[r],t,"Expression")}},wa.TemplateLiteral=function(e,t,n){for(var r=0,i=e.quasis;r<i.length;r+=1){n(i[r],t)}for(var s=0,o=e.expressions;s<o.length;s+=1){n(o[s],t,"Expression")}},wa.TemplateElement=Ia,wa.UnaryExpression=wa.UpdateExpression=function(e,t,n){n(e.argument,t,"Expression")},wa.BinaryExpression=wa.LogicalExpression=function(e,t,n){n(e.left,t,"Expression"),n(e.right,t,"Expression")},wa.AssignmentExpression=wa.AssignmentPattern=function(e,t,n){n(e.left,t,"Pattern"),n(e.right,t,"Expression")},wa.ConditionalExpression=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Expression"),n(e.alternate,t,"Expression")},wa.NewExpression=wa.CallExpression=function(e,t,n){if(n(e.callee,t,"Expression"),e.arguments)for(var r=0,i=e.arguments;r<i.length;r+=1){n(i[r],t,"Expression")}},wa.MemberExpression=function(e,t,n){n(e.object,t,"Expression"),e.computed&&n(e.property,t,"Expression")},wa.ExportNamedDeclaration=wa.ExportDefaultDeclaration=function(e,t,n){e.declaration&&n(e.declaration,t,"ExportNamedDeclaration"===e.type||e.declaration.id?"Statement":"Expression"),e.source&&n(e.source,t,"Expression")},wa.ExportAllDeclaration=function(e,t,n){n(e.source,t,"Expression")},wa.ImportDeclaration=function(e,t,n){for(var r=0,i=e.specifiers;r<i.length;r+=1){n(i[r],t)}n(e.source,t,"Expression")},wa.ImportSpecifier=wa.ImportDefaultSpecifier=wa.ImportNamespaceSpecifier=wa.Identifier=wa.Literal=Ia,wa.TaggedTemplateExpression=function(e,t,n){n(e.tag,t,"Expression"),n(e.quasi,t,"Expression")},wa.ClassDeclaration=wa.ClassExpression=function(e,t,n){return n(e,t,"Class")},wa.Class=function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression"),n(e.body,t)},wa.ClassBody=function(e,t,n){for(var r=0,i=e.body;r<i.length;r+=1){n(i[r],t)}},wa.MethodDefinition=wa.Property=function(e,t,n){e.computed&&n(e.key,t,"Expression"),n(e.value,t,"Expression")};const Ca=/[@#]__PURE__/,Na=e=>Ca.test(e.text);let $a="sourceMa";$a+="ppingURL";const Ra=new RegExp(`^#\\s+${$a}=.+\\n?`),Oa=()=>{};let Ma=()=>0,Ta=()=>0,Da=()=>0,La={};const Va=e=>1e3*e[0]+e[1]/1e6;function Ba(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function za(e,t=3){e=Ba(e,t),La.hasOwnProperty(e)||(La[e]={memory:0,startMemory:void 0,startTime:void 0,time:0,totalMemory:0});const n=Da();La[e].startTime=Ma(),La[e].startMemory=n}function ja(e,t=3){if(e=Ba(e,t),La.hasOwnProperty(e)){const t=Da();La[e].time+=Ta(La[e].startTime),La[e].totalMemory=Math.max(La[e].totalMemory,t),La[e].memory+=t-La[e].startMemory}}function Wa(){const e={};return Object.keys(La).forEach(t=>{e[t]=[La[t].time,La[t].memory,La[t].totalMemory]}),e}let Ua=Oa,Fa=Oa;const qa={load:!0,ongenerate:!0,onwrite:!0,resolveDynamicImport:!0,resolveId:!0,transform:!0,transformBundle:!0};function Ga(e,t){const n={};for(const r of Object.keys(e))if(!0===qa[r]){let i=`plugin ${t}`;e.name&&(i+=` (${e.name})`),i+=` - ${r}`,n[r]=function(){Ua(i,4);const t=e[r].apply(this===n?e:this,arguments);return Fa(i,4),t&&"function"==typeof t.then&&(Ua(`${i} (async)`,4),t.then(()=>Fa(`${i} (async)`,4))),t}}else n[r]=e[r];return n}function Ha(e){e.perf?(La={},"undefined"!=typeof process&&"function"==typeof process.hrtime?(Ma=process.hrtime.bind(process),Ta=(e=>Va(process.hrtime(e)))):"undefined"!=typeof performance&&"function"==typeof performance.now&&(Ma=performance.now.bind(performance),Ta=(e=>performance.now()-e)),"undefined"!=typeof process&&"function"==typeof process.memoryUsage&&(Da=(()=>process.memoryUsage().heapUsed)),Ua=za,Fa=ja,e.plugins=e.plugins.map(Ga)):(Ua=Oa,Fa=Oa)}const Ka={ecmaVersion:2019,preserveParens:!1,sourceType:"module"};function Ya(e,t,n,r){t.error({code:"MISSING_EXPORT",message:`'${e}' is not exported by ${Bt(n)}`,url:"https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-"},r)}const Xa={localName:mt};class Qa{constructor(e,t,n,r){this.chunkAlias=null,this.comments=[],this.dependencies=[],this.dynamicallyImportedBy=[],this.dynamicDependencies=[],this.dynamicImports=[],this.entryPointsHash=new Uint8Array(10),this.execIndex=1/0,this.exportAllModules=null,this.exportAllSources=[],this.exports=Object.create(null),this.exportsAll=Object.create(null),this.exportShimVariable=new yt(this),this.facadeChunk=null,this.importDescriptions=Object.create(null),this.importMetas=[],this.imports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.manualChunkAlias=null,this.reexports=Object.create(null),this.sources=[],this.usesTopLevelAwait=!1,this.namespaceVariable=void 0,this.id=t,this.graph=e,this.excludeFromSourcemap=/\0/.test(t),this.context=e.getModuleContext(t),this.moduleSideEffects=n,this.isEntryPoint=r}basename(){const e=st(this.id),t=at(this.id);return Ze(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){if(void 0!==t){e.pos=t;let n=Tt(this.code,t,{offsetLine:1});try{n=function(e,t){const n=e.filter(e=>e.mappings);for(;n.length>0;){const e=n.pop(),r=e.mappings[t.line-1];let i=!1;if(void 0!==r)for(const n of r)if(n[0]>=t.column){if(n.length<4)break;t={column:n[3],line:n[2]+1,name:e.names[n[4]],source:e.sources[n[1]]},i=!0;break}if(!i)throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,n)}catch(e){this.warn({code:"SOURCEMAP_ERROR",loc:{column:n.column,file:this.id,line:n.line},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:t},void 0)}e.loc={column:n.column,file:this.id,line:n.line},e.frame=Lt(this.originalCode,n.line,n.column)}jt(e)}getAllExports(){const e=Object.assign(Object.create(null),this.exports,this.reexports);return this.exportAllModules.forEach(t=>{if(t.isExternal)e[`*${t.id}`]=!0;else for(const n of t.getAllExports())"default"!==n&&(e[n]=!0)}),Object.keys(e)}getDynamicImportExpressions(){return this.dynamicImports.map(({node:e})=>{const t=e.parent.arguments[0];if(function(e){return e.type===pe}(t)){if(0===t.expressions.length&&1===t.quasis.length)return t.quasis[0].value.cooked}else{if(!function(e){return e.type===ae}(t))return t;if("string"==typeof t.value)return t.value}})}getExports(){return Object.keys(this.exports)}getOrCreateNamespace(){return this.namespaceVariable||(this.namespaceVariable=new kt(this.astContext))}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set;for(const t in this.reexports)e.add(t);for(const t of this.exportAllModules)if(t instanceof ct)e.add(`*${t.id}`);else for(const n of t.getExports().concat(t.getReexports()))"default"!==n&&e.add(n);return this.transitiveReexports=Array.from(e)}getRenderedExports(){const e=[],t=[];for(const n in this.exports){const r=this.getVariableForExportName(n);(r&&r.included?e:t).push(n)}return{renderedExports:e,removedExports:t}}getTransitiveDependencies(){return this.dependencies.concat(this.getReexports().map(e=>this.getVariableForExportName(e).module))}getVariableForExportName(e,t){if("*"===e[0]){if(1===e.length)return this.getOrCreateNamespace();return this.graph.moduleById.get(e.slice(1)).getVariableForExportName("*")}const n=this.reexports[e];if(n){const e=n.module.getVariableForExportName(n.localName);return e||Ya(n.localName,this,n.module.id,n.start),e}const r=this.exports[e];if(r){if(r===Xa)return this.exportShimVariable;const e=r.localName;return this.traceVariable(e)||this.graph.scope.findVariable(e)}if("default"!==e)for(let t=0;t<this.exportAllModules.length;t+=1){const n=this.exportAllModules[t].getVariableForExportName(e,!0);if(n)return n}if(this.graph.shimMissingExports&&!t)return this.shimMissingExport(e),this.exportShimVariable}include(){this.ast.shouldBeIncluded()&&this.ast.include(!1)}includeAllExports(){this.isExecuted||(this.graph.needsTreeshakingPass=!0,lt(this));for(const e of this.getExports()){const t=this.getVariableForExportName(e);t.deoptimizePath(ye),t.included||(t.include(),this.graph.needsTreeshakingPass=!0)}for(const e of this.getReexports()){const t=this.getVariableForExportName(e);t.isExternal?t.reexported=t.module.reexported=!0:t.included||(t.include(),t.deoptimizePath(ye),this.graph.needsTreeshakingPass=!0)}}includeAllInBundle(){this.ast.include(!0)}isIncluded(){return this.ast.included||this.namespaceVariable&&this.namespaceVariable.included}linkDependencies(){for(const e of this.sources){const t=this.resolvedIds[e].id;if(t){const e=this.graph.moduleById.get(t);this.dependencies.push(e)}}for(const{resolution:e}of this.dynamicImports)(e instanceof Qa||e instanceof ct)&&this.dynamicDependencies.push(e);this.addModulesToSpecifiers(this.importDescriptions),this.addModulesToSpecifiers(this.reexports),this.exportAllModules=this.exportAllSources.map(e=>{const t=this.resolvedIds[e].id;return this.graph.moduleById.get(t)})}render(e){const t=this.magicString.clone();return this.ast.render(t,e),this.usesTopLevelAwait=this.astContext.usesTopLevelAwait,t}setSource({ast:e,code:t,customTransformCache:n,moduleSideEffects:r,originalCode:i,originalSourcemap:s,resolvedIds:o,sourcemapChain:a,transformDependencies:h}){var u;this.code=t,this.originalCode=i,this.originalSourcemap=s,this.sourcemapChain=a,this.transformDependencies=h,this.customTransformCache=n,"boolean"==typeof r&&(this.moduleSideEffects=r),Ua("generate ast",3),this.esTreeAst=e||function(e,t,n){try{return t.parse(e.code,Object.assign({},Ka,n,{onComment:(t,n,r,i)=>e.comments.push({block:t,text:n,start:r,end:i})}))}catch(t){let n=t.message.replace(/ \(\d+:\d+\)$/,"");e.id.endsWith(".json")?n+=" (Note that you need rollup-plugin-json to import JSON files)":e.id.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),e.error({code:"PARSE_ERROR",message:n},t.pos)}}(this,this.graph.acornParser,this.graph.acornOptions),u=this.comments,Pa(this.esTreeAst,{commentIndex:0,commentNodes:u.filter(Na)}),Fa("generate ast",3),this.resolvedIds=o||Object.create(null);const c=this.id;this.magicString=new H(t,{filename:this.excludeFromSourcemap?null:c,indentExclusionRanges:[]}),this.removeExistingSourceMap(),Ua("analyse ast",3),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),annotations:this.graph.treeshake&&this.graph.treeshakingOptions.annotations,code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:c,getAssetFileName:this.graph.pluginDriver.getAssetFileName,getChunkFileName:this.graph.moduleLoader.getChunkFileName.bind(this.graph.moduleLoader),getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeDynamicImport:this.includeDynamicImport.bind(this),includeVariable:this.includeVariable.bind(this),isCrossChunkImport:e=>e.module.chunk!==this.chunk,magicString:this.magicString,module:this,moduleContext:this.context,nodeConstructors:Aa,preserveModules:this.graph.preserveModules,propertyReadSideEffects:!this.graph.treeshake||this.graph.treeshakingOptions.propertyReadSideEffects,traceExport:this.getVariableForExportName.bind(this),traceVariable:this.traceVariable.bind(this),treeshake:this.graph.treeshake,usesTopLevelAwait:!1,warn:this.warn.bind(this)},this.scope=new Ea(this.graph.scope,this.astContext),this.ast=new va(this.esTreeAst,{type:"Module",context:this.astContext},this.scope),Fa("analyse ast",3)}toJSON(){return{ast:this.esTreeAst,code:this.code,customTransformCache:this.customTransformCache,dependencies:this.dependencies.map(e=>e.id),id:this.id,moduleSideEffects:this.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,transformAssets:this.transformAssets,transformDependencies:this.transformDependencies}}traceVariable(e){if(e in this.scope.variables)return this.scope.variables[e];if(e in this.importDescriptions){const t=this.importDescriptions[e],n=t.module;if(!n.isExternal&&"*"===t.name)return n.getOrCreateNamespace();const r=n.getVariableForExportName(t.name);return r||Ya(t.name,this,n.id,t.start),r}return null}warn(e,t){if(void 0!==t){e.pos=t;const{line:n,column:r}=Tt(this.code,t,{offsetLine:1});e.loc={file:this.id,line:n,column:r},e.frame=Lt(this.code,n,r)}e.id=this.id,this.graph.warn(e)}addDynamicImport(e){this.dynamicImports.push({node:e,resolution:void 0})}addExport(e){const t=e.source&&e.source.value;if(t)if(-1===this.sources.indexOf(t)&&this.sources.push(t),e.type===Z)this.exportAllSources.push(t);else for(const n of e.specifiers){const e=n.exported.name;(this.exports[e]||this.reexports[e])&&this.error({code:"DUPLICATE_EXPORT",message:`A module cannot have multiple exports with the same name ('${e}')`},n.start),this.reexports[e]={localName:n.local.name,module:null,source:t,start:n.start}}else if(function(e){return e.type===ee}(e))this.exports.default&&this.error({code:"DUPLICATE_EXPORT",message:"A module can only have one default export"},e.start),this.exports.default={identifier:e.variable.getOriginalVariableName(),localName:"default"};else if(e.declaration){const t=e.declaration;if(t.type===de)for(const e of t.declarations)for(const t of an(e.id))this.exports[t]={localName:t};else{const e=t.id.name;this.exports[e]={localName:e}}}else for(const t of e.specifiers){const e=t.local.name,n=t.exported.name;(this.exports[n]||this.reexports[n])&&this.error({code:"DUPLICATE_EXPORT",message:`A module cannot have multiple exports with the same name ('${n}')`},t.start),this.exports[n]={localName:e}}}addImport(e){const t=e.source.value;-1===this.sources.indexOf(t)&&this.sources.push(t);for(const n of e.specifiers){const e=n.local.name;this.importDescriptions[e]&&this.error({code:"DUPLICATE_IMPORT",message:`Duplicated import '${e}'`},n.start);const r=n.type===se,i=n.type===oe,s=r?"default":i?"*":n.imported.name;this.importDescriptions[e]={source:t,start:n.start,name:s,module:null}}}addImportMeta(e){this.importMetas.push(e)}addModulesToSpecifiers(e){for(const t of Object.keys(e)){const n=e[t],r=this.resolvedIds[n.source].id;n.module=this.graph.moduleById.get(r)}}includeDynamicImport(e){const t=this.dynamicImports.find(t=>t.node===e).resolution;t instanceof Qa&&(t.dynamicallyImportedBy.push(this),t.includeAllExports())}includeVariable(e){const t=e.module;e.included||(e.include(),this.graph.needsTreeshakingPass=!0),t&&t!==this&&this.imports.add(e)}removeExistingSourceMap(){for(const e of this.comments)!e.block&&Ra.test(e.text)&&this.magicString.remove(e.start,e.end)}shimMissingExport(e){this.exports[e]||(this.graph.warn({code:"SHIMMED_EXPORT",exporter:Bt(this.id),exportName:e,message:`Missing export "${e}" has been shimmed in module ${Bt(this.id)}.`}),this.exports[e]=Xa)}}class Ja{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,n){return{line:e,column:t,name:n,source:this}}}class Za{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=[],n=[],r=[];for(const i of this.mappings){const s=[];for(const r of i){const i=this.sources[r[1]];if(!i)continue;const o=i.traceSegment(r[2],r[3],this.names[r[4]]);if(o){let i=e.lastIndexOf(o.source.filename);-1===i?(i=e.length,e.push(o.source.filename),t[i]=o.source.content):null==t[i]?t[i]=o.source.content:null!=o.source.content&&t[i]!==o.source.content&&jt({message:`Multiple conflicting contents for sourcemap source ${o.source.filename}`});const a=[r[0],i,o.line,o.column];if(o.name){let e=n.indexOf(o.name);-1===e&&(e=n.length,n.push(o.name)),a[4]=e}s.push(a)}}r.push(s)}return{sources:e,sourcesContent:t,names:n,mappings:r}}traceSegment(e,t,n){const r=this.mappings[e];if(!r)return null;let i=0,s=r.length-1;for(;i<=s;){const e=i+s>>1,o=r[e];if(o[0]===t){const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],this.names[o[4]]||n):null}o[0]>t?s=e-1:i=e+1}return null}}const eh={amd:rh,cjs:rh,es:nh,iife:rh,system:nh,umd:rh};function th(e,t,n,r,i,s,o){const{forbiddenNames:a,formatGlobals:h}=Pt[i];Object.assign(r,a),Object.assign(r,h),function(e,t){const n=Object.assign({},...t.map(e=>e.scope.accessedOutsideVariables));for(const t of Object.keys(n)){const r=n[t];r.included&&(e[t]=!0)}}(r,e),function(e,t){for(const n of t){const t=n.scope.variables;for(const n of Object.keys(t)){const r=t[n];r.included&&!(r.renderBaseName||r instanceof ft&&r.referencesOriginal())&&r.setRenderNames(null,vn(r.name,e))}const r=n.getOrCreateNamespace();r.included&&r.setRenderNames(null,vn(r.name,e))}}(r,e),eh[i](r,n,t,s,o);for(const t of e)t.scope.deconflict(a)}function nh(e,t,n,r){for(const n of t){const t=n.module,i=n.name;let s;s=t instanceof ct&&("*"===i||"default"===i)?"default"===i&&r&&t.exportsNamespace?t.variableName+"__default":t.variableName:i,n.setRenderNames(null,vn(s,e))}}function rh(e,t,n,r,i){for(const t of n)t.variableName=vn(t.variableName,e);for(const e of t){const t=e.module;if(t instanceof ct){const n=e.name;"default"===n&&r&&(t.exportsNamespace||t.exportsNames)?e.setRenderNames(null,t.variableName+"__default"):"*"===n||"default"===n?e.setRenderNames(null,t.variableName):e.setRenderNames(t.variableName,null)}else{const n=t.chunk;"default"===n.exportMode||i&&e.isNamespace?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,t.chunk.getVariableExportName(e))}}}const ih=(e,t)=>e.execIndex>t.execIndex?1:-1;function sh(e){e.sort(ih)}function oh(e,t,n){const r=[Bt(e)];let i=t;for(;i!==e&&(r.push(Bt(i)),i=n[i]););return r.push(r[0]),r.reverse(),r}function ah(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),r=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===r.length)return null;if(n.length>=r.length)return"\t";const i=r.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(" ")}function hh(e,t,n){return zt(e)||jt({code:"INVALID_PATTERN",message:`Invalid output pattern "${e}" for ${t}, cannot be an absolute or relative URL or path.`}),e.replace(/\[(\w+)\]/g,(e,r)=>{const i=n(r);return void 0===i&&jt({code:"INVALID_PATTERN_REPLACEMENT",message:`"${r}" is not a valid substitution name in output option ${t} pattern.`}),zt(i)||jt({code:"INVALID_PATTERN_REPLACEMENT",message:`Invalid replacement "${i}" for "${r}" in ${t} pattern, must be a plain path name.`}),i})}function uh(e,t){if(e in t==!1)return e;const n=at(e);e=e.substr(0,e.length-n.length);let r,i=1;for(;t[r=e+ ++i+n];);return r}function ch(e){return e.replace(/[\0?*]/g,"_")}function lh(e,t,n,r){let i;return"function"==typeof t?i=t(e.id):t&&(i=t[e.id]),i||(r?(n.warn({code:"MISSING_GLOBAL_NAME",guess:e.variableName,message:`No name was provided for external module '${e.id}' in output.globals – guessing '${e.variableName}'`,source:e.id}),e.variableName):void 0)}function ph(e){return!e.isEmpty||e.entryModules.length>0||null!==e.manualChunkAlias}class dh{constructor(e,t){this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.hasDynamicImport=!1,this.id=void 0,this.indentString=void 0,this.manualChunkAlias=null,this.usedModules=void 0,this.dependencies=void 0,this.dynamicDependencies=void 0,this.exportNames=Object.create(null),this.exports=new Set,this.imports=new Set,this.needsExportsShim=!1,this.renderedDeclarations=void 0,this.renderedHash=void 0,this.renderedModuleSources=void 0,this.renderedSource=null,this.renderedSourceLength=void 0,this.sortedExportNames=null,this.graph=e,this.orderedModules=t,this.execIndex=t.length>0?t[0].execIndex:1/0,this.isEmpty=!0;for(const e of t)this.isEmpty&&e.isIncluded()&&(this.isEmpty=!1),e.manualChunkAlias&&(this.manualChunkAlias=e.manualChunkAlias),e.chunk=this,(e.isEntryPoint||e.dynamicallyImportedBy.some(e=>-1===t.indexOf(e)))&&this.entryModules.push(e);const n=this.entryModules[0];this.variableName=n?Ze(st(n.chunkAlias||n.manualChunkAlias||Vt(n.id))):"__chunk_"+ ++e.curChunkIndex}generateEntryExportsOrMarkAsTainted(){const e=this.entryModules.map(e=>({map:this.getVariableExportNamesForModule(e),module:e}));for(const{map:t}of e)for(const e of t.keys())this.exports.add(e);e:for(const{map:t,module:n}of e){if(!this.graph.preserveModules){if(this.manualChunkAlias&&n.chunkAlias&&this.manualChunkAlias!==n.chunkAlias)continue e;for(const e of this.exports)if(!t.has(e))continue e}this.facadeModule=n;for(const[e,n]of t)for(const t of n)this.exportNames[t]=e;return}}generateId(e,t,n,r,i){this.id=uh(hh(e,t,e=>{switch(e){case"format":return"es"===r.format?"esm":r.format;case"hash":return this.computeContentHashWithDependencies(n,r);case"name":return this.getChunkName()}}),i)}generateIdPreserveModules(e,t){const n=ch(this.orderedModules[0].id);this.id=uh(it(nt(this.orderedModules[0].id)?ht(e,n):"_virtual/"+st(n)),t)}generateInternalExports(e){if(null!==this.facadeModule)return;const t="system"===e.format||"es"===e.format||e.compact;let n,r=0;if(this.exportNames=Object.create(null),this.sortedExportNames=null,t)for(const e of this.exports){do{49===(n=xn(++r)).charCodeAt(0)&&(n=xn(r+=9*Math.pow(64,n.length-1)))}while(St[n]);this.exportNames[n]=e}else for(const e of this.exports){for(r=0,n=e.name;this.exportNames[n];)n=e.name+"$"+ ++r;this.exportNames[n]=e}}getChunkName(){return this.chunkName||(this.chunkName=this.computeChunkName())}getDynamicImportIds(){return this.dynamicDependencies.map(e=>e.id).filter(Boolean)}getExportNames(){return this.sortedExportNames||(this.sortedExportNames=Object.keys(this.exportNames).sort())}getImportIds(){return this.dependencies.map(e=>e.id)}getRenderedHash(){if(this.renderedHash)return this.renderedHash;if(!this.renderedSource)return"";const e=N();return e.update(this.renderedSource.toString()),e.update(this.getExportNames().map(e=>{const t=this.exportNames[e];return`${Bt(t.module.id).replace(/\\/g,"/")}:${t.name}:${e}`}).join(",")),this.renderedHash=e.digest("hex")}getRenderedSourceLength(){return void 0!==this.renderedSourceLength?this.renderedSourceLength:this.renderedSourceLength=this.renderedSource.length()}getVariableExportName(e){if(this.graph.preserveModules&&e instanceof kt)return"*";for(const t of Object.keys(this.exportNames))if(this.exportNames[t]===e)return t}link(){const e=new Set,t=new Set;for(const n of this.orderedModules)this.addChunksFromDependencies(n.getTransitiveDependencies(),e),this.addChunksFromDependencies(n.dynamicDependencies,t),this.setUpModuleImports(n);this.dependencies=Array.from(e),this.dynamicDependencies=Array.from(t)}merge(e,t,n,r){if(null!==this.facadeModule||null!==e.facadeModule)throw new Error("Internal error: Code splitting chunk merges not supported for facades");for(const t of e.orderedModules)t.chunk=this,this.orderedModules.push(t);for(const t of e.imports)this.imports.has(t)||t.module.chunk===this||this.imports.add(t);for(const t of e.exports)this.exports.has(t)||this.exports.add(t);const i=this.exportNames;this.generateInternalExports(n);const s=(e,t)=>{if(e.imports)for(const n of e.imports)n.imported=this.getVariableExportName(t[n.imported]);if(e.reexports)for(const n of e.reexports)n.imported=this.getVariableExportName(t[n.imported])},o=(e,t)=>{t.imports&&(e.imports?e.imports=e.imports.concat(t.imports):e.imports=t.imports),t.reexports&&(e.reexports?e.reexports=e.reexports.concat(t.reexports):e.reexports=t.reexports),!e.exportsNames&&t.exportsNames&&(e.exportsNames=!0),!e.exportsDefault&&t.exportsDefault&&(e.exportsDefault=!0),e.name=this.variableName};for(const n of t){let t;for(let r=0;r<n.dependencies.length;r++){const a=n.dependencies[r];if(a!==e&&a!==this||!t)a===e?(n.dependencies[r]=this,s(t=n.renderedDeclarations.dependencies[r],e.exportNames)):a===this&&s(t=n.renderedDeclarations.dependencies[r],i);else{const h=n.renderedDeclarations.dependencies[r];s(h,a===e?e.exportNames:i),o(t,h),n.renderedDeclarations.dependencies.splice(r,1),n.dependencies.splice(r--,1)}}}this.preRender(n,r)}preRender(e,t){Ua("render modules",3);const n=new Y({separator:e.compact?"":"\n\n"});this.usedModules=[],this.indentString=e.compact?"":function(e,t){if(!0!==t.indent)return t.indent||"";for(let t=0;t<e.length;t++){const n=ah(e[t].originalCode);if(null!==n)return n}return"\t"}(this.orderedModules,e);const r=e.compact?"":"\n",i=e.compact?"":" ",s={compact:e.compact,dynamicImportFunction:e.dynamicImportFunction,format:e.format,freeze:!1!==e.freeze,indent:this.indentString,namespaceToStringTag:!0===e.namespaceToStringTag,varOrConst:e.preferConst?"const":"var"};for(const{module:e}of this.imports){const t=e instanceof Qa?e.chunk:e;-1===this.dependencies.indexOf(t)&&this.dependencies.push(t)}if(!this.graph.preserveModules&&null!==this.facadeModule)for(const e of this.dependencies)e instanceof dh&&this.inlineChunkDependencies(e,!0);for(let e=0;e<this.dependencies.length;e++){const t=this.dependencies[e];t instanceof dh&&t.isEmpty&&(this.dependencies.splice(e--,1),this.inlineChunkDependencies(t,!1))}sh(this.dependencies),this.setIdentifierRenderResolutions(e),this.prepareDynamicImports();let o="";this.renderedModules=Object.create(null),this.renderedModuleSources=[];for(let t=0;t<this.orderedModules.length;t++){const i=this.orderedModules[t],a=i.render(s);a.trim(),e.compact&&-1!==a.lastLine().indexOf("//")&&a.append("\n"),this.renderedModuleSources.push(a);const{renderedExports:h,removedExports:u}=i.getRenderedExports();this.renderedModules[i.id]={originalLength:i.originalCode.length,removedExports:u,renderedExports:h,renderedLength:a.length()};const c=i.getOrCreateNamespace();if((c.included||!a.isEmpty())&&(n.addSource(a),this.usedModules.push(i),c.included&&!this.graph.preserveModules)){const e=c.renderBlock(s);c.renderFirst()?o+=r+e:n.addSource(new H(e))}}o&&n.prepend(o+r+r),this.needsExportsShim&&n.prepend(`${r}${s.varOrConst} ${mt}${i}=${i}void 0;${r}${r}`),e.compact?this.renderedSource=n:this.renderedSource=n.trim(),this.renderedSourceLength=void 0,this.renderedHash=void 0,0===this.getExportNames().length&&0===this.getImportIds().length&&this.isEmpty&&this.graph.warn({code:"EMPTY_BUNDLE",message:"Generated an empty bundle"}),this.setExternalRenderPaths(e,t),this.renderedDeclarations={dependencies:this.getChunkDependencyDeclarations(e),exports:"none"===this.exportMode?[]:this.getChunkExportDeclarations()},Fa("render modules",3)}render(e,t,n){if(Ua("render format",3),!this.renderedSource)throw new Error("Internal error: Chunk render called before preRender");const r=sn[e.format];r||jt({code:"INVALID_OPTION",message:`Invalid format: ${e.format} - valid options are ${Object.keys(sn).join(", ")}.`}),e.dynamicImportFunction&&"es"!==e.format&&this.graph.warn({code:"INVALID_OPTION",message:'"output.dynamicImportFunction" is ignored for formats other than "esm".'});for(let e=0;e<this.dependencies.length;e++){const t=this.dependencies[e];if(t instanceof ct&&!t.renormalizeRenderPath)continue;const n=this.renderedDeclarations.dependencies[e],r=t instanceof ct?n.id:t.id;let i=this.id?it(ht(ot(this.id),r)):r;i.startsWith("../")||(i="./"+i),t instanceof dh&&(n.namedExportsMode="default"!==t.exportMode),n.id=i}this.finaliseDynamicImports(e.format);const i=this.finaliseImportMetas(e),s=0!==this.renderedDeclarations.exports.length||this.renderedDeclarations.dependencies.some(e=>e.reexports&&0!==e.reexports.length),o=this.orderedModules.some(e=>e.usesTopLevelAwait);o&&"es"!==e.format&&"system"!==e.format&&jt({code:"INVALID_TLA_FORMAT",message:`Module format ${e.format} does not support top-level await. Use the "es" or "system" output formats rather.`});const a=r(this.renderedSource,{dependencies:this.renderedDeclarations.dependencies,dynamicImport:this.hasDynamicImport,exports:this.renderedDeclarations.exports,hasExports:s,indentString:this.indentString,intro:t.intro,isEntryModuleFacade:null!==this.facadeModule&&this.facadeModule.isEntryPoint,namedExportsMode:"default"!==this.exportMode,needsAmdModule:i,outro:t.outro,usesTopLevelAwait:o,varOrConst:e.preferConst?"const":"var",warn:this.graph.warn.bind(this.graph)},e);t.banner&&a.prepend(t.banner),t.footer&&a.append(t.footer);const h=a.toString();Fa("render format",3);let u=null;const c=[];return function({graph:e,chunk:t,renderChunk:n,code:r,sourcemapChain:i,options:s}){const o=(e,t,n)=>{if(null==t)return e;"string"==typeof t&&(t={code:t,map:void 0});const r="string"==typeof t.map?JSON.parse(t.map):t.map;return r&&"string"==typeof r.mappings&&(r.mappings=M(r.mappings)),null!==r&&i.push(r||{missing:!0,plugin:n.name}),t.code};let a=!1,h=!0;return e.pluginDriver.hookReduceArg0("renderChunk",[r,n,s],o).then(n=>(h=!1,e.pluginDriver.hookReduceArg0("transformChunk",[n,s,t],o))).then(n=>(a=!0,e.pluginDriver.hookReduceArg0("transformBundle",[n,s,t],o))).catch(e=>{if(h)throw e;jt(e,{code:a?"BAD_BUNDLE_TRANSFORMER":"BAD_CHUNK_TRANSFORMER",message:`Error transforming ${(a?"bundle":"chunk")+(e.plugin?` with '${e.plugin}' plugin`:"")}: ${e.message}`,plugin:e.plugin})})}({chunk:this,code:h,graph:this.graph,options:e,renderChunk:n,sourcemapChain:c}).then(t=>{if(e.sourcemap){let t;if(Ua("sourcemap",3),t=e.file?ut(e.sourcemapFile||e.file):e.dir?ut(e.dir,this.id):ut(this.id),this.graph.pluginDriver.hasLoadersOrTransforms){const n=a.generateDecodedMap({});u=function(e,t,n,r,i,s){function o(t,n){return n.missing&&(e.graph.warn({code:"SOURCEMAP_BROKEN",message:`Sourcemap is likely to be incorrect: a plugin${n.plugin?` ('${n.plugin}')`:""} was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:n.plugin,url:"https://rollupjs.org/guide/en#warning-sourcemap-is-likely-to-be-incorrect"}),n={mappings:"",names:[]}),new Za(n,[t])}const a=r.filter(e=>!e.excludeFromSourcemap).map(e=>{let t,n=e.sourcemapChain;const r=e.originalSourcemap;if(r){const i=r.sources,s=r.sourcesContent||[];if(null==i||i.length<=1&&null==i[0])t=new Ja(e.id,s[0]),n=[r].concat(n);else{const n=ot(e.id)||".",o=r.sourceRoot||".",a=i.map((e,t)=>new Ja(ut(n,o,e),s[t]));t=new Za(r,a)}}else t=new Ja(e.id,e.originalCode);return t=n.reduce(o,t)});let h=new Za(n,a);h=i.reduce(o,h);let{sources:u,sourcesContent:c,names:l,mappings:p}=h.traceMappings();if(t){const e=ot(t);u=u.map(t=>ht(e,t)),t=st(t)}return new V({file:t,sources:u,sourcesContent:c=s?null:c,names:l,mappings:p})}(this,t,n,this.usedModules,c,e.sourcemapExcludeSources)}else u=a.generateMap({file:t,includeContent:!e.sourcemapExcludeSources});u.sources=u.sources.map(t=>it(e.sourcemapPathTransform?e.sourcemapPathTransform(t):t)),Fa("sourcemap",3)}return!0!==e.compact&&"\n"!==t[t.length-1]&&(t+="\n"),{code:t,map:u}})}turnIntoFacade(e){this.dependencies=[e.chunk],this.dynamicDependencies=[],this.facadeModule=e,e.facadeChunk=this;for(const t of e.getAllExports()){const n=e.getVariableForExportName(t);this.exports.add(n),this.exportNames[t]=n}}visitDependencies(e){const t=[this],n=new Set;for(const r of t)if(e(r),!(r instanceof ct))for(const e of r.dependencies.concat(r.dynamicDependencies))n.has(e)||(n.add(e),t.push(e))}visitStaticDependenciesUntilCondition(e){const t=new Set;return function n(r){if(!t.has(r)){if(t.add(r),r instanceof dh)for(const e of r.dependencies)if(n(e))return!0;return!0===e(r)}}(this)}addChunksFromDependencies(e,t){for(const n of e){if(n.chunk===this)continue;let e;if(n instanceof Qa)e=n.chunk;else{if(!n.used&&!n.moduleSideEffects)continue;e=n}t.add(e)}}computeChunkName(){if(this.manualChunkAlias)return ch(this.manualChunkAlias);if(null!==this.facadeModule)return ch(this.facadeModule.chunkAlias||Vt(this.facadeModule.id));for(const e of this.orderedModules)if(e.chunkAlias)return ch(e.chunkAlias);return"chunk"}computeContentHashWithDependencies(e,t){const n=N();return n.update([e.intro,e.outro,e.banner,e.footer].map(e=>e||"").join(":")),n.update(t.format),this.visitDependencies(e=>{e instanceof ct?n.update(":"+e.renderPath):n.update(e.getRenderedHash())}),n.digest("hex").substr(0,8)}finaliseDynamicImports(e){for(let t=0;t<this.orderedModules.length;t++){const n=this.orderedModules[t],r=this.renderedModuleSources[t];for(const{node:t,resolution:i}of n.dynamicImports)if(i)if(i instanceof Qa){if(i.chunk!==this&&ph(i.chunk)){const n=i.facadeChunk||i.chunk;let s=it(ht(ot(this.id),n.id));s.startsWith("../")||(s="./"+s),t.renderFinalResolution(r,`'${s}'`,e)}}else if(i instanceof ct){let n=i.id;i.renormalizeRenderPath&&((n=it(ht(ot(this.id),i.renderPath))).startsWith("../")||(n="./"+n)),t.renderFinalResolution(r,`'${n}'`,e)}else t.renderFinalResolution(r,i,e)}}finaliseImportMetas(e){let t=!1;for(let n=0;n<this.orderedModules.length;n++){const r=this.orderedModules[n],i=this.renderedModuleSources[n];for(const n of r.importMetas)n.renderFinalMechanism(i,this.id,e.format,this.graph.pluginDriver)&&(t=!0)}return t}getChunkDependencyDeclarations(e){const t=new Map;for(let e of this.getExportNames()){let n,r,i=!1;if("*"===e[0])n=this.graph.moduleById.get(e.substr(1)),r=e="*";else{const t=this.exportNames[e],s=t.module;if(!s||s.chunk===this)continue;s instanceof Qa?(n=s.chunk,r=s.chunk.getVariableExportName(t),i=t.isReassigned):(n=s,r=t.name,i=!0)}let s=t.get(n);s||t.set(n,s=[]),s.push({imported:r,reexported:e,needsLiveBinding:i})}const n=new Set,r=[];for(const i of this.dependencies){const s=[];for(const e of this.imports){const t=e instanceof ft&&e.referencesOriginal()?e.getOriginalVariable():e;if((e.module instanceof Qa?e.module.chunk===i:e.module===i)&&!n.has(t)){n.add(t);const r=e.getName(),i=e.module instanceof ct?e.name:e.module.chunk.getVariableExportName(e);s.push({local:r,imported:i})}}const o=t.get(i);let a,h,u,c,l=!0;i instanceof ct?(a=i.exportsNames||i.exportsNamespace,h="default"in i.declarations):(a=!0,h=!1,l="default"!==i.exportMode),i instanceof ct&&(u=i.renderPath,"umd"!==e.format&&"iife"!==e.format||(c=lh(i,e.globals,this.graph,a||h))),r.push({exportsDefault:h,exportsNames:a,globalName:c,id:u,imports:s.length>0?s:null,isChunk:!i.isExternal,name:i.variableName,namedExportsMode:l,reexports:o})}return r}getChunkExportDeclarations(){const e=[];for(const t of this.getExportNames()){if("*"===t[0])continue;const n=this.exportNames[t],r=n.module;if(r&&r.chunk!==this)continue;let i=!1,s=!1;n instanceof dt?(n.init===_e&&(s=!0),n.declarations.forEach(e=>{e.type===ee?e.declaration.type===ne&&(i=!0):e.parent.type===ne&&(i=!0)})):n instanceof At&&(i=!0);const o=n.getName();e.push({exported:"*"===t?o:t,hoisted:i,local:o,uninitialized:s})}return e}getVariableExportNamesForModule(e){const t=new Map;for(const n of e.getAllExports()){const r=e.getVariableForExportName(n);if(!r||!r.included&&!r.isExternal)continue;const i=t.get(r);i?i.push(n):t.set(r,[n]);const s=r.module;s&&s.chunk&&s.chunk!==this&&s.chunk.exports.add(r)}return t}inlineChunkDependencies(e,t){for(const n of e.dependencies)if(n instanceof ct)-1===this.dependencies.indexOf(n)&&this.dependencies.push(n);else{if(n===this||-1!==this.dependencies.indexOf(n))continue;n.isEmpty||this.dependencies.push(n),t&&this.inlineChunkDependencies(n,!0)}}prepareDynamicImports(){for(const e of this.orderedModules)for(const{node:t,resolution:n}of e.dynamicImports)if(n)if(n instanceof Qa)if(n.chunk===this){const e=n.getOrCreateNamespace();t.setResolution(!1,e.getName())}else t.setResolution(!1);else t.setResolution(!1)}setExternalRenderPaths(e,t){for(const n of this.dependencies.concat(this.dynamicDependencies))n instanceof ct&&n.setRenderPath(e,t)}setIdentifierRenderResolutions(e){for(const t of this.getExportNames()){const n=this.exportNames[t];n&&(n instanceof yt&&(this.needsExportsShim=!0),n.exportName=t,"es"===e.format||"system"===e.format||!n.isReassigned||n.isId||n.isDefault&&n.hasId?n.setRenderNames(null,null):n.setRenderNames("exports",t))}const t=Object.create(null);this.needsExportsShim&&(t[mt]=!0),th(this.orderedModules,this.dependencies,this.imports,t,e.format,!1!==e.interop,this.graph.preserveModules)}setUpModuleImports(e){for(const t of e.imports)t.module.chunk!==this&&(this.imports.add(t),t.module instanceof Qa&&t.module.chunk.exports.add(t));if(e.getOrCreateNamespace().included)for(const t of Object.keys(e.reexports)){const n=e.reexports[t],r=n.module.getVariableForExportName(n.localName);r.module.chunk!==this&&(this.imports.add(r),r.module instanceof Qa&&r.module.chunk.exports.add(r))}for(const{node:t,resolution:n}of e.dynamicImports)t.included&&(this.hasDynamicImport=!0,n instanceof Qa&&n.chunk===this&&n.getOrCreateNamespace().include())}}var fh={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},mh="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",gh={5:mh,6:mh+" const class extends export import super"},yh=/^in(stanceof)?$/,xh="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴ��-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",vh="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",Eh=new RegExp("["+xh+"]"),_h=new RegExp("["+xh+vh+"]");xh=vh=null;var bh=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],Ah=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function Sh(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}}function Ih(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Eh.test(String.fromCharCode(e)):!1!==t&&Sh(e,bh)))}function wh(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&_h.test(String.fromCharCode(e)):!1!==t&&(Sh(e,bh)||Sh(e,Ah)))))}var Ph=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function kh(e,t){return new Ph(e,{beforeExpr:!0,binop:t})}var Ch={beforeExpr:!0},Nh={startsExpr:!0},$h={};function Rh(e,t){return void 0===t&&(t={}),t.keyword=e,$h[e]=new Ph(e,t)}var Oh={num:new Ph("num",Nh),regexp:new Ph("regexp",Nh),string:new Ph("string",Nh),name:new Ph("name",Nh),eof:new Ph("eof"),bracketL:new Ph("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Ph("]"),braceL:new Ph("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Ph("}"),parenL:new Ph("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Ph(")"),comma:new Ph(",",Ch),semi:new Ph(";",Ch),colon:new Ph(":",Ch),dot:new Ph("."),question:new Ph("?",Ch),arrow:new Ph("=>",Ch),template:new Ph("template"),invalidTemplate:new Ph("invalidTemplate"),ellipsis:new Ph("...",Ch),backQuote:new Ph("`",Nh),dollarBraceL:new Ph("${",{beforeExpr:!0,startsExpr:!0}),eq:new Ph("=",{beforeExpr:!0,isAssign:!0}),assign:new Ph("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Ph("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Ph("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:kh("||",1),logicalAND:kh("&&",2),bitwiseOR:kh("|",3),bitwiseXOR:kh("^",4),bitwiseAND:kh("&",5),equality:kh("==/!=/===/!==",6),relational:kh("</>/<=/>=",7),bitShift:kh("<</>>/>>>",8),plusMin:new Ph("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:kh("%",10),star:kh("*",10),slash:kh("/",10),starstar:new Ph("**",{beforeExpr:!0}),_break:Rh("break"),_case:Rh("case",Ch),_catch:Rh("catch"),_continue:Rh("continue"),_debugger:Rh("debugger"),_default:Rh("default",Ch),_do:Rh("do",{isLoop:!0,beforeExpr:!0}),_else:Rh("else",Ch),_finally:Rh("finally"),_for:Rh("for",{isLoop:!0}),_function:Rh("function",Nh),_if:Rh("if"),_return:Rh("return",Ch),_switch:Rh("switch"),_throw:Rh("throw",Ch),_try:Rh("try"),_var:Rh("var"),_const:Rh("const"),_while:Rh("while",{isLoop:!0}),_with:Rh("with"),_new:Rh("new",{beforeExpr:!0,startsExpr:!0}),_this:Rh("this",Nh),_super:Rh("super",Nh),_class:Rh("class",Nh),_extends:Rh("extends",Ch),_export:Rh("export"),_import:Rh("import"),_null:Rh("null",Nh),_true:Rh("true",Nh),_false:Rh("false",Nh),_in:Rh("in",{beforeExpr:!0,binop:7}),_instanceof:Rh("instanceof",{beforeExpr:!0,binop:7}),_typeof:Rh("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Rh("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Rh("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Mh=/\r\n?|\n|\u2028|\u2029/,Th=new RegExp(Mh.source,"g");function Dh(e,t){return 10===e||13===e||!t&&(8232===e||8233===e)}var Lh=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Vh=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Bh=Object.prototype,zh=Bh.hasOwnProperty,jh=Bh.toString;function Wh(e,t){return zh.call(e,t)}var Uh=Array.isArray||function(e){return"[object Array]"===jh.call(e)};function Fh(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var qh=function(e,t){this.line=e,this.column=t};qh.prototype.offset=function(e){return new qh(this.line,this.column+e)};var Gh=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function Hh(e,t){for(var n=1,r=0;;){Th.lastIndex=r;var i=Th.exec(e);if(!(i&&i.index<t))return new qh(n,t-r);++n,r=i.index+i[0].length}}var Kh={ecmaVersion:9,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function Yh(e){var t={};for(var n in Kh)t[n]=e&&Wh(e,n)?e[n]:Kh[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),Uh(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return Uh(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,s,o,a){var h={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(h.loc=new Gh(this,o,a)),e.ranges&&(h.range=[i,s]),t.push(h)}}(t,t.onComment)),t}var Xh=2,Qh=1|Xh,Jh=4,Zh=8;function eu(e,t){return Xh|(e?Jh:0)|(t?Zh:0)}var tu=function(e,t,n){this.options=e=Yh(e),this.sourceFile=e.sourceFile,this.keywords=Fh(gh[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=fh[i]);i--);"module"===e.sourceType&&(r+=" await")}this.reservedWords=Fh(r);var s=(r?r+" ":"")+fh.strict;this.reservedWordsStrict=Fh(s),this.reservedWordsStrictBind=Fh(s+" "+fh.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Mh).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=Oh.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},nu={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};tu.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},nu.inFunction.get=function(){return(this.currentVarScope().flags&Xh)>0},nu.inGenerator.get=function(){return(this.currentVarScope().flags&Zh)>0},nu.inAsync.get=function(){return(this.currentVarScope().flags&Jh)>0},nu.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},nu.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},nu.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},tu.prototype.inNonArrowFunction=function(){return(this.currentThisScope().flags&Xh)>0},tu.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},tu.parse=function(e,t){return new this(t,e).parse()},tu.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},tu.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(tu.prototype,nu);var ru=tu.prototype,iu=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/;function su(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}ru.strictDirective=function(e){for(;;){Vh.lastIndex=e,e+=Vh.exec(this.input)[0].length;var t=iu.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2]))return!0;e+=t[0].length,Vh.lastIndex=e,e+=Vh.exec(this.input)[0].length,";"===this.input[e]&&e++}},ru.eat=function(e){return this.type===e&&(this.next(),!0)},ru.isContextual=function(e){return this.type===Oh.name&&this.value===e&&!this.containsEsc},ru.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},ru.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},ru.canInsertSemicolon=function(){return this.type===Oh.eof||this.type===Oh.braceR||Mh.test(this.input.slice(this.lastTokEnd,this.start))},ru.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ru.semicolon=function(){this.eat(Oh.semi)||this.insertSemicolon()||this.unexpected()},ru.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},ru.expect=function(e){this.eat(e)||this.unexpected()},ru.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},ru.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},ru.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},ru.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},ru.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var ou=tu.prototype;ou.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==Oh.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var s=i[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var au={kind:"loop"},hu={kind:"switch"};ou.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Vh.lastIndex=this.pos;var t=Vh.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r)return!0;if(e)return!1;if(123===r)return!0;if(Ih(r,!0)){for(var i=n+1;wh(this.input.charCodeAt(i),!0);)++i;var s=this.input.slice(n,i);if(!yh.test(s))return!0}return!1},ou.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Vh.lastIndex=this.pos;var e=Vh.exec(this.input),t=this.pos+e[0].length;return!(Mh.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!==this.input.length&&wh(this.input.charAt(t+8)))},ou.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=Oh._var,r="let"),i){case Oh._break:case Oh._continue:return this.parseBreakContinueStatement(s,i.keyword);case Oh._debugger:return this.parseDebuggerStatement(s);case Oh._do:return this.parseDoStatement(s);case Oh._for:return this.parseForStatement(s);case Oh._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case Oh._class:return e&&this.unexpected(),this.parseClass(s,!0);case Oh._if:return this.parseIfStatement(s);case Oh._return:return this.parseReturnStatement(s);case Oh._switch:return this.parseSwitchStatement(s);case Oh._throw:return this.parseThrowStatement(s);case Oh._try:return this.parseTryStatement(s);case Oh._const:case Oh._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case Oh._while:return this.parseWhileStatement(s);case Oh._with:return this.parseWithStatement(s);case Oh.braceL:return this.parseBlock(!0,s);case Oh.semi:return this.parseEmptyStatement(s);case Oh._export:case Oh._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===Oh._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var o=this.value,a=this.parseExpression();return i===Oh.name&&"Identifier"===a.type&&this.eat(Oh.colon)?this.parseLabeledStatement(s,o,a,e):this.parseExpressionStatement(s,a)}},ou.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(Oh.semi)||this.insertSemicolon()?e.label=null:this.type!==Oh.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},ou.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},ou.parseDoStatement=function(e){return this.next(),this.labels.push(au),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(Oh._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(Oh.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},ou.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(au),this.enterScope(0),this.expect(Oh.parenL),this.type===Oh.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===Oh._var||this.type===Oh._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),!(this.type===Oh._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==r.declarations.length||"var"!==i&&r.declarations[0].init?(t>-1&&this.unexpected(t),this.parseFor(e,r)):(this.options.ecmaVersion>=9&&(this.type===Oh._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r))}var s=new su,o=this.parseExpression(!0,s);return this.type===Oh._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===Oh._in?t>-1&&this.unexpected(t):e.await=t>-1),this.toAssignable(o,!1,s),this.checkLVal(o),this.parseForIn(e,o)):(this.checkExpressionErrors(s,!0),t>-1&&this.unexpected(t),this.parseFor(e,o))},ou.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,cu|(n?0:lu),!1,t)},ou.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(Oh._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},ou.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(Oh.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},ou.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(Oh.braceL),this.labels.push(hu),this.enterScope(0);for(var n=!1;this.type!==Oh.braceR;)if(this.type===Oh._case||this.type===Oh._default){var r=this.type===Oh._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(Oh.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},ou.parseThrowStatement=function(e){return this.next(),Mh.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var uu=[];ou.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===Oh._catch){var t=this.startNode();if(this.next(),this.eat(Oh.parenL)){t.param=this.parseBindingAtom();var n="Identifier"===t.param.type;this.enterScope(n?32:0),this.checkLVal(t.param,n?4:2),this.expect(Oh.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(Oh._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},ou.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},ou.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(au),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},ou.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},ou.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},ou.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i<s.length;i+=1){s[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var o=this.type.isLoop?"loop":this.type===Oh._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var h=this.labels[a];if(h.statementStart!==e.start)break;h.statementStart=this.start,h.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},ou.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},ou.parseBlock=function(e,t){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(Oh.braceL),e&&this.enterScope(0);!this.eat(Oh.braceR);){var n=this.parseStatement(null);t.body.push(n)}return e&&this.exitScope(),this.finishNode(t,"BlockStatement")},ou.parseFor=function(e,t){return e.init=t,this.expect(Oh.semi),e.test=this.type===Oh.semi?null:this.parseExpression(),this.expect(Oh.semi),e.update=this.type===Oh.parenR?null:this.parseExpression(),this.expect(Oh.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},ou.parseForIn=function(e,t){var n=this.type===Oh._in?"ForInStatement":"ForOfStatement";return this.next(),"ForInStatement"===n&&("AssignmentPattern"===t.type||"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(this.strict||"Identifier"!==t.declarations[0].id.type))&&this.raise(t.start,"Invalid assignment in for-in loop head"),e.left=t,e.right="ForInStatement"===n?this.parseExpression():this.parseMaybeAssign(),this.expect(Oh.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n)},ou.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(Oh.eq)?r.init=this.parseMaybeAssign(t):"const"!==n||this.type===Oh._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===r.id.type||t&&(this.type===Oh._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(Oh.comma))break}return e},ou.parseVarId=function(e,t){"const"!==t&&"let"!==t||!this.isContextual("let")||this.raiseRecoverable(this.start,"let is disallowed as a lexically bound name"),e.id=this.parseBindingAtom(),this.checkLVal(e.id,"var"===t?1:2,!1)};var cu=1,lu=2;ou.parseFunction=function(e,t,n,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===Oh.star&&t&lu&&this.unexpected(),e.generator=this.eat(Oh.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&cu&&(e.id=4&t&&this.type!==Oh.name?null:this.parseIdent(),!e.id||t&lu||this.checkLVal(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(eu(e.async,e.generator)),t&cu||(e.id=this.type===Oh.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,t&cu?"FunctionDeclaration":"FunctionExpression")},ou.parseFunctionParams=function(e){this.expect(Oh.parenL),e.params=this.parseBindingList(Oh.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},ou.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),i=!1;for(r.body=[],this.expect(Oh.braceL);!this.eat(Oh.braceR);){var s=this.parseClassElement(null!==e.superClass);s&&(r.body.push(s),"MethodDefinition"===s.type&&"constructor"===s.kind&&(i&&this.raise(s.start,"Duplicate constructor in the same class"),i=!0))}return e.body=this.finishNode(r,"ClassBody"),this.strict=n,this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},ou.parseClassElement=function(e){var t=this;if(this.eat(Oh.semi))return null;var n=this.startNode(),r=function(e,r){void 0===r&&(r=!1);var i=t.start,s=t.startLoc;return!!t.eatContextual(e)&&(!(t.type===Oh.parenL||r&&t.canInsertSemicolon())||(n.key&&t.unexpected(),n.computed=!1,n.key=t.startNodeAt(i,s),n.key.name=e,t.finishNode(n.key,"Identifier"),!1))};n.kind="method",n.static=r("static");var i=this.eat(Oh.star),s=!1;i||(this.options.ecmaVersion>=8&&r("async",!0)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(Oh.star)):r("get")?n.kind="get":r("set")&&(n.kind="set")),n.key||this.parsePropertyName(n);var o=n.key,a=!1;return n.computed||n.static||!("Identifier"===o.type&&"constructor"===o.name||"Literal"===o.type&&"constructor"===o.value)?n.static&&"Identifier"===o.type&&"prototype"===o.name&&this.raise(o.start,"Classes may not have a static property named prototype"):("method"!==n.kind&&this.raise(o.start,"Constructor can't have get/set modifier"),i&&this.raise(o.start,"Constructor can't be a generator"),s&&this.raise(o.start,"Constructor can't be an async method"),n.kind="constructor",a=e),this.parseClassMethod(n,i,s,a),"get"===n.kind&&0!==n.value.params.length&&this.raiseRecoverable(n.value.start,"getter should have no params"),"set"===n.kind&&1!==n.value.params.length&&this.raiseRecoverable(n.value.start,"setter should have exactly one param"),"set"===n.kind&&"RestElement"===n.value.params[0].type&&this.raiseRecoverable(n.value.params[0].start,"Setter cannot use rest params"),n},ou.parseClassMethod=function(e,t,n,r){return e.value=this.parseMethod(t,n,r),this.finishNode(e,"MethodDefinition")},ou.parseClassId=function(e,t){this.type===Oh.name?(e.id=this.parseIdent(),t&&this.checkLVal(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},ou.parseClassSuper=function(e){e.superClass=this.eat(Oh._extends)?this.parseExprSubscripts():null},ou.parseExport=function(e,t){if(this.next(),this.eat(Oh.star))return this.expectContextual("from"),this.type!==Oh.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(Oh._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===Oh._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,4|cu,!1,n)}else if(this.type===Oh._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==Oh.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,o=e.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local),this.checkLocalExport(a.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},ou.checkExport=function(e,t,n){e&&(Wh(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},ou.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var o=0,a=t.elements;o<a.length;o+=1){var h=a[o];h&&this.checkPatternExport(e,h)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===n&&this.checkPatternExport(e,t.expression)},ou.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},ou.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},ou.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(Oh.braceL);!this.eat(Oh.braceR);){if(n)n=!1;else if(this.expect(Oh.comma),this.afterTrailingComma(Oh.braceR))break;var r=this.startNode();r.local=this.parseIdent(!0),r.exported=this.eatContextual("as")?this.parseIdent(!0):r.local,this.checkExport(e,r.exported.name,r.exported.start),t.push(this.finishNode(r,"ExportSpecifier"))}return t},ou.parseImport=function(e){return this.next(),this.type===Oh.string?(e.specifiers=uu,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===Oh.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},ou.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===Oh.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,2),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(Oh.comma))return e}if(this.type===Oh.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLVal(r.local,2),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(Oh.braceL);!this.eat(Oh.braceR);){if(t)t=!1;else if(this.expect(Oh.comma),this.afterTrailingComma(Oh.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLVal(i.local,2),e.push(this.finishNode(i,"ImportSpecifier"))}return e},ou.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},ou.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var pu=tu.prototype;pu.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.toAssignable(s,t),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},pu.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},pu.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},pu.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==Oh.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},pu.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case Oh.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(Oh.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case Oh.braceL:return this.parseObj(!0)}return this.parseIdent()},pu.parseBindingList=function(e,t,n){for(var r=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(Oh.comma),t&&this.type===Oh.comma)r.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===Oh.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),r.push(s),this.type===Oh.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),r.push(o)}return r},pu.parseBindingListItem=function(e){return e},pu.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(Oh.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},pu.checkLVal=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(Wh(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),0!==t&&5!==t&&this.declareName(e.name,t,e.start);break;case"MemberExpression":t&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.checkLVal(s,t,n)}break;case"Property":this.checkLVal(e.value,t,n);break;case"ArrayPattern":for(var o=0,a=e.elements;o<a.length;o+=1){var h=a[o];h&&this.checkLVal(h,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var du=tu.prototype;du.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===s&&(t.proto&&(n&&n.doubleProto<0?n.doubleProto=i.start:this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var o=t[r="$"+r];if(o)("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(i.start,"Redefinition of property");else o=t[r]={init:!1,get:!1,set:!1};o[s]=!0}}},du.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===Oh.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(Oh.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},du.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,s=-1,o=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,o=t.shorthandAssign,t.parenthesizedAssign=t.trailingComma=t.shorthandAssign=-1):(t=new su,r=!0);var a=this.start,h=this.startLoc;this.type!==Oh.parenL&&this.type!==Oh.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,a,h)),this.type.isAssign){var c=this.startNodeAt(a,h);return c.operator=this.value,c.left=this.type===Oh.eq?this.toAssignable(u,!1,t):u,r||su.call(t),t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),o>-1&&(t.shorthandAssign=o),u},du.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(Oh.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(Oh.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},du.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},du.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==Oh._in)&&s>r){var o=this.type===Oh.logicalOR||this.type===Oh.logicalAND,a=this.value;this.next();var h=this.start,u=this.startLoc,c=this.parseExprOp(this.parseMaybeUnary(null,!1),h,u,s,i),l=this.buildBinary(t,n,e,c,a,o);return this.parseExprOp(l,t,n,r,i)}return e},du.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},du.parseMaybeUnary=function(e,t){var n,r=this.start,i=this.startLoc;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))n=this.parseAwait(),t=!0;else if(this.type.prefix){var s=this.startNode(),o=this.type===Oh.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(s,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var a=this.startNodeAt(r,i);a.operator=this.value,a.prefix=!1,a.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(a,"UpdateExpression")}}return!t&&this.eat(Oh.starstar)?this.buildBinary(r,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},du.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},du.parseSubscripts=function(e,t,n,r){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(e.start,e.end);;){var s=this.parseSubscript(e,t,n,r,i);if(s===e||"ArrowFunctionExpression"===s.type)return s;e=s}},du.parseSubscript=function(e,t,n,r,i){var s=this.eat(Oh.bracketL);if(s||this.eat(Oh.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=s?this.parseExpression():this.parseIdent(!0),o.computed=!!s,s&&this.expect(Oh.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!r&&this.eat(Oh.parenL)){var a=new su,h=this.yieldPos,u=this.awaitPos,c=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var l=this.parseExprList(Oh.parenR,this.options.ecmaVersion>=8,!1,a);if(i&&!this.canInsertSemicolon()&&this.eat(Oh.arrow))return this.checkPatternErrors(a,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=u,this.awaitIdentPos=c,this.parseArrowExpression(this.startNodeAt(t,n),l,!0);this.checkExpressionErrors(a,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=u||this.awaitPos,this.awaitIdentPos=c||this.awaitIdentPos;var p=this.startNodeAt(t,n);p.callee=e,p.arguments=l,e=this.finishNode(p,"CallExpression")}else if(this.type===Oh.backQuote){var d=this.startNodeAt(t,n);d.tag=e,d.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(d,"TaggedTemplateExpression")}return e},du.parseExprAtom=function(e){this.type===Oh.slash&&this.readRegexp();var t,n=this.potentialArrowAt===this.start;switch(this.type){case Oh._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),t=this.startNode(),this.next(),this.type!==Oh.parenL||this.allowDirectSuper||this.raise(t.start,"super() call outside constructor of a subclass"),this.type!==Oh.dot&&this.type!==Oh.bracketL&&this.type!==Oh.parenL&&this.unexpected(),this.finishNode(t,"Super");case Oh._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case Oh.name:var r=this.start,i=this.startLoc,s=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(Oh._function))return this.parseFunction(this.startNodeAt(r,i),0,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(Oh.arrow))return this.parseArrowExpression(this.startNodeAt(r,i),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===Oh.name&&!s)return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(Oh.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,i),[o],!0)}return o;case Oh.regexp:var a=this.value;return(t=this.parseLiteral(a.value)).regex={pattern:a.pattern,flags:a.flags},t;case Oh.num:case Oh.string:return this.parseLiteral(this.value);case Oh._null:case Oh._true:case Oh._false:return(t=this.startNode()).value=this.type===Oh._null?null:this.type===Oh._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case Oh.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case Oh.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(Oh.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case Oh.braceL:return this.parseObj(!1,e);case Oh._function:return t=this.startNode(),this.next(),this.parseFunction(t,0);case Oh._class:return this.parseClass(this.startNode(),!1);case Oh._new:return this.parseNew();case Oh.backQuote:return this.parseTemplate();default:this.unexpected()}},du.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},du.parseParenExpression=function(){this.expect(Oh.parenL);var e=this.parseExpression();return this.expect(Oh.parenR),e},du.parseParenAndDistinguishExpression=function(e){var t,n=this.start,r=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o=this.start,a=this.startLoc,h=[],u=!0,c=!1,l=new su,p=this.yieldPos,d=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==Oh.parenR;){if(u?u=!1:this.expect(Oh.comma),i&&this.afterTrailingComma(Oh.parenR,!0)){c=!0;break}if(this.type===Oh.ellipsis){s=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===Oh.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}h.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var f=this.start,m=this.startLoc;if(this.expect(Oh.parenR),e&&!this.canInsertSemicolon()&&this.eat(Oh.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=d,this.parseParenArrowList(n,r,h);h.length&&!c||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(l,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=d||this.awaitPos,h.length>1?((t=this.startNodeAt(o,a)).expressions=h,this.finishNodeAt(t,"SequenceExpression",f,m)):t=h[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var g=this.startNodeAt(n,r);return g.expression=t,this.finishNode(g,"ParenthesizedExpression")}return t},du.parseParenItem=function(e){return e},du.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var fu=[];du.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(Oh.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),("target"!==e.property.name||n)&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inNonArrowFunction()||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),r,i,!0),this.eat(Oh.parenL)?e.arguments=this.parseExprList(Oh.parenR,this.options.ecmaVersion>=8,!1):e.arguments=fu,this.finishNode(e,"NewExpression")},du.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===Oh.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===Oh.backQuote,this.finishNode(n,"TemplateElement")},du.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===Oh.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(Oh.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(Oh.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},du.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===Oh.name||this.type===Oh.num||this.type===Oh.string||this.type===Oh.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===Oh.star)&&!Mh.test(this.input.slice(this.lastTokEnd,this.start))},du.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(Oh.braceR);){if(r)r=!1;else if(this.expect(Oh.comma),this.afterTrailingComma(Oh.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},du.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(Oh.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===Oh.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(this.type===Oh.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),o.argument=this.parseMaybeAssign(!1,t),this.type===Oh.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(Oh.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(Oh.star),this.parsePropertyName(o,t)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t,a),this.finishNode(o,"Property")},du.parsePropertyValue=function(e,t,n,r,i,s,o,a){if((n||r)&&this.type===Oh.colon&&this.unexpected(),this.eat(Oh.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===Oh.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===Oh.comma||this.type===Oh.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===Oh.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var h="get"===e.kind?0:1;if(e.value.params.length!==h){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},du.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(Oh.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(Oh.bracketR),e.key;e.computed=!1}return e.key=this.type===Oh.num||this.type===Oh.string?this.parseExprAtom():this.parseIdent(!0)},du.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},du.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|eu(t,r.generator)|(n?128:0)),this.expect(Oh.parenL),r.params=this.parseBindingList(Oh.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},du.parseArrowExpression=function(e,t,n){var r=this.yieldPos,i=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(16|eu(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1),this.yieldPos=r,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")},du.parseFunctionBody=function(e,t,n){var r=t&&this.type!==Oh.braceL,i=this.strict,s=!1;if(r)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var a=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!i&&!s&&!t&&!n&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=a}this.exitScope(),this.strict&&e.id&&this.checkLVal(e.id,5),this.strict=i},du.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){if("Identifier"!==n[t].type)return!1}return!0},du.checkParams=function(e,t){for(var n={},r=0,i=e.params;r<i.length;r+=1){var s=i[r];this.checkLVal(s,1,t?null:n)}},du.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(Oh.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===Oh.comma?o=null:this.type===Oh.ellipsis?(o=this.parseSpread(r),r&&this.type===Oh.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},du.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;(this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},du.parseIdent=function(e,t){var n=this.startNode();return e&&"never"===this.options.allowReserved&&(e=!1),this.type===Oh.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(),this.finishNode(n,"Identifier"),e||(this.checkUnreserved(n),"await"!==n.name||this.awaitIdentPos||(this.awaitIdentPos=n.start)),n},du.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===Oh.semi||this.canInsertSemicolon()||this.type!==Oh.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(Oh.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},du.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var mu=tu.prototype;mu.raise=function(e,t){var n=Hh(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},mu.raiseRecoverable=mu.raise,mu.curPosition=function(){if(this.options.locations)return new qh(this.curLine,this.pos-this.lineStart)};var gu=tu.prototype,yu=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};gu.enterScope=function(e){this.scopeStack.push(new yu(e))},gu.exitScope=function(){this.scopeStack.pop()},gu.treatFunctionsAsVarInScope=function(e){return e.flags&Xh||!this.inModule&&1&e.flags},gu.declareName=function(e,t,n){var r=!1;if(2===t){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){r=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],a.flags&Qh)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},gu.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},gu.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},gu.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Qh)return t}},gu.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Qh&&!(16&t.flags))return t}};var xu=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Gh(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},vu=tu.prototype;function Eu(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}vu.startNode=function(){return new xu(this,this.start,this.startLoc)},vu.startNodeAt=function(e,t){return new xu(this,e,t)},vu.finishNode=function(e,t){return Eu.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},vu.finishNodeAt=function(e,t,n,r){return Eu.call(this,e,t,n,r)};var _u=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},bu={b_stat:new _u("{",!1),b_expr:new _u("{",!0),b_tmpl:new _u("${",!1),p_stat:new _u("(",!1),p_expr:new _u("(",!0),q_tmpl:new _u("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new _u("function",!1),f_expr:new _u("function",!0),f_expr_gen:new _u("function",!0,!1,null,!0),f_gen:new _u("function",!1,!1,null,!0)},Au=tu.prototype;Au.initialContext=function(){return[bu.b_stat]},Au.braceIsBlock=function(e){var t=this.curContext();return t===bu.f_expr||t===bu.f_stat||(e!==Oh.colon||t!==bu.b_stat&&t!==bu.b_expr?e===Oh._return||e===Oh.name&&this.exprAllowed?Mh.test(this.input.slice(this.lastTokEnd,this.start)):e===Oh._else||e===Oh.semi||e===Oh.eof||e===Oh.parenR||e===Oh.arrow||(e===Oh.braceL?t===bu.b_stat:e!==Oh._var&&e!==Oh._const&&e!==Oh.name&&!this.exprAllowed):!t.isExpr)},Au.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},Au.updateContext=function(e){var t,n=this.type;n.keyword&&e===Oh.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},Oh.parenR.updateContext=Oh.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===bu.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},Oh.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?bu.b_stat:bu.b_expr),this.exprAllowed=!0},Oh.dollarBraceL.updateContext=function(){this.context.push(bu.b_tmpl),this.exprAllowed=!0},Oh.parenL.updateContext=function(e){var t=e===Oh._if||e===Oh._for||e===Oh._with||e===Oh._while;this.context.push(t?bu.p_stat:bu.p_expr),this.exprAllowed=!0},Oh.incDec.updateContext=function(){},Oh._function.updateContext=Oh._class.updateContext=function(e){!e.beforeExpr||e===Oh.semi||e===Oh._else||e===Oh._return&&Mh.test(this.input.slice(this.lastTokEnd,this.start))||(e===Oh.colon||e===Oh.braceL)&&this.curContext()===bu.b_stat?this.context.push(bu.f_stat):this.context.push(bu.f_expr),this.exprAllowed=!1},Oh.backQuote.updateContext=function(){this.curContext()===bu.q_tmpl?this.context.pop():this.context.push(bu.q_tmpl),this.exprAllowed=!1},Oh.star.updateContext=function(e){if(e===Oh._function){var t=this.context.length-1;this.context[t]===bu.f_expr?this.context[t]=bu.f_expr_gen:this.context[t]=bu.f_gen}this.exprAllowed=!0},Oh.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==Oh.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var Su="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Iu={9:Su,10:Su+" Extended_Pictographic"},wu="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Pu="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",ku={9:Pu,10:Pu+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"},Cu={};function Nu(e){var t=Cu[e]={binary:Fh(Iu[e]+" "+wu),nonBinary:{General_Category:Fh(wu),Script:Fh(ku[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}Nu(9),Nu(10);var $u=tu.prototype,Ru=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":""),this.unicodeProperties=Cu[e.options.ecmaVersion>=10?10:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function Ou(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function Mu(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Tu(e){return e>=65&&e<=90||e>=97&&e<=122}function Du(e){return Tu(e)||95===e}function Lu(e){return Du(e)||Vu(e)}function Vu(e){return e>=48&&e<=57}function Bu(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function zu(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function ju(e){return e>=48&&e<=55}Ru.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchN=r&&this.parser.options.ecmaVersion>=9},Ru.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Ru.prototype.at=function(e){var t=this.source,n=t.length;if(e>=n)return-1;var r=t.charCodeAt(e);return!this.switchU||r<=55295||r>=57344||e+1>=n?r:(r<<10)+t.charCodeAt(e+1)-56613888},Ru.prototype.nextIndex=function(e){var t=this.source,n=t.length;if(e>=n)return n;var r=t.charCodeAt(e);return!this.switchU||r<=55295||r>=57344||e+1>=n?e+1:e+2},Ru.prototype.current=function(){return this.at(this.pos)},Ru.prototype.lookahead=function(){return this.at(this.nextIndex(this.pos))},Ru.prototype.advance=function(){this.pos=this.nextIndex(this.pos)},Ru.prototype.eat=function(e){return this.current()===e&&(this.advance(),!0)},$u.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=0;r<n.length;r++){var i=n.charAt(r);-1===t.indexOf(i)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(i,r+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},$u.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},$u.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];-1===e.groupNames.indexOf(r)&&e.raise("Invalid named capture referenced")}},$u.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},$u.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},$u.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!(e.switchU?!this.regexp_eatAtom(e):!this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},$u.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},$u.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},$u.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},$u.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},$u.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},$u.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},$u.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},$u.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},$u.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},$u.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},$u.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!Mu(t)&&(e.lastIntValue=t,e.advance(),!0)},$u.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!Mu(n);)e.advance();return e.pos!==t},$u.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},$u.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},$u.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},$u.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Ou(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Ou(e.lastIntValue);return!0}return!1},$u.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return Ih(e,!0)||36===e||95===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},$u.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return wh(e,!0)||36===e||95===e||8204===e||8205===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},$u.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},$u.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},$u.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},$u.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},$u.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},$u.regexp_eatZero=function(e){return 48===e.current()&&!Vu(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},$u.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},$u.regexp_eatControlLetter=function(e){var t=e.current();return!!Tu(t)&&(e.lastIntValue=t%32,e.advance(),!0)},$u.regexp_eatRegExpUnicodeEscapeSequence=function(e){var t,n=e.pos;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(e.switchU&&r>=55296&&r<=56319){var i=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=1024*(r-55296)+(s-56320)+65536,!0}e.pos=i,e.lastIntValue=r}return!0}if(e.switchU&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((t=e.lastIntValue)>=0&&t<=1114111))return!0;e.switchU&&e.raise("Invalid unicode escape"),e.pos=n}return!1},$u.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},$u.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},$u.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},$u.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i),!0}return!1},$u.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){Wh(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},$u.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},$u.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Du(t=e.current());)e.lastStringValue+=Ou(t),e.advance();return""!==e.lastStringValue},$u.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Lu(t=e.current());)e.lastStringValue+=Ou(t),e.advance();return""!==e.lastStringValue},$u.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},$u.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},$u.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},$u.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||ju(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},$u.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},$u.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Vu(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},$u.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},$u.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Vu(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},$u.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Bu(n=e.current());)e.lastIntValue=16*e.lastIntValue+zu(n),e.advance();return e.pos!==t},$u.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},$u.regexp_eatOctalDigit=function(e){var t=e.current();return ju(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},$u.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Bu(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+zu(i),e.advance()}return!0};var Wu=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Gh(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Uu=tu.prototype;function Fu(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Uu.next=function(){this.options.onToken&&this.options.onToken(new Wu(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Uu.getToken=function(){return this.next(),new Wu(this)},"undefined"!=typeof Symbol&&(Uu[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===Oh.eof,value:t}}}}),Uu.curContext=function(){return this.context[this.context.length-1]},Uu.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(Oh.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Uu.readToken=function(e){return Ih(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Uu.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},Uu.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(-1===r&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(Th.lastIndex=n;(e=Th.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,r),n,this.pos,t,this.curPosition())},Uu.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Dh(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Uu.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&Lh.test(String.fromCharCode(e))))break e;++this.pos}}},Uu.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Uu.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(Oh.ellipsis)):(++this.pos,this.finishToken(Oh.dot))},Uu.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(Oh.assign,2):this.finishOp(Oh.slash,1)},Uu.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?Oh.star:Oh.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=Oh.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(Oh.assign,n+1):this.finishOp(r,n)},Uu.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?Oh.logicalOR:Oh.logicalAND,2):61===t?this.finishOp(Oh.assign,2):this.finishOp(124===e?Oh.bitwiseOR:Oh.bitwiseAND,1)},Uu.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(Oh.assign,2):this.finishOp(Oh.bitwiseXOR,1)},Uu.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!Mh.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(Oh.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(Oh.assign,2):this.finishOp(Oh.plusMin,1)},Uu.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(Oh.assign,n+1):this.finishOp(Oh.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(Oh.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Uu.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(Oh.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(Oh.arrow)):this.finishOp(61===e?Oh.eq:Oh.prefix,1)},Uu.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(Oh.parenL);case 41:return++this.pos,this.finishToken(Oh.parenR);case 59:return++this.pos,this.finishToken(Oh.semi);case 44:return++this.pos,this.finishToken(Oh.comma);case 91:return++this.pos,this.finishToken(Oh.bracketL);case 93:return++this.pos,this.finishToken(Oh.bracketR);case 123:return++this.pos,this.finishToken(Oh.braceL);case 125:return++this.pos,this.finishToken(Oh.braceR);case 58:return++this.pos,this.finishToken(Oh.colon);case 63:return++this.pos,this.finishToken(Oh.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(Oh.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(Oh.prefix,1)}this.raise(this.pos,"Unexpected character '"+Fu(e)+"'")},Uu.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Uu.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Mh.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Ru(this));a.reset(n,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var h=null;try{h=new RegExp(i,o)}catch(e){}return this.finishToken(Oh.regexp,{pattern:i,flags:o,value:h})},Uu.readInt=function(e,t){for(var n=this.pos,r=0,i=0,s=null==t?1/0:t;i<s;++i){var o=this.input.charCodeAt(this.pos),a=void 0;if((a=o>=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=e)break;++this.pos,r=r*e+a}return this.pos===n||null!=t&&this.pos-n!==t?null:r},Uu.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),Ih(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Oh.num,t)},Uu.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number"),n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1);var r=this.input.charCodeAt(this.pos);46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),Ih(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var i=this.input.slice(t,this.pos),s=n?parseInt(i,8):parseFloat(i);return this.finishToken(Oh.num,s)},Uu.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Uu.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(Dh(r,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(Oh.string,t)};var qu={};Uu.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==qu)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Uu.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw qu;this.raise(e,t)},Uu.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==Oh.template&&this.type!==Oh.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(Oh.template,e)):36===n?(this.pos+=2,this.finishToken(Oh.dollarBraceL)):(++this.pos,this.finishToken(Oh.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Dh(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Uu.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(Oh.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Uu.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Fu(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),"0"===n&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Dh(t)?"":String.fromCharCode(t)}},Uu.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Uu.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(wh(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?Ih:wh)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=Fu(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},Uu.readWord=function(){var e=this.readWord1(),t=Oh.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=$h[e]),this.finishToken(t,e)};var Gu=function(e){return e&&e.default||e}(Object.freeze({version:"6.1.1",parse:function(e,t){return tu.parse(e,t)},parseExpressionAt:function(e,t,n){return tu.parseExpressionAt(e,t,n)},tokenizer:function(e,t){return tu.tokenizer(e,t)},Parser:tu,defaultOptions:Kh,Position:qh,SourceLocation:Gh,getLineInfo:Hh,Node:xu,TokenType:Ph,tokTypes:Oh,keywordTypes:$h,TokContext:_u,tokContexts:bu,isIdentifierChar:wh,isIdentifierStart:Ih,Token:Wu,isNewLine:Dh,lineBreak:Mh,lineBreakG:Th,nonASCIIwhitespace:Lh}));const Hu=Gu.tokTypes,Ku=Gu.isIdentifierStart;var Yu=function(e){return class extends e{parseLiteral(e){const t=super.parseLiteral(e);return 110==t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=this.getNumberInput(t.start,t.end)),t}readRadixNumber(e){let t=this.pos;this.pos+=2;let n=this.readInt(e);if(null===n&&this.raise(this.start+2,`Expected number in radix ${e}`),110==this.input.charCodeAt(this.pos)){let e=this.getNumberInput(t,this.pos);n="undefined"!=typeof BigInt?BigInt(e):null,++this.pos}else Ku(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");return this.finishToken(Hu.num,n)}readNumber(e){let t=this.pos;if(e)return super.readNumber(e);if(48===this.input.charCodeAt(t)&&110!==this.input.charCodeAt(t+1))return super.readNumber(e);if(null===this.readInt(10)&&this.raise(t,"Invalid number"),110!=this.input.charCodeAt(this.pos))return this.pos=t,super.readNumber(e);let n=this.getNumberInput(t,this.pos),r="undefined"!=typeof BigInt?BigInt(n):null;return++this.pos,this.finishToken(Hu.num,r)}getNumberInput(e,t){return super.getNumberInput?super.getNumberInput(e,t):this.input.slice(e,t)}}};const Xu="Import";function Qu(e){return class extends e{parseStatement(e,t,n){return this.type===Oh._import&&function(){return/^(\s|\/\/.*|\/\*[^]*?\*\/)*\(/.test(this.input.slice(this.pos))}.call(this)?this.parseExpressionStatement(this.startNode(),this.parseExpression()):super.parseStatement(e,t,n)}parseExprAtom(e){return this.type===Oh._import?function(){const e=this.startNode();return this.next(),this.type!==Oh.parenL&&this.unexpected(),this.finishNode(e,Xu)}.call(this):super.parseExprAtom(e)}}}Oh._import.startsExpr=!0;const Ju=Gu.tokTypes,Zu=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ec=e=>{Zu.lastIndex=e.pos;let t=Zu.exec(e.input),n=e.pos+t[0].length;return"."===e.input.slice(n,n+1)};var tc=function(e){return class extends e{parseExprAtom(e){if(this.type!==Ju._import||!ec(this))return super.parseExprAtom(e);this.options.allowImportExportEverywhere||this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'");let t=this.startNode();return t.meta=this.parseIdent(!0),this.expect(Ju.dot),t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is import.meta"),this.containsEsc&&this.raiseRecoverable(t.property.start,'"meta" in import.meta must not contain escape sequences'),this.finishNode(t,"MetaProperty")}parseStatement(e,t,n){if(this.type!==Ju._import||!ec(this))return super.parseStatement(e,t,n);let r=this.startNode(),i=this.parseExpression();return this.parseExpressionStatement(r,i)}}};class nc extends Ge{constructor(){super("undefined")}getLiteralValueAtPath(){}}class rc extends En{constructor(){super(),this.variables.undefined=new nc}findVariable(e){return this.variables[e]?this.variables[e]:this.variables[e]=new At(e)}}const ic=()=>({paths:Object.create(null),tracked:!1,unknownPath:null});class sc{constructor(){this.entityPaths=new Map}track(e,t){let n=this.entityPaths.get(e);n||(n=ic(),this.entityPaths.set(e,n));let r,i=0;for(;i<t.length;){const e=t[i];"string"==typeof e?(r=n.paths[e])||(r=ic(),n.paths[e]=r):(r=n.unknownPath)||(r=ic(),n.unknownPath=r),n=r,i++}const s=n.tracked;return n.tracked=!0,s}}function oc(e,t,n){let r;do{const e=N();r?e.update(r):e.update(n),r=e.digest("hex").substr(0,8)}while(t.has(r));return t.set(r,e),r}function ac(e,t,n){return void 0===e.source&&jt(function(e){return{code:Ut.ASSET_SOURCE_MISSING,message:`Plugin error creating asset "${e.name}" - no asset source set.`}}(e)),e.fileName?e.fileName:uh(hh(n,"assetFileNames",t=>{switch(t){case"hash":const n=N();return n.update(t),n.update(":"),n.update(e.source),n.digest("hex").substr(0,8);case"name":return e.name.substr(0,e.name.length-at(e.name).length);case"extname":return at(e.name);case"ext":return at(e.name).substr(1)}}),t)}function hc(e,t,n){return{emitAsset(r,i){"string"==typeof r&&zt(r)||jt(function(e){return{code:Ut.INVALID_ASSET_NAME,message:`Plugin error creating asset, name "${e}" is not a plain (non relative or absolute URL) string name.`}}(r));const s={name:r,source:i,fileName:void 0};return t&&void 0!==i&&uc(s,t,n),oc(s,e,r)},setAssetSource(r,i){const s=e.get(r);s||jt(function(e){return{code:Ut.ASSET_NOT_FOUND,message:`Plugin error - Unable to set the source for unknown asset "${e}".`}}(r)),void 0!==s.source&&jt(function(e){return{code:Ut.ASSET_SOURCE_ALREADY_SET,message:`Plugin error - Unable to set the source for asset "${e.name}", source already set.`}}(s)),"string"==typeof i||i||jt(function(e){return{code:Ut.ASSET_SOURCE_MISSING,message:`Plugin error creating asset "${e.name}", setAssetSource call without a source.`}}(s)),s.source=i,t&&uc(s,t,n)},getAssetFileName(t){const n=e.get(t);return n||jt(function(e){return{code:Ut.ASSET_NOT_FOUND,message:`Plugin error - Unable to get file name for unknown asset "${e}".`}}(t)),void 0===n.fileName&&jt(function(e){return{code:Ut.ASSET_NOT_FINALISED,message:`Plugin error - Unable to get file name for asset "${e.name}". Ensure that the source is set and that generate is called first.`}}(n)),n.fileName}}}function uc(e,t,n){const r=ac(e,t,n);e.fileName=r,t[r]={fileName:r,isAsset:!0,source:e.source}}var cc;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(cc||(cc={}));const lc=e=>(...t)=>{throw new Error(`Cannot use fs.${e} inside browser`)},pc=lc("lstatSync"),dc=lc("readdirSync"),fc=lc("readFileSync"),mc=lc("realpathSync"),gc=lc("writeFile");function yc(e,t){try{const n=pc(e);if(!t&&n.isSymbolicLink())return yc(mc(e),t);if(t&&n.isSymbolicLink()||n.isFile()){const t=st(e);if(-1!==dc(ot(e)).indexOf(t))return e}}catch(e){}}function xc(e){return function(t,n){return"undefined"==typeof process&&jt({code:"MISSING_PROCESS",message:"It looks like you're using Rollup in a non-Node.js environment. This means you must supply a plugin with custom resolveId and load functions",url:"https://rollupjs.org/guide/en#a-simple-example"}),void 0===n||nt(t)||"."===t[0]?function(e,t){let n=yc(e,t);return n||((n=yc(e+".mjs",t))?n:n=yc(e+".js",t))}(ut(n?ot(n):ut(),t),e):null}}const vc=(e,t="URL")=>`new ${t}(${e}).href`,Ec=e=>`(document.currentScript && document.currentScript.src || new URL('${e}', document.baseURI).href)`,_c=e=>(t,n)=>{const r=e(n);return null===t?`({ url: ${r} })`:"url"===t?r:"undefined"},bc={amd:_c(()=>vc("module.uri, document.baseURI")),cjs:_c(e=>`(typeof document === 'undefined' ? ${vc("'file:' + __filename","(require('u' + 'rl').URL)")} : ${Ec(e)})`),iife:_c(e=>Ec(e)),system:e=>null===e?"module.meta":`module.meta.${e}`,umd:_c(e=>`(typeof document === 'undefined' ? ${vc("'file:' + __filename","(require('u' + 'rl').URL)")} : ${Ec(e)})`)},Ac=e=>vc(`(document.currentScript && document.currentScript.src || document.baseURI) + '/../${e}'`),Sc={amd:e=>vc(`module.uri + '/../${e}', document.baseURI`),cjs:e=>`(typeof document === 'undefined' ? ${vc(`'file:' + __dirname + '/${e}'`,"(require('u' + 'rl').URL)")} : ${Ac(e)})`,es:e=>vc(`'${e}', import.meta.url`),iife:e=>Ac(e),system:e=>vc(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' ? ${vc(`'file:' + __dirname + '/${e}'`,"(require('u' + 'rl').URL)")} : ${Ac(e)})`},Ic={ongenerate:"generateBundle",onwrite:"generateBundle",transformBundle:"renderChunk",transformChunk:"renderChunk"};function wc(e,t,r,i){const s=[...t.plugins||[],(o=t.preserveSymlinks,{name:"Rollup Core",resolveId:xc(o),load:e=>fc(e,"utf-8"),resolveFileUrl:({relativePath:e,format:t})=>Sc[t](e),resolveImportMeta(e,{chunkId:t,format:n}){const r=bc[n]&&bc[n](e,t);if(r)return r}})];var o;const{emitAsset:a,getAssetFileName:h,setAssetSource:u}=hc(e.assetsById),c={};let l=!1;const p=s.map((t,s)=>{let o,p=!0;if("string"!=typeof t.cacheKey&&("string"!=typeof t.name||c[t.name]?p=!1:c[t.name]=!0),!l&&(t.load||t.transform||t.transformBundle||t.transformChunk)&&(l=!0),r)if(p){const e=t.cacheKey||t.name;o=function(e){return{has(t){const n=e[t];return!!n&&(n[0]=0,!0)},get(t){const n=e[t];if(n)return n[0]=0,n[1]},set(t,n){e[t]=[0,n]},delete:t=>delete e[t]}}(r[e]||(r[e]=Object.create(null)))}else o=Cc(t.name);else o=Pc;let d=!1;function f(e,t){return d||(m.warn({code:"PLUGIN_WATCHER_DEPRECATED",message:"this.watcher usage is deprecated in plugins. Use the watchChange plugin hook and this.addWatchFile() instead."}),d=!0),i.on(e,t)}const m={addWatchFile(t){e.phase>=cc.GENERATE&&this.error({code:Ut.INVALID_ROLLUP_PHASE,message:"Cannot call addWatchFile after the build has finished."}),e.watchFiles[t]=!0},cache:o,emitAsset:a,emitChunk(t,n){return e.phase>cc.LOAD_AND_PARSE&&this.error({code:Ut.INVALID_ROLLUP_PHASE,message:"Cannot call emitChunk after module loading has finished."}),e.moduleLoader.addEntryModuleAndGetReferenceId({alias:n&&n.name||null,unresolvedId:t})},error(e){"string"==typeof e&&(e={message:e}),e.code&&(e.pluginCode=e.code),e.code="PLUGIN_ERROR",e.plugin=t.name||`Plugin at position ${s+1}`,jt(e)},isExternal:(t,n,r=!1)=>e.moduleLoader.isExternal(t,n,r),getAssetFileName:h,getChunkFileName:t=>e.moduleLoader.getChunkFileName(t),getModuleInfo(t){const n=e.moduleById.get(t);if(null==n)throw new Error(`Unable to find module ${t}`);return{hasModuleSideEffects:n.moduleSideEffects,id:n.id,importedIds:n instanceof ct?[]:n.sources.map(e=>n.resolvedIds[e].id),isEntry:n instanceof Qa&&n.isEntryPoint,isExternal:n instanceof ct}},meta:{rollupVersion:n},get moduleIds(){return e.moduleById.keys()},parse:e.contextParse,resolveId:(t,n)=>e.moduleLoader.resolveId(t,n).then(e=>e&&e.id),resolve:(t,n,r)=>e.moduleLoader.resolveId(t,n,r&&r.skipSelf?s:null),setAssetSource:u,warn(n){"string"==typeof n&&(n={message:n}),n.code&&(n.pluginCode=n.code),n.code="PLUGIN_WARNING",n.plugin=t.name||`Plugin at position ${s+1}`,e.warn(n)},watcher:i?Object.assign({},i,{addListener:f,on:f}):void 0};return m});function d(e,t,n,r=!1,i){const o=s[n];let a=p[n];const h=o[e];if(!h)return;const u=Ic[e];if(u&&a.warn(Nc(e,u,o,n)),i&&(!(a=i(a,o))||a===p[n]))throw new Error("Internal Rollup error: hookContext must return a new context object.");try{if("function"!=typeof h){if(r)return h;jt({code:"INVALID_PLUGIN_HOOK",message:`Error running plugin hook ${e} for ${o.name||`Plugin at position ${n+1}`}, expected a function hook.`})}return h.apply(a,t)}catch(t){"string"==typeof t&&(t={message:t}),"PLUGIN_ERROR"!==t.code&&(t.code&&(t.pluginCode=t.code),t.code="PLUGIN_ERROR"),t.plugin=o.name||`Plugin at position ${n+1}`,t.hook=e,jt(t)}}function f(e,t,n,r=!1,i){const o=s[n];let a=p[n];const h=o[e];if(!h)return;const u=Ic[e];if(u&&a.warn(Nc(e,u,o,n)),i&&(!(a=i(a,o))||a===p[n]))throw new Error("Internal Rollup error: hookContext must return a new context object.");return Promise.resolve().then(()=>{if("function"!=typeof h){if(r)return h;jt({code:"INVALID_PLUGIN_HOOK",message:`Error running plugin hook ${e} for ${o.name||`Plugin at position ${n+1}`}, expected a function hook.`})}return h.apply(a,t)}).catch(t=>{"string"==typeof t&&(t={message:t}),"PLUGIN_ERROR"!==t.code&&(t.code&&(t.pluginCode=t.code),t.code="PLUGIN_ERROR"),t.plugin=o.name||`Plugin at position ${n+1}`,t.hook=e,jt(t)})}return{emitAsset:a,getAssetFileName:h,hasLoadersOrTransforms:l,hookSeq(e,t,n){let r=Promise.resolve();for(let i=0;i<s.length;i++)r=r.then(()=>f(e,t,i,!1,n));return r},hookSeqSync(e,t,n){for(let r=0;r<s.length;r++)d(e,t,r,!1,n)},hookFirst(e,t,n,r){let i=Promise.resolve();for(let o=0;o<s.length;o++)r!==o&&(i=i.then(r=>null!=r?r:f(e,t,o,!1,n)));return i},hookFirstSync(e,t,n){for(let r=0;r<s.length;r++){const i=d(e,t,r,!1,n);if(null!=i)return i}return null},hookParallel(e,t,n){const r=[];for(let i=0;i<s.length;i++){const s=f(e,t,i,!1,n);s&&r.push(s)}return Promise.all(r).then(()=>{})},hookReduceArg0(e,[t,...n],r,i){let o=Promise.resolve(t);for(let t=0;t<s.length;t++)o=o.then(o=>{const a=f(e,[o,...n],t,!1,i);return a?a.then(e=>r.call(p[t],o,e,s[t])):o});return o},hookReduceArg0Sync(e,[t,...n],r,i){for(let o=0;o<s.length;o++){const a=d(e,[t,...n],o,!1,i);t=r.call(p[o],t,a,s[o])}return t},hookReduceValue(e,t,n,r,i){let o=Promise.resolve(t);for(let t=0;t<s.length;t++)o=o.then(o=>{const a=f(e,n,t,!0,i);return a?a.then(e=>r.call(p[t],o,e,s[t])):o});return o}}}const Pc={has:()=>!1,get(){},set(){},delete:()=>!1};function kc(e){jt(e?{code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`}:{code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."})}const Cc=e=>({has:()=>(kc(e),!1),get(){kc(e)},set(){kc(e)},delete:()=>(kc(e),!1)});function Nc(e,t,n,r){return{code:e.toUpperCase()+"_HOOK_DEPRECATED",message:`The ${e} hook used by plugin ${n.name||`at position ${r+1}`} is deprecated. The ${t} hook should be used instead.`}}function $c(e,t){return rt(t)?ut(e,"..",t):t}function Rc(e){if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>!t.startsWith("\0")&&e(t,...n)||!1;if(e){const t=new Set(Array.isArray(e)?e:e?[e]:[]);return e=>t.has(e)}return()=>!1}function Oc(e,t,n){if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>!!t.startsWith("\0")||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}var r,i;e&&n.warn((r="treeshake.moduleSideEffects",i='please use one of false, "no-external", a function or an array',{code:Ut.INVALID_OPTION,message:`Invalid value for option "${r}" - ${i}.`}));const s=Rc(t);return(e,t)=>!(t&&s(e))}class Mc{constructor(e,t,n,r,i,s,o){this.entriesByReferenceId=new Map,this.entryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.manualChunkModules={},this.loadEntryModule=(({alias:e,unresolvedId:t},n)=>this.pluginDriver.hookFirst("resolveId",[t,void 0]).then(r=>{(!1===r||r&&"object"==typeof r&&r.external)&&jt(function(e){return{code:Ut.UNRESOLVED_ENTRY,message:`Entry module cannot be external (${Bt(e)}).`}}(t));const i=r&&"object"==typeof r?r.id:r;if("string"==typeof i)return this.fetchModule(i,void 0,!0,n).then(t=>(null!==e&&(null!==t.chunkAlias&&t.chunkAlias!==e&&jt(Ft(t.id,e,t.chunkAlias)),t.chunkAlias=e),t));jt(function(e){return{code:Ut.UNRESOLVED_ENTRY,message:`Could not resolve entry module (${Bt(e)}).`}}(t))})),this.graph=e,this.modulesById=t,this.pluginDriver=n,this.isExternal=Rc(r),this.hasModuleSideEffects=Oc(s,o,e),this.getManualChunk="function"==typeof i?i:()=>null}addEntryModuleAndGetReferenceId(e){const t={module:null,name:e.unresolvedId},n=oc(t,this.entriesByReferenceId,e.unresolvedId);return this.addEntryModules([e],!1).then(({newEntryModules:[e]})=>{t.module=e}).catch(()=>{}),n}addEntryModules(e,t){const n=Promise.all(e.map(e=>this.loadEntryModule(e,!0))).then(e=>{for(const n of e){n.isUserDefinedEntryPoint=n.isUserDefinedEntryPoint||t,this.entryModules.find(e=>e.id===n.id)||this.entryModules.push(n)}return e});return this.awaitLoadModulesPromise(n).then(e=>({entryModules:this.entryModules,manualChunkModulesByAlias:this.manualChunkModules,newEntryModules:e}))}addManualChunks(e){const t=[];for(const n of Object.keys(e)){const r=e[n];for(const e of r)t.push({alias:null,unresolvedId:e,manualChunkAlias:n})}const n=Promise.all(t.map(e=>this.loadEntryModule(e,!1))).then(e=>{for(let n=0;n<e.length;n++)this.addToManualChunk(t[n].manualChunkAlias,e[n])});return this.awaitLoadModulesPromise(n)}getChunkFileName(e){const t=this.entriesByReferenceId.get(e);var n;t||jt((n=e,{code:Ut.CHUNK_NOT_FOUND,message:`Plugin error - Unable to get file name for unknown chunk "${n}".`}));const r=t.module&&(t.module.facadeChunk?t.module.facadeChunk.id:t.module.chunk.id);var i;return r||jt((i=t,{code:Ut.CHUNK_NOT_GENERATED,message:`Plugin error - Unable to get file name for chunk "${i.name}". Ensure that generate is called first.`})),r}resolveId(e,t,n){return Promise.resolve(this.isExternal(e,t,!1)?{id:e,external:!0}:this.pluginDriver.hookFirst("resolveId",[e,t],null,n)).then(n=>this.normalizeResolveIdResult(n,t,e))}addToManualChunk(e,t){null!==t.manualChunkAlias&&t.manualChunkAlias!==e&&jt(Ft(t.id,e,t.manualChunkAlias)),t.manualChunkAlias=e,this.manualChunkModules[e]||(this.manualChunkModules[e]=[]),this.manualChunkModules[e].push(t)}awaitLoadModulesPromise(e){this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]);const t=()=>{const e=this.latestLoadModulesPromise;return e.then(()=>{if(this.latestLoadModulesPromise!==e)return t()})};return t().then(()=>e)}fetchAllDependencies(e){const t=Promise.all(e.getDynamicImportExpressions().map((t,n)=>this.resolveDynamicImport(t,e.id).then(t=>{if(null===t)return;const r=e.dynamicImports[n];if("string"!=typeof t)return this.fetchResolvedDependency(Bt(t.id),e.id,t).then(e=>{r.resolution=e});r.resolution=t})));return t.catch(()=>{}),Promise.all(e.sources.map(t=>this.resolveAndFetchDependency(e,t))).then(()=>t)}fetchModule(e,t,n,r){const i=this.modulesById.get(e);if(i){if(i instanceof ct)throw new Error(`Cannot fetch external module ${e}`);return i.isEntryPoint=i.isEntryPoint||r,Promise.resolve(i)}const s=new Qa(this.graph,e,n,r);this.modulesById.set(e,s);const o=this.getManualChunk(e);return"string"==typeof o&&this.addToManualChunk(o,s),Ua("load modules",3),Promise.resolve(this.pluginDriver.hookFirst("load",[e])).catch(n=>{Fa("load modules",3);let r=`Could not load ${e}`;throw t&&(r+=` (imported by ${t})`),r+=`: ${n.message}`,new Error(r)}).then(t=>(Fa("load modules",3),"string"==typeof t?{code:t}:t&&"object"==typeof t&&"string"==typeof t.code?t:void jt(function(e){return{code:Ut.BAD_LOADER,message:`Error loading ${Bt(e)}: plugin load hook should return a string, a { code, map } object, or nothing/null`}}(e)))).then(t=>{const n=this.graph.cachedModules.get(e);if(n&&!n.customTransformCache&&n.originalCode===t.code){if(n.transformAssets)for(const e of n.transformAssets)this.pluginDriver.emitAsset(e.name,e.source);return n}return"boolean"==typeof t.moduleSideEffects&&(s.moduleSideEffects=t.moduleSideEffects),function(e,t,n){const r=n.id,i=[],s="string"==typeof t.map?JSON.parse(t.map):t.map;s&&"string"==typeof s.mappings&&(s.mappings=M(s.mappings));const o=e.pluginDriver.emitAsset,a=t.code;let h,u,c,l,p=t.ast,d=!1,f=null;const m=t.code;let g;return e.pluginDriver.hookReduceArg0("transform",[m,r],function(t,s,o){if(!d&&c.used&&(d=!0),d){if(s&&"object"==typeof s&&Array.isArray(s.dependencies))for(const t of s.dependencies){const n=ut(ot(r),t);e.watchFiles[n]||(e.watchFiles[n]=!0)}}else if(u.length&&(n.transformAssets=u),s&&"object"==typeof s&&Array.isArray(s.dependencies)){l.warnedTransformDependencies||this.warn({code:"TRANSFORM_DEPENDENCIES_DEPRECATED",message:'Returning "dependencies" from plugin transform hook is deprecated for using this.addWatchFile() instead.'}),l.warnedTransformDependencies=!0,h||(h=[]);for(const e of s.dependencies)h.push(ut(ot(r),e))}if("string"==typeof s)s={ast:void 0,code:s,map:void 0};else{if(!s||"object"!=typeof s)return t;"string"==typeof s.map&&(s.map=JSON.parse(s.map)),"boolean"==typeof s.moduleSideEffects&&(f=s.moduleSideEffects)}return s.map&&"string"==typeof s.map.mappings&&(s.map.mappings=M(s.map.mappings)),null!==s.map&&i.push(s.map||{missing:!0,plugin:o.name}),p=s.ast,s.code},(t,n)=>{let i;return l=n,n.cacheKey?d=!0:c=function(e){const t={used:!1,cache:void 0};return t.cache={has:n=>(t.used=!0,e.has(n)),get:n=>(t.used=!0,e.get(n)),set:(n,r)=>(t.used=!0,e.set(n,r)),delete:n=>(t.used=!0,e.delete(n))},t}(t.cache),({assets:u,emitAsset:i}=function(e,t){const n=[];return{assets:n,emitAsset:(r,i)=>{const s=t(r,i),o=e.get(s);return n.push({fileName:void 0,name:o.name,source:o.source}),s}}}(e.assetsById,o)),Object.assign({},t,{cache:c?c.cache:t.cache,warn(e,n){"string"==typeof e&&(e={message:e}),n&&Wt(e,n,m,r),e.id=r,e.hook="transform",t.warn(e)},error(e,n){"string"==typeof e&&(e={message:e}),n&&Wt(e,n,m,r),e.id=r,e.hook="transform",t.error(e)},emitAsset:i,addWatchFile(e){h||(h=[]),h.push(e),t.addWatchFile(e)},setAssetSource(e,n){if(t.setAssetSource(e,n),!d&&!g)try{this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitAsset with a source, or call setAssetSource in another hook."})}catch(e){g=e}}})}).catch(e=>{"string"==typeof e&&(e={message:e}),"PLUGIN_ERROR"!==e.code&&(e.code&&(e.pluginCode=e.code),e.code="PLUGIN_ERROR"),e.id=r,jt(e)}).then(e=>{if(!d&&g)throw g;return{ast:p,code:e,customTransformCache:d,moduleSideEffects:f,originalCode:a,originalSourcemap:s,sourcemapChain:i,transformDependencies:h}})}(this.graph,t,s)}).then(t=>(s.setSource(t),this.modulesById.set(e,s),this.fetchAllDependencies(s).then(()=>{for(const e in s.exports)"default"!==e&&(s.exportsAll[e]=s.id);return s.exportAllSources.forEach(e=>{const t=s.resolvedIds[e].id,n=this.modulesById.get(t);if(!(n instanceof ct))for(const e in n.exportsAll)e in s.exportsAll?this.graph.warn(qt(e,s,n)):s.exportsAll[e]=n.exportsAll[e]}),s})))}fetchResolvedDependency(e,t,n){if(n.external){this.modulesById.has(n.id)||this.modulesById.set(n.id,new ct(this.graph,n.id,n.moduleSideEffects));const r=this.modulesById.get(n.id);return r instanceof ct==!1&&jt(function(e,t){return{code:Ut.INVALID_EXTERNAL_ID,message:`'${e}' is imported as an external by ${Bt(t)}, but is already an existing non-external module id.`}}(e,t)),Promise.resolve(r)}return this.fetchModule(n.id,t,n.moduleSideEffects,!1)}handleMissingImports(e,t,n){return null===e?(rt(t)&&jt(function(e,t){return{code:Ut.UNRESOLVED_IMPORT,message:`Could not resolve '${e}' from ${Bt(t)}`}}(t,n)),this.graph.warn(function(e,t){return{code:Ut.UNRESOLVED_IMPORT,importer:Bt(t),message:`'${e}' is imported by ${Bt(t)}, but could not be resolved – treating it as an external dependency`,source:e,url:"https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency"}}(t,n)),{id:t,external:!0,moduleSideEffects:!0}):e}normalizeResolveIdResult(e,t,n){let r="",i=!1,s=null;if(e)"object"==typeof e?(r=e.id,e.external&&(i=!0),"boolean"==typeof e.moduleSideEffects&&(s=e.moduleSideEffects)):(r=e,this.isExternal(r,t,!0)&&(i=!0)),i&&(r=$c(t,r));else{if(r=$c(t,n),!1!==e&&!this.isExternal(r,t,!0))return null;i=!0}return{external:i,id:r,moduleSideEffects:"boolean"==typeof s?s:this.hasModuleSideEffects(r,i)}}resolveAndFetchDependency(e,t){return Promise.resolve(e.resolvedIds[t]||this.resolveId(t,e.id).then(n=>this.handleMissingImports(n,t,e.id))).then(n=>(e.resolvedIds[t]=n,this.fetchResolvedDependency(t,e.id,n)))}resolveDynamicImport(e,t){return this.pluginDriver.hookFirst("resolveDynamicImport",[e,t]).then(n=>"string"!=typeof e?"string"==typeof n?n:n?Object.assign({external:!1,moduleSideEffects:!0},n):null:null==n?this.resolveId(e,t).then(n=>this.handleMissingImports(n,e,t)):this.handleMissingImports(this.normalizeResolveIdResult(n,t,e),e,t))}}const Tc=97,Dc=48;function Lc(e){return e<10?String.fromCharCode(Dc+e):String.fromCharCode(Tc+(e-10))}function Vc(e){let t="";for(let n=0;n<e.length;n++){const r=e[n];t+=Lc(r>>4),t+=Lc(15&r)}return t}function Bc(e){const t=new Uint8Array(e);for(let e=0;e<t.length;e++)t[e]=512*Math.random();return t}function zc(e){return"string"==typeof e?[{alias:null,unresolvedId:e}]:Array.isArray(e)?e.map(e=>({alias:null,unresolvedId:e})):Object.keys(e).map(t=>({alias:t,unresolvedId:e[t]}))}class jc{constructor(e,t){if(this.assetsById=new Map,this.curChunkIndex=0,this.moduleById=new Map,this.needsTreeshakingPass=!1,this.phase=cc.LOAD_AND_PARSE,this.watchFiles=Object.create(null),this.externalModules=[],this.modules=[],this.curChunkIndex=0,this.deoptimizationTracker=new sc,this.cachedModules=new Map,e.cache&&e.cache.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);if(!1!==e.cache){this.pluginCache=e.cache&&e.cache.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.keys(t))t[e][0]++}}if(this.preserveModules=e.preserveModules,this.cacheExpiry=e.experimentalCacheExpiry,this.treeshake=!1!==e.treeshake,this.treeshake&&(this.treeshakingOptions=e.treeshake?{annotations:!1!==e.treeshake.annotations,moduleSideEffects:e.treeshake.moduleSideEffects,propertyReadSideEffects:!1!==e.treeshake.propertyReadSideEffects,pureExternalModules:e.treeshake.pureExternalModules}:{annotations:!0,moduleSideEffects:!0,propertyReadSideEffects:!0,pureExternalModules:!1}),this.contextParse=((e,t={})=>this.acornParser.parse(e,Object.assign({},Ka,t,this.acornOptions))),this.pluginDriver=wc(this,e,this.pluginCache,t),t){const e=e=>this.pluginDriver.hookSeqSync("watchChange",[e]);t.on("change",e),t.once("restart",()=>{t.removeListener("change",e)})}this.shimMissingExports=e.shimMissingExports,this.scope=new rc,this.context=String(e.context);const n=e.moduleContext;if("function"==typeof n)this.getModuleContext=(e=>n(e)||this.context);else if("object"==typeof n){const e=new Map;for(const t in n)e.set(ut(t),n[t]);this.getModuleContext=(t=>e.get(t)||this.context)}else this.getModuleContext=(()=>this.context);this.onwarn=e.onwarn||function(){const e=Object.create(null);return t=>{const n=t.toString();n in e||(console.error(n),e[n]=!0)}}(),this.acornOptions=e.acorn||{};const r=[];r.push(Qu),r.push(tc),r.push(Yu),e.experimentalTopLevelAwait&&(this.acornOptions.allowAwaitOutsideFunction=!0);const i=e.acornInjectPlugins;r.push(...Array.isArray(i)?i:i?[i]:[]),this.acornParser=tu.extend(...r),this.moduleLoader=new Mc(this,this.moduleById,this.pluginDriver,e.external,"function"==typeof e.manualChunks&&e.manualChunks,this.treeshake?this.treeshakingOptions.moduleSideEffects:null,!!this.treeshake&&this.treeshakingOptions.pureExternalModules)}build(e,t,n){return Ua("parse modules",2),Promise.all([this.moduleLoader.addEntryModules(zc(e),!0),t&&"object"==typeof t&&this.moduleLoader.addManualChunks(t)]).then(([{entryModules:e,manualChunkModulesByAlias:t}])=>{if(0===e.length)throw new Error("You must supply options.input to rollup");for(const e of this.moduleById.values())e instanceof Qa?(this.modules.push(e),this.watchFiles[e.id]=!0):this.externalModules.push(e);if(Fa("parse modules",2),this.phase=cc.ANALYSE,Ua("analyse dependency graph",2),this.link(e),Fa("analyse dependency graph",2),Ua("mark included statements",2),n&&e.length>1)throw new Error("Internal Error: can only inline dynamic imports for single-file builds.");for(const t of e)t.includeAllExports();this.includeMarked(this.modules);for(const e of this.externalModules)e.warnUnusedImports();Fa("mark included statements",2),Ua("generate chunks",2),this.preserveModules||n||function(e,t){let n,r,i;const s=new Set,o=[],a=e=>{n.manualChunkAlias?(e.manualChunkAlias=n.manualChunkAlias,e.entryPointsHash=r):function(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]^t[n]}(e.entryPointsHash,r);for(const t of e.dependencies)t instanceof ct||i.has(t.id)||(i.add(t.id),s.has(t.id)||t.manualChunkAlias||a(t));for(const{resolution:t}of e.dynamicImports)t instanceof Qa&&t.dynamicallyImportedBy.length>0&&!t.manualChunkAlias&&o.push(t)};if(t)for(const e of Object.keys(t))for(n of(r=Bc(10),t[e]))i=new Set(n.id),a(n);for(n of e)s.add(n.id),r=Bc(10),i=new Set(n.id),n.manualChunkAlias||a(n);for(n of o)s.has(n.id)||(s.add(n.id),r=Bc(10),i=new Set(n.id),a(n))}(e,t);let r=[];if(this.preserveModules)for(const e of this.modules){const t=new dh(this,[e]);!e.isEntryPoint&&t.isEmpty||(t.entryModules=[e]),r.push(t)}else{const e={};for(const t of this.modules){const n=Vc(t.entryPointsHash),r=e[n];r?r.push(t):e[n]=[t]}for(const t in e){const n=e[t];sh(n);const i=new dh(this,n);r.push(i)}}for(const e of r)e.link();r=r.filter(ph);for(const e of r)(this.preserveModules||e.entryModules.length>0)&&e.generateEntryExportsOrMarkAsTainted();const i=[];if(!this.preserveModules)for(const e of r)for(const t of e.entryModules)if(e.facadeModule!==t){const e=new dh(this,[]);e.turnIntoFacade(t),i.push(e)}return Fa("generate chunks",2),this.phase=cc.GENERATE,r.concat(i)})}finaliseAssets(e){const t=Object.create(null);return this.assetsById.forEach(n=>{void 0!==n.source&&uc(n,t,e)}),t}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let n=!0;for(const e of Object.keys(t))t[e][0]>=this.cacheExpiry?delete t[e]:n=!1;n&&delete this.pluginCache[e]}return{modules:this.modules.map(e=>e.toJSON()),plugins:this.pluginCache}}includeMarked(e){if(this.treeshake){let t=1;do{Ua(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const t of e)t.isExecuted&&t.include();Fa(`treeshaking pass ${t++}`,3)}while(this.needsTreeshakingPass)}else for(const t of e)t.includeAllInBundle()}warn(e){e.toString=(()=>{let t="";return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${Bt(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+=e.message}),this.onwarn(e)}link(e){for(const e of this.modules)e.linkDependencies();const{orderedModules:t,cyclePaths:n}=function(e){let t=0;const n=[],r={},i=[],s=[],o={},a=e=>{if(!r[e.id]){if(e instanceof ct)return e.execIndex=t++,void(r[e.id]=!0);for(const t of e.dependencies)t.id in o?r[t.id]||n.push(oh(t.id,e.id,o)):(o[t.id]=e.id,a(t));for(const{resolution:t}of e.dynamicImports)t instanceof Qa&&-1===s.indexOf(t)&&s.push(t);e.execIndex=t++,r[e.id]=!0,i.push(e)}};for(const t of e)o[t.id]||(o[t.id]=null,a(t));for(const e of s)o[e.id]||(o[e.id]=null,a(e));return{orderedModules:i,cyclePaths:n}}(e);for(const e of n)this.warn({code:"CIRCULAR_DEPENDENCY",importer:e[0],message:`Circular dependency: ${e.join(" -> ")}`});this.modules=t;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of Object.keys(e.importDescriptions)){const n=e.importDescriptions[t];"*"===n.name||n.module.getVariableForExportName(n.name)||e.warn({code:"NON_EXISTENT_EXPORT",message:`Non-existent export '${n.name}' is imported from ${Bt(n.module.id)}`,name:n.name,source:n.module.id},n.start)}}}function Wc(e){switch(typeof e){case"function":return e();case"string":return e;default:return""}}const Uc=(e,t)=>t?`${e}\n${t}`:e,Fc=(e,t)=>t?`${e}\n\n${t}`:e;function qc(e,t){jt({code:"INVALID_EXPORT_OPTION",message:`'${e}' was specified for output.exports, but entry module has following exports: ${t.join(", ")}`})}function Gc(e,{exports:t,name:n,format:r}){const i=e.getExportNames();return"default"===t?1===i.length&&"default"===i[0]||qc("default",i):"none"===t&&i.length&&qc("none",i),t&&"auto"!==t||(0===i.length?t="none":1===i.length&&"default"===i[0]?t="default":(null!==e.facadeModule&&e.facadeModule.isEntryPoint&&"es"!==r&&-1!==i.indexOf("default")&&e.graph.warn({code:"MIXED_EXPORTS",message:`Using named and default exports together. Consumers of your bundle will have to use ${n||"bundle"}['default'] to access the default export, which may not be what you want. Use \`output.exports: 'named'\` to disable this warning`,url:"https://rollupjs.org/guide/en#output-exports"}),t="named")),/(?:default|named|none)/.test(t)||jt({code:"INVALID_EXPORT_OPTION",message:"output.exports must be 'default', 'named', 'none', 'auto', or left unspecified (defaults to 'auto')",url:"https://rollupjs.org/guide/en#output-exports"}),t}const Hc=(e,t)=>(n,r)=>void 0!==t[n]?t[n]:void 0!==e[n]?e[n]:r,Kc=e=>e&&"object"!=typeof e?{}:e,Yc=(e,t,n)=>{const r=Kc(t[n]),i=Kc(e[n]);return void 0!==r?r&&i?Object.assign({},i,r):r:i},Xc=(e,t,n=(e=>{"string"==typeof e?console.warn(e):console.warn(e.message)}))=>t.silent?()=>{}:e.onwarn?t=>e.onwarn(t,n):n,Qc=(e,t)=>{const n=e.external;return"function"==typeof n?(e,...r)=>n(e,...r)||-1!==t.external.indexOf(e):(n||[]).concat(t.external)},Jc={c:"config",d:"dir",e:"external",f:"format",g:"globals",h:"help",i:"input",m:"sourcemap",n:"name",o:"file",v:"version",w:"watch"};function Zc({config:e={},command:t={},defaultOnWarnHandler:n}){const r=function(e){const t=Object.assign({},e);t.external=e.external?e.external.split(","):[],e.globals&&(t.globals=Object.create(null),e.globals.split(",").forEach(e=>{const n=e.split(":");t.globals[n[0]]=n[1],-1===t.external.indexOf(n[0])&&t.external.push(n[0])}));return t}(t),i=function(e,t={},n){const r=Hc(e,t),i={acorn:e.acorn,acornInjectPlugins:e.acornInjectPlugins,cache:r("cache"),chunkGroupingSize:r("chunkGroupingSize",5e3),context:e.context,experimentalCacheExpiry:r("experimentalCacheExpiry",10),experimentalOptimizeChunks:r("experimentalOptimizeChunks"),experimentalTopLevelAwait:r("experimentalTopLevelAwait"),external:Qc(e,t),inlineDynamicImports:r("inlineDynamicImports",!1),input:r("input",[]),manualChunks:r("manualChunks"),moduleContext:e.moduleContext,onwarn:Xc(e,t,n),perf:r("perf",!1),plugins:e.plugins,preserveModules:r("preserveModules"),preserveSymlinks:r("preserveSymlinks"),shimMissingExports:r("shimMissingExports"),treeshake:Yc(e,t,"treeshake"),watch:e.watch};i.cache&&i.cache.cache&&(i.cache=i.cache.cache);return i}(e,r,n);r.output&&Object.assign(r,r.output);const s=e.output,o=Array.isArray(s)?s:s?[s]:[];0===o.length&&o.push({});const a=o.map(e=>(function(e,t={}){const n=Hc(e,t);let r=n("format");switch(r){case"esm":case"module":r="es";break;case"commonjs":r="cjs"}return{amd:Object.assign({},e.amd,t.amd),assetFileNames:n("assetFileNames"),banner:n("banner"),chunkFileNames:n("chunkFileNames"),compact:n("compact",!1),dir:n("dir"),dynamicImportFunction:n("dynamicImportFunction"),entryFileNames:n("entryFileNames"),esModule:n("esModule",!0),exports:n("exports"),extend:n("extend"),file:n("file"),footer:n("footer"),format:"esm"===r?"es":r,freeze:n("freeze",!0),globals:n("globals"),indent:n("indent",!0),interop:n("interop",!0),intro:n("intro"),name:n("name"),namespaceToStringTag:n("namespaceToStringTag",!1),noConflict:n("noConflict"),outro:n("outro"),paths:n("paths"),preferConst:n("preferConst"),sourcemap:n("sourcemap"),sourcemapExcludeSources:n("sourcemapExcludeSources"),sourcemapFile:n("sourcemapFile"),sourcemapPathTransform:n("sourcemapPathTransform"),strict:n("strict",!0)}})(e,r)),h=[],u=Object.keys(i);el(h,Object.keys(e),u,"input option",/^output$/);const c=Object.keys(a[0]);el(h,a.reduce((e,t)=>e.concat(Object.keys(t)),[]),c,"output option");const l=c.filter(e=>"sourcemapPathTransform"!==e);return el(h,Object.keys(r),u.concat(l,Object.keys(Jc),"config","environment","silent"),"CLI flag",/^_|output|(config.*)$/),{inputOptions:i,optionError:h.length>0?h.join("\n"):null,outputOptions:a}}function el(e,t,n,r,i=/$./){const s=t.filter(e=>-1===n.indexOf(e)&&!i.test(e));s.length>0&&e.push(`Unknown ${r}: ${s.join(", ")}. Allowed options: ${n.sort().join(", ")}`)}const tl={get(){throw new Error("bundle.generate(...) now returns a Promise instead of a { code, map } object")}};function nl(e,t){return t.options&&t.options.call({meta:{rollupVersion:n}},e)||e}let rl;var il;function sl(e){return e.isAsset?il.ASSET:e.isEntry?il.ENTRY_CHUNK:il.SECONDARY_CHUNK}function ol(e){return{output:Object.keys(e).map(t=>e[t]).sort((e,t)=>{const n=sl(e),r=sl(t);return n===r?0:n<r?-1:1})}}function al(e){return!0===e.isAsset}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(il||(il={})),e.VERSION=n,e.rollup=function(e){try{const t=function(e){if(!e)throw new Error("You must supply an options object to rollup");let{inputOptions:t,optionError:n}=Zc({config:e});n&&t.onwarn({message:n,code:"UNKNOWN_OPTION"});const r=t.plugins;return t.plugins=Array.isArray(r)?r.filter(Boolean):r?[r]:[],(t=t.plugins.reduce(nl,t)).inlineDynamicImports?(t.preserveModules&&jt({code:"INVALID_OPTION",message:'"preserveModules" does not support the "inlineDynamicImports" option.'}),t.manualChunks&&jt({code:"INVALID_OPTION",message:'"manualChunks" option is not supported for "inlineDynamicImports".'}),t.experimentalOptimizeChunks&&jt({code:"INVALID_OPTION",message:'"experimentalOptimizeChunks" option is not supported for "inlineDynamicImports".'}),(t.input instanceof Array&&t.input.length>1||"object"==typeof t.input&&Object.keys(t.input).length>1)&&jt({code:"INVALID_OPTION",message:'Multiple inputs are not supported for "inlineDynamicImports".'})):t.preserveModules&&(t.manualChunks&&jt({code:"INVALID_OPTION",message:'"preserveModules" does not support the "manualChunks" option.'}),t.experimentalOptimizeChunks&&jt({code:"INVALID_OPTION",message:'"preserveModules" does not support the "experimentalOptimizeChunks" option.'})),t}(e);Ha(t);const n=new jc(t,rl);rl=void 0;const r=!1!==e.cache;return delete t.cache,delete e.cache,Ua("BUILD",1),n.pluginDriver.hookParallel("buildStart",[t]).then(()=>n.build(t.input,t.manualChunks,t.inlineDynamicImports)).then(e=>n.pluginDriver.hookParallel("buildEnd",[]).then(()=>e),e=>n.pluginDriver.hookParallel("buildEnd",[e]).then(()=>{throw e})).then(e=>{Fa("BUILD",1);let i=!1;function s(r){return function(e,t,n,r){if(!t)throw new Error("You must supply an options object");const i=Zc({config:{output:Object.assign({},t,t.output,e.output)}});if(i.optionError)throw new Error(i.optionError);const s=i.outputOptions[0],o=r.hookReduceArg0Sync("outputOptions",[s],(e,t)=>t||e);var a;return"es6"===(a=o).format&&jt({message:'The "es6" output format is deprecated – use "esm" instead',url:"https://rollupjs.org/guide/en#output-format"}),["amd","cjs","system","es","iife","umd"].indexOf(a.format)<0&&jt({message:'You must specify "output.format", which can be one of "amd", "cjs", "system", "esm", "iife" or "umd".',url:"https://rollupjs.org/guide/en#output-format"}),"string"==typeof o.file&&("string"==typeof o.dir&&jt({code:"INVALID_OPTION",message:'You must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks.'}),e.preserveModules&&jt({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when using the "preserveModules" option.'}),"object"!=typeof e.input||Array.isArray(e.input)||jt({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when providing named inputs.'})),n&&("umd"!==o.format&&"iife"!==o.format||jt({code:"INVALID_OPTION",message:"UMD and IIFE output formats are not supported for code-splitting builds."}),"string"==typeof o.file&&jt({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when generating multiple chunks.'})),o}(t,r,e.length>1,n.pluginDriver)}function o(r,s){Ua("GENERATE",1);const o=r.assetFileNames||"assets/[name]-[hash][extname]",a=n.finaliseAssets(o),h=function(e){if(0===e.length)return"/";if(1===e.length)return ot(e[0]);const t=e.slice(1).reduce((e,t)=>{const n=t.split(/\/+|\\+/);let r;for(r=0;e[r]===n[r]&&r<Math.min(e.length,n.length);r++);return e.slice(0,r)},e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}(function(e){const t=[];for(const n of e)for(const e of n.entryModules)nt(e.id)&&t.push(e.id);return t}(e));return n.pluginDriver.hookParallel("renderStart",[]).then(()=>(function(e,t){const n=e.pluginDriver;return Promise.all([n.hookReduceValue("banner",Wc(t.banner),[],Uc),n.hookReduceValue("footer",Wc(t.footer),[],Uc),n.hookReduceValue("intro",Wc(t.intro),[],Fc),n.hookReduceValue("outro",Wc(t.outro),[],Fc)]).then(([e,t,n,r])=>(n&&(n+="\n\n"),r&&(r=`\n\n${r}`),e.length&&(e+="\n"),t.length&&(t="\n"+t),{intro:n,outro:r,banner:e,footer:t})).catch(e=>{jt({code:"ADDON_ERROR",message:`Could not retrieve ${e.hook}. Check configuration of ${e.plugin}.\n\tError Message: ${e.message}`})})})(n,r)).then(s=>{for(const n of e)t.preserveModules||n.generateInternalExports(r),n.facadeModule&&n.facadeModule.isEntryPoint&&(n.exportMode=Gc(n,r));for(const t of e)t.preRender(r,h);!i&&t.experimentalOptimizeChunks&&(function(e,t,n,r){for(let i=0;i<e.length;i++){const s=e[i],o=[];if(s.visitStaticDependenciesUntilCondition(e=>{e instanceof dh&&o.push(e)}),o.length<2)continue;let a,h=1,u=!0,c=o[0],l=o[1];const p=e=>!(null!==e.facadeModule||null!==e.manualChunkAlias||!l||null!==l.facadeModule||e.getRenderedSourceLength()>n);do{if(u){p(c)&&(u=!1);continue}let s=n-a.getRenderedSourceLength()-c.getRenderedSourceLength();if(s<=0){p(c)||(u=!0);continue}const d=new Set;c.visitStaticDependenciesUntilCondition(e=>d.add(e));const f=new Set([c,a]);if(a.visitStaticDependenciesUntilCondition(e=>e!==c&&e!==a&&!d.has(e)&&(e instanceof ct||(s-=e.getRenderedSourceLength())<=0||void f.add(e)))){p(c)||(u=!0);continue}if(c.visitStaticDependenciesUntilCondition(e=>!f.has(e)&&(e instanceof ct||(s-=e.getRenderedSourceLength())<=0||void 0))){p(c)||(u=!0);continue}const m=e.indexOf(c);m<=i&&i--,e.splice(m,1),a.merge(c,e,t,r),o.splice(--h,1),c=a,l&&!p(l)&&(u=!0)}while(a=c,c=l,l=o[++h],c)}}(e,r,t.chunkGroupingSize,h),i=!0),function(e,t,n,r,i){const s={},[o,a]=e.reduce(([e,t],n)=>((n.facadeModule&&n.facadeModule.isUserDefinedEntryPoint?e:t).push(n),[e,t]),[[],[]]),h=o.concat(a);for(let e=0;e<h.length;e++){const o=h[e];if(n.file)o.id=st(n.file);else if(t.preserveModules)o.generateIdPreserveModules(r,s);else{let e,t;o.facadeModule&&o.facadeModule.isUserDefinedEntryPoint?(e=n.entryFileNames||"[name].js",t="output.entryFileNames"):(e=n.chunkFileNames||"[name]-[hash].js",t="output.chunkFileNames"),o.generateId(e,t,i,n,s)}s[o.id]=!0}}(e,t,r,h,s);for(let t=0;t<e.length;t++){const n=e[t],r=n.facadeModule;a[n.id]={code:void 0,dynamicImports:n.getDynamicImportIds(),exports:n.getExportNames(),facadeModuleId:r&&r.id,fileName:n.id,imports:n.getImportIds(),isDynamicEntry:null!==r&&r.dynamicallyImportedBy.length>0,isEntry:null!==r&&r.isEntryPoint,map:void 0,modules:n.renderedModules,get name(){return n.getChunkName()}}}return Promise.all(e.map(e=>{const t=a[e.id];return e.render(r,s,t).then(e=>(t.code=e.code,t.map=e.map,n.pluginDriver.hookParallel("ongenerate",[Object.assign({bundle:t},r),t])))})).then(()=>{})}).catch(e=>n.pluginDriver.hookParallel("renderError",[e]).then(()=>{throw e})).then(()=>{const e=new Map(n.assetsById),t=hc(e,a,o);return n.pluginDriver.hookSeq("generateBundle",[r,a,s],e=>Object.assign({},e,t)).then(()=>{e.forEach(e=>{void 0===e.fileName&&uc(e,a,o)})})}).then(()=>(Fa("GENERATE",1),a))}const a={cache:r?n.getCache():void 0,generate:e=>{const t=o(s(e),!1).then(e=>ol(e));return Object.defineProperty(t,"code",tl),Object.defineProperty(t,"map",tl),t},watchFiles:Object.keys(n.watchFiles),write:e=>{const r=s(e);return r.dir||r.file||jt({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.'}),o(r,!0).then(e=>{let i=0;for(const t of Object.keys(e))if(!e[t].isAsset&&++i>1)break;return i>1&&(r.sourcemapFile&&jt({code:"INVALID_OPTION",message:'"output.sourcemapFile" is only supported for single-file builds.'}),"string"==typeof r.file&&jt({code:"INVALID_OPTION",message:'When building multiple chunks, the "output.dir" option must be used, not "output.file".'+("string"!=typeof t.input||!0===t.inlineDynamicImports?"":' To inline dynamic imports, set the "inlineDynamicImports" option.')})),Promise.all(Object.keys(e).map(t=>(function(e,t,n,r){const i=ut(r.dir||ot(r.file),n.fileName);let s,o;if(al(n))o=n.source;else if(o=n.code,r.sourcemap&&n.map){let e;"inline"===r.sourcemap?e=n.map.toUrl():(e=`${st(n.fileName)}.map`,s=gc(`${i}.map`,n.map.toString())),o+=`//# ${$a}=${e}\n`}return gc(i,o).then(()=>s).then(()=>!al(n)&&e.pluginDriver.hookSeq("onwrite",[Object.assign({bundle:t},r),n])).then(()=>{})})(n,a,e[t],r))).then(()=>n.pluginDriver.hookParallel("writeBundle",[e])).then(()=>ol(e))})}};return!0===t.perf&&(a.getTimings=Wa),a})}catch(e){return Promise.reject(e)}},Object.defineProperty(e,"__esModule",{value:!0})});
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).rollup={})}(this,function(e){"use strict";var t,n="1.12.3",r=i;function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function s(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function h(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}i.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var u={inherits:(function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}(t={exports:{}},t.exports),t.exports),toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):s(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},toHex:function(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t},htonl:o,toHex32:function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=o(i)),n+=h(i.toString(16))}return n},zero2:a,zero8:h,join32:function(e,t,n,i){var s=n-t;r(s%4==0);for(var o=new Array(s/4),a=0,h=t;a<o.length;a++,h+=4){var u;u="big"===i?e[h]<<24|e[h+1]<<16|e[h+2]<<8|e[h+3]:e[h+3]<<24|e[h+2]<<16|e[h+1]<<8|e[h],o[a]=u>>>0}return o},split32:function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var s=e[r];"big"===t?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=255&s):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=255&s)}return n},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<<t|e>>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,n){return e+t+n>>>0},sum32_4:function(e,t,n,r){return e+t+n+r>>>0},sum32_5:function(e,t,n,r,i){return e+t+n+r+i>>>0},sum64:function(e,t,n,r){var i=e[t],s=r+e[t+1]>>>0,o=(s<r?1:0)+n+i;e[t]=o>>>0,e[t+1]=s},sum64_hi:function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},sum64_lo:function(e,t,n,r){return t+r>>>0},sum64_4_hi:function(e,t,n,r,i,s,o,a){var h=0,u=t;return h+=(u=u+r>>>0)<t?1:0,h+=(u=u+s>>>0)<s?1:0,e+n+i+o+(h+=(u=u+a>>>0)<a?1:0)>>>0},sum64_4_lo:function(e,t,n,r,i,s,o,a){return t+r+s+a>>>0},sum64_5_hi:function(e,t,n,r,i,s,o,a,h,u){var c=0,l=t;return c+=(l=l+r>>>0)<t?1:0,c+=(l=l+s>>>0)<s?1:0,c+=(l=l+a>>>0)<a?1:0,e+n+i+o+h+(c+=(l=l+u>>>0)<u?1:0)>>>0},sum64_5_lo:function(e,t,n,r,i,s,o,a,h,u){return t+r+s+a+u>>>0},rotr64_hi:function(e,t,n){return(t<<32-n|e>>>n)>>>0},rotr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0},shr64_hi:function(e,t,n){return e>>>n},shr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0}};function c(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var l=c;c.prototype.update=function(e,t){if(e=u.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=u.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},c.prototype.digest=function(e){return this.update(this._pad()),r(null===this.pending),this._digest(e)},c.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,s=8;s<this.padLength;s++)r[i++]=0;return r};var p={BlockHash:l},d=u.rotr32;function f(e,t,n){return e&t^~e&n}function m(e,t,n){return e&t^e&n^t&n}function g(e,t,n){return e^t^n}var y={ft_1:function(e,t,n,r){return 0===e?f(t,n,r):1===e||3===e?g(t,n,r):2===e?m(t,n,r):void 0},ch32:f,maj32:m,p32:g,s0_256:function(e){return d(e,2)^d(e,13)^d(e,22)},s1_256:function(e){return d(e,6)^d(e,11)^d(e,25)},g0_256:function(e){return d(e,7)^d(e,18)^e>>>3},g1_256:function(e){return d(e,17)^d(e,19)^e>>>10}},x=u.sum32,v=u.sum32_4,E=u.sum32_5,_=y.ch32,b=y.maj32,A=y.s0_256,S=y.s1_256,I=y.g0_256,w=y.g1_256,P=p.BlockHash,k=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function C(){if(!(this instanceof C))return new C;P.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=k,this.W=new Array(64)}u.inherits(C,P);var N=C;C.blockSize=512,C.outSize=256,C.hmacStrength=192,C.padLength=64,C.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i<n.length;i++)n[i]=v(w(n[i-2]),n[i-7],I(n[i-15]),n[i-16]);var s=this.h[0],o=this.h[1],a=this.h[2],h=this.h[3],u=this.h[4],c=this.h[5],l=this.h[6],p=this.h[7];for(r(this.k.length===n.length),i=0;i<n.length;i++){var d=E(p,S(u),_(u,c,l),this.k[i],n[i]),f=x(A(s),b(s,o,a));p=l,l=c,c=u,u=x(h,d),h=a,a=o,o=s,s=x(d,f)}this.h[0]=x(this.h[0],s),this.h[1]=x(this.h[1],o),this.h[2]=x(this.h[2],a),this.h[3]=x(this.h[3],h),this.h[4]=x(this.h[4],u),this.h[5]=x(this.h[5],c),this.h[6]=x(this.h[6],l),this.h[7]=x(this.h[7],p)},C.prototype._digest=function(e){return"hex"===e?u.toHex32(this.h,"big"):u.split32(this.h,"big")};for(var $={},R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",O=0;O<R.length;O++)$[R.charCodeAt(O)]=O;function M(e){for(var t=0,n=0,r=0,i=0,s=0,o=[],a=[],h=[],u=0,c=0,l=0,p=0,d=e.length;u<d;u++){var f=e.charCodeAt(u);if(44===f)h.length&&a.push(new Int32Array(h)),h=[],c=0;else if(59===f)h.length&&a.push(new Int32Array(h)),h=[],c=0,o.push(a),a=[],t=0;else{var m=$[f];if(void 0===m)throw new Error("Invalid character ("+String.fromCharCode(f)+")");var g=32&m;if(p+=(m&=31)<<l,g)l+=5;else{var y=1&p;p>>=1;var x=y?-p:p;0==c?(t+=x,h.push(t)):1===c?(n+=x,h.push(n)):2===c?(r+=x,h.push(r)):3===c?(i+=x,h.push(i)):4===c&&(s+=x,h.push(s)),c++,p=l=0}}}return h.length&&a.push(new Int32Array(h)),o.push(a),o}function T(e){var t="";e=e<0?-e<<1|1:e<<1;do{var n=31&e;(e>>=5)>0&&(n|=32),t+=R[n]}while(e>0);return t}var D=function(e,t,n){this.start=e,this.end=t,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,Object.defineProperties(this,{previous:{writable:!0,value:null},next:{writable:!0,value:null}})};D.prototype.appendLeft=function(e){this.outro+=e},D.prototype.appendRight=function(e){this.intro=this.intro+e},D.prototype.clone=function(){var e=new D(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e},D.prototype.contains=function(e){return this.start<e&&e<this.end},D.prototype.eachNext=function(e){for(var t=this;t;)e(t),t=t.next},D.prototype.eachPrevious=function(e){for(var t=this;t;)e(t),t=t.previous},D.prototype.edit=function(e,t,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this},D.prototype.prependLeft=function(e){this.outro=e+this.outro},D.prototype.prependRight=function(e){this.intro=e+this.intro},D.prototype.split=function(e){var t=e-this.start,n=this.original.slice(0,t),r=this.original.slice(t);this.original=n;var i=new D(e,this.end,r);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i},D.prototype.toString=function(){return this.intro+this.content+this.outro},D.prototype.trimEnd=function(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;var t=this.content.replace(e,"");return t.length?(t!==this.content&&this.split(this.start+t.length).edit("",void 0,!0),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)},D.prototype.trimStart=function(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;var t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.end-t.length),this.edit("",void 0,!0)),!0):(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0)};var L=function(){throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};"undefined"!=typeof window&&"function"==typeof window.btoa?L=function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"function"==typeof Buffer&&(L=function(e){return Buffer.from(e,"utf-8").toString("base64")});var V=function(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=function(e){for(var t=0,n=0,r=0,i=0,s="",o=0;o<e.length;o++){var a=e[o];if(o>0&&(s+=";"),0!==a.length){for(var h=0,u=[],c=0,l=a;c<l.length;c++){var p=l[c],d=T(p[0]-h);h=p[0],p.length>1&&(d+=T(p[1]-t)+T(p[2]-n)+T(p[3]-r),t=p[1],n=p[2],r=p[3]),5===p.length&&(d+=T(p[4]-i),i=p[4]),u.push(d)}s+=u.join(",")}}return s}(e.mappings)};function B(e){var t=e.split("\n"),n=t.filter(function(e){return/^\t+/.test(e)}),r=t.filter(function(e){return/^ {2,}/.test(e)});if(0===n.length&&0===r.length)return null;if(n.length>=r.length)return"\t";var i=r.reduce(function(e,t){var n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(" ")}function z(e,t){var n=e.split(/[\/\\]/),r=t.split(/[\/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length)for(var i=n.length;i--;)n[i]="..";return n.concat(r).join("/")}V.prototype.toString=function(){return JSON.stringify(this)},V.prototype.toUrl=function(){return"data:application/json;charset=utf-8;base64,"+L(this.toString())};var j=Object.prototype.toString;function W(e){return"[object Object]"===j.call(e)}function U(e){for(var t=e.split("\n"),n=[],r=0,i=0;r<t.length;r++)n.push(i),i+=t[r].length+1;return function(e){for(var t=0,r=n.length;t<r;){var i=t+r>>1;e<n[i]?r=i:t=i+1}var s=t-1;return{line:s,column:e-n[s]}}}var F=function(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null};F.prototype.addEdit=function(e,t,n,r){if(t.length){var i=[this.generatedCodeColumn,e,n.line,n.column];r>=0&&i.push(r),this.rawSegments.push(i)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null},F.prototype.addUneditedChunk=function(e,t,n,r,i){for(var s=t.start,o=!0;s<t.end;)(this.hires||o||i[s])&&this.rawSegments.push([this.generatedCodeColumn,e,r.line,r.column]),"\n"===n[s]?(r.line+=1,r.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0):(r.column+=1,this.generatedCodeColumn+=1),s+=1,o=!1;this.pending=[this.generatedCodeColumn,e,r.line,r.column]},F.prototype.advance=function(e){if(e){var t=e.split("\n");if(t.length>1){for(var n=0;n<t.length-1;n++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}};var q="\n",G={insertLeft:!1,insertRight:!1,storeName:!1},H=function(e,t){void 0===t&&(t={});var n=new D(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:{}},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:B(e)}}),this.byStart[0]=n,this.byEnd[e.length]=n};H.prototype.addSourcemapLocation=function(e){this.sourcemapLocations[e]=!0},H.prototype.append=function(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this},H.prototype.appendLeft=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this},H.prototype.appendRight=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this},H.prototype.clone=function(){for(var e=new H(this.original,{filename:this.filename}),t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;var r=t.next,i=r&&r.clone();i&&(n.next=i,i.previous=n,n=i),t=r}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),Object.keys(this.sourcemapLocations).forEach(function(t){e.sourcemapLocations[t]=!0}),e},H.prototype.generateDecodedMap=function(e){var t=this;e=e||{};var n=Object.keys(this.storedNames),r=new F(e.hires),i=U(this.original);return this.intro&&r.advance(this.intro),this.firstChunk.eachNext(function(e){var s=i(e.start);e.intro.length&&r.advance(e.intro),e.edited?r.addEdit(0,e.content,s,e.storeName?n.indexOf(e.original):-1):r.addUneditedChunk(0,e,t.original,s,t.sourcemapLocations),e.outro.length&&r.advance(e.outro)}),{file:e.file?e.file.split(/[\/\\]/).pop():null,sources:[e.source?z(e.file||"",e.source):null],sourcesContent:e.includeContent?[this.original]:[null],names:n,mappings:r.raw}},H.prototype.generateMap=function(e){return new V(this.generateDecodedMap(e))},H.prototype.getIndentString=function(){return null===this.indentStr?"\t":this.indentStr},H.prototype.indent=function(e,t){var n=/^[^\r\n]/gm;if(W(e)&&(t=e,e=void 0),""===(e=void 0!==e?e:this.indentStr||"\t"))return this;var r={};(t=t||{}).exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(function(e){for(var t=e[0];t<e[1];t+=1)r[t]=!0});var i=!1!==t.indentStart,s=function(t){return i?""+e+t:(i=!0,t)};this.intro=this.intro.replace(n,s);for(var o=0,a=this.firstChunk;a;){var h=a.end;if(a.edited)r[o]||(a.content=a.content.replace(n,s),a.content.length&&(i="\n"===a.content[a.content.length-1]));else for(o=a.start;o<h;){if(!r[o]){var u=this.original[o];"\n"===u?i=!0:"\r"!==u&&i&&(i=!1,o===a.start?a.prependRight(e):(this._splitChunk(a,o),(a=a.next).prependRight(e)))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(n,s),this},H.prototype.insert=function(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")},H.prototype.insertLeft=function(e,t){return G.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),G.insertLeft=!0),this.appendLeft(e,t)},H.prototype.insertRight=function(e,t){return G.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),G.insertRight=!0),this.prependRight(e,t)},H.prototype.move=function(e,t,n){if(n>=e&&n<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);var r=this.byStart[e],i=this.byEnd[t],s=r.previous,o=i.next,a=this.byStart[n];if(!a&&i===this.lastChunk)return this;var h=a?a.previous:this.lastChunk;return s&&(s.next=o),o&&(o.previous=s),h&&(h.next=r),a&&(a.previous=i),r.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=r.previous,this.lastChunk.next=null),r.previous=h,i.next=a||null,h||(this.firstChunk=r),a||(this.lastChunk=i),this},H.prototype.overwrite=function(e,t,n,r){if("string"!=typeof n)throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===r&&(G.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),G.storeName=!0),r={storeName:!0});var i=void 0!==r&&r.storeName,s=void 0!==r&&r.contentOnly;if(i){var o=this.original.slice(e,t);this.storedNames[o]=!0}var a=this.byStart[e],h=this.byEnd[t];if(a){if(t>a.end&&a.next!==this.byStart[a.end])throw new Error("Cannot overwrite across a split point");if(a.edit(n,i,s),a!==h){for(var u=a.next;u!==h;)u.edit("",!1),u=u.next;u.edit("",!1)}}else{var c=new D(e,t,"").edit(n,i);h.next=c,c.previous=h}return this},H.prototype.prepend=function(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this},H.prototype.prependLeft=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this},H.prototype.prependRight=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this},H.prototype.remove=function(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);for(var n=this.byStart[e];n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this},H.prototype.lastChar=function(){if(this.outro.length)return this.outro[this.outro.length-1];var e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""},H.prototype.lastLine=function(){var e=this.outro.lastIndexOf(q);if(-1!==e)return this.outro.substr(e+1);var t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(-1!==(e=n.outro.lastIndexOf(q)))return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(-1!==(e=n.content.lastIndexOf(q)))return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(-1!==(e=n.intro.lastIndexOf(q)))return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return-1!==(e=this.intro.lastIndexOf(q))?this.intro.substr(e+1)+t:this.intro+t},H.prototype.slice=function(e,t){for(void 0===e&&(e=0),void 0===t&&(t=this.original.length);e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;for(var n="",r=this.firstChunk;r&&(r.start>e||r.end<=e);){if(r.start<t&&r.end>=t)return n;r=r.next}if(r&&r.edited&&r.start!==e)throw new Error("Cannot use replaced character "+e+" as slice start anchor.");for(var i=r;r;){!r.intro||i===r&&r.start!==e||(n+=r.intro);var s=r.start<t&&r.end>=t;if(s&&r.edited&&r.end!==t)throw new Error("Cannot use replaced character "+t+" as slice end anchor.");var o=i===r?e-r.start:0,a=s?r.content.length+t-r.end:r.content.length;if(n+=r.content.slice(o,a),!r.outro||s&&r.end!==t||(n+=r.outro),s)break;r=r.next}return n},H.prototype.snip=function(e,t){var n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n},H.prototype._split=function(e){if(!this.byStart[e]&&!this.byEnd[e])for(var t=this.lastSearchedChunk,n=e>t.end;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}},H.prototype._splitChunk=function(e,t){if(e.edited&&e.content.length){var n=U(this.original)(t);throw new Error("Cannot split a chunk that has already been edited ("+n.line+":"+n.column+' – "'+e.original+'")')}var r=e.split(t);return this.byEnd[t]=e,this.byStart[t]=r,this.byEnd[r.end]=r,e===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=e,!0},H.prototype.toString=function(){for(var e=this.intro,t=this.firstChunk;t;)e+=t.toString(),t=t.next;return e+this.outro},H.prototype.isEmpty=function(){var e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0},H.prototype.length=function(){var e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t},H.prototype.trimLines=function(){return this.trim("[\\r\\n]")},H.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},H.prototype.trimEndAborted=function(e){var t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;var n=this.lastChunk;do{var r=n.end,i=n.trimEnd(t);if(n.end!==r&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),i)return!0;n=n.previous}while(n);return!1},H.prototype.trimEnd=function(e){return this.trimEndAborted(e),this},H.prototype.trimStartAborted=function(e){var t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;var n=this.firstChunk;do{var r=n.end,i=n.trimStart(t);if(n.end!==r&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),i)return!0;n=n.next}while(n);return!1},H.prototype.trimStart=function(e){return this.trimStartAborted(e),this};var K=Object.prototype.hasOwnProperty,Y=function(e){void 0===e&&(e={}),this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}};Y.prototype.addSource=function(e){if(e instanceof H)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!W(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","indentExclusionRanges","separator"].forEach(function(t){K.call(e,t)||(e[t]=e.content[t])}),void 0===e.separator&&(e.separator=this.separator),e.filename)if(K.call(this.uniqueSourceIndexByFilename,e.filename)){var t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error("Illegal source: same filename ("+e.filename+"), different contents")}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this},Y.prototype.append=function(e,t){return this.addSource({content:new H(e),separator:t&&t.separator||""}),this},Y.prototype.clone=function(){var e=new Y({intro:this.intro,separator:this.separator});return this.sources.forEach(function(t){e.addSource({filename:t.filename,content:t.content.clone(),separator:t.separator})}),e},Y.prototype.generateDecodedMap=function(e){var t=this;void 0===e&&(e={});var n=[];this.sources.forEach(function(e){Object.keys(e.content.storedNames).forEach(function(e){~n.indexOf(e)||n.push(e)})});var r=new F(e.hires);return this.intro&&r.advance(this.intro),this.sources.forEach(function(e,i){i>0&&r.advance(t.separator);var s=e.filename?t.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=U(o.original);o.intro&&r.advance(o.intro),o.firstChunk.eachNext(function(t){var i=a(t.start);t.intro.length&&r.advance(t.intro),e.filename?t.edited?r.addEdit(s,t.content,i,t.storeName?n.indexOf(t.original):-1):r.addUneditedChunk(s,t,o.original,i,o.sourcemapLocations):r.advance(t.content),t.outro.length&&r.advance(t.outro)}),o.outro&&r.advance(o.outro)}),{file:e.file?e.file.split(/[\/\\]/).pop():null,sources:this.uniqueSources.map(function(t){return e.file?z(e.file,t.filename):t.filename}),sourcesContent:this.uniqueSources.map(function(t){return e.includeContent?t.content:null}),names:n,mappings:r.raw}},Y.prototype.generateMap=function(e){return new V(this.generateDecodedMap(e))},Y.prototype.getIndentString=function(){var e={};return this.sources.forEach(function(t){var n=t.content.indentStr;null!==n&&(e[n]||(e[n]=0),e[n]+=1)}),Object.keys(e).sort(function(t,n){return e[t]-e[n]})[0]||"\t"},Y.prototype.indent=function(e){var t=this;if(arguments.length||(e=this.getIndentString()),""===e)return this;var n=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach(function(r,i){var s=void 0!==r.separator?r.separator:t.separator,o=n||i>0&&/\r?\n$/.test(s);r.content.indent(e,{exclude:r.indentExclusionRanges,indentStart:o}),n="\n"===r.content.lastChar()}),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,function(t,n){return n>0?e+t:t})),this},Y.prototype.prepend=function(e){return this.intro=e+this.intro,this},Y.prototype.toString=function(){var e=this,t=this.sources.map(function(t,n){var r=void 0!==t.separator?t.separator:e.separator;return(n>0?r:"")+t.content.toString()}).join("");return this.intro+t},Y.prototype.isEmpty=function(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some(function(e){return!e.content.isEmpty()})},Y.prototype.length=function(){return this.sources.reduce(function(e,t){return e+t.content.length()},this.intro.length)},Y.prototype.trimLines=function(){return this.trim("[\\r\\n]")},Y.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},Y.prototype.trimStart=function(e){var t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){var n,r=0;do{if(!(n=this.sources[r++]))break}while(!n.content.trimStartAborted(e))}return this},Y.prototype.trimEnd=function(e){var t,n=new RegExp((e||"\\s")+"+$"),r=this.sources.length-1;do{if(!(t=this.sources[r--])){this.intro=this.intro.replace(n,"");break}}while(!t.content.trimEndAborted(e));return this};const X=Object.create(null),Q="BlockStatement",J="CallExpression",Z="ExportAllDeclaration",ee="ExpressionStatement",te="FunctionExpression",ne="Identifier",re="ImportDefaultSpecifier",ie="ImportNamespaceSpecifier",se="Program",oe="Property",ae="ReturnStatement",he="VariableDeclaration";function ue(e,t,n,r){if(t.remove(n,r),e.annotations)for(const r of e.annotations){if(!(r.start<n))return;t.remove(r.start,r.end)}}function ce(e,t){if(e.annotations||e.parent.type!==ee||(e=e.parent),e.annotations)for(const n of e.annotations)t.remove(n.start,n.end)}const le={isNoStatement:!0};function pe(e,t,n=0){let r,i;for(r=e.indexOf(t,n);;){if(-1===(n=e.indexOf("/",n))||n>r)return r;if(i=e.charCodeAt(++n),++n,47===i){if(0===(n=e.indexOf("\n",n)+1))return-1;n>r&&(r=e.indexOf(t,n))}else 42===i&&(n=e.indexOf("*/",n)+2)>r&&(r=e.indexOf(t,n))}}function de(e,t=0){let n,r;for(n=e.indexOf("\n",t);;){if(-1===(t=e.indexOf("/",t))||t>n)return n;if(47===(r=e.charCodeAt(++t)))return n;++t,42===r&&(t=e.indexOf("*/",t)+2)>n&&(n=e.indexOf("\n",t))}}function fe(e,t,n,r,i){if(0===e.length)return;let s,o,a,h,u=e[0],c=!u.included||u.needsBoundaries;c&&(h=n+de(t.original.slice(n,u.start))+1);for(let n=1;n<=e.length;n++)s=u,o=h,a=c,c=void 0!==(u=e[n])&&(!u.included||u.needsBoundaries),a||c?(h=s.end+de(t.original.slice(s.end,void 0===u?r:u.start))+1,s.included?a?s.render(t,i,{end:h,start:o}):s.render(t,i):ue(s,t,o,h)):s.render(t,i)}function me(e,t,n,r){const i=[];let s,o,a,h,u,c=n-1;for(let r=0;r<e.length;r++){for(o=e[r],void 0!==s&&(c=s.end+pe(t.original.slice(s.end,o.start),",")),a=h=c+2+de(t.original.slice(c+1,o.start));32===(u=t.original.charCodeAt(a))||9===u||10===u||13===u;)a++;void 0!==s&&i.push({contentEnd:h,end:a,node:s,separator:c,start:n}),s=o,n=a}return i.push({contentEnd:r,end:r,node:s,separator:null,start:n}),i}const ge="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",ye=64;function xe(e){let t="";do{const n=e%ye;e=Math.floor(e/ye),t=ge[n]+t}while(0!==e);return t}function ve(e,t){let n=e,r=1;for(;t[n];)n=`${e}$${xe(r++)}`;return t[n]=!0,n}class Ee{static create(e){return new this(e)}constructor({withNew:e=!1,args:t=[],callIdentifier:n}={}){this.withNew=e,this.args=t,this.callIdentifier=n}equals(e){return e&&this.callIdentifier===e.callIdentifier}}const _e={UNKNOWN_KEY:!0},be=[],Ae=[_e];function Se(e,t=null){return Object.create(t,e)}const Ie={UNKNOWN_VALUE:!0},we={deoptimizePath:()=>{},getLiteralValueAtPath:()=>Ie,getReturnExpressionWhenCalledAtPath:()=>we,hasEffectsWhenAccessedAtPath:e=>e.length>0,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:()=>!0,include:()=>{},included:!0,toString:()=>"[[UNKNOWN]]"},Pe={deoptimizePath:()=>{},getLiteralValueAtPath:()=>void 0,getReturnExpressionWhenCalledAtPath:()=>we,hasEffectsWhenAccessedAtPath:e=>e.length>0,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:()=>!0,include:()=>{},included:!0,toString:()=>"undefined"},ke={value:{returns:null,returnsPrimitive:we,callsArgs:null,mutatesSelf:!0}},Ce={value:{returns:null,returnsPrimitive:we,callsArgs:[0],mutatesSelf:!1}};class Ne{constructor(){this.included=!1}deoptimizePath(){}getLiteralValueAtPath(){return Ie}getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Qe(Ge,e[0]):we}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Xe(Ge,e[0],this.included,t,n)}include(){this.included=!0}toString(){return"[[UNKNOWN ARRAY]]"}}const $e={value:{callsArgs:null,mutatesSelf:!1,returns:Ne,returnsPrimitive:null}},Re={value:{callsArgs:null,mutatesSelf:!0,returns:Ne,returnsPrimitive:null}},Oe={value:{callsArgs:[0],mutatesSelf:!1,returns:Ne,returnsPrimitive:null}},Me={value:{callsArgs:[0],mutatesSelf:!0,returns:Ne,returnsPrimitive:null}},Te={deoptimizePath:()=>{},getLiteralValueAtPath:()=>Ie,getReturnExpressionWhenCalledAtPath:e=>1===e.length?Qe(He,e[0]):we,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:e=>{if(1===e.length){const t=e[0];return"string"!=typeof t||!He[t]}return!0},include:()=>{},included:!0,toString:()=>"[[UNKNOWN BOOLEAN]]"},De={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:Te}},Le={value:{callsArgs:[0],mutatesSelf:!1,returns:null,returnsPrimitive:Te}},Ve={deoptimizePath:()=>{},getLiteralValueAtPath:()=>Ie,getReturnExpressionWhenCalledAtPath:e=>1===e.length?Qe(Ke,e[0]):we,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:e=>{if(1===e.length){const t=e[0];return"string"!=typeof t||!Ke[t]}return!0},include:()=>{},included:!0,toString:()=>"[[UNKNOWN NUMBER]]"},Be={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:Ve}},ze={value:{callsArgs:null,mutatesSelf:!0,returns:null,returnsPrimitive:Ve}},je={value:{callsArgs:[0],mutatesSelf:!1,returns:null,returnsPrimitive:Ve}},We={deoptimizePath:()=>{},getLiteralValueAtPath:()=>Ie,getReturnExpressionWhenCalledAtPath:e=>1===e.length?Qe(Ye,e[0]):we,hasEffectsWhenAccessedAtPath:e=>e.length>1,hasEffectsWhenAssignedAtPath:e=>e.length>0,hasEffectsWhenCalledAtPath:(e,t,n)=>1!==e.length||Xe(Ye,e[0],!0,t,n),include:()=>{},included:!0,toString:()=>"[[UNKNOWN STRING]]"},Ue={value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:We}};class Fe{constructor(){this.included=!1}deoptimizePath(){}getLiteralValueAtPath(){return Ie}getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Qe(qe,e[0]):we}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Xe(qe,e[0],this.included,t,n)}include(){this.included=!0}toString(){return"[[UNKNOWN OBJECT]]"}}const qe=Se({hasOwnProperty:De,isPrototypeOf:De,propertyIsEnumerable:De,toLocaleString:Ue,toString:Ue,valueOf:{value:{callsArgs:null,mutatesSelf:!1,returns:null,returnsPrimitive:we}}}),Ge=Se({concat:$e,copyWithin:Re,every:Le,fill:Re,filter:Oe,find:Ce,findIndex:je,forEach:Ce,includes:De,indexOf:Be,join:Ue,lastIndexOf:Be,map:Oe,pop:ke,push:ze,reduce:Ce,reduceRight:Ce,reverse:Re,shift:ke,slice:$e,some:Le,sort:Me,splice:Re,unshift:ze},qe),He=Se({valueOf:De},qe),Ke=Se({toExponential:Ue,toFixed:Ue,toLocaleString:Ue,toPrecision:Ue,valueOf:Be},qe),Ye=Se({charAt:Ue,charCodeAt:Be,codePointAt:Be,concat:Ue,endsWith:De,includes:De,indexOf:Be,lastIndexOf:Be,localeCompare:Be,match:De,normalize:Ue,padEnd:Ue,padStart:Ue,repeat:Ue,replace:{value:{callsArgs:[1],mutatesSelf:!1,returns:null,returnsPrimitive:We}},search:Be,slice:Ue,split:$e,startsWith:De,substr:Ue,substring:Ue,toLocaleLowerCase:Ue,toLocaleUpperCase:Ue,toLowerCase:Ue,toUpperCase:Ue,trim:Ue,valueOf:Ue},qe);function Xe(e,t,n,r,i){if("string"!=typeof t||!e[t])return!0;if(e[t].mutatesSelf&&n)return!0;if(!e[t].callsArgs)return!1;for(const n of e[t].callsArgs)if(r.args[n]&&r.args[n].hasEffectsWhenCalledAtPath(be,Ee.create({args:[],callIdentifier:{},withNew:!1}),i.getHasEffectsWhenCalledOptions()))return!0;return!1}function Qe(e,t){return"string"==typeof t&&e[t]?null!==e[t].returnsPrimitive?e[t].returnsPrimitive:new e[t].returns:we}class Je{constructor(e){this.exportName=null,this.included=!1,this.isId=!1,this.isReassigned=!1,this.reexported=!1,this.renderBaseName=null,this.renderName=null,this.safeExportName=null,this.name=e}addReference(e){}deoptimizePath(e){}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getLiteralValueAtPath(e,t,n){return Ie}getName(){const e=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}.${e}`:e}getReturnExpressionWhenCalledAtPath(e,t,n){return we}hasEffectsWhenAccessedAtPath(e,t){return e.length>0}hasEffectsWhenAssignedAtPath(e,t){return!0}hasEffectsWhenCalledAtPath(e,t,n){return!0}include(){this.included=!0}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}setSafeName(e){this.renderName=e}toString(){return this.name}}class Ze extends Je{constructor(e,t){super(t),this.module=e,this.isNamespace="*"===t,this.referenced=!1}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}include(){this.included||(this.included=!0,this.module.used=!0)}}Ze.prototype.isExternal=!0;const et="break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public".split(" "),tt="Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" "),nt=Object.create(null);et.concat(tt).forEach(e=>nt[e]=!0);const rt=/[^$_a-zA-Z0-9]/g,it=e=>/\d/.test(e[0]);function st(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(rt,"_"),(it(e)||nt[e])&&(e=`_${e}`),e}const ot=/^(?:\/|(?:[A-Za-z]:)?[\\|\/])/,at=/^\.?\.\//;function ht(e){return ot.test(e)}function ut(e){return at.test(e)}function ct(e){return e.replace(/\\/g,"/")}function lt(e){return e.split(/(\/|\\)/).pop()}function pt(e){const t=/(\/|\\)[^\/\\]*$/.exec(e);if(!t)return".";const n=e.slice(0,-t[0].length);return n||"/"}function dt(e){const t=/\.[^.]+$/.exec(lt(e));return t?t[0]:""}function ft(e,t){const n=e.split(/[\/\\]/).filter(Boolean),r=t.split(/[\/\\]/).filter(Boolean);for(;n[0]&&r[0]&&n[0]===r[0];)n.shift(),r.shift();for(;"."===r[0]||".."===r[0];){".."===r.shift()&&n.pop()}for(;n.pop();)r.unshift("..");return r.join("/")}function mt(...e){let t=e.shift().split(/[\/\\]/);return e.forEach(e=>{if(ht(e))t=e.split(/[\/\\]/);else{const n=e.split(/[\/\\]/);for(;"."===n[0]||".."===n[0];){".."===n.shift()&&t.pop()}t.push.apply(t,n)}}),t.join("/")}class gt{constructor(e,t,n){this.exportsNames=!1,this.exportsNamespace=!1,this.isExternal=!0,this.mostCommonSuggestion=0,this.reexported=!1,this.renderPath=void 0,this.renormalizeRenderPath=!1,this.used=!1,this.graph=e,this.id=t,this.execIndex=1/0,this.moduleSideEffects=n;const r=t.split(/[\\\/]/);this.variableName=st(r.pop()),this.nameSuggestions=Object.create(null),this.declarations=Object.create(null),this.exportedVariables=new Map}getVariableForExportName(e,t){"default"!==e&&"*"!==e&&(this.exportsNames=!0),"*"===e&&(this.exportsNamespace=!0);let n=this.declarations[e];return n||(this.declarations[e]=n=new Ze(this,e),this.exportedVariables.set(n,e),n)}setRenderPath(e,t){return this.renderPath="",e.paths&&(this.renderPath="function"==typeof e.paths?e.paths(this.id):e.paths[this.id]),this.renderPath||(ht(this.id)?(this.renderPath=ct(ft(t,this.id)),this.renormalizeRenderPath=!0):this.renderPath=this.id),this.renderPath}suggestName(e){this.nameSuggestions[e]||(this.nameSuggestions[e]=0),this.nameSuggestions[e]+=1,this.nameSuggestions[e]>this.mostCommonSuggestion&&(this.mostCommonSuggestion=this.nameSuggestions[e],this.variableName=e)}warnUnusedImports(){const e=Object.keys(this.declarations).filter(e=>{if("*"===e)return!1;const t=this.declarations[e];return!t.included&&!this.reexported&&!t.referenced});if(0===e.length)return;const t=1===e.length?`'${e[0]}' is`:`${e.slice(0,-1).map(e=>`'${e}'`).join(", ")} and '${e.slice(-1)}' are`;this.graph.warn({code:"UNUSED_EXTERNAL_IMPORT",message:`${t} imported from external module '${this.id}' but never used`,names:e,source:this.id})}}function yt(e){e.isExecuted=!0;const t=[e],n={};for(const e of t)for(const r of e.dependencies)r instanceof gt||r.isExecuted||!r.moduleSideEffects||n[r.id]||(r.isExecuted=!0,n[r.id]=!0,t.push(r))}const xt=7;class vt extends Je{constructor(e,t,n,r){super(e),this.additionalInitializers=null,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.init=n,this.deoptimizationTracker=r.deoptimizationTracker,this.module=r.module}addDeclaration(e,t){this.declarations.push(e),null===this.additionalInitializers&&(this.additionalInitializers=null===this.init?[]:[this.init],this.init=we,this.isReassigned=!0),null!==t&&this.additionalInitializers.push(t)}consolidateInitializers(){if(null!==this.additionalInitializers){for(const e of this.additionalInitializers)e.deoptimizePath(Ae);this.additionalInitializers=null}}deoptimizePath(e){if(!(e.length>xt||this.isReassigned||this.deoptimizationTracker.track(this,e)))if(0===e.length){if(!this.isReassigned){this.isReassigned=!0;for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache();this.init&&this.init.deoptimizePath(Ae)}}else this.init&&this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.isReassigned||!this.init||e.length>xt||t.isTracked(this.init,e)?Ie:(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath(e,t.track(this.init,e),n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isReassigned||!this.init||e.length>xt||t.isTracked(this.init,e)?we:(this.expressionsToBeDeoptimized.push(n),this.init.getReturnExpressionWhenCalledAtPath(e,t.track(this.init,e),n))}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(this.isReassigned||e.length>xt||this.init&&!t.hasNodeBeenAccessedAtPath(e,this.init)&&this.init.hasEffectsWhenAccessedAtPath(e,t.addAccessedNodeAtPath(e,this.init)))}hasEffectsWhenAssignedAtPath(e,t){return!!(this.included||e.length>xt)||0!==e.length&&(this.isReassigned||this.init&&!t.hasNodeBeenAssignedAtPath(e,this.init)&&this.init.hasEffectsWhenAssignedAtPath(e,t.addAssignedNodeAtPath(e,this.init)))}hasEffectsWhenCalledAtPath(e,t,n){return e.length>xt||(this.isReassigned||this.init&&!n.hasNodeBeenCalledAtPathWithOptions(e,this.init,t)&&this.init.hasEffectsWhenCalledAtPath(e,t,n.addCalledNodeAtPathWithOptions(e,this.init,t)))}include(){if(!this.included){this.included=!0,this.module.isExecuted||yt(this.module);for(const e of this.declarations){e.included||e.include(!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==se);)t=t.parent}}}}vt.prototype.isLocal=!0;class Et{constructor(){this.children=[],this.variables=Object.create(null)}addDeclaration(e,t,n=null,r){const i=e.name;return this.variables[i]?this.variables[i].addDeclaration(e,n):this.variables[i]=new vt(e.name,e,n||Pe,t),this.variables[i]}contains(e){return e in this.variables}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class _t extends Et{constructor(e){super(),this.accessedOutsideVariables=Object.create(null),this.parent=e,e.children.push(this)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables[e]=t,this.parent instanceof _t&&this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof _t&&this.parent.addReturnExpression(e)}contains(e){return e in this.variables||this.parent.contains(e)}deconflict(e){const t=Object.assign(Object.create(null),e);for(const e of Object.keys(this.accessedOutsideVariables)){const n=this.accessedOutsideVariables[e];n.included&&(t[n.getBaseVariableName()]=!0)}for(const e of Object.keys(this.variables)){const n=this.variables[e];n.included&&n.setSafeName(ve(e,t))}for(const t of this.children)t.deconflict(e)}findLexicalBoundary(){return this.parent instanceof _t?this.parent.findLexicalBoundary():this}findVariable(e){const t=this.variables[e]||this.accessedOutsideVariables[e];return t||(this.accessedOutsideVariables[e]=this.parent.findVariable(e))}}function bt(e,t,n){if("number"==typeof n)throw new Error("locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument");return function(e,t){void 0===t&&(t={});var n=t.offsetLine||0,r=t.offsetColumn||0,i=e.split("\n"),s=0,o=i.map(function(e,t){var n=s+e.length+1,r={start:s,end:n,line:t};return s=n,r}),a=0;function h(e,t){return e.start<=t&&t<e.end}function u(e,t){return{line:n+e.line,column:r+t-e.start,character:t}}return function(t,n){"string"==typeof t&&(t=e.indexOf(t,n||0));for(var r=o[a],i=t>=r.end?1:-1;r;){if(h(r,t))return u(r,t);r=o[a+=i]}}}(e,n)(t,n&&n.startIndex)}var At=5,St=1<<At,It=St-1,wt={};function Pt(e){e&&(e.value=!0)}function kt(){}function Ct(e){return void 0===e.size&&(e.size=e.__iterate($t)),e.size}function Nt(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?Ct(e)+t:t}function $t(){return!0}function Rt(e,t,n){return(0===e&&!Dt(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function Ot(e,t){return Tt(e,t,0)}function Mt(e,t){return Tt(e,t,t)}function Tt(e,t,n){return void 0===e?n:Dt(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function Dt(e){return e<0||0===e&&1/e==-1/0}var Lt="@@__IMMUTABLE_ITERABLE__@@";function Vt(e){return Boolean(e&&e[Lt])}var Bt="@@__IMMUTABLE_KEYED__@@";function zt(e){return Boolean(e&&e[Bt])}var jt="@@__IMMUTABLE_INDEXED__@@";function Wt(e){return Boolean(e&&e[jt])}function Ut(e){return zt(e)||Wt(e)}var Ft=function(e){return Vt(e)?e:yn(e)},qt=function(e){function t(e){return zt(e)?e:xn(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Ft),Gt=function(e){function t(e){return Wt(e)?e:vn(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Ft),Ht=function(e){function t(e){return Vt(e)&&!Ut(e)?e:En(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Ft);Ft.Keyed=qt,Ft.Indexed=Gt,Ft.Set=Ht;var Kt="@@__IMMUTABLE_SEQ__@@";function Yt(e){return Boolean(e&&e[Kt])}var Xt="@@__IMMUTABLE_RECORD__@@";function Qt(e){return Boolean(e&&e[Xt])}function Jt(e){return Vt(e)||Qt(e)}var Zt="@@__IMMUTABLE_ORDERED__@@";function en(e){return Boolean(e&&e[Zt])}var tn=0,nn=1,rn=2,sn="function"==typeof Symbol&&Symbol.iterator,on="@@iterator",an=sn||on,hn=function(e){this.next=e};function un(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function cn(){return{value:void 0,done:!0}}function ln(e){return!!fn(e)}function pn(e){return e&&"function"==typeof e.next}function dn(e){var t=fn(e);return t&&t.call(e)}function fn(e){var t=e&&(sn&&e[sn]||e[on]);if("function"==typeof t)return t}hn.prototype.toString=function(){return"[Iterator]"},hn.KEYS=tn,hn.VALUES=nn,hn.ENTRIES=rn,hn.prototype.inspect=hn.prototype.toSource=function(){return this.toString()},hn.prototype[an]=function(){return this};var mn=Object.prototype.hasOwnProperty;function gn(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var yn=function(e){function t(e){return null==e?In():Jt(e)?e.toSeq():function(e){var t=kn(e);if(t)return t;if("object"==typeof e)return new bn(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var s=n[t?r-++i:i++];if(!1===e(s[1],s[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new hn(function(){if(i===r)return{value:void 0,done:!0};var s=n[t?r-++i:i++];return un(e,s[0],s[1])})}return this.__iteratorUncached(e,t)},t}(Ft),xn=function(e){function t(e){return null==e?In().toKeyedSeq():Vt(e)?zt(e)?e.toSeq():e.fromEntrySeq():Qt(e)?e.toSeq():wn(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(yn),vn=function(e){function t(e){return null==e?In():Vt(e)?zt(e)?e.entrySeq():e.toIndexedSeq():Qt(e)?e.toSeq().entrySeq():Pn(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(yn),En=function(e){function t(e){return(Vt(e)&&!Ut(e)?e:vn(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(yn);yn.isSeq=Yt,yn.Keyed=xn,yn.Set=En,yn.Indexed=vn,yn.prototype[Kt]=!0;var _n=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[Nt(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var s=t?r-++i:i++;if(!1===e(n[s],s,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new hn(function(){if(i===r)return{value:void 0,done:!0};var s=t?r-++i:i++;return un(e,s,n[s])})},t}(vn),bn=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return mn.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,s=0;s!==i;){var o=r[t?i-++s:s++];if(!1===e(n[o],o,this))break}return s},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,s=0;return new hn(function(){if(s===i)return{value:void 0,done:!0};var o=r[t?i-++s:s++];return un(e,o,n[o])})},t}(xn);bn.prototype[Zt]=!0;var An,Sn=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=dn(this._collection),r=0;if(pn(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=dn(this._collection);if(!pn(n))return new hn(cn);var r=0;return new hn(function(){var t=n.next();return t.done?t:un(e,r++,t.value)})},t}(vn);function In(){return An||(An=new _n([]))}function wn(e){var t=Array.isArray(e)?new _n(e):ln(e)?new Sn(e):void 0;if(t)return t.fromEntrySeq();if("object"==typeof e)return new bn(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function Pn(e){var t=kn(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function kn(e){return gn(e)?new _n(e):ln(e)?new Sn(e):void 0}var Cn="@@__IMMUTABLE_MAP__@@";function Nn(e){return Boolean(e&&e[Cn])}function $n(e){return Nn(e)&&en(e)}function Rn(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function On(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(Rn(e)&&Rn(t)&&e.equals(t))}var Mn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Tn(e){return e>>>1&1073741824|3221225471&e}var Dn=Object.prototype.valueOf;function Ln(e){switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return Tn(t)}(e);case"string":return e.length>qn?function(e){var t=Kn[e];void 0===t&&(t=Vn(e),Hn===Gn&&(Hn=0,Kn={}),Hn++,Kn[e]=t);return t}(e):Vn(e);case"object":case"function":return null===e?1108378658:"function"==typeof e.hashCode?Tn(e.hashCode(e)):(e.valueOf!==Dn&&"function"==typeof e.valueOf&&(e=e.valueOf(e)),function(e){var t;if(Wn&&void 0!==(t=jn.get(e)))return t;if(void 0!==(t=e[Fn]))return t;if(!zn){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Fn]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}t=++Un,1073741824&Un&&(Un=0);if(Wn)jn.set(e,t);else{if(void 0!==Bn&&!1===Bn(e))throw new Error("Non-extensible objects are not allowed as keys.");if(zn)Object.defineProperty(e,Fn,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Fn]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Fn]=t}}return t}(e));case"undefined":return 1108378659;default:if("function"==typeof e.toString)return Vn(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function Vn(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Tn(t)}var Bn=Object.isExtensible,zn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();var jn,Wn="function"==typeof WeakMap;Wn&&(jn=new WeakMap);var Un=0,Fn="__immutablehash__";"function"==typeof Symbol&&(Fn=Symbol(Fn));var qn=16,Gn=255,Hn=0,Kn={},Yn=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=tr(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=er(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(xn);Yn.prototype[Zt]=!0;var Xn=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&Ct(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(nn,t),i=0;return t&&Ct(this),new hn(function(){var s=r.next();return s.done?s:un(e,t?n.size-++i:i++,s.value,s)})},t}(vn),Qn=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(nn,t);return new hn(function(){var t=n.next();return t.done?t:un(e,t.value,t.value,t)})},t}(En),Jn=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){lr(t);var r=Vt(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(nn,t);return new hn(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){lr(r);var i=Vt(r);return un(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(xn);function Zn(e){var t=dr(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=fr,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===rn){var r=e.__iterator(t,n);return new hn(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===nn?tn:nn,n)},t}function er(e,t,n){var r=dr(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var s=e.get(r,wt);return s===wt?i:t.call(n,s,r,e)},r.__iterateUncached=function(r,i){var s=this;return e.__iterate(function(e,i,o){return!1!==r(t.call(n,e,i,o),i,s)},i)},r.__iteratorUncached=function(r,i){var s=e.__iterator(rn,i);return new hn(function(){var i=s.next();if(i.done)return i;var o=i.value,a=o[0];return un(r,a,t.call(n,o[1],a,e),i)})},r}function tr(e,t){var n=this,r=dr(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=Zn(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=fr,r.__iterate=function(n,r){var i=this,s=0;return r&&Ct(e),e.__iterate(function(e,o){return n(e,t?o:r?i.size-++s:s++,i)},!r)},r.__iterator=function(r,i){var s=0;i&&Ct(e);var o=e.__iterator(rn,!i);return new hn(function(){var e=o.next();if(e.done)return e;var a=e.value;return un(r,t?a[0]:i?n.size-++s:s++,a[1],e)})},r}function nr(e,t,n,r){var i=dr(e);return r&&(i.has=function(r){var i=e.get(r,wt);return i!==wt&&!!t.call(n,i,r,e)},i.get=function(r,i){var s=e.get(r,wt);return s!==wt&&t.call(n,s,r,e)?s:i}),i.__iterateUncached=function(i,s){var o=this,a=0;return e.__iterate(function(e,s,h){if(t.call(n,e,s,h))return a++,i(e,r?s:a-1,o)},s),a},i.__iteratorUncached=function(i,s){var o=e.__iterator(rn,s),a=0;return new hn(function(){for(;;){var s=o.next();if(s.done)return s;var h=s.value,u=h[0],c=h[1];if(t.call(n,c,u,e))return un(i,r?u:a++,c,s)}})},i}function rr(e,t,n,r){var i=e.size;if(Rt(t,n,i))return e;var s=Ot(t,i),o=Mt(n,i);if(s!=s||o!=o)return rr(e.toSeq().cacheResult(),t,n,r);var a,h=o-s;h==h&&(a=h<0?0:h);var u=dr(e);return u.size=0===a?a:e.size&&a||void 0,!r&&Yt(e)&&a>=0&&(u.get=function(t,n){return(t=Nt(this,t))>=0&&t<a?e.get(t+s,n):n}),u.__iterateUncached=function(t,n){var i=this;if(0===a)return 0;if(n)return this.cacheResult().__iterate(t,n);var o=0,h=!0,u=0;return e.__iterate(function(e,n){if(!h||!(h=o++<s))return u++,!1!==t(e,r?n:u-1,i)&&u!==a}),u},u.__iteratorUncached=function(t,n){if(0!==a&&n)return this.cacheResult().__iterator(t,n);if(0===a)return new hn(cn);var i=e.__iterator(t,n),o=0,h=0;return new hn(function(){for(;o++<s;)i.next();if(++h>a)return{value:void 0,done:!0};var e=i.next();return r||t===nn||e.done?e:un(t,h-1,t===tn?void 0:e.value[1],e)})},u}function ir(e,t,n,r){var i=dr(e);return i.__iterateUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterate(i,s);var a=!0,h=0;return e.__iterate(function(e,s,u){if(!a||!(a=t.call(n,e,s,u)))return h++,i(e,r?s:h-1,o)}),h},i.__iteratorUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterator(i,s);var a=e.__iterator(rn,s),h=!0,u=0;return new hn(function(){var e,s,c;do{if((e=a.next()).done)return r||i===nn?e:un(i,u++,i===tn?void 0:e.value[1],e);var l=e.value;s=l[0],c=l[1],h&&(h=t.call(n,c,s,o))}while(h);return i===rn?e:un(i,s,c,e)})},i}function sr(e,t,n){var r=dr(e);return r.__iterateUncached=function(i,s){if(s)return this.cacheResult().__iterate(i,s);var o=0,a=!1;return function e(h,u){h.__iterate(function(s,h){return(!t||u<t)&&Vt(s)?e(s,u+1):(o++,!1===i(s,n?h:o-1,r)&&(a=!0)),!a},s)}(e,0),o},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var s=e.__iterator(r,i),o=[],a=0;return new hn(function(){for(;s;){var e=s.next();if(!1===e.done){var h=e.value;if(r===rn&&(h=h[1]),t&&!(o.length<t)||!Vt(h))return n?e:un(r,a++,h,e);o.push(s),s=h.__iterator(r,i)}else s=o.pop()}return{value:void 0,done:!0}})},r}function or(e,t,n){t||(t=mr);var r=zt(e),i=0,s=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return s.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){s[t].length=2}:function(e,t){s[t]=e[1]}),r?xn(s):Wt(e)?vn(s):En(s)}function ar(e,t,n){if(t||(t=mr),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return hr(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return hr(t,e,n)?n:e})}function hr(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function ur(e,t,n,r){var i=dr(e),s=new _n(n).map(function(e){return e.size});return i.size=r?s.max():s.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(nn,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var s=n.map(function(e){return e=Ft(e),dn(i?e.reverse():e)}),o=0,a=!1;return new hn(function(){var n;return a||(n=s.map(function(e){return e.next()}),a=r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),a?{value:void 0,done:!0}:un(e,o++,t.apply(null,n.map(function(e){return e.value})))})},i}function cr(e,t){return e===t?e:Yt(e)?t:e.constructor(t)}function lr(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function pr(e){return zt(e)?qt:Wt(e)?Gt:Ht}function dr(e){return Object.create((zt(e)?xn:Wt(e)?vn:En).prototype)}function fr(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):yn.prototype.cacheResult.call(this)}function mr(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function gr(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function yr(e,t){if(!e)throw new Error(t)}function xr(e){yr(e!==1/0,"Cannot perform this action with an infinite size.")}function vr(e){if(gn(e)&&"string"!=typeof e)return e;if(en(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function Er(e){return e&&("function"!=typeof e.constructor||"Object"===e.constructor.name)}function _r(e){return"object"==typeof e&&(Jt(e)||Array.isArray(e)||Er(e))}function br(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function Ar(e,t){return Jt(e)?e.has(t):_r(e)&&mn.call(e,t)}function Sr(e,t,n){return Jt(e)?e.get(t,n):Ar(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function Ir(e){if(Array.isArray(e))return gr(e);var t={};for(var n in e)mn.call(e,n)&&(t[n]=e[n]);return t}function wr(e,t){if(!_r(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Jt(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!mn.call(e,t))return e;var n=Ir(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function Pr(e,t,n){if(!_r(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Jt(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(mn.call(e,t)&&n===e[t])return e;var r=Ir(e);return r[t]=n,r}function kr(e,t,n,r){r||(r=n,n=void 0);var i=function e(t,n,r,i,s,o){var a=n===wt;if(i===r.length){var h=a?s:n,u=o(h);return u===h?n:u}if(!a&&!_r(n))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,i).map(br)+"]: "+n);var c=r[i];var l=a?wt:Sr(n,c,wt);var p=e(l===wt?t:Jt(l),l,r,i+1,s,o);return p===l?n:p===wt?wr(n,c):Pr(a?t?ai():{}:n,c,p)}(Jt(e),e,vr(t),0,n,r);return i===wt?n:i}function Cr(e,t,n){return kr(e,t,wt,function(){return n})}function Nr(e,t){return Cr(this,e,t)}function $r(e,t){return kr(e,t,function(){return wt})}function Rr(e){return $r(this,e)}function Or(e,t,n,r){return kr(e,[t],n,r)}function Mr(e,t,n){return 1===arguments.length?e(this):Or(this,e,t,n)}function Tr(e,t,n){return kr(this,e,t,n)}function Dr(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Vr(this,e)}function Lr(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return Vr(this,t,e)}function Vr(e,t,n){for(var r=[],i=0;i<t.length;i++){var s=qt(t[i]);0!==s.size&&r.push(s)}return 0===r.length?e:0!==e.toSeq().size||e.__ownerID||1!==r.length?e.withMutations(function(e){for(var t=n?function(t,r){Or(e,r,wt,function(e){return e===wt?t:n(e,t,r)})}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)}):e.constructor(r[0])}function Br(e,t,n){return zr(e,t,function(e){return function t(n,r,i){return _r(n)&&_r(r)?zr(n,[r],t):e?e(n,r,i):r}}(n))}function zr(e,t,n){if(!_r(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(Jt(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,s=r?Gt:qt,o=r?function(t){i===e&&(i=Ir(i)),i.push(t)}:function(t,r){var s=mn.call(i,r),o=s&&n?n(i[r],t,r):t;s&&o===i[r]||(i===e&&(i=Ir(i)),i[r]=o)},a=0;a<t.length;a++)s(t[a]).forEach(o);return i}function jr(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Br(this,e)}function Wr(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Br(this,t,e)}function Ur(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return kr(this,e,ai(),function(e){return zr(e,t)})}function Fr(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return kr(this,e,ai(),function(e){return Br(e,t)})}function qr(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Gr(){return this.__ownerID?this:this.__ensureOwner(new kt)}function Hr(){return this.__ensureOwner()}function Kr(){return this.__altered}Xn.prototype.cacheResult=Yn.prototype.cacheResult=Qn.prototype.cacheResult=Jn.prototype.cacheResult=fr;var Yr=function(e){function t(t){return null==t?ai():Nn(t)&&!en(t)?t:ai().withMutations(function(n){var r=e(t);xr(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return ai().withMutations(function(t){for(var n=0;n<e.length;n+=2){if(n+1>=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return hi(this,e,t)},t.prototype.remove=function(e){return hi(this,e,wt)},t.prototype.deleteAll=function(e){var t=Ft(e);return 0===t.size?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ai()},t.prototype.sort=function(e){return Oi(or(this,e))},t.prototype.sortBy=function(e,t){return Oi(or(this,t,e))},t.prototype.map=function(e,t){return this.withMutations(function(n){n.forEach(function(r,i){n.set(i,e.call(t,r,i,n))})})},t.prototype.__iterator=function(e,t){return new ri(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?oi(this.size,this._root,e,this.__hash):0===this.size?ai():(this.__ownerID=e,this.__altered=!1,this)},t}(qt);Yr.isMap=Nn;var Xr=Yr.prototype;Xr[Cn]=!0,Xr.delete=Xr.remove,Xr.removeAll=Xr.deleteAll,Xr.setIn=Nr,Xr.removeIn=Xr.deleteIn=Rr,Xr.update=Mr,Xr.updateIn=Tr,Xr.merge=Xr.concat=Dr,Xr.mergeWith=Lr,Xr.mergeDeep=jr,Xr.mergeDeepWith=Wr,Xr.mergeIn=Ur,Xr.mergeDeepIn=Fr,Xr.withMutations=qr,Xr.wasAltered=Kr,Xr.asImmutable=Hr,Xr["@@transducer/init"]=Xr.asMutable=Gr,Xr["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Xr["@@transducer/result"]=function(e){return e.asImmutable()};var Qr=function(e,t){this.ownerID=e,this.entries=t};Qr.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if(On(n,i[s][0]))return i[s][1];return r},Qr.prototype.update=function(e,t,n,r,i,s,o){for(var a=i===wt,h=this.entries,u=0,c=h.length;u<c&&!On(r,h[u][0]);u++);var l=u<c;if(l?h[u][1]===i:a)return this;if(Pt(o),(a||!l)&&Pt(s),!a||1!==h.length){if(!l&&!a&&h.length>=fi)return function(e,t,n,r){e||(e=new kt);for(var i=new ti(e,Ln(n),[n,r]),s=0;s<t.length;s++){var o=t[s];i=i.update(e,0,void 0,o[0],o[1])}return i}(e,h,r,i);var p=e&&e===this.ownerID,d=p?h:gr(h);return l?a?u===c-1?d.pop():d[u]=d.pop():d[u]=[r,i]:d.push([r,i]),p?(this.entries=d,this):new Qr(e,d)}};var Jr=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};Jr.prototype.get=function(e,t,n,r){void 0===t&&(t=Ln(n));var i=1<<((0===e?t:t>>>e)&It),s=this.bitmap;return 0==(s&i)?r:this.nodes[pi(s&i-1)].get(e+At,t,n,r)},Jr.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Ln(r));var a=(0===t?n:n>>>t)&It,h=1<<a,u=this.bitmap,c=0!=(u&h);if(!c&&i===wt)return this;var l=pi(u&h-1),p=this.nodes,d=c?p[l]:void 0,f=ui(d,e,t+At,n,r,i,s,o);if(f===d)return this;if(!c&&f&&p.length>=mi)return function(e,t,n,r,i){for(var s=0,o=new Array(St),a=0;0!==n;a++,n>>>=1)o[a]=1&n?t[s++]:void 0;return o[r]=i,new Zr(e,s+1,o)}(e,p,u,a,f);if(c&&!f&&2===p.length&&ci(p[1^l]))return p[1^l];if(c&&f&&1===p.length&&ci(f))return f;var m=e&&e===this.ownerID,g=c?f?u:u^h:u|h,y=c?f?di(p,l,f,m):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),s=0,o=0;o<r;o++)o===t&&(s=1),i[o]=e[o+s];return i}(p,l,m):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var s=new Array(i),o=0,a=0;a<i;a++)a===t?(s[a]=n,o=-1):s[a]=e[a+o];return s}(p,l,f,m);return m?(this.bitmap=g,this.nodes=y,this):new Jr(e,g,y)};var Zr=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};Zr.prototype.get=function(e,t,n,r){void 0===t&&(t=Ln(n));var i=(0===e?t:t>>>e)&It,s=this.nodes[i];return s?s.get(e+At,t,n,r):r},Zr.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Ln(r));var a=(0===t?n:n>>>t)&It,h=i===wt,u=this.nodes,c=u[a];if(h&&!c)return this;var l=ui(c,e,t+At,n,r,i,s,o);if(l===c)return this;var p=this.count;if(c){if(!l&&--p<gi)return function(e,t,n,r){for(var i=0,s=0,o=new Array(n),a=0,h=1,u=t.length;a<u;a++,h<<=1){var c=t[a];void 0!==c&&a!==r&&(i|=h,o[s++]=c)}return new Jr(e,i,o)}(e,u,p,a)}else p++;var d=e&&e===this.ownerID,f=di(u,a,l,d);return d?(this.count=p,this.nodes=f,this):new Zr(e,p,f)};var ei=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};ei.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if(On(n,i[s][0]))return i[s][1];return r},ei.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Ln(r));var a=i===wt;if(n!==this.keyHash)return a?this:(Pt(o),Pt(s),li(this,e,t,n,[r,i]));for(var h=this.entries,u=0,c=h.length;u<c&&!On(r,h[u][0]);u++);var l=u<c;if(l?h[u][1]===i:a)return this;if(Pt(o),(a||!l)&&Pt(s),a&&2===c)return new ti(e,this.keyHash,h[1^u]);var p=e&&e===this.ownerID,d=p?h:gr(h);return l?a?u===c-1?d.pop():d[u]=d.pop():d[u]=[r,i]:d.push([r,i]),p?(this.entries=d,this):new ei(e,this.keyHash,d)};var ti=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};ti.prototype.get=function(e,t,n,r){return On(n,this.entry[0])?this.entry[1]:r},ti.prototype.update=function(e,t,n,r,i,s,o){var a=i===wt,h=On(r,this.entry[0]);return(h?i===this.entry[1]:a)?this:(Pt(o),a?void Pt(s):h?e&&e===this.ownerID?(this.entry[1]=i,this):new ti(e,this.keyHash,[r,i]):(Pt(s),li(this,e,t,Ln(r),[r,i])))},Qr.prototype.iterate=ei.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Jr.prototype.iterate=Zr.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var s=n[t?i-r:r];if(s&&!1===s.iterate(e,t))return!1}},ti.prototype.iterate=function(e,t){return e(this.entry)};var ni,ri=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&si(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return ii(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return ii(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var s=n.nodes[this._reverse?i-r:r];if(s){if(s.entry)return ii(e,s.entry);t=this._stack=si(s,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(hn);function ii(e,t){return un(e,t[0],t[1])}function si(e,t){return{node:e,index:0,__prev:t}}function oi(e,t,n,r){var i=Object.create(Xr);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function ai(){return ni||(ni=oi(0))}function hi(e,t,n){var r,i;if(e._root){var s={value:!1},o={value:!1};if(r=ui(e._root,e.__ownerID,0,void 0,t,n,s,o),!o.value)return e;i=e.size+(s.value?n===wt?-1:1:0)}else{if(n===wt)return e;i=1,r=new Qr(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?oi(i,r):ai()}function ui(e,t,n,r,i,s,o,a){return e?e.update(t,n,r,i,s,o,a):s===wt?e:(Pt(a),Pt(o),new ti(t,r,[i,s]))}function ci(e){return e.constructor===ti||e.constructor===ei}function li(e,t,n,r,i){if(e.keyHash===r)return new ei(t,r,[e.entry,i]);var s,o=(0===n?e.keyHash:e.keyHash>>>n)&It,a=(0===n?r:r>>>n)&It,h=o===a?[li(e,t,n+At,r,i)]:(s=new ti(t,r,i),o<a?[e,s]:[s,e]);return new Jr(t,1<<o|1<<a,h)}function pi(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function di(e,t,n,r){var i=r?e:gr(e);return i[t]=n,i}var fi=St/4,mi=St/2,gi=St/4,yi="@@__IMMUTABLE_LIST__@@";function xi(e){return Boolean(e&&e[yi])}var vi=function(e){function t(t){var n=wi();if(null==t)return n;if(xi(t))return t;var r=e(t),i=r.size;return 0===i?n:(xr(i),i>0&&i<St?Ii(0,i,At,null,new _i(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=Nt(this,e))>=0&&e<this.size){var n=Ci(this,e+=this._origin);return n&&n.array[e&It]}return t},t.prototype.set=function(e,t){return function(e,t,n){if((t=Nt(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Ni(e,t).set(0,n):Ni(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,s={value:!1};t>=$i(e._capacity)?r=Pi(r,e.__ownerID,0,t,n,s):i=Pi(i,e.__ownerID,e._level,t,n,s);if(!s.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return Ii(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=At,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):wi()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Ni(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return Ni(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Ni(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return Ni(this,1)},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],s=e("string"!=typeof i&&ln(i)?i:[i]);0!==s.size&&n.push(s)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(n[0])},t.prototype.setSize=function(e){return Ni(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,r))})},t.prototype.slice=function(e,t){var n=this.size;return Rt(e,t,n)?this:Ni(this,Ot(e,n),Mt(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=Si(this,t);return new hn(function(){var i=r();return i===Ai?{value:void 0,done:!0}:un(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=Si(this,t);(n=i())!==Ai&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ii(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?wi():(this.__ownerID=e,this.__altered=!1,this)},t}(Gt);vi.isList=xi;var Ei=vi.prototype;Ei[yi]=!0,Ei.delete=Ei.remove,Ei.merge=Ei.concat,Ei.setIn=Nr,Ei.deleteIn=Ei.removeIn=Rr,Ei.update=Mr,Ei.updateIn=Tr,Ei.mergeIn=Ur,Ei.mergeDeepIn=Fr,Ei.withMutations=qr,Ei.wasAltered=Kr,Ei.asImmutable=Hr,Ei["@@transducer/init"]=Ei.asMutable=Gr,Ei["@@transducer/step"]=function(e,t){return e.push(t)},Ei["@@transducer/result"]=function(e){return e.asImmutable()};var _i=function(e,t){this.array=e,this.ownerID=t};_i.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&It;if(r>=this.array.length)return new _i([],e);var i,s=0===r;if(t>0){var o=this.array[r];if((i=o&&o.removeBefore(e,t-At,n))===o&&s)return this}if(s&&!i)return this;var a=ki(this,e);if(!s)for(var h=0;h<r;h++)a.array[h]=void 0;return i&&(a.array[r]=i),a},_i.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&It;if(i>=this.array.length)return this;if(t>0){var s=this.array[i];if((r=s&&s.removeAfter(e,t-At,n))===s&&i===this.array.length-1)return this}var o=ki(this,e);return o.array.splice(i+1),r&&(o.array[i]=r),o};var bi,Ai={};function Si(e,t){var n=e._origin,r=e._capacity,i=$i(r),s=e._tail;return o(e._root,e._level,0);function o(e,a,h){return 0===a?function(e,o){var a=o===i?s&&s.array:e&&e.array,h=o>n?0:n-o,u=r-o;u>St&&(u=St);return function(){if(h===u)return Ai;var e=t?--u:h++;return a&&a[e]}}(e,h):function(e,i,s){var a,h=e&&e.array,u=s>n?0:n-s>>i,c=1+(r-s>>i);c>St&&(c=St);return function(){for(;;){if(a){var e=a();if(e!==Ai)return e;a=null}if(u===c)return Ai;var n=t?--c:u++;a=o(h&&h[n],i-At,s+(n<<i))}}}(e,a,h)}}function Ii(e,t,n,r,i,s,o){var a=Object.create(Ei);return a.size=t-e,a._origin=e,a._capacity=t,a._level=n,a._root=r,a._tail=i,a.__ownerID=s,a.__hash=o,a.__altered=!1,a}function wi(){return bi||(bi=Ii(0,0,At))}function Pi(e,t,n,r,i,s){var o,a=r>>>n&It,h=e&&a<e.array.length;if(!h&&void 0===i)return e;if(n>0){var u=e&&e.array[a],c=Pi(u,t,n-At,r,i,s);return c===u?e:((o=ki(e,t)).array[a]=c,o)}return h&&e.array[a]===i?e:(s&&Pt(s),o=ki(e,t),void 0===i&&a===o.array.length-1?o.array.pop():o.array[a]=i,o)}function ki(e,t){return t&&e&&t===e.ownerID?e:new _i(e?e.array.slice():[],t)}function Ci(e,t){if(t>=$i(e._capacity))return e._tail;if(t<1<<e._level+At){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&It],r-=At;return n}}function Ni(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new kt,i=e._origin,s=e._capacity,o=i+t,a=void 0===n?s:n<0?s+n:i+n;if(o===i&&a===s)return e;if(o>=a)return e.clear();for(var h=e._level,u=e._root,c=0;o+c<0;)u=new _i(u&&u.array.length?[void 0,u]:[],r),c+=1<<(h+=At);c&&(o+=c,i+=c,a+=c,s+=c);for(var l=$i(s),p=$i(a);p>=1<<h+At;)u=new _i(u&&u.array.length?[u]:[],r),h+=At;var d=e._tail,f=p<l?Ci(e,a-1):p>l?new _i([],r):d;if(d&&p>l&&o<s&&d.array.length){for(var m=u=ki(u,r),g=h;g>At;g-=At){var y=l>>>g&It;m=m.array[y]=ki(m.array[y],r)}m.array[l>>>At&It]=d}if(a<s&&(f=f&&f.removeAfter(r,0,a)),o>=p)o-=p,a-=p,h=At,u=null,f=f&&f.removeBefore(r,0,o);else if(o>i||p<l){for(c=0;u;){var x=o>>>h&It;if(x!==p>>>h&It)break;x&&(c+=(1<<h)*x),h-=At,u=u.array[x]}u&&o>i&&(u=u.removeBefore(r,h,o-c)),u&&p<l&&(u=u.removeAfter(r,h,p-c)),c&&(o-=c,a-=c)}return e.__ownerID?(e.size=a-o,e._origin=o,e._capacity=a,e._level=h,e._root=u,e._tail=f,e.__hash=void 0,e.__altered=!0,e):Ii(o,a,h,u,f)}function $i(e){return e<St?0:e-1>>>At<<At}var Ri,Oi=function(e){function t(e){return null==e?Ti():$n(e)?e:Ti().withMutations(function(t){var n=qt(e);xr(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ti()},t.prototype.set=function(e,t){return Di(this,e,t)},t.prototype.remove=function(e){return Di(this,e,wt)},t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Mi(t,n,e,this.__hash):0===this.size?Ti():(this.__ownerID=e,this._map=t,this._list=n,this)},t}(Yr);function Mi(e,t,n,r){var i=Object.create(Oi.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function Ti(){return Ri||(Ri=Mi(ai(),wi()))}function Di(e,t,n){var r,i,s=e._map,o=e._list,a=s.get(t),h=void 0!==a;if(n===wt){if(!h)return e;o.size>=St&&o.size>=2*s.size?(r=(i=o.filter(function(e,t){return void 0!==e&&a!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=s.remove(t),i=a===o.size-1?o.pop():o.set(a,void 0))}else if(h){if(n===o.get(a)[1])return e;r=s,i=o.set(a,[t,n])}else r=s.set(t,o.size),i=o.set(o.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Mi(r,i)}Oi.isOrderedMap=$n,Oi.prototype[Zt]=!0,Oi.prototype.delete=Oi.prototype.remove;var Li="@@__IMMUTABLE_STACK__@@";function Vi(e){return Boolean(e&&e[Li])}var Bi=function(e){function t(e){return null==e?Ui():Vi(e)?e:Ui().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=Nt(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Wi(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Vi(t))return t;xr(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):Wi(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ui()},t.prototype.slice=function(t,n){if(Rt(t,n,this.size))return this;var r=Ot(t,this.size);if(Mt(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,s=this._head;r--;)s=s.next;return this.__ownerID?(this.size=i,this._head=s,this.__hash=void 0,this.__altered=!0,this):Wi(i,s)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Wi(this.size,this._head,e,this.__hash):0===this.size?Ui():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new _n(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new _n(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new hn(function(){if(r){var t=r.value;return r=r.next,un(e,n++,t)}return{value:void 0,done:!0}})},t}(Gt);Bi.isStack=Vi;var zi,ji=Bi.prototype;function Wi(e,t,n,r){var i=Object.create(ji);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ui(){return zi||(zi=Wi(0))}ji[Li]=!0,ji.shift=ji.pop,ji.unshift=ji.push,ji.unshiftAll=ji.pushAll,ji.withMutations=qr,ji.wasAltered=Kr,ji.asImmutable=Hr,ji["@@transducer/init"]=ji.asMutable=Gr,ji["@@transducer/step"]=function(e,t){return e.unshift(t)},ji["@@transducer/result"]=function(e){return e.asImmutable()};var Fi="@@__IMMUTABLE_SET__@@";function qi(e){return Boolean(e&&e[Fi])}function Gi(e){return qi(e)&&en(e)}function Hi(e,t){if(e===t)return!0;if(!Vt(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||zt(e)!==zt(t)||Wt(e)!==Wt(t)||en(e)!==en(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!Ut(e);if(en(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&On(i[1],e)&&(n||On(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var s=e;e=t,t=s}var o=!0,a=t.__iterate(function(t,r){if(n?!e.has(t):i?!On(t,e.get(r,wt)):!On(e.get(r,wt),t))return o=!1,!1});return o&&e.size===a}function Ki(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Yi(e){if(!e||"object"!=typeof e)return e;if(!Vt(e)){if(!_r(e))return e;e=yn(e)}if(zt(e)){var t={};return e.__iterate(function(e,n){t[n]=Yi(e)}),t}var n=[];return e.__iterate(function(e){n.push(Yi(e))}),n}var Xi=function(e){function t(t){return null==t?ts():qi(t)&&!en(t)?t:ts().withMutations(function(n){var r=e(t);xr(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(qt(e).keySeq())},t.intersect=function(e){return(e=Ft(e).toArray()).length?Ji.intersect.apply(t(e.pop()),e):ts()},t.union=function(e){return(e=Ft(e).toArray()).length?Ji.union.apply(t(e.pop()),e):ts()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Zi(this,this._map.set(e,e))},t.prototype.remove=function(e){return Zi(this,this._map.remove(e))},t.prototype.clear=function(){return Zi(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=[],i=[];return this.forEach(function(s){var o=e.call(t,s,s,n);o!==s&&(r.push(s),i.push(o))}),this.withMutations(function(e){r.forEach(function(t){return e.remove(t)}),i.forEach(function(t){return e.add(t)})})},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(n){for(var r=0;r<t.length;r++)e(t[r]).forEach(function(e){return n.add(e)})}):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return vs(or(this,e))},t.prototype.sortBy=function(e,t){return vs(or(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(Ht);Xi.isSet=qi;var Qi,Ji=Xi.prototype;function Zi(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function es(e,t){var n=Object.create(Ji);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function ts(){return Qi||(Qi=es(ai()))}Ji[Fi]=!0,Ji.delete=Ji.remove,Ji.merge=Ji.concat=Ji.union,Ji.withMutations=qr,Ji.asImmutable=Hr,Ji["@@transducer/init"]=Ji.asMutable=Gr,Ji["@@transducer/step"]=function(e,t){return e.add(t)},Ji["@@transducer/result"]=function(e){return e.asImmutable()},Ji.__empty=ts,Ji.__make=es;var ns,rs=function(e){function t(e,n,r){if(!(this instanceof t))return new t(e,n,r);if(yr(0!==r,"Cannot step a Range by 0"),e=e||0,void 0===n&&(n=1/0),r=void 0===r?1:Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(ns)return ns;ns=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+Nt(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return Rt(e,n,this.size)?this:(e=Ot(e,this.size),(n=Mt(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,s=0;s!==n&&!1!==e(i,t?n-++s:s++,this);)i+=t?-r:r;return s},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,s=0;return new hn(function(){if(s===n)return{value:void 0,done:!0};var o=i;return i+=t?-r:r,un(e,t?n-++s:s++,o)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:Hi(this,e)},t}(vn);function is(e,t,n){for(var r=vr(t),i=0;i!==r.length;)if((e=Sr(e,r[i++],wt))===wt)return n;return e}function ss(e,t){return is(this,e,t)}function os(e,t){return is(e,t,wt)!==wt}function as(){xr(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e}Ft.isIterable=Vt,Ft.isKeyed=zt,Ft.isIndexed=Wt,Ft.isAssociative=Ut,Ft.isOrdered=en,Ft.Iterator=hn,Ki(Ft,{toArray:function(){xr(this.size);var e=new Array(this.size||0),t=zt(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new Xn(this)},toJS:function(){return Yi(this)},toKeyedSeq:function(){return new Yn(this,!0)},toMap:function(){return Yr(this.toKeyedSeq())},toObject:as,toOrderedMap:function(){return Oi(this.toKeyedSeq())},toOrderedSet:function(){return vs(zt(this)?this.valueSeq():this)},toSet:function(){return Xi(zt(this)?this.valueSeq():this)},toSetSeq:function(){return new Qn(this)},toSeq:function(){return Wt(this)?this.toIndexedSeq():zt(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Bi(zt(this)?this.valueSeq():this)},toList:function(){return vi(zt(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return cr(this,function(e,t){var n=zt(e),r=[e].concat(t).map(function(e){return Vt(e)?n&&(e=qt(e)):e=n?wn(e):Pn(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&zt(i)||Wt(e)&&Wt(i))return i}var s=new _n(r);return n?s=s.toKeyedSeq():Wt(e)||(s=s.toSetSeq()),(s=s.flatten(!0)).size=r.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),s}(this,e))},includes:function(e){return this.some(function(t){return On(t,e)})},entries:function(){return this.__iterator(rn)},every:function(e,t){xr(this.size);var n=!0;return this.__iterate(function(r,i,s){if(!e.call(t,r,i,s))return n=!1,!1}),n},filter:function(e,t){return cr(this,nr(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return xr(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){xr(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(tn)},map:function(e,t){return cr(this,er(this,e,t))},reduce:function(e,t,n){return ls(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return ls(this,e,t,n,arguments.length<2,!0)},reverse:function(){return cr(this,tr(this,!0))},slice:function(e,t){return cr(this,rr(this,e,t,!0))},some:function(e,t){return!this.every(fs(e),t)},sort:function(e){return cr(this,or(this,e))},values:function(){return this.__iterator(nn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return Ct(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Yr().asMutable();return e.__iterate(function(i,s){r.update(t.call(n,i,s,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return Hi(this,e)},entrySeq:function(){var e=this;if(e._cache)return new _n(e._cache);var t=e.toSeq().map(ds).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(fs(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,s){if(e.call(t,n,i,s))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find($t,null,e)},flatMap:function(e,t){return cr(this,function(e,t,n){var r=pr(e);return e.toSeq().map(function(i,s){return r(t.call(n,i,s,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return cr(this,sr(this,e,!0))},fromEntrySeq:function(){return new Jn(this)},get:function(e,t){return this.find(function(t,n){return On(n,e)},void 0,t)},getIn:ss,groupBy:function(e,t){return function(e,t,n){var r=zt(e),i=(en(e)?Oi():Yr()).asMutable();e.__iterate(function(s,o){i.update(t.call(n,s,o,e),function(e){return(e=e||[]).push(r?[o,s]:s),e})});var s=pr(e);return i.map(function(t){return cr(e,s(t))}).asImmutable()}(this,e,t)},has:function(e){return this.get(e,wt)!==wt},hasIn:function(e){return os(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:Ft(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:Ft(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return On(t,e)})},keySeq:function(){return this.toSeq().map(ps).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return ar(this,e)},maxBy:function(e,t){return ar(this,t,e)},min:function(e){return ar(this,e?ms(e):ys)},minBy:function(e,t){return ar(this,t?ms(t):ys,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return cr(this,ir(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(fs(e),t)},sortBy:function(e,t){return cr(this,or(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return cr(this,function(e,t,n){var r=dr(e);return r.__iterateUncached=function(r,i){var s=this;if(i)return this.cacheResult().__iterate(r,i);var o=0;return e.__iterate(function(e,i,a){return t.call(n,e,i,a)&&++o&&r(e,i,s)}),o},r.__iteratorUncached=function(r,i){var s=this;if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(rn,i),a=!0;return new hn(function(){if(!a)return{value:void 0,done:!0};var e=o.next();if(e.done)return e;var i=e.value,h=i[0],u=i[1];return t.call(n,u,h,s)?r===rn?e:un(r,h,u,e):(a=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(fs(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=en(e),n=zt(e),r=t?1:0;return function(e,t){return t=Mn(t,3432918353),t=Mn(t<<15|t>>>-15,461845907),t=Mn(t<<13|t>>>-13,5),t=Mn((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Tn((t=Mn(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+xs(Ln(e),Ln(t))|0}:function(e,t){r=r+xs(Ln(e),Ln(t))|0}:t?function(e){r=31*r+Ln(e)|0}:function(e){r=r+Ln(e)|0}),r)}(this))}});var hs=Ft.prototype;hs[Lt]=!0,hs[an]=hs.values,hs.toJSON=hs.toArray,hs.__toStringMapper=br,hs.inspect=hs.toSource=function(){return this.toString()},hs.chain=hs.flatMap,hs.contains=hs.includes,Ki(qt,{flip:function(){return cr(this,Zn(this))},mapEntries:function(e,t){var n=this,r=0;return cr(this,this.toSeq().map(function(i,s){return e.call(t,[s,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return cr(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var us=qt.prototype;us[Bt]=!0,us[an]=hs.entries,us.toJSON=as,us.__toStringMapper=function(e,t){return br(t)+": "+br(e)},Ki(Gt,{toKeyedSeq:function(){return new Yn(this,!1)},filter:function(e,t){return cr(this,nr(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return cr(this,tr(this,!1))},slice:function(e,t){return cr(this,rr(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=Ot(e,e<0?this.count():this.size);var r=this.slice(0,e);return cr(this,1===n?r:r.concat(gr(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return cr(this,sr(this,e,!1))},get:function(e,t){return(e=Nt(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=Nt(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return cr(this,function(e,t){var n=dr(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,s=0;return e.__iterate(function(e){return(!s||!1!==n(t,s++,i))&&!1!==n(e,s++,i)},r),s},n.__iteratorUncached=function(n,r){var i,s=e.__iterator(nn,r),o=0;return new hn(function(){return(!i||o%2)&&(i=s.next()).done?i:o%2?un(n,o++,t):un(n,o++,i.value,i)})},n}(this,e))},interleave:function(){var e=[this].concat(gr(arguments)),t=ur(this.toSeq(),vn.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),cr(this,n)},keySeq:function(){return rs(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return cr(this,ir(this,e,t,!1))},zip:function(){return cr(this,ur(this,gs,[this].concat(gr(arguments))))},zipAll:function(){return cr(this,ur(this,gs,[this].concat(gr(arguments)),!0))},zipWith:function(e){var t=gr(arguments);return t[0]=this,cr(this,ur(this,e,t))}});var cs=Gt.prototype;function ls(e,t,n,r,i,s){return xr(e.size),e.__iterate(function(e,s,o){i?(i=!1,n=e):n=t.call(r,n,e,s,o)},s),n}function ps(e,t){return t}function ds(e,t){return[t,e]}function fs(e){return function(){return!e.apply(this,arguments)}}function ms(e){return function(){return-e.apply(this,arguments)}}function gs(){return gr(arguments)}function ys(e,t){return e<t?1:e>t?-1:0}function xs(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}cs[jt]=!0,cs[Zt]=!0,Ki(Ht,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),Ht.prototype.has=hs.includes,Ht.prototype.contains=Ht.prototype.includes,Ki(xn,qt.prototype),Ki(vn,Gt.prototype),Ki(En,Ht.prototype);var vs=function(e){function t(e){return null==e?As():Gi(e)?e:As().withMutations(function(t){var n=Ht(e);xr(n.size),n.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(qt(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Xi);vs.isOrderedSet=Gi;var Es,_s=vs.prototype;function bs(e,t){var n=Object.create(_s);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function As(){return Es||(Es=bs(Ti()))}_s[Zt]=!0,_s.zip=cs.zip,_s.zipWith=cs.zipWith,_s.__empty=As,_s.__make=bs;var Ss=function(e,t){var n,r=function(s){var o=this;if(s instanceof r)return s;if(!(this instanceof r))return new r(s);if(!n){n=!0;var a=Object.keys(e),h=i._indices={};i._name=t,i._keys=a,i._defaultValues=e;for(var u=0;u<a.length;u++){var c=a[u];h[c]=u,i[c]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+ks(this)+' with property "'+c+'" since that property name is part of the Record API.'):Ns(i,c)}}this.__ownerID=void 0,this._values=vi().withMutations(function(e){e.setSize(o._keys.length),qt(s).forEach(function(t,n){e.set(o._indices[n],t===o._defaultValues[n]?void 0:t)})})},i=r.prototype=Object.create(ws);return i.constructor=r,t&&(r.displayName=t),r};Ss.prototype.toString=function(){for(var e,t=ks(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)t+=(r?", ":"")+(e=n[r])+": "+br(this.get(e));return t+" }"},Ss.prototype.equals=function(e){return this===e||e&&this._keys===e._keys&&Cs(this).equals(Cs(e))},Ss.prototype.hashCode=function(){return Cs(this).hashCode()},Ss.prototype.has=function(e){return this._indices.hasOwnProperty(e)},Ss.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return void 0===r?this._defaultValues[e]:r},Ss.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return Ps(this,n)}return this},Ss.prototype.remove=function(e){return this.set(e)},Ss.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Ps(this,e)},Ss.prototype.wasAltered=function(){return this._values.wasAltered()},Ss.prototype.toSeq=function(){return Cs(this)},Ss.prototype.toJS=function(){return Yi(this)},Ss.prototype.entries=function(){return this.__iterator(rn)},Ss.prototype.__iterator=function(e,t){return Cs(this).__iterator(e,t)},Ss.prototype.__iterate=function(e,t){return Cs(this).__iterate(e,t)},Ss.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?Ps(this,t,e):(this.__ownerID=e,this._values=t,this)},Ss.isRecord=Qt,Ss.getDescriptiveName=ks;var Is,ws=Ss.prototype;function Ps(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function ks(e){return e.constructor.displayName||e.constructor.name||"Record"}function Cs(e){return wn(e._keys.map(function(t){return[t,e.get(t)]}))}function Ns(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){yr(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}function $s(e,t){return zt(t)?t.toMap():t.toList()}ws[Xt]=!0,ws.delete=ws.remove,ws.deleteIn=ws.removeIn=Rr,ws.getIn=ss,ws.hasIn=hs.hasIn,ws.merge=Dr,ws.mergeWith=Lr,ws.mergeIn=Ur,ws.mergeDeep=jr,ws.mergeDeepWith=Wr,ws.mergeDeepIn=Fr,ws.setIn=Nr,ws.update=Mr,ws.updateIn=Tr,ws.withMutations=qr,ws.asMutable=Gr,ws.asImmutable=Hr,ws[an]=ws.entries,ws.toJSON=ws.toObject=hs.toObject,ws.inspect=ws.toSource=function(){return this.toString()};var Rs,Os={version:"4.0.0-rc.11",Collection:Ft,Iterable:Ft,Seq:yn,Map:Yr,OrderedMap:Oi,List:vi,Stack:Bi,Set:Xi,OrderedSet:vs,Record:Ss,Range:rs,Repeat:function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(Is)return Is;Is=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return On(this._value,e)},t.prototype.slice=function(e,n){var r=this.size;return Rt(e,n,r)?this:new t(this._value,Mt(n,r)-Ot(e,r))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return On(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return On(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},t.prototype.__iterator=function(e,t){var n=this,r=this.size,i=0;return new hn(function(){return i===r?{value:void 0,done:!0}:un(e,t?r-++i:i++,n._value)})},t.prototype.equals=function(e){return e instanceof t?On(this._value,e._value):Hi(e)},t}(vn),is:On,fromJS:function(e,t){return function e(t,n,r,i,s,o){var a=Array.isArray(r)?vn:Er(r)?xn:null;if(a){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),s&&""!==i&&s.push(i);var h=n.call(o,i,a(r).map(function(i,o){return e(t,n,i,o,s,r)}),s&&s.slice());return t.pop(),s&&s.pop(),h}return r}([],t||$s,e,"",t&&t.length>2?[]:void 0,{"":e})},hash:Ln,isImmutable:Jt,isCollection:Vt,isKeyed:zt,isIndexed:Wt,isAssociative:Ut,isOrdered:en,isValueObject:Rn,isSeq:Yt,isList:xi,isMap:Nn,isOrderedMap:$n,isStack:Vi,isSet:qi,isOrderedSet:Gi,isRecord:Qt,get:Sr,getIn:is,has:Ar,hasIn:os,merge:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return zr(e,t)},mergeDeep:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Br(e,t)},mergeWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return zr(t,n,e)},mergeDeepWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Br(t,n,e)},remove:wr,removeIn:$r,set:Pr,setIn:Cr,update:Or,updateIn:kr};!function(e){e[e.IGNORED_LABELS=0]="IGNORED_LABELS",e[e.ACCESSED_NODES=1]="ACCESSED_NODES",e[e.ARGUMENTS_VARIABLES=2]="ARGUMENTS_VARIABLES",e[e.ASSIGNED_NODES=3]="ASSIGNED_NODES",e[e.IGNORE_BREAK_STATEMENTS=4]="IGNORE_BREAK_STATEMENTS",e[e.IGNORE_RETURN_AWAIT_YIELD=5]="IGNORE_RETURN_AWAIT_YIELD",e[e.NODES_CALLED_AT_PATH_WITH_OPTIONS=6]="NODES_CALLED_AT_PATH_WITH_OPTIONS",e[e.REPLACED_VARIABLE_INITS=7]="REPLACED_VARIABLE_INITS",e[e.RETURN_EXPRESSIONS_ACCESSED_AT_PATH=8]="RETURN_EXPRESSIONS_ACCESSED_AT_PATH",e[e.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH=9]="RETURN_EXPRESSIONS_ASSIGNED_AT_PATH",e[e.RETURN_EXPRESSIONS_CALLED_AT_PATH=10]="RETURN_EXPRESSIONS_CALLED_AT_PATH"}(Rs||(Rs={}));const Ms={};class Ts{static create(){return new this(Os.Map())}constructor(e){this.optionValues=e}addAccessedNodeAtPath(e,t){return this.setIn([Rs.ACCESSED_NODES,t,...e,Ms],!0)}addAccessedReturnExpressionAtPath(e,t){return this.setIn([Rs.RETURN_EXPRESSIONS_ACCESSED_AT_PATH,t,...e,Ms],!0)}addAssignedNodeAtPath(e,t){return this.setIn([Rs.ASSIGNED_NODES,t,...e,Ms],!0)}addAssignedReturnExpressionAtPath(e,t){return this.setIn([Rs.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH,t,...e,Ms],!0)}addCalledNodeAtPathWithOptions(e,t,n){return this.setIn([Rs.NODES_CALLED_AT_PATH_WITH_OPTIONS,t,...e,Ms,n],!0)}addCalledReturnExpressionAtPath(e,t){return this.setIn([Rs.RETURN_EXPRESSIONS_CALLED_AT_PATH,t,...e,Ms],!0)}getArgumentsVariables(){return this.get(Rs.ARGUMENTS_VARIABLES)||[]}getHasEffectsWhenCalledOptions(){return this.setIgnoreReturnAwaitYield().setIgnoreBreakStatements(!1).setIgnoreNoLabels()}getReplacedVariableInit(e){return this.optionValues.getIn([Rs.REPLACED_VARIABLE_INITS,e])}hasNodeBeenAccessedAtPath(e,t){return this.optionValues.getIn([Rs.ACCESSED_NODES,t,...e,Ms])}hasNodeBeenAssignedAtPath(e,t){return this.optionValues.getIn([Rs.ASSIGNED_NODES,t,...e,Ms])}hasNodeBeenCalledAtPathWithOptions(e,t,n){const r=this.optionValues.getIn([Rs.NODES_CALLED_AT_PATH_WITH_OPTIONS,t,...e,Ms]);return r&&r.find((e,t)=>t.equals(n))}hasReturnExpressionBeenAccessedAtPath(e,t){return this.optionValues.getIn([Rs.RETURN_EXPRESSIONS_ACCESSED_AT_PATH,t,...e,Ms])}hasReturnExpressionBeenAssignedAtPath(e,t){return this.optionValues.getIn([Rs.RETURN_EXPRESSIONS_ASSIGNED_AT_PATH,t,...e,Ms])}hasReturnExpressionBeenCalledAtPath(e,t){return this.optionValues.getIn([Rs.RETURN_EXPRESSIONS_CALLED_AT_PATH,t,...e,Ms])}ignoreBreakStatements(){return this.get(Rs.IGNORE_BREAK_STATEMENTS)}ignoreLabel(e){return this.optionValues.getIn([Rs.IGNORED_LABELS,e])}ignoreReturnAwaitYield(){return this.get(Rs.IGNORE_RETURN_AWAIT_YIELD)}replaceVariableInit(e,t){return this.setIn([Rs.REPLACED_VARIABLE_INITS,e],t)}setArgumentsVariables(e){return this.set(Rs.ARGUMENTS_VARIABLES,e)}setIgnoreBreakStatements(e=!0){return this.set(Rs.IGNORE_BREAK_STATEMENTS,e)}setIgnoreLabel(e){return this.setIn([Rs.IGNORED_LABELS,e],!0)}setIgnoreNoLabels(){return this.remove(Rs.IGNORED_LABELS)}setIgnoreReturnAwaitYield(e=!0){return this.set(Rs.IGNORE_RETURN_AWAIT_YIELD,e)}get(e){return this.optionValues.get(e)}remove(e){return new Ts(this.optionValues.remove(e))}set(e,t){return new Ts(this.optionValues.set(e,t))}setIn(e,t){return new Ts(this.optionValues.setIn(e,t))}}const Ds={Literal:[],Program:["body"]};const Ls=Ts.create();class Vs{constructor(e,t,n){this.keys=Ds[e.type]||function(e){return Ds[e.type]=Object.keys(e).filter(t=>"object"==typeof e[t]),Ds[e.type]}(e),this.parent=t,this.context=t.context,this.createScope(n),this.parseNode(e),this.initialise(),this.context.magicString.addSourcemapLocation(this.start),this.context.magicString.addSourcemapLocation(this.end)}bind(){for(const e of this.keys){const t=this[e];if(null!==t&&"annotations"!==e)if(Array.isArray(t))for(const e of t)null!==e&&e.bind();else t.bind()}}createScope(e){this.scope=e}declare(e,t){}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return Ie}getReturnExpressionWhenCalledAtPath(e,t,n){return we}hasEffects(e){for(const t of this.keys){const n=this[t];if(null!==n&&"annotations"!==t)if(Array.isArray(n)){for(const t of n)if(null!==t&&t.hasEffects(e))return!0}else if(n.hasEffects(e))return!0}return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>0}hasEffectsWhenAssignedAtPath(e,t){return!0}hasEffectsWhenCalledAtPath(e,t,n){return!0}include(e){this.included=!0;for(const t of this.keys){const n=this[t];if(null!==n&&"annotations"!==t)if(Array.isArray(n))for(const t of n)null!==t&&t.include(e);else n.include(e)}}includeWithAllDeclaredVariables(e){this.include(e)}initialise(){this.included=!1}insertSemicolon(e){";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}locate(){const e=bt(this.context.code,this.start,{offsetLine:1});return e.file=this.context.fileName,e.toString=(()=>JSON.stringify(e)),e}parseNode(e){for(const t of Object.keys(e)){if(this.hasOwnProperty(t))continue;const n=e[t];if("object"!=typeof n||null===n||"annotations"===t)this[t]=n;else if(Array.isArray(n)){this[t]=[];for(const e of n)this[t].push(null===e?null:new(this.context.nodeConstructors[e.type]||this.context.nodeConstructors.UnknownNode)(e,this,this.scope))}else this[t]=new(this.context.nodeConstructors[n.type]||this.context.nodeConstructors.UnknownNode)(n,this,this.scope)}}render(e,t){for(const n of this.keys){const r=this[n];if(null!==r&&"annotations"!==n)if(Array.isArray(r))for(const n of r)null!==n&&n.render(e,t);else r.render(e,t)}}shouldBeIncluded(){return this.included||this.hasEffects(Ls)}toString(){return this.context.code.slice(this.start,this.end)}}class Bs extends Vs{createScope(e){this.scope=new _t(e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}hasEffectsWhenAssignedAtPath(e,t){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return this.body.hasEffectsWhenCalledAtPath(e,t,n)||null!==this.superClass&&this.superClass.hasEffectsWhenCalledAtPath(e,t,n)}initialise(){this.included=!1,null!==this.id&&this.id.declare("class",this)}}class zs extends Bs{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new this.context.nodeConstructors.Identifier(e.id,this,this.scope.parent)),super.parseNode(e)}render(e,t){"system"===t.format&&this.id&&this.id.variable.exportName&&e.appendLeft(this.end,` exports('${this.id.variable.exportName}', ${this.id.variable.getName()});`),super.render(e,t)}}const js=(e,t)=>{const n=parseInt(e[0],10);return n<t.getArgumentsVariables().length&&t.getArgumentsVariables()[n]||we};class Ws extends vt{constructor(e,t){super("arguments",null,we,t),this.parameters=e}deoptimizePath(e){const t=parseInt(e[0],10);e.length>0&&t>=0&&this.parameters[t]&&this.parameters[t].deoptimizePath(e.slice(1))}hasEffectsWhenAccessedAtPath(e,t){return e.length>1&&js(e,t).hasEffectsWhenAccessedAtPath(e.slice(1),t)}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||this.included||js(e,t).hasEffectsWhenAssignedAtPath(e.slice(1),t)}hasEffectsWhenCalledAtPath(e,t,n){return 0===e.length||js(e,n).hasEffectsWhenCalledAtPath(e.slice(1),t,n)}}class Us extends vt{constructor(e){super("this",null,null,e)}_getInit(e){return e.getReplacedVariableInit(this)||we}getLiteralValueAtPath(){return Ie}hasEffectsWhenAccessedAtPath(e,t){return this._getInit(t).hasEffectsWhenAccessedAtPath(e,t)||super.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return this._getInit(t).hasEffectsWhenAssignedAtPath(e,t)||super.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return this._getInit(n).hasEffectsWhenCalledAtPath(e,t,n)||super.hasEffectsWhenCalledAtPath(e,t,n)}}class Fs extends _t{constructor(e,t){super(e),this.parameters=[],this.context=t,this.hoistedBodyVarScope=new _t(this)}addParameterDeclaration(e){const t=e.name;let n;return t in this.hoistedBodyVarScope.variables?(n=this.hoistedBodyVarScope.variables[t]).addDeclaration(e,null):n=new vt(t,e,we,this.context),this.variables[t]=n,this.parameters.push(n),n}getParameterVariables(){return this.parameters}}class qs extends Fs{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=we;for(const e of this.returnExpressions)e.deoptimizePath(Ae)}}}class Gs extends qs{constructor(e,t){super(e,t),this.variables.arguments=new Ws(super.getParameterVariables(),t),this.variables.this=new Us(t)}findLexicalBoundary(){return this}getOptionsWhenCalledWith({args:e,withNew:t},n){return n.replaceVariableInit(this.variables.this,t?new Fe:we).setArgumentsVariables(e.map((e,t)=>super.getParameterVariables()[t]||e))}}class Hs extends Vs{createScope(e){this.scope=new Gs(e,this.context)}deoptimizePath(e){1===e.length&&("prototype"===e[0]?this.isPrototypeDeoptimized=!0:e[0]===_e&&(this.isPrototypeDeoptimized=!0,this.scope.getReturnExpression().deoptimizePath(Ae)))}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.scope.getReturnExpression():we}hasEffects(e){return null!==this.id&&this.id.hasEffects(e)}hasEffectsWhenAccessedAtPath(e){return!(e.length<=1)&&(e.length>2||"prototype"!==e[0]||this.isPrototypeDeoptimized)}hasEffectsWhenAssignedAtPath(e){return!(e.length<=1)&&(e.length>2||"prototype"!==e[0]||this.isPrototypeDeoptimized)}hasEffectsWhenCalledAtPath(e,t,n){if(e.length>0)return!0;const r=this.scope.getOptionsWhenCalledWith(t,n);for(const e of this.params)if(e.hasEffects(r))return!0;return this.body.hasEffects(r)}include(e){this.scope.variables.arguments.include(),super.include(e)}initialise(){this.included=!1,this.isPrototypeDeoptimized=!1,null!==this.id&&this.id.declare("function",this);for(const e of this.params)e.declare("parameter",we);this.body.addImplicitReturnExpressionToScope()}parseNode(e){this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope.hoistedBodyVarScope),super.parseNode(e)}}Hs.prototype.preventChildBlockScope=!0;class Ks extends Hs{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new this.context.nodeConstructors.Identifier(e.id,this,this.scope.parent)),super.parseNode(e)}}const Ys=/\s/;class Xs extends Vs{include(e){super.include(e),e&&this.context.includeVariable(this.variable)}initialise(){this.included=!1;const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context),this.context.addExport(this)}render(e,t,{start:n,end:r}=X){const i=function(e,t=0){for(t=pe(e,"default",t)+7;Ys.test(e[t]);)t++;return t}(e.original,this.start);if(this.declaration instanceof Ks)this.renderNamedDeclaration(e,i,"function",null===this.declaration.id,t);else if(this.declaration instanceof zs)this.renderNamedDeclaration(e,i,"class",null===this.declaration.id,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void("system"===t.format&&this.variable.exportName?e.overwrite(n,r,`exports('${this.variable.exportName}', ${this.variable.getName()});`):ue(this,e,n,r));if(!this.variable.included)return e.remove(this.start,i),this.declaration.render(e,t,{isCalleeOfRenderedParent:!1,renderedParentType:ee}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,i,t)}this.declaration.render(e,t)}renderNamedDeclaration(e,t,n,r,i){const s=this.variable.getName();e.remove(this.start,t),r&&e.appendLeft(function(e,t,n=0){const r=pe(e,t,n)+t.length;e=e.slice(r,pe(e,"{",r));const i=pe(e,"*");return-1===i?r:r+i+1}(e.original,n,t),` ${s}`),"system"===i.format&&this.declaration instanceof zs&&this.variable.exportName&&e.appendLeft(this.end,` exports('${this.variable.exportName}', ${s});`)}renderVariableDeclaration(e,t,n){const r="system"===n.format&&this.variable.exportName?`exports('${this.variable.exportName}', `:"";e.overwrite(this.start,t,`${n.varOrConst} ${this.variable.getName()} = ${r}`);const i=59===e.original.charCodeAt(this.end-1);r?e.appendRight(i?this.end-1:this.end,")"+(i?"":";")):i||e.appendLeft(this.end,";")}}Xs.prototype.needsBoundaries=!0;class Qs extends Vs{addExportedVariables(e){null!==this.variable&&this.variable.exportName&&e.push(this.variable)}bind(){this.bound||(this.bound=!0,null===this.variable&&function e(t,n){if("MemberExpression"===t.type)return!t.computed&&e(t.object,t);if("Identifier"===t.type)switch(n.type){case"MemberExpression":return n.computed||t===n.object;case"MethodDefinition":return n.computed;case"Property":return n.computed||t===n.value;case"ExportSpecifier":return t===n.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}return!1}(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)),null!==this.variable&&this.variable.isLocal&&null!==this.variable.additionalInitializers&&this.variable.consolidateInitializers())}declare(e,t){switch(e){case"var":case"function":this.variable=this.scope.addDeclaration(this,this.context,t,!0);break;case"let":case"const":case"class":this.variable=this.scope.addDeclaration(this,this.context,t,!1);break;case"parameter":this.variable=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Unexpected identifier kind ${e}.`)}}deoptimizePath(e){this.bound||this.bind(),null!==this.variable&&(0===e.length&&this.name in this.context.importDescriptions&&!this.scope.contains(this.name)&&this.disallowImportReassignment(),this.variable.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.bound||this.bind(),null!==this.variable?this.variable.getLiteralValueAtPath(e,t,n):Ie}getReturnExpressionWhenCalledAtPath(e,t,n){return this.bound||this.bind(),null!==this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n):we}hasEffectsWhenAccessedAtPath(e,t){return null!==this.variable&&this.variable.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return!this.variable||this.variable.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return!this.variable||this.variable.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included||(this.included=!0,null!==this.variable&&this.context.includeVariable(this.variable))}initialise(){this.included=!1,this.bound=!1,this.variable||(this.variable=null)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r,isShorthandProperty:i}=X){if(this.variable){const t=this.variable.getName();t!==this.name&&(e.overwrite(this.start,this.end,t,{contentOnly:!0,storeName:!0}),i&&e.prependRight(this.start,`${this.name}: `)),"eval"===t&&n===J&&r&&e.appendRight(this.start,"0, ")}}disallowImportReassignment(){this.context.error({code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment to import '${this.name}'`},this.start)}}class Js extends vt{constructor(e,t,n){super(e,t,t.declaration,n),this.originalId=null,this.originalVariable=null;const r=t.declaration;(r instanceof Ks||r instanceof zs)&&r.id?(this.hasId=!0,this.originalId=r.id):r instanceof Qs&&(this.originalId=r)}addReference(e){this.hasId||(this.name=e.name)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getName(){const e=this.getOriginalVariable();return e===this?super.getName():e.getName()}getOriginalVariable(){if(null===this.originalVariable)if(!this.originalId||!this.hasId&&this.originalId.variable.isReassigned)this.originalVariable=this;else{const e=this.originalId.variable;this.originalVariable=e instanceof Js?e.getOriginalVariable():e}return this.originalVariable}setRenderNames(e,t){const n=this.getOriginalVariable();n===this?super.setRenderNames(e,t):n.setRenderNames(e,t)}setSafeName(e){const t=this.getOriginalVariable();t===this?super.setSafeName(e):t.setSafeName(e)}}Js.prototype.getBaseVariableName=Js.prototype.getName,Js.prototype.isDefault=!0;const Zs="_missingExportShim",eo="_interopDefault";class to extends Je{constructor(e){super(Zs),this.module=e}}const no={},ro="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),io="Int8x16 Int16x8 Int32x4 Float32x4 Float64x2".split(" "),so="abs add and bool check div equal extractLane fromFloat32x4 fromFloat32x4Bits fromFloat64x2 fromFloat64x2Bits fromInt16x8Bits fromInt32x4 fromInt32x4Bits fromInt8x16Bits greaterThan greaterThanOrEqual lessThan lessThanOrEqual load max maxNum min minNum mul neg not notEqual or reciprocalApproximation reciprocalSqrtApproximation replaceLane select selectBits shiftLeftByScalar shiftRightArithmeticByScalar shiftRightLogicalByScalar shuffle splat sqrt store sub swizzle xor".split(" "),oo=[];io.forEach(e=>{so.forEach(t=>{oo.push(`SIMD.${e}.${t}`)})}),["Array.isArray","Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","Object","Object.create","Object.getNotifier","Object.getOwn","Object.getOwnPropertyDescriptor","Object.getOwnPropertyNames","Object.getOwnPropertySymbols","Object.getPrototypeOf","Object.is","Object.isExtensible","Object.isFrozen","Object.isSealed","Object.keys","Boolean","Number","Number.isFinite","Number.isInteger","Number.isNaN","Number.isSafeInteger","Number.parseFloat","Number.parseInt","Symbol","Symbol.for","Symbol.keyFor","Math.abs","Math.acos","Math.acosh","Math.asin","Math.asinh","Math.atan","Math.atan2","Math.atanh","Math.cbrt","Math.ceil","Math.clz32","Math.cos","Math.cosh","Math.exp","Math.expm1","Math.floor","Math.fround","Math.hypot","Math.imul","Math.log","Math.log10","Math.log1p","Math.log2","Math.max","Math.min","Math.pow","Math.random","Math.round","Math.sign","Math.sin","Math.sinh","Math.sqrt","Math.tan","Math.tanh","Math.trunc","Date","Date.UTC","Date.now","Date.parse","String","String.fromCharCode","String.fromCodePoint","String.raw","RegExp","Map","Set","WeakMap","WeakSet","ArrayBuffer","ArrayBuffer.isView","DataView","Promise.all","Promise.race","Promise.resolve","Intl.Collator","Intl.Collator.supportedLocalesOf","Intl.DateTimeFormat","Intl.DateTimeFormat.supportedLocalesOf","Intl.NumberFormat","Intl.NumberFormat.supportedLocalesOf"].concat(ro,ro.map(e=>`${e}.from`),ro.map(e=>`${e}.of`),io.map(e=>`SIMD.${e}`),oo).forEach(e=>no[e]=!0);class ao extends Je{hasEffectsWhenAccessedAtPath(e){return e.length>0&&!this.isPureFunctionMember(e)&&!("Reflect"===this.name&&1===e.length)}hasEffectsWhenCalledAtPath(e){return!no[[this.name,...e].join(".")]}isPureFunctionMember(e){return no[[this.name,...e].join(".")]||e.length>=1&&no[[this.name,...e.slice(0,-1)].join(".")]||e.length>=2&&no[[this.name,...e.slice(0,-2)].join(".")]&&"prototype"===e[e.length-2]}}const ho=Object.assign(Object.create(null),{await:!0,break:!0,case:!0,catch:!0,class:!0,const:!0,continue:!0,debugger:!0,default:!0,delete:!0,do:!0,else:!0,enum:!0,eval:!0,export:!0,extends:!0,false:!0,finally:!0,for:!0,function:!0,if:!0,implements:!0,import:!0,in:!0,instanceof:!0,interface:!0,let:!0,new:!0,null:!0,package:!0,private:!0,protected:!0,public:!0,return:!0,static:!0,super:!0,switch:!0,this:!0,throw:!0,true:!0,try:!0,typeof:!0,undefined:!0,var:!0,void:!0,while:!0,with:!0,yield:!0}),uo={},co={exports:!0},lo={amd:{formatGlobals:co,forbiddenNames:ho},cjs:{forbiddenNames:ho,formatGlobals:{exports:!0,module:!0,[eo]:!0}},es:{formatGlobals:uo,forbiddenNames:ho},iife:{formatGlobals:co,forbiddenNames:ho},system:{forbiddenNames:Object.assign(Object.create(null),ho,co),formatGlobals:uo},umd:{formatGlobals:co,forbiddenNames:ho}};class po extends Je{constructor(e){super(e.getModuleName()),this.memberVariables=Object.create(null),this.containsExternalNamespace=!1,this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module;for(const e of this.context.getExports().concat(this.context.getReexports()))"*"===e[0]&&e.length>1&&(this.containsExternalNamespace=!0),this.memberVariables[e]=this.context.traceExport(e)}addReference(e){this.references.push(e),this.name=e.name}deoptimizePath(){for(const e in this.memberVariables)this.memberVariables[e].deoptimizePath(Ae)}include(){if(!this.included){this.containsExternalNamespace&&this.context.error({code:"NAMESPACE_CANNOT_CONTAIN_EXTERNAL",id:this.module.id,message:`Cannot create an explicit namespace object for module "${this.context.getModuleName()}" because it contains a reexported external namespace`},void 0),this.included=!0;for(const e of this.references)if(e.context.getModuleExecIndex()<=this.context.getModuleExecIndex()){this.referencedEarly=!0;break}if(this.context.preserveModules)for(const e of Object.keys(this.memberVariables))this.memberVariables[e].include();else for(const e of Object.keys(this.memberVariables))this.context.includeVariable(this.memberVariables[e])}}renderBlock(e){const t=e.compact?"":" ",n=e.compact?"":"\n",r=e.indent,i=Object.keys(this.memberVariables).map(n=>{const i=this.memberVariables[n];if(this.referencedEarly||i.isReassigned)return`${r}get ${n}${t}()${t}{${t}return ${i.getName()}${e.compact?"":";"}${t}}`;const s=ho[n]?`'${n}'`:n;return`${r}${s}: ${i.getName()}`}),s=this.getName(),o=e.freeze?"/*#__PURE__*/Object.freeze":"";let a=`${e.varOrConst} ${s} = ${e.namespaceToStringTag?`{${n}${i.join(`,${n}`)}${n}};`:`${o}({${n}${i.join(`,${n}`)}${n}});`}`;return e.namespaceToStringTag&&(a+=`${n}if${t}(typeof Symbol${t}!==${t}'undefined'${t}&&${t}Symbol.toStringTag)${n}`,a+=`${r}Object.defineProperty(${s},${t}Symbol.toStringTag,${t}{${t}value:${t}'Module'${t}});${n}`,a+=`else${n||" "}`,a+=`${r}Object.defineProperty(${s},${t}'toString',${t}{${t}value:${t}function${t}()${t}{${t}return${t}'[object Module]'${e.compact?";":""}${t}}${t}});${n}`,a+=`${o}(${s});`),"system"===e.format&&this.exportName&&(a+=`${n}exports('${this.exportName}',${t}${s});`),a}renderFirst(){return this.referencedEarly}}po.prototype.isNamespace=!0;const fo="Object.defineProperty(exports, '__esModule', { value: true });",mo="Object.defineProperty(exports,'__esModule',{value:true});";function go(e,t,n,r,i,s,o="return "){const a=i?"":" ",h=i?"":"\n";if(!n){let n;return e.some(e=>"default"===e.exported&&(n=e.local,!0)),n||t.some(e=>!!e.reexports&&e.reexports.some(t=>"default"===t.reexported&&(n=e.namedExportsMode?`${e.name}.${t.imported}`:e.name,!0))),`${o}${n};`}let u="";return t.forEach(({name:e,reexports:t})=>{t&&n&&t.forEach(t=>{"*"===t.reexported&&(!i&&u&&(u+="\n"),u+=`Object.keys(${e}).forEach(function${a}(key)${a}{${h}`+`${s}Object.defineProperty(exports,${a}key,${a}{${h}`+`${s}${s}enumerable:${a}true,${h}`+`${s}${s}get:${a}function${a}()${a}{${h}`+`${s}${s}${s}return ${e}[key];${h}`+`${s}${s}}${h}${s}});${h}});`)})}),t.forEach(({name:e,imports:t,reexports:o,isChunk:c,namedExportsMode:l})=>{o&&n&&o.forEach(n=>{if("default"!==n.imported||c)if("*"!==n.imported){u&&!i&&(u+="\n");const t="default"!==n.imported||l?`${e}.${n.imported}`:e;u+=n.needsLiveBinding?`Object.defineProperty(exports,${a}'${n.reexported}',${a}{${h}`+`${s}enumerable:${a}true,${h}`+`${s}get:${a}function${a}()${a}{${h}`+`${s}${s}return ${t};${h}${s}}${h}});`:`exports.${n.reexported}${a}=${a}${t};`}else"*"!==n.reexported&&(u&&!i&&(u+="\n"),u+=`exports.${n.reexported}${a}=${a}${e};`);else{const s=t&&t.some(e=>"default"!==e.imported)||o&&o.some(e=>"default"!==e.imported&&"*"!==e.imported),h=o&&o.some(e=>"default"===e.imported&&"default"===e.reexported);u&&!i&&(u+="\n"),u+=s||h?`exports.${n.reexported}${a}=${a}${e}${!1!==r?"__default":".default"};`:`exports.${n.reexported}${a}=${a}${e};`}})}),e.forEach(e=>{const t=`exports.${e.exported}`,n=e.local;t!==n&&(u&&!i&&(u+="\n"),u+=`${t}${a}=${a}${n};`)}),u}function yo(e,t,n){return e.map(({name:e,exportsNames:r,exportsDefault:i,namedExportsMode:s})=>{if(s)return i&&!1!==t.interop?r?t.compact?`${n} ${e}__default='default'in ${e}?${e}['default']:${e};`:`${n} ${e}__default = 'default' in ${e} ? ${e}['default'] : ${e};`:t.compact?`${e}=${e}&&${e}.hasOwnProperty('default')?${e}['default']:${e};`:`${e} = ${e} && ${e}.hasOwnProperty('default') ? ${e}['default'] : ${e};`:null}).filter(Boolean).join(t.compact?"":"\n")}const xo={assert:!0,buffer:!0,console:!0,constants:!0,domain:!0,events:!0,http:!0,https:!0,os:!0,path:!0,process:!0,punycode:!0,querystring:!0,stream:!0,string_decoder:!0,timers:!0,tty:!0,url:!0,util:!0,vm:!0,zlib:!0};function vo(e,t){const n=t.map(({id:e})=>e).filter(e=>e in xo);n.length&&e({code:"MISSING_NODE_BUILTINS",message:`Creating a browser bundle that depends on Node.js built-in ${1===n.length?`module ('${n[0]}')`:`modules (${n.slice(0,-1).map(e=>`'${e}'`).join(", ")} and '${n.slice(-1)}')`}. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins`,modules:n})}function Eo(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}function _o(e,t,n){let r=e.split("\n");const i=Math.max(0,t-3);let s=Math.min(t+2,r.length);for(r=r.slice(i,s);!/\S/.test(r[r.length-1]);)r.pop(),s-=1;const o=String(s).length;return r.map((e,r)=>{const s=i+r+1===t;let a=String(r+i+1);for(;a.length<o;)a=` ${a}`;if(s){const t=function(e){let t="";for(;e--;)t+=" ";return t}(o+2+Eo(e.slice(0,n)).length)+"^";return`${a}: ${Eo(e)}\n${t}`}return`${a}: ${Eo(e)}`}).join("\n")}function bo(e){const t=lt(e);return t.substr(0,t.length-dt(e).length)}function Ao(e){return"undefined"!=typeof process&&ht(e)?ft(process.cwd(),e):e}function So(e){return!("/"===e[0]||"."===e[1]&&("/"===e[2]||"."===e[2]&&"/"===e[3]))}function Io(e,t){throw e instanceof Error==!1&&(e=Object.assign(new Error(e.message),e)),t&&Object.assign(e,t),e}function wo(e,t,n,r){if(void 0!==t.line&&void 0!==t.column){const{line:n,column:i}=t;e.loc={file:r,line:n,column:i}}else{e.pos=t;const{line:i,column:s}=bt(n,t,{offsetLine:1});e.loc={file:r,line:i,column:s}}if(void 0===e.frame){const{line:t,column:r}=e.loc;e.frame=_o(n,t,r)}}var Po;function ko(e,t,n){return{code:Po.INVALID_CHUNK,message:`Cannot assign ${Ao(e)} to the "${t}" chunk as it is already in the "${n}" chunk.`}}function Co(e,t,n){return{code:Po.NAMESPACE_CONFLICT,message:`Conflicting namespaces: ${Ao(t.id)} re-exports '${e}' from both ${Ao(t.exportsAll[e])} and ${Ao(n.exportsAll[e])} (will be ignored)`,name:e,reexporter:t.id,sources:[t.exportsAll[e],n.exportsAll[e]]}}!function(e){e.ASSET_NOT_FINALISED="ASSET_NOT_FINALISED",e.ASSET_NOT_FOUND="ASSET_NOT_FOUND",e.ASSET_SOURCE_ALREADY_SET="ASSET_SOURCE_ALREADY_SET",e.ASSET_SOURCE_MISSING="ASSET_SOURCE_MISSING",e.BAD_LOADER="BAD_LOADER",e.CHUNK_NOT_FOUND="CHUNK_NOT_FOUND",e.CHUNK_NOT_GENERATED="CHUNK_NOT_GENERATED",e.INVALID_ASSET_NAME="INVALID_ASSET_NAME",e.INVALID_CHUNK="INVALID_CHUNK",e.INVALID_EXTERNAL_ID="INVALID_EXTERNAL_ID",e.INVALID_OPTION="INVALID_OPTION",e.INVALID_PLUGIN_HOOK="INVALID_PLUGIN_HOOK",e.INVALID_ROLLUP_PHASE="INVALID_ROLLUP_PHASE",e.NAMESPACE_CONFLICT="NAMESPACE_CONFLICT",e.UNRESOLVED_ENTRY="UNRESOLVED_ENTRY",e.UNRESOLVED_IMPORT="UNRESOLVED_IMPORT"}(Po||(Po={}));const No=/^[a-zA-Z$_][a-zA-Z0-9$_]*$/;function $o(e){return No.test(e)?`.${e}`:`['${e}']`}function Ro(e){return e.split(".").map($o).join("")}function Oo(e,t,n,r,i){const s=r?"":" ",o=e.split(".");n&&(o[0]=("function"==typeof n?n(o[0]):n[o[0]])||o[0]);const a=o.pop();let h=t,u=o.map(e=>(h+=$o(e),`${h}${s}=${s}${h}${s}||${s}{}`)).concat(`${h}${$o(a)}`).join(`,${s}`).concat(`${s}=${s}${i}`);return o.length>0&&(u=`(${u})`),u}function Mo(e){let t=e.length;for(;t--;){const n=e[t];if(n.exportsDefault||n.exportsNames)return e.slice(0,t+1)}return[]}const To=e=>`this${Ro(e)}`;const Do=(e,t,n,r,i)=>e?`${i}${r}${t} _starExcludes${n}=${n}{${n}${Array.from(e).join(`:${n}1,${n}`)}${e.size?`:${n}1`:""}${n}};`:"",Lo=(e,t,n,r)=>e.length?`${r}${n}var ${e.join(`,${t}`)};`:"";function Vo(e,t,n,r){return 0===e.length?"":1===e.length?`${n}${n}${n}exports('${e[0].name}',${t}${e[0].value});${r}${r}`:`${n}${n}${n}exports({${r}`+e.map(({name:e,value:r})=>`${n}${n}${n}${n}${e}:${t}${r}`).join(`,${r}`)+`${r}${n}${n}${n}});${r}${r}`}const Bo=(e,t,n,r)=>Vo(e.filter(e=>e.hoisted||e.uninitialized).map(e=>({name:e.exported,value:e.uninitialized?"void 0":e.local})),t,n,r),zo=(e,t,n,r)=>Vo(e.filter(e=>e.local===Zs).map(e=>({name:e.exported,value:Zs})),t,n,r);function jo(e,t){return e?`${t}${Ro(e)}`:"null"}var Wo={system:function(e,{dependencies:t,exports:n,indentString:r,intro:i,outro:s,usesTopLevelAwait:o,varOrConst:a},h){const u=h.compact?"":"\n",c=h.compact?"":" ",l=t.map(e=>`'${e.id}'`),p=[];let d;const f=[];t.forEach(({imports:e,reexports:i})=>{const s=[];if(e&&e.forEach(e=>{p.push(e.local),"*"===e.imported?s.push(`${e.local}${c}=${c}module;`):s.push(`${e.local}${c}=${c}module.${e.imported};`)}),i){let e=!1;i.length>1||1===i.length&&("*"===i[0].reexported||"*"===i[0].imported)?(i.forEach(i=>{"*"===i.reexported&&(d||(d=function({dependencies:e,exports:t}){const n=new Set(t.map(e=>e.exported));return n.has("default")||n.add("default"),e.forEach(({reexports:e})=>{e&&e.forEach(e=>{"*"===e.imported||n.has(e.reexported)||n.add(e.reexported)})}),n}({dependencies:t,exports:n})),e||(s.push(`${a} _setter${c}=${c}{};`),e=!0),s.push(`for${c}(var _$p${c}in${c}module)${c}{`),s.push(`${r}if${c}(!_starExcludes[_$p])${c}_setter[_$p]${c}=${c}module[_$p];`),s.push("}"))}),i.forEach(e=>{"*"===e.imported&&"*"!==e.reexported&&s.push(`exports('${e.reexported}',${c}module);`)}),i.forEach(t=>{"*"!==t.reexported&&"*"!==t.imported&&(e||(s.push(`${a} _setter${c}=${c}{};`),e=!0),s.push(`_setter.${t.reexported}${c}=${c}module.${t.imported};`))}),e&&s.push("exports(_setter);")):i.forEach(e=>{s.push(`exports('${e.reexported}',${c}module.${e.imported});`)})}f.push(s.join(`${u}${r}${r}${r}`))});let m=`System.register(${h.name?`'${h.name}',${c}`:""}[`+l.join(`,${c}`)+`],${c}function${c}(exports,${c}module)${c}{${u}${r}'use strict';`+Do(d,a,c,r,u)+Lo(p,c,r,u)+`${u}${r}return${c}{${f.length?`${u}${r}${r}setters:${c}[${f.map(e=>e?`function${c}(module)${c}{${u}${r}${r}${r}${e}${u}${r}${r}}`:`function${c}()${c}{}`).join(`,${c}`)}],`:""}${u}`;m+=`${r}${r}execute:${c}${o?`async${c}`:""}function${c}()${c}{${u}${u}`+Bo(n,c,r,u);const g=`${u}${u}`+zo(n,c,r,u)+`${r}${r}}${u}${r}}${h.compact?"":";"}${u}});`;return i&&e.prepend(i),s&&e.append(s),e.indent(`${r}${r}${r}`).append(g).prepend(m)},amd:function(e,{dependencies:t,dynamicImport:n,exports:r,hasExports:i,indentString:s,intro:o,isEntryModuleFacade:a,namedExportsMode:h,needsAmdModule:u,outro:c,varOrConst:l,warn:p},d){vo(p,t);const f=t.map(e=>`'${function(e){return"."===e[0]&&e.endsWith(".js")?e.slice(0,-3):e}(e.id)}'`),m=t.map(e=>e.name),g=d.compact?"":"\n",y=d.compact?"":" ";h&&i&&(m.unshift("exports"),f.unshift("'exports'")),n&&(m.unshift("require"),f.unshift("'require'")),u&&(m.unshift("module"),f.unshift("'module'"));const x=d.amd||{},v=(x.id?`'${x.id}',${y}`:"")+(f.length?`[${f.join(`,${y}`)}],${y}`:""),E=!1!==d.strict?`${y}'use strict';`:"",_=`${x.define||"define"}(${v}function${y}(${m.join(`,${y}`)})${y}{${E}${g}${g}`,b=yo(t,d,l);b&&e.prepend(b+g+g),o&&e.prepend(o);const A=go(r,t,h,d.interop,d.compact,s);return A&&e.append(g+g+A),h&&i&&a&&d.esModule&&e.append(`${g}${g}${d.compact?mo:fo}`),c&&e.append(c),e.indent(s).append(g+g+"});").prepend(_)},cjs:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,isEntryModuleFacade:o,namedExportsMode:a,outro:h,varOrConst:u},c){const l=c.compact?"":"\n",p=c.compact?"":" ";s=(!1===c.strict?s:`'use strict';${l}${l}${s}`)+(a&&r&&o&&c.esModule?`${c.compact?mo:fo}${l}${l}`:"");let d=!1;const f=!1!==c.interop;let m,g=!1;m="";for(const{id:e,namedExportsMode:n,isChunk:r,name:i,reexports:s,imports:o,exportsNames:a,exportsDefault:h}of t)s||o?(m+=c.compact&&g?",":`${m?`;${l}`:""}${u} `,g=!0,f&&!r&&h&&n?(d=!0,m+=a?`${i}${p}=${p}require('${e}')${c.compact?",":`;\n${u} `}${i}__default${p}=${p}${eo}(${i})`:`${i}${p}=${p}${eo}(require('${e}'))`):m+=`${i}${p}=${p}require('${e}')`):(m&&(m+=!c.compact||g?`;${l}`:","),g=!1,m+=`require('${e}')`);if(m&&(m+=";"),d){const e=c.compact?"e":"ex";s+=`function ${eo}${p}(${e})${p}{${p}return${p}`+`(${e}${p}&&${p}(typeof ${e}${p}===${p}'object')${p}&&${p}'default'${p}in ${e})${p}`+`?${p}${e}['default']${p}:${p}${e}${c.compact?"":"; "}}${l}${l}`}m&&(s+=m+l+l);const y=go(n,t,a,c.interop,c.compact,i,`module.exports${p}=${p}`);return e.prepend(s),y&&e.append(l+l+y),h&&e.append(h),e},es:function(e,{intro:t,outro:n,dependencies:r,exports:i},s){const o=s.compact?"":" ",a=s.compact?"":"\n",h=r.map(({id:e,reexports:t,imports:n,name:r})=>{if(!t&&!n)return`import${o}'${e}';`;let i="";if(n){const t=n.find(e=>"default"===e.imported),r=n.find(e=>"*"===e.imported);r&&(i+=`import${o}*${o}as ${r.local} from${o}'${e}';`,n.length>1&&(i+=a)),t&&1===n.length?i+=`import ${t.local} from${o}'${e}';`:(!r||n.length>1)&&(i+=`import ${t?`${t.local},${o}`:""}{${o}${n.filter(e=>e!==t&&e!==r).map(e=>e.imported===e.local?e.imported:`${e.imported} as ${e.local}`).join(`,${o}`)}${o}}${o}from${o}'${e}';`)}if(t){n&&(i+=a);const s=t.find(e=>"*"===e.reexported),h=t.find(e=>"*"===e.imported&&"*"!==e.reexported);if(s){if(i+=`export${o}*${o}from${o}'${e}';`,1===t.length)return i;i+=a}if(h){if(n&&n.some(e=>"*"===e.imported&&e.local===r)||(i+=`import${o}*${o}as ${r} from${o}'${e}';${a}`),i+=`export${o}{${o}${r===h.reexported?r:`${r} as ${h.reexported}`} };`,t.length===(s?2:1))return i;i+=a}i+=`export${o}{${o}${t.filter(e=>e!==s&&e!==h).map(e=>e.imported===e.reexported?e.imported:`${e.imported} as ${e.reexported}`).join(`,${o}`)}${o}}${o}from${o}'${e}';`}return i}).join(a);h&&(t+=h+a+a),t&&e.prepend(t);const u=[],c=[];return i.forEach(e=>{"default"===e.exported?u.push(`export default ${e.local};`):c.push(e.exported===e.local?e.local:`${e.local} as ${e.exported}`)}),c.length&&u.push(`export${o}{${o}${c.join(`,${o}`)}${o}};`),u.length&&e.append(a+a+u.join(a).trim()),n&&e.append(n),e.trim()},iife:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,namedExportsMode:o,outro:a,varOrConst:h,warn:u},c){const l=c.compact?"":" ",p=c.compact?"":"\n",{extend:d,name:f}=c,m=f&&-1!==f.indexOf("."),g=!d&&!m;var y;f&&g&&(it(y=f)||nt[y]||rt.test(y))&&Io({code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name (${f}) is not legal JS identifier. If you need this you can try --extend option`}),vo(u,t);const x=Mo(t),v=x.map(e=>e.globalName||"null"),E=x.map(e=>e.name);r&&!f&&Io({code:"INVALID_OPTION",message:'You must supply "output.name" for IIFE bundles.'}),o&&r&&(d?(v.unshift(`${To(f)}${l}=${l}${To(f)}${l}||${l}{}`),E.unshift("exports")):(v.unshift("{}"),E.unshift("exports")));const _=!1!==c.strict?`${i}'use strict';${p}${p}`:"";let b=`(function${l}(${E.join(`,${l}`)})${l}{${p}${_}`;!r||d&&o||(b=(g?`${h} ${f}`:To(f))+`${l}=${l}${b}`),m&&r&&(b=function(e,t,n,r){const i=e.split(".");n&&(i[0]=("function"==typeof n?n(i[0]):n[i[0]])||i[0]);const s=r?"":" ";i.pop();let o=t;return i.map(e=>(o+=$o(e),`${o}${s}=${s}${o}${s}||${s}{}${r?"":";"}`)).join(r?",":"\n")+(r&&i.length?";":"\n")}(f,"this",c.globals,c.compact)+b);let A=`${p}${p}}(${v.join(`,${l}`)}));`;!d&&o&&r&&(A=`${p}${p}${i}return exports;${A}`);const S=yo(t,c,h);S&&e.prepend(S+p+p),s&&e.prepend(s);const I=go(n,t,o,c.interop,c.compact,i);return I&&e.append(p+p+I),a&&e.append(a),e.indent(i).prepend(b).append(A)},umd:function(e,{dependencies:t,exports:n,hasExports:r,indentString:i,intro:s,namedExportsMode:o,outro:a,varOrConst:h,warn:u},c){const l=c.compact?"":" ",p=c.compact?"":"\n",d=c.compact?"f":"factory",f=c.compact?"g":"global";r&&!c.name&&Io({code:"INVALID_OPTION",message:'You must supply "output.name" for UMD bundles.'}),vo(u,t);const m=t.map(e=>`'${e.id}'`),g=t.map(e=>`require('${e.id}')`),y=Mo(t),x=y.map(e=>jo(e.globalName,f)),v=y.map(e=>e.name);o&&(r||!0===c.noConflict)&&(m.unshift("'exports'"),g.unshift("exports"),x.unshift(Oo(c.name,f,c.globals,c.compact,`${c.extend?`${jo(c.name,f)}${l}||${l}`:""}{}`)),v.unshift("exports"));const E=c.amd||{},_=(E.id?`'${E.id}',${l}`:"")+(m.length?`[${m.join(`,${l}`)}],${l}`:""),b=E.define||"define",A=!o&&r?`module.exports${l}=${l}`:"",S=!1!==c.strict?`${l}'use strict';${p}`:"";let I;if(!0===c.noConflict){const e=c.compact?"e":"exports";let t;!o&&r?t=`var ${e}${l}=${l}${Oo(c.name,f,c.globals,c.compact,`${d}(${x.join(`,${l}`)})`)};`:o&&(t=`var ${e}${l}=${l}${x.shift()};${p}`+`${i}${i}${d}(${[e].concat(x).join(`,${l}`)});`),I=`(function${l}()${l}{${p}`+`${i}${i}var current${l}=${l}${function(e,t,n){const r=e.split(".");let i=t;return r.map(e=>(i+=$o(e),i)).join(`${n}&&${n}`)}(c.name,f,l)};${p}`+`${i}${i}${t}${p}`+`${i}${i}${e}.noConflict${l}=${l}function${l}()${l}{${l}`+`${jo(c.name,f)}${l}=${l}current;${l}return ${e}${c.compact?"":"; "}};${p}`+`${i}}())`}else I=`${d}(${x.join(`,${l}`)})`,!o&&r&&(I=Oo(c.name,f,c.globals,c.compact,I));const w=r||!0===c.noConflict&&o||x.length>0,P=w?`this,${l}`:"",k=w?`(${f}${l}=${l}${f}${l}||${l}self,${l}`:"",C=w?")":"",N=`(function${l}(${w?`${f},${l}`:""}${d})${l}{${p}`+(w?`${i}typeof exports${l}===${l}'object'${l}&&${l}typeof module${l}!==${l}'undefined'${l}?`+`${l}${A}${d}(${g.join(`,${l}`)})${l}:${p}`:"")+`${i}typeof ${b}${l}===${l}'function'${l}&&${l}${b}.amd${l}?${l}${b}(${_}${d})${l}:${p}`+`${i}${k}${I}${C};${p}`+`}(${P}function${l}(${v.join(", ")})${l}{${S}${p}`,$=p+p+"}));",R=yo(t,c,h);R&&e.prepend(R+p+p),s&&e.prepend(s);const O=go(n,t,o,c.interop,c.compact,i);return O&&e.append(p+p+O),o&&r&&c.esModule&&e.append(p+p+(c.compact?mo:fo)),a&&e.append(a),e.trim().indent(i).append($).prepend(N)}};const Uo={ArrayPattern(e,t){for(const n of t.elements)n&&Uo[n.type](e,n)},AssignmentPattern(e,t){Uo[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const n of t.properties)"RestElement"===n.type?Uo.RestElement(e,n):Uo[n.value.type](e,n.value)},RestElement(e,t){Uo[t.argument.type](e,t.argument)}},Fo=function(e){const t=[];return Uo[e.type](t,e),t};class qo extends _t{addDeclaration(e,t,n=null,r=!1){return r?this.parent.addDeclaration(e,t,we,!0):super.addDeclaration(e,t,n,!1)}}class Go extends Vs{addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&e.type===ae||this.scope.addReturnExpression(we)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new qo(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e){this.included=!0;for(const t of this.body)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){this.body.length?fe(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class Ho extends Vs{createScope(e){this.scope=new qs(e,this.context)}deoptimizePath(e){1===e.length&&e[0]===_e&&this.scope.getReturnExpression().deoptimizePath(Ae)}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.scope.getReturnExpression():we}hasEffects(e){return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}hasEffectsWhenAssignedAtPath(e,t){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){if(e.length>0)return!0;for(const e of this.params)if(e.hasEffects(n))return!0;return this.body.hasEffects(n)}initialise(){this.included=!1;for(const e of this.params)e.declare("parameter",we);this.body instanceof Go?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(e){e.body.type===Q&&(this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope.hoistedBodyVarScope)),super.parseNode(e)}}function Ko(e){return 1===e.length?`exports('${e[0].safeExportName||e[0].exportName}', ${e[0].getName()});`:`exports({${e.map(e=>`${e.safeExportName||e.exportName}: ${e.getName()}`).join(", ")}});`}Ho.prototype.preventChildBlockScope=!0;const Yo={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>Math.pow(e,t),"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>e<t,"<<":(e,t)=>e<<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,in:()=>Ie,instanceof:()=>Ie,"|":(e,t)=>e|t};const Xo={};class Qo{constructor(e=Os.Map()){this.entityPaths=e}isTracked(e,t){return this.entityPaths.getIn([e,...t,Xo])}track(e,t){return new Qo(this.entityPaths.setIn([e,...t,Xo],!0))}}const Jo=new Qo;class Zo extends Fs{addDeclaration(e,t,n=null,r=!1){return r?this.parent.addDeclaration(e,t,n,!0):super.addDeclaration(e,t,n,!1)}}class ea extends Vs{createScope(e){this.scope=new Zo(e,this.context)}initialise(){this.included=!1,this.param&&this.param.declare("parameter",we)}parseNode(e){this.body=new this.context.nodeConstructors.BlockStatement(e.body,this,this.scope),super.parseNode(e)}}ea.prototype.preventChildBlockScope=!0;class ta{constructor(e){this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getLiteralValueAtPath(){return Ie}getReturnExpressionWhenCalledAtPath(e,t,n){return new ta(this.expressions.map(r=>r.getReturnExpressionWhenCalledAtPath(e,t,n)))}hasEffectsWhenAccessedAtPath(e,t){for(const n of this.expressions)if(n.hasEffectsWhenAccessedAtPath(e,t))return!0;return!1}hasEffectsWhenAssignedAtPath(e,t){for(const n of this.expressions)if(n.hasEffectsWhenAssignedAtPath(e,t))return!0;return!1}hasEffectsWhenCalledAtPath(e,t,n){for(const r of this.expressions)if(r.hasEffectsWhenCalledAtPath(e,t,n))return!0;return!1}include(){}}class na extends Vs{hasEffects(){return!1}initialise(){this.included=!1,this.context.addExport(this)}render(e,t,{start:n,end:r}=X){e.remove(n,r)}}na.prototype.needsBoundaries=!0;class ra extends Vs{bind(){null!==this.declaration&&this.declaration.bind()}hasEffects(e){return null!==this.declaration&&this.declaration.hasEffects(e)}initialise(){this.included=!1,this.context.addExport(this)}render(e,t,{start:n,end:r}=X){null===this.declaration?e.remove(n,r):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{start:n,end:r}))}}ra.prototype.needsBoundaries=!0;const ia=e=>{switch(e.format){case"cjs":{const t=e.compact?"":" ";return{interopLeft:`Promise.resolve({${t}default:${t}require(`,interopRight:`)${t}})`,left:"Promise.resolve(require(",right:"))"}}case"amd":{const t=e.compact?"":" ",n=e.compact?"c":"resolve",r=e.compact?"e":"reject";return{interopLeft:`new Promise(function${t}(${n},${t}${r})${t}{${t}require([`,interopRight:`],${t}function${t}(m)${t}{${t}${n}({${t}default:${t}m${t}})${t}},${t}${r})${t}})`,left:`new Promise(function${t}(${n},${t}${r})${t}{${t}require([`,right:`],${t}${n},${t}${r})${t}})`}}case"system":return{left:"module.import(",right:")"};case"es":return{left:`${e.dynamicImportFunction||"import"}(`,right:")"}}};class sa extends Vs{bind(){}hasEffects(){return!1}initialise(){this.included=!1,this.context.addImport(this)}render(e,t,{start:n,end:r}=X){e.remove(n,r)}}sa.prototype.needsBoundaries=!0;class oa extends Vs{getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.context.code.charCodeAt(this.start)||"bigint"==typeof this.value?Ie:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?we:Qe(this.members,e[0])}hasEffectsWhenAccessedAtPath(e){return null===this.value?e.length>0:e.length>1}hasEffectsWhenAssignedAtPath(e){return e.length>0}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Xe(this.members,e[0],this.included,t,n)}initialise(){this.included=!1,this.members=function(e){switch(typeof e){case"boolean":return He;case"number":return Ke;case"string":return Ye;default:return Object.create(null)}}(this.value)}render(e,t){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function aa(e){return e.computed?function(e){if(e instanceof oa)return String(e.value);return null}(e.property):e.property.name}class ha extends Vs{constructor(){super(...arguments),this.variable=null}addExportedVariables(){}bind(){if(this.bound)return;this.bound=!0;const e=function e(t){const n=t.propertyKey,r=t.object;if("string"==typeof n){if(r instanceof Qs)return[{key:r.name,pos:r.start},{key:n,pos:t.property.start}];if(r instanceof ha){const i=e(r);return i&&[...i,{key:n,pos:t.property.start}]}}return null}(this),t=e&&this.scope.findVariable(e[0].key);if(t&&t.isNamespace){const n=this.resolveNamespaceVariables(t,e.slice(1));n?"string"==typeof n?this.replacement=n:(n.isExternal&&n.module&&n.module.suggestName(e[0].key),this.variable=n,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let n=1;n<e.length;n++)t+="."+e[n].key;return t}(e),n)):super.bind()}else super.bind(),null===this.propertyKey&&this.analysePropertyKey()}deoptimizeCache(){for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}deoptimizePath(e){this.bound||this.bind(),0===e.length&&this.disallowNamespaceReassignment(),this.variable?this.variable.deoptimizePath(e):(null===this.propertyKey&&this.analysePropertyKey(),this.object.deoptimizePath([this.propertyKey,...e]))}getLiteralValueAtPath(e,t,n){return null!==this.variable?this.variable.getLiteralValueAtPath(e,t,n):(null===this.propertyKey&&this.analysePropertyKey(),this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([this.propertyKey,...e],t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return null!==this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n):(null===this.propertyKey&&this.analysePropertyKey(),this.expressionsToBeDeoptimized.push(n),this.object.getReturnExpressionWhenCalledAtPath([this.propertyKey,...e],t,n))}hasEffects(e){return this.property.hasEffects(e)||this.object.hasEffects(e)||this.context.propertyReadSideEffects&&this.object.hasEffectsWhenAccessedAtPath([this.propertyKey],e)}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null!==this.variable?this.variable.hasEffectsWhenAccessedAtPath(e,t):this.object.hasEffectsWhenAccessedAtPath([this.propertyKey,...e],t))}hasEffectsWhenAssignedAtPath(e,t){return null!==this.variable?this.variable.hasEffectsWhenAssignedAtPath(e,t):this.object.hasEffectsWhenAssignedAtPath([this.propertyKey,...e],t)}hasEffectsWhenCalledAtPath(e,t,n){return null!==this.variable?this.variable.hasEffectsWhenCalledAtPath(e,t,n):this.object.hasEffectsWhenCalledAtPath([this.propertyKey,...e],t,n)}include(e){this.included||(this.included=!0,null!==this.variable&&this.context.includeVariable(this.variable)),this.object.include(e),this.property.include(e)}initialise(){this.included=!1,this.propertyKey=aa(this),this.variable=null,this.bound=!1,this.replacement=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=X){const i=n===J&&r;if(this.variable||this.replacement){let t=this.variable?this.variable.getName():this.replacement;i&&(t="0, "+t),e.overwrite(this.start,this.end,t,{contentOnly:!0,storeName:!0})}else i&&e.appendRight(this.start,"0, "),super.render(e,t)}analysePropertyKey(){this.propertyKey=_e;const e=this.property.getLiteralValueAtPath(be,Jo,this);this.propertyKey=e===Ie?_e:String(e)}disallowNamespaceReassignment(){this.object instanceof Qs&&this.scope.findVariable(this.object.name).isNamespace&&this.context.error({code:"ILLEGAL_NAMESPACE_REASSIGNMENT",message:`Illegal reassignment to import '${this.object.name}'`},this.start)}resolveNamespaceVariables(e,t){if(0===t.length)return e;if(!e.isNamespace)return null;const n=t[0].key,r=e.isExternal?e.module.getVariableForExportName(n):e.context.traceExport(n);if(!r){const r=e.isExternal?e.module.id:e.context.fileName;return this.context.warn({code:"MISSING_EXPORT",exporter:Ao(r),importer:Ao(this.context.fileName),message:`'${n}' is not exported by '${Ao(r)}'`,missing:n,url:"https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-"},t[0].pos),"undefined"}return this.resolveNamespaceVariables(r,t.slice(1))}}const ua="ROLLUP_ASSET_URL_",ca="ROLLUP_CHUNK_URL_";class la extends Vs{bind(){super.bind(),this.argument.deoptimizePath([_e,_e])}}class pa extends Vs{hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e){this.included=!0;for(const t of this.body)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){this.body.length?fe(this.body,e,this.start,this.end,t):super.render(e,t)}}class da extends Vs{getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Ie:this.quasis[0].value.cooked}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class fa extends _t{constructor(e,t){super(e),this.context=t,this.variables.this=new vt("this",null,Pe,t)}addExportDefaultDeclaration(e,t,n){return this.variables.default=new Js(e,t,n)}addNamespaceMemberAccess(e,t){t instanceof ao&&(this.accessedOutsideVariables[t.name]=t)}deconflict(e){for(const t of this.children)t.deconflict(e)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables[e]||this.accessedOutsideVariables[e];if(t)return t;const n=this.context.traceVariable(e)||this.parent.findVariable(e);return n instanceof ao&&(this.accessedOutsideVariables[e]=n),n}}const ma={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Ie,typeof:e=>typeof e,void:()=>void 0,"~":e=>~e};function ga(e){return null!==e.renderBaseName&&null!==e.exportName&&e.isReassigned}const ya={ArrayExpression:class extends Vs{bind(){super.bind();for(const e of this.elements)null!==e&&e.deoptimizePath(Ae)}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?we:Qe(Ge,e[0])}hasEffectsWhenAccessedAtPath(e){return e.length>1}hasEffectsWhenCalledAtPath(e,t,n){return 1!==e.length||Xe(Ge,e[0],this.included,t,n)}},ArrayPattern:class extends Vs{addExportedVariables(e){for(const t of this.elements)null!==t&&t.addExportedVariables(e)}declare(e,t){for(const t of this.elements)null!==t&&t.declare(e,we)}deoptimizePath(e){if(0===e.length)for(const t of this.elements)null!==t&&t.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){if(e.length>0)return!0;for(const e of this.elements)if(null!==e&&e.hasEffectsWhenAssignedAtPath(be,t))return!0;return!1}},ArrowFunctionExpression:Ho,AssignmentExpression:class extends Vs{bind(){super.bind(),this.left.deoptimizePath(be),this.right.deoptimizePath(Ae)}hasEffects(e){return this.right.hasEffects(e)||this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(be,e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.right.hasEffectsWhenAccessedAtPath(e,t)}render(e,t){if(this.left.render(e,t),this.right.render(e,t),"system"===t.format)if(this.left.variable&&this.left.variable.exportName)e.prependLeft(e.original.indexOf("=",this.left.end)+1,` exports('${this.left.variable.exportName}',`),e.appendLeft(this.right.end,")");else if("addExportedVariables"in this.left){const t=[];this.left.addExportedVariables(t),t.length>0&&(e.prependRight(this.start,`function (v) {${Ko(t)} return v;} (`),e.appendLeft(this.end,")"))}}},AssignmentPattern:class extends Vs{addExportedVariables(e){this.left.addExportedVariables(e)}bind(){super.bind(),this.left.deoptimizePath(be),this.right.deoptimizePath(Ae)}declare(e,t){this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){return e.length>0||this.left.hasEffectsWhenAssignedAtPath(be,t)}render(e,t,{isShorthandProperty:n}=X){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}},AwaitExpression:class extends Vs{hasEffects(e){return super.hasEffects(e)||!e.ignoreReturnAwaitYield()}include(e){if(super.include(e),!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof Hs||e instanceof Ho)return}while(e=e.parent);this.context.usesTopLevelAwait=!0}}render(e,t){super.render(e,t)}},BinaryExpression:class extends Vs{getLiteralValueAtPath(e,t,n){if(e.length>0)return Ie;const r=this.left.getLiteralValueAtPath(be,t,n);if(r===Ie)return Ie;const i=this.right.getLiteralValueAtPath(be,t,n);if(i===Ie)return Ie;const s=Yo[this.operator];return s?s(r,i):Ie}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}},BlockStatement:Go,BreakStatement:class extends Vs{hasEffects(e){return super.hasEffects(e)||!e.ignoreBreakStatements()||null!==this.label&&!e.ignoreLabel(this.label.name)}},CallExpression:class extends Vs{bind(){super.bind(),this.callee instanceof Qs&&(this.scope.findVariable(this.callee.name).isNamespace&&this.context.error({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${this.callee.name}')`},this.start),"eval"===this.callee.name&&this.context.warn({code:"EVAL",message:"Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification",url:"https://rollupjs.org/guide/en#avoiding-eval"},this.start)),null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(be,Jo,this));for(const e of this.arguments)e.deoptimizePath(Ae)}deoptimizeCache(){if(this.returnExpression!==we){this.returnExpression=we;for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&!this.context.deoptimizationTracker.track(this,e)&&(null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(be,Jo,this)),this.returnExpression.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(be,t,this)),this.returnExpression===we||t.isTracked(this.returnExpression,e)?Ie:(this.expressionsToBeDeoptimized.push(n),this.returnExpression.getLiteralValueAtPath(e,t.track(this.returnExpression,e),n))}getReturnExpressionWhenCalledAtPath(e,t,n){return null===this.returnExpression&&(this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(be,t,this)),this.returnExpression===we||t.isTracked(this.returnExpression,e)?we:(this.expressionsToBeDeoptimized.push(n),this.returnExpression.getReturnExpressionWhenCalledAtPath(e,t.track(this.returnExpression,e),n))}hasEffects(e){for(const t of this.arguments)if(t.hasEffects(e))return!0;return(!this.context.annotations||!this.annotatedPure)&&(this.callee.hasEffects(e)||this.callee.hasEffectsWhenCalledAtPath(be,this.callOptions,e.getHasEffectsWhenCalledOptions()))}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&!t.hasReturnExpressionBeenAccessedAtPath(e,this)&&this.returnExpression.hasEffectsWhenAccessedAtPath(e,t.addAccessedReturnExpressionAtPath(e,this))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||!t.hasReturnExpressionBeenAssignedAtPath(e,this)&&this.returnExpression.hasEffectsWhenAssignedAtPath(e,t.addAssignedReturnExpressionAtPath(e,this))}hasEffectsWhenCalledAtPath(e,t,n){return!n.hasReturnExpressionBeenCalledAtPath(e,this)&&this.returnExpression.hasEffectsWhenCalledAtPath(e,t,n.addCalledReturnExpressionAtPath(e,this))}include(e){super.include(e),this.returnExpression.included||this.returnExpression.include(!1)}initialise(){this.included=!1,this.returnExpression=null,this.callOptions=Ee.create({args:this.arguments,callIdentifier:this,withNew:!1}),this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n}=X){super.render(e,t),n===ee&&this.callee.type===te&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}},CatchClause:ea,ClassBody:class extends Vs{hasEffectsWhenCalledAtPath(e,t,n){return e.length>0||null!==this.classConstructor&&this.classConstructor.hasEffectsWhenCalledAtPath(be,t,n)}initialise(){this.included=!1;for(const e of this.body)if("constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}},ClassDeclaration:zs,ClassExpression:class extends Bs{},ConditionalExpression:class extends Vs{bind(){super.bind(),this.isBranchResolutionAnalysed||this.analyseBranchResolution()}deoptimizeCache(){if(null!==this.usedBranch){this.usedBranch=null,this.unusedBranch.deoptimizePath(Ae);for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&(this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e)):this.usedBranch.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?Ie:(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getLiteralValueAtPath(e,t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?new ta([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,n),this.alternate.getReturnExpressionWhenCalledAtPath(e,t,n)]):(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getReturnExpressionWhenCalledAtPath(e,t,n))}hasEffects(e){return!!this.test.hasEffects(e)||(null===this.usedBranch?this.consequent.hasEffects(e)||this.alternate.hasEffects(e):this.usedBranch.hasEffects(e))}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null===this.usedBranch?this.consequent.hasEffectsWhenAccessedAtPath(e,t)||this.alternate.hasEffectsWhenAccessedAtPath(e,t):this.usedBranch.hasEffectsWhenAccessedAtPath(e,t))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||(null===this.usedBranch?this.consequent.hasEffectsWhenAssignedAtPath(e,t)||this.alternate.hasEffectsWhenAssignedAtPath(e,t):this.usedBranch.hasEffectsWhenAssignedAtPath(e,t))}hasEffectsWhenCalledAtPath(e,t,n){return null===this.usedBranch?this.consequent.hasEffectsWhenCalledAtPath(e,t,n)||this.alternate.hasEffectsWhenCalledAtPath(e,t,n):this.usedBranch.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0,e||null===this.usedBranch||this.test.shouldBeIncluded()?(this.test.include(e),this.consequent.include(e),this.alternate.include(e)):this.usedBranch.include(e)}initialise(){this.included=!1,this.isBranchResolutionAnalysed=!1,this.usedBranch=null,this.unusedBranch=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=X){this.test.included?super.render(e,t):(e.remove(this.start,this.usedBranch.start),e.remove(this.usedBranch.end,this.end),ce(this,e),this.usedBranch.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}))}analyseBranchResolution(){this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(be,Jo,this);e!==Ie&&(e?(this.usedBranch=this.consequent,this.unusedBranch=this.alternate):(this.usedBranch=this.alternate,this.unusedBranch=this.consequent))}},DoWhileStatement:class extends Vs{hasEffects(e){return this.test.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}},EmptyStatement:class extends Vs{hasEffects(){return!1}},ExportAllDeclaration:na,ExportDefaultDeclaration:Xs,ExportNamedDeclaration:ra,ExpressionStatement:class extends Vs{initialise(){this.included=!1,this.directive&&"use strict"!==this.directive&&this.parent.type===se&&this.context.warn({code:"MODULE_LEVEL_DIRECTIVE",message:`Module level directives cause errors when bundled, '${this.directive}' was ignored.`},this.start)}render(e,t){super.render(e,t),this.included&&this.insertSemicolon(e)}shouldBeIncluded(){return this.directive&&"use strict"!==this.directive?this.parent.type!==se:super.shouldBeIncluded()}},ForInStatement:class extends Vs{bind(){this.left.bind(),this.left.deoptimizePath(be),this.right.bind(),this.body.bind()}createScope(e){this.scope=new qo(e)}hasEffects(e){return this.left&&(this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(be,e))||this.right&&this.right.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}include(e){this.included=!0,this.left.includeWithAllDeclaredVariables(e),this.left.deoptimizePath(be),this.right.include(e),this.body.include(e)}render(e,t){this.left.render(e,t,le),this.right.render(e,t,le),this.body.render(e,t)}},ForOfStatement:class extends Vs{bind(){this.left.bind(),this.left.deoptimizePath(be),this.right.bind(),this.body.bind()}createScope(e){this.scope=new qo(e)}hasEffects(e){return this.left&&(this.left.hasEffects(e)||this.left.hasEffectsWhenAssignedAtPath(be,e))||this.right&&this.right.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}include(e){this.included=!0,this.left.includeWithAllDeclaredVariables(e),this.left.deoptimizePath(be),this.right.include(e),this.body.include(e)}render(e,t){this.left.render(e,t,le),this.right.render(e,t,le),this.body.render(e,t)}},ForStatement:class extends Vs{createScope(e){this.scope=new qo(e)}hasEffects(e){return this.init&&this.init.hasEffects(e)||this.test&&this.test.hasEffects(e)||this.update&&this.update.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}render(e,t){this.init&&this.init.render(e,t,le),this.test&&this.test.render(e,t,le),this.update&&this.update.render(e,t,le),this.body.render(e,t)}},FunctionDeclaration:Ks,FunctionExpression:class extends Hs{},Identifier:Qs,IfStatement:class extends Vs{bind(){super.bind(),this.isTestValueAnalysed||(this.testValue=Ie,this.isTestValueAnalysed=!0,this.testValue=this.test.getLiteralValueAtPath(be,Jo,this))}deoptimizeCache(){this.testValue=Ie}hasEffects(e){return!!this.test.hasEffects(e)||(this.testValue===Ie?this.consequent.hasEffects(e)||null!==this.alternate&&this.alternate.hasEffects(e):this.testValue?this.consequent.hasEffects(e):null!==this.alternate&&this.alternate.hasEffects(e))}include(e){if(this.included=!0,e)return this.test.include(!0),this.consequent.include(!0),void(null!==this.alternate&&this.alternate.include(!0));const t=this.testValue===Ie;(t||this.test.shouldBeIncluded())&&this.test.include(!1),(t||this.testValue)&&this.consequent.shouldBeIncluded()&&this.consequent.include(!1),null===this.alternate||!t&&this.testValue||!this.alternate.shouldBeIncluded()||this.alternate.include(!1)}initialise(){this.included=!1,this.isTestValueAnalysed=!1}render(e,t){if(this.test.included||(this.testValue?null!==this.alternate&&this.alternate.included:this.consequent.included))this.test.included?this.test.render(e,t):e.overwrite(this.test.start,this.test.end,this.testValue?"true":"false"),this.consequent.included?this.consequent.render(e,t):e.overwrite(this.consequent.start,this.consequent.end,";"),null!==this.alternate&&(this.alternate.included?this.alternate.render(e,t):e.remove(this.consequent.end,this.alternate.end));else{const n=this.testValue?this.consequent:this.alternate;e.remove(this.start,n.start),e.remove(n.end,this.end),ce(this,e),n.render(e,t)}}},Import:class extends Vs{include(){this.included=!0,this.context.includeDynamicImport(this)}initialise(){this.included=!1,this.resolutionNamespace=void 0,this.resolutionInterop=!1,this.context.addDynamicImport(this)}render(e,t){if(this.resolutionNamespace){const n=t.compact?"":" ",r=t.compact?"":";";return void e.overwrite(this.parent.start,this.parent.end,`Promise.resolve().then(function${n}()${n}{${n}return ${this.resolutionNamespace}${r}${n}})`)}const n=ia(t);if(n){const t=this.resolutionInterop&&n.interopLeft||n.left,r=pe(e.original,"(",this.parent.callee.end)+1;e.overwrite(this.parent.start,r,t);const i=this.resolutionInterop&&n.interopRight||n.right;e.overwrite(this.parent.end-1,this.parent.end,i)}}renderFinalResolution(e,t,n){this.included&&("amd"===n&&t.startsWith("'.")&&t.endsWith(".js'")&&(t=t.slice(0,-4)+"'"),e.overwrite(this.parent.arguments[0].start,this.parent.arguments[0].end,t))}setResolution(e,t){this.resolutionInterop=e,this.resolutionNamespace=t}},ImportDeclaration:sa,LabeledStatement:class extends Vs{hasEffects(e){return this.body.hasEffects(e.setIgnoreLabel(this.label.name).setIgnoreBreakStatements())}},Literal:oa,LogicalExpression:class extends Vs{bind(){super.bind(),this.isBranchResolutionAnalysed||this.analyseBranchResolution()}deoptimizeCache(){if(null!==this.usedBranch){this.usedBranch=null,this.unusedBranch.deoptimizePath(Ae);for(const e of this.expressionsToBeDeoptimized)e.deoptimizeCache()}}deoptimizePath(e){e.length>0&&(this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?(this.left.deoptimizePath(e),this.right.deoptimizePath(e)):this.usedBranch.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?Ie:(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getLiteralValueAtPath(e,t,n))}getReturnExpressionWhenCalledAtPath(e,t,n){return this.isBranchResolutionAnalysed||this.analyseBranchResolution(),null===this.usedBranch?new ta([this.left.getReturnExpressionWhenCalledAtPath(e,t,n),this.right.getReturnExpressionWhenCalledAtPath(e,t,n)]):(this.expressionsToBeDeoptimized.push(n),this.usedBranch.getReturnExpressionWhenCalledAtPath(e,t,n))}hasEffects(e){return null===this.usedBranch?this.left.hasEffects(e)||this.right.hasEffects(e):this.usedBranch.hasEffects(e)}hasEffectsWhenAccessedAtPath(e,t){return 0!==e.length&&(null===this.usedBranch?this.left.hasEffectsWhenAccessedAtPath(e,t)||this.right.hasEffectsWhenAccessedAtPath(e,t):this.usedBranch.hasEffectsWhenAccessedAtPath(e,t))}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||(null===this.usedBranch?this.left.hasEffectsWhenAssignedAtPath(e,t)||this.right.hasEffectsWhenAssignedAtPath(e,t):this.usedBranch.hasEffectsWhenAssignedAtPath(e,t))}hasEffectsWhenCalledAtPath(e,t,n){return null===this.usedBranch?this.left.hasEffectsWhenCalledAtPath(e,t,n)||this.right.hasEffectsWhenCalledAtPath(e,t,n):this.usedBranch.hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0,e||null===this.usedBranch||this.unusedBranch.shouldBeIncluded()?(this.left.include(e),this.right.include(e)):this.usedBranch.include(e)}initialise(){this.included=!1,this.isBranchResolutionAnalysed=!1,this.usedBranch=null,this.unusedBranch=null,this.expressionsToBeDeoptimized=[]}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=X){this.left.included&&this.right.included?super.render(e,t):(e.remove(this.start,this.usedBranch.start),e.remove(this.usedBranch.end,this.end),ce(this,e),this.usedBranch.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}))}analyseBranchResolution(){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(be,Jo,this);e!==Ie&&(("||"===this.operator?e:!e)?(this.usedBranch=this.left,this.unusedBranch=this.right):(this.usedBranch=this.right,this.unusedBranch=this.left))}},MemberExpression:ha,MetaProperty:class extends Vs{hasEffectsWhenAccessedAtPath(e){return e.length>1}initialise(){"import"===this.meta.name&&this.context.addImportMeta(this),this.included=!1}renderFinalMechanism(e,t,n,r){if(!this.included)return!1;const i=this.parent,s=i instanceof ha&&"string"==typeof i.propertyKey?i.propertyKey:null;if(s&&(s.startsWith(ua)||s.startsWith(ca))){let o,a=null,h=null;s.startsWith(ua)?(a=s.substr(ua.length),o=this.context.getAssetFileName(a)):(h=s.substr(ca.length),o=this.context.getChunkFileName(h));const u=ct(ft(pt(t),o));let c;return null!==a&&(c=r.hookFirstSync("resolveAssetUrl",[{assetFileName:o,chunkId:t,format:n,moduleId:this.context.module.id,relativeAssetPath:u}])),c||(c=r.hookFirstSync("resolveFileUrl",[{assetReferenceId:a,chunkId:t,chunkReferenceId:h,fileName:o,format:n,moduleId:this.context.module.id,relativePath:u}])),e.overwrite(i.start,i.end,c),!0}const o=r.hookFirstSync("resolveImportMeta",[s,{chunkId:t,format:n,moduleId:this.context.module.id}]);return"string"==typeof o&&(i instanceof ha?e.overwrite(i.start,i.end,o):e.overwrite(this.start,this.end,o),!0)}},MethodDefinition:class extends Vs{hasEffects(e){return this.key.hasEffects(e)}hasEffectsWhenCalledAtPath(e,t,n){return e.length>0||this.value.hasEffectsWhenCalledAtPath(be,t,n)}},NewExpression:class extends Vs{bind(){super.bind();for(const e of this.arguments)e.deoptimizePath(Ae)}hasEffects(e){for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotatedPure&&this.callee.hasEffectsWhenCalledAtPath(be,this.callOptions,e.getHasEffectsWhenCalledOptions())}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}initialise(){this.included=!1,this.callOptions=Ee.create({args:this.arguments,callIdentifier:this,withNew:!0})}},ObjectExpression:class extends Vs{bind(){super.bind(),null===this.propertyMap&&this.buildPropertyMap()}deoptimizeCache(){this.hasUnknownDeoptimizedProperty||this.deoptimizeAllProperties()}deoptimizePath(e){if(this.hasUnknownDeoptimizedProperty)return;if(null===this.propertyMap&&this.buildPropertyMap(),0===e.length)return void this.deoptimizeAllProperties();const t=e[0];if(1===e.length){if("string"!=typeof t)return void this.deoptimizeAllProperties();if(!this.deoptimizedPaths[t]&&(this.deoptimizedPaths[t]=!0,this.expressionsToBeDeoptimized[t]))for(const e of this.expressionsToBeDeoptimized[t])e.deoptimizeCache()}const n=1===e.length?Ae:e.slice(1);for(const e of"string"==typeof t?this.propertyMap[t]?this.propertyMap[t].propertiesRead:[]:this.properties)e.deoptimizePath(n)}getLiteralValueAtPath(e,t,n){null===this.propertyMap&&this.buildPropertyMap();const r=e[0];return 0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]?Ie:1!==e.length||this.propertyMap[r]||qe[r]||0!==this.unmatchablePropertiesRead.length?!this.propertyMap[r]||null===this.propertyMap[r].exactMatchRead||this.propertyMap[r].propertiesRead.length>1?Ie:(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n],this.propertyMap[r].exactMatchRead.getLiteralValueAtPath(e.slice(1),t,n)):void(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n])}getReturnExpressionWhenCalledAtPath(e,t,n){null===this.propertyMap&&this.buildPropertyMap();const r=e[0];return 0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]?we:1!==e.length||!qe[r]||0!==this.unmatchablePropertiesRead.length||this.propertyMap[r]&&null!==this.propertyMap[r].exactMatchRead?!this.propertyMap[r]||null===this.propertyMap[r].exactMatchRead||this.propertyMap[r].propertiesRead.length>1?we:(this.expressionsToBeDeoptimized[r]?this.expressionsToBeDeoptimized[r].push(n):this.expressionsToBeDeoptimized[r]=[n],this.propertyMap[r].exactMatchRead.getReturnExpressionWhenCalledAtPath(e.slice(1),t,n)):Qe(qe,r)}hasEffectsWhenAccessedAtPath(e,t){if(0===e.length)return!1;const n=e[0];if(e.length>1&&(this.hasUnknownDeoptimizedProperty||"string"!=typeof n||this.deoptimizedPaths[n]||!this.propertyMap[n]||null===this.propertyMap[n].exactMatchRead))return!0;const r=e.slice(1);for(const e of"string"!=typeof n?this.properties:this.propertyMap[n]?this.propertyMap[n].propertiesRead:[])if(e.hasEffectsWhenAccessedAtPath(r,t))return!0;return!1}hasEffectsWhenAssignedAtPath(e,t){if(0===e.length)return!1;const n=e[0];if(e.length>1&&(this.hasUnknownDeoptimizedProperty||"string"!=typeof n||this.deoptimizedPaths[n]||!this.propertyMap[n]||null===this.propertyMap[n].exactMatchRead))return!0;const r=e.slice(1);for(const i of"string"!=typeof n?this.properties:e.length>1?this.propertyMap[n].propertiesRead:this.propertyMap[n]?this.propertyMap[n].propertiesSet:[])if(i.hasEffectsWhenAssignedAtPath(r,t))return!0;return!1}hasEffectsWhenCalledAtPath(e,t,n){const r=e[0];if(0===e.length||this.hasUnknownDeoptimizedProperty||"string"!=typeof r||this.deoptimizedPaths[r]||(this.propertyMap[r]?!this.propertyMap[r].exactMatchRead:e.length>1||!qe[r]))return!0;const i=e.slice(1);for(const e of this.propertyMap[r]?this.propertyMap[r].propertiesRead:[])if(e.hasEffectsWhenCalledAtPath(i,t,n))return!0;return!(1!==e.length||!qe[r])&&Xe(qe,r,this.included,t,n)}initialise(){this.included=!1,this.hasUnknownDeoptimizedProperty=!1,this.deoptimizedPaths=Object.create(null),this.propertyMap=null,this.expressionsToBeDeoptimized=Object.create(null)}render(e,t,{renderedParentType:n}=X){super.render(e,t),n===ee&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}buildPropertyMap(){this.propertyMap=Object.create(null),this.unmatchablePropertiesRead=[],this.unmatchablePropertiesWrite=[];for(let e=this.properties.length-1;e>=0;e--){const t=this.properties[e];if(t instanceof la){this.unmatchablePropertiesRead.push(t);continue}const n="get"!==t.kind,r="set"!==t.kind;let i;if(t.computed){const e=t.key.getLiteralValueAtPath(be,Jo,this);if(e===Ie){r?this.unmatchablePropertiesRead.push(t):this.unmatchablePropertiesWrite.push(t);continue}i=String(e)}else i=t.key instanceof Qs?t.key.name:String(t.key.value);const s=this.propertyMap[i];s?(r&&null===s.exactMatchRead&&(s.exactMatchRead=t,s.propertiesRead.push(t,...this.unmatchablePropertiesRead)),n&&!r&&null===s.exactMatchWrite&&(s.exactMatchWrite=t,s.propertiesSet.push(t,...this.unmatchablePropertiesWrite))):this.propertyMap[i]={exactMatchRead:r?t:null,exactMatchWrite:n?t:null,propertiesRead:r?[t,...this.unmatchablePropertiesRead]:[],propertiesSet:n&&!r?[t,...this.unmatchablePropertiesWrite]:[]}}}deoptimizeAllProperties(){this.hasUnknownDeoptimizedProperty=!0;for(const e of this.properties)e.deoptimizePath(Ae);for(const e of Object.keys(this.expressionsToBeDeoptimized))for(const t of this.expressionsToBeDeoptimized[e])t.deoptimizeCache()}},ObjectPattern:class extends Vs{addExportedVariables(e){for(const t of this.properties)t.type===oe?t.value.addExportedVariables(e):t.argument.addExportedVariables(e)}declare(e,t){for(const n of this.properties)n.declare(e,t)}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsWhenAssignedAtPath(e,t){if(e.length>0)return!0;for(const e of this.properties)if(e.hasEffectsWhenAssignedAtPath(be,t))return!0;return!1}},Program:pa,Property:class extends Vs{constructor(){super(...arguments),this.declarationInit=null}bind(){super.bind(),"get"===this.kind&&null===this.returnExpression&&this.updateReturnExpression(),null!==this.declarationInit&&this.declarationInit.deoptimizePath([_e,_e])}declare(e,t){this.declarationInit=t,this.value.declare(e,we)}deoptimizeCache(){throw new Error("Unexpected deoptimization")}deoptimizePath(e){"get"===this.kind?e.length>0&&(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.deoptimizePath(e)):"set"!==this.kind&&this.value.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return"set"===this.kind?Ie:"get"===this.kind?(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.getLiteralValueAtPath(e,t,n)):this.value.getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n){return"set"===this.kind?we:"get"===this.kind?(null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression.getReturnExpressionWhenCalledAtPath(e,t,n)):this.value.getReturnExpressionWhenCalledAtPath(e,t,n)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenAccessedAtPath(e,t){return"get"===this.kind?this.value.hasEffectsWhenCalledAtPath(be,this.accessorCallOptions,t.getHasEffectsWhenCalledOptions())||e.length>0&&this.returnExpression.hasEffectsWhenAccessedAtPath(e,t):this.value.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return"get"===this.kind?0===e.length||this.returnExpression.hasEffectsWhenAssignedAtPath(e,t):"set"===this.kind?e.length>0||this.value.hasEffectsWhenCalledAtPath(be,this.accessorCallOptions,t.getHasEffectsWhenCalledOptions()):this.value.hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return"get"===this.kind?this.returnExpression.hasEffectsWhenCalledAtPath(e,t,n):this.value.hasEffectsWhenCalledAtPath(e,t,n)}initialise(){this.included=!1,this.returnExpression=null,this.accessorCallOptions=Ee.create({callIdentifier:this,withNew:!1})}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}updateReturnExpression(){this.returnExpression=we,this.returnExpression=this.value.getReturnExpressionWhenCalledAtPath(be,Jo,this)}},RestElement:class extends Vs{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e){this.argument.addExportedVariables(e)}bind(){super.bind(),null!==this.declarationInit&&this.declarationInit.deoptimizePath([_e,_e])}declare(e,t){this.argument.declare(e,we),this.declarationInit=t}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(be)}hasEffectsWhenAssignedAtPath(e,t){return e.length>0||this.argument.hasEffectsWhenAssignedAtPath(be,t)}},ReturnStatement:class extends Vs{hasEffects(e){return!e.ignoreReturnAwaitYield()||null!==this.argument&&this.argument.hasEffects(e)}initialise(){this.included=!1,this.scope.addReturnExpression(this.argument||we)}render(e,t){this.argument&&(this.argument.render(e,t),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends Vs{deoptimizePath(e){e.length>0&&this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,n)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.expressions[this.expressions.length-1].hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return 0===e.length||this.expressions[this.expressions.length-1].hasEffectsWhenAssignedAtPath(e,t)}hasEffectsWhenCalledAtPath(e,t,n){return this.expressions[this.expressions.length-1].hasEffectsWhenCalledAtPath(e,t,n)}include(e){this.included=!0;for(let t=0;t<this.expressions.length-1;t++){const n=this.expressions[t];(e||n.shouldBeIncluded())&&n.include(e)}this.expressions[this.expressions.length-1].include(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:r}=X){let i,s=0,o=0;for(const{node:a,start:h,end:u}of me(this.expressions,e,this.start,this.end))a.included?(o++,0===s&&(s=h),i=u,a===this.expressions[this.expressions.length-1]&&1===o?a.render(e,t,{isCalleeOfRenderedParent:n?r:this.parent.callee===this,renderedParentType:n||this.parent.type}):a.render(e,t)):ue(a,e,h,u);o>1&&n&&(e.prependRight(s,"("),e.appendLeft(i,")"))}},SpreadElement:la,SwitchCase:class extends Vs{include(e){this.included=!0,this.test&&this.test.include(e);for(const t of this.consequent)(e||t.shouldBeIncluded())&&t.include(e)}render(e,t){if(this.consequent.length){this.test&&this.test.render(e,t);const n=this.test?this.test.end:pe(e.original,"default",this.start)+7,r=pe(e.original,":",n)+1;fe(this.consequent,e,r,this.end,t)}else super.render(e,t)}},SwitchStatement:class extends Vs{createScope(e){this.scope=new qo(e)}hasEffects(e){return super.hasEffects(e.setIgnoreBreakStatements())}},TaggedTemplateExpression:class extends Vs{bind(){super.bind(),this.tag.type===ne&&(this.scope.findVariable(this.tag.name).isNamespace&&this.context.error({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${this.tag.name}')`},this.start),"eval"===this.tag.name&&this.context.warn({code:"EVAL",message:"Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification",url:"https://rollupjs.org/guide/en#avoiding-eval"},this.start))}hasEffects(e){return super.hasEffects(e)||this.tag.hasEffectsWhenCalledAtPath(be,this.callOptions,e.getHasEffectsWhenCalledOptions())}initialise(){this.included=!1,this.callOptions=Ee.create({callIdentifier:this,withNew:!1})}},TemplateElement:class extends Vs{hasEffects(e){return!1}},TemplateLiteral:da,ThisExpression:class extends Vs{bind(){super.bind(),this.variable=this.scope.findVariable("this")}hasEffectsWhenAccessedAtPath(e,t){return e.length>0&&this.variable.hasEffectsWhenAccessedAtPath(e,t)}hasEffectsWhenAssignedAtPath(e,t){return this.variable.hasEffectsWhenAssignedAtPath(e,t)}initialise(){this.included=!1,this.variable=null,this.alias=this.scope.findLexicalBoundary()instanceof fa?this.context.moduleContext:null,"undefined"===this.alias&&this.context.warn({code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:"https://rollupjs.org/guide/en#error-this-is-undefined"},this.start)}render(e,t){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends Vs{hasEffects(e){return!0}},TryStatement:Vs,UnaryExpression:class extends Vs{bind(){super.bind(),"delete"===this.operator&&this.argument.deoptimizePath(be)}getLiteralValueAtPath(e,t,n){if(e.length>0)return Ie;const r=this.argument.getLiteralValueAtPath(be,t,n);return r===Ie?Ie:ma[this.operator](r)}hasEffects(e){return this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsWhenAssignedAtPath(be,e)}hasEffectsWhenAccessedAtPath(e,t){return"void"===this.operator?e.length>0:e.length>1}},UnknownNode:class extends Vs{hasEffects(e){return!0}include(){super.include(!0)}},UpdateExpression:class extends Vs{bind(){super.bind(),this.argument.deoptimizePath(be),this.argument instanceof Qs&&(this.scope.findVariable(this.argument.name).isReassigned=!0)}hasEffects(e){return this.argument.hasEffects(e)||this.argument.hasEffectsWhenAssignedAtPath(be,e)}hasEffectsWhenAccessedAtPath(e,t){return e.length>1}render(e,t){this.argument.render(e,t);const n=this.argument.variable;if("system"===t.format&&n&&n.exportName){const t=n.getName();if(this.prefix)e.overwrite(this.start,this.end,`exports('${n.exportName}', ${this.operator}${t})`);else{let r;switch(this.operator){case"++":r=`${t} + 1`;break;case"--":r=`${t} - 1`}e.overwrite(this.start,this.end,`(exports('${n.exportName}', ${r}), ${t}${this.operator})`)}}}},VariableDeclaration:class extends Vs{deoptimizePath(e){for(const e of this.declarations)e.deoptimizePath(be)}hasEffectsWhenAssignedAtPath(e,t){return!1}include(e){this.included=!0;for(const t of this.declarations)(e||t.shouldBeIncluded())&&t.include(e)}includeWithAllDeclaredVariables(e){this.included=!0;for(const t of this.declarations)t.include(e)}initialise(){this.included=!1;for(const e of this.declarations)e.declareDeclarator(this.kind)}render(e,t,n=X){if(function(e){for(const t of e){if(!t.included)return!1;if(t.id.type===ne){if(t.id.variable.exportName)return!1}else{const e=[];if(t.id.addExportedVariables(e),e.length>0)return!1}}return!0}(this.declarations)){for(const n of this.declarations)n.render(e,t);n.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t,n)}renderDeclarationEnd(e,t,n,r,i,s,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),s&&(t+=";"),null!==n?(10!==e.original.charCodeAt(r-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(r--,13===e.original.charCodeAt(r)&&r--),r===n+1?e.overwrite(n,i,t):(e.overwrite(n,n+1,t),e.remove(r,i))):e.appendLeft(i,t),o.length>0&&e.appendLeft(i," "+Ko(o))}renderReplacedDeclarations(e,t,{start:n=this.start,end:r=this.end,isNoStatement:i}){const s=me(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let o,a,h=(a=/\n\s*$/.test(e.slice(this.start,s[0].start))?this.start+this.kind.length:s[0].start)-1;e.remove(this.start,h);let u,c,l=!1,p=!1,d="";const f=[];for(const{node:n,start:r,separator:i,contentEnd:m,end:g}of s)!n.included||n.id instanceof Qs&&ga(n.id.variable)&&null===n.init?e.remove(r,g):(u="",c="",n.id instanceof Qs&&ga(n.id.variable)?(p&&(d+=";"),l=!1):("system"===t.format&&null!==n.init&&(n.id.type!==ne?n.id.addExportedVariables(f):n.id.variable.exportName&&(e.prependLeft(e.original.indexOf("=",n.id.end)+1,` exports('${n.id.variable.safeExportName||n.id.variable.exportName}',`),c+=")")),l?d+=",":(p&&(d+=";"),u+=`${this.kind} `,l=!0)),a===h+1?e.overwrite(h,a,d+u):(e.overwrite(h,h+1,d),e.appendLeft(a,u)),n.render(e,t),o=m,a=g,p=!0,h=i,d=c);p?this.renderDeclarationEnd(e,d,h,o,a,!i,f):e.remove(n,r)}},VariableDeclarator:class extends Vs{declareDeclarator(e){this.id.declare(e,this.init||Pe)}deoptimizePath(e){this.id.deoptimizePath(e)}render(e,t){null===this.init||this.init.included?super.render(e,t):(e.remove(this.id.end,this.end),this.id.render(e,t))}},WhileStatement:class extends Vs{hasEffects(e){return this.test.hasEffects(e)||this.body.hasEffects(e.setIgnoreBreakStatements())}},YieldExpression:class extends Vs{bind(){super.bind(),null!==this.argument&&this.argument.deoptimizePath(Ae)}hasEffects(e){return!e.ignoreReturnAwaitYield()||null!==this.argument&&this.argument.hasEffects(e)}render(e,t){this.argument&&(this.argument.render(e,t),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}};function xa(e,t,n){n(e,t)}function va(e,t,n){}var Ea={};function _a(e,t,n=e.type){let r=t.commentNodes[t.commentIndex];for(;r&&e.start>=r.end;)ba(e,r),r=t.commentNodes[++t.commentIndex];r&&r.end<=e.end&&Ea[n](e,t,_a)}function ba(e,t){e.annotations?e.annotations.push(t):e.annotations=[t],"ExpressionStatement"===e.type&&(e=e.expression),"CallExpression"!==e.type&&"NewExpression"!==e.type||(e.annotatedPure=!0)}Ea.Program=Ea.BlockStatement=function(e,t,n){for(var r=0,i=e.body;r<i.length;r+=1){n(i[r],t,"Statement")}},Ea.Statement=xa,Ea.EmptyStatement=va,Ea.ExpressionStatement=Ea.ParenthesizedExpression=function(e,t,n){return n(e.expression,t,"Expression")},Ea.IfStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Statement"),e.alternate&&n(e.alternate,t,"Statement")},Ea.LabeledStatement=function(e,t,n){return n(e.body,t,"Statement")},Ea.BreakStatement=Ea.ContinueStatement=va,Ea.WithStatement=function(e,t,n){n(e.object,t,"Expression"),n(e.body,t,"Statement")},Ea.SwitchStatement=function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0,i=e.cases;r<i.length;r+=1){var s=i[r];s.test&&n(s.test,t,"Expression");for(var o=0,a=s.consequent;o<a.length;o+=1){n(a[o],t,"Statement")}}},Ea.SwitchCase=function(e,t,n){e.test&&n(e.test,t,"Expression");for(var r=0,i=e.consequent;r<i.length;r+=1){n(i[r],t,"Statement")}},Ea.ReturnStatement=Ea.YieldExpression=Ea.AwaitExpression=function(e,t,n){e.argument&&n(e.argument,t,"Expression")},Ea.ThrowStatement=Ea.SpreadElement=function(e,t,n){return n(e.argument,t,"Expression")},Ea.TryStatement=function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,"Statement")},Ea.CatchClause=function(e,t,n){e.param&&n(e.param,t,"Pattern"),n(e.body,t,"Statement")},Ea.WhileStatement=Ea.DoWhileStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.body,t,"Statement")},Ea.ForStatement=function(e,t,n){e.init&&n(e.init,t,"ForInit"),e.test&&n(e.test,t,"Expression"),e.update&&n(e.update,t,"Expression"),n(e.body,t,"Statement")},Ea.ForInStatement=Ea.ForOfStatement=function(e,t,n){n(e.left,t,"ForInit"),n(e.right,t,"Expression"),n(e.body,t,"Statement")},Ea.ForInit=function(e,t,n){"VariableDeclaration"===e.type?n(e,t):n(e,t,"Expression")},Ea.DebuggerStatement=va,Ea.FunctionDeclaration=function(e,t,n){return n(e,t,"Function")},Ea.VariableDeclaration=function(e,t,n){for(var r=0,i=e.declarations;r<i.length;r+=1){n(i[r],t)}},Ea.VariableDeclarator=function(e,t,n){n(e.id,t,"Pattern"),e.init&&n(e.init,t,"Expression")},Ea.Function=function(e,t,n){e.id&&n(e.id,t,"Pattern");for(var r=0,i=e.params;r<i.length;r+=1){n(i[r],t,"Pattern")}n(e.body,t,e.expression?"Expression":"Statement")},Ea.Pattern=function(e,t,n){"Identifier"===e.type?n(e,t,"VariablePattern"):"MemberExpression"===e.type?n(e,t,"MemberPattern"):n(e,t)},Ea.VariablePattern=va,Ea.MemberPattern=xa,Ea.RestElement=function(e,t,n){return n(e.argument,t,"Pattern")},Ea.ArrayPattern=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Pattern")}},Ea.ObjectPattern=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];"Property"===s.type?(s.computed&&n(s.key,t,"Expression"),n(s.value,t,"Pattern")):"RestElement"===s.type&&n(s.argument,t,"Pattern")}},Ea.Expression=xa,Ea.ThisExpression=Ea.Super=Ea.MetaProperty=va,Ea.ArrayExpression=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r+=1){var s=i[r];s&&n(s,t,"Expression")}},Ea.ObjectExpression=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r+=1){n(i[r],t)}},Ea.FunctionExpression=Ea.ArrowFunctionExpression=Ea.FunctionDeclaration,Ea.SequenceExpression=function(e,t,n){for(var r=0,i=e.expressions;r<i.length;r+=1){n(i[r],t,"Expression")}},Ea.TemplateLiteral=function(e,t,n){for(var r=0,i=e.quasis;r<i.length;r+=1){n(i[r],t)}for(var s=0,o=e.expressions;s<o.length;s+=1){n(o[s],t,"Expression")}},Ea.TemplateElement=va,Ea.UnaryExpression=Ea.UpdateExpression=function(e,t,n){n(e.argument,t,"Expression")},Ea.BinaryExpression=Ea.LogicalExpression=function(e,t,n){n(e.left,t,"Expression"),n(e.right,t,"Expression")},Ea.AssignmentExpression=Ea.AssignmentPattern=function(e,t,n){n(e.left,t,"Pattern"),n(e.right,t,"Expression")},Ea.ConditionalExpression=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Expression"),n(e.alternate,t,"Expression")},Ea.NewExpression=Ea.CallExpression=function(e,t,n){if(n(e.callee,t,"Expression"),e.arguments)for(var r=0,i=e.arguments;r<i.length;r+=1){n(i[r],t,"Expression")}},Ea.MemberExpression=function(e,t,n){n(e.object,t,"Expression"),e.computed&&n(e.property,t,"Expression")},Ea.ExportNamedDeclaration=Ea.ExportDefaultDeclaration=function(e,t,n){e.declaration&&n(e.declaration,t,"ExportNamedDeclaration"===e.type||e.declaration.id?"Statement":"Expression"),e.source&&n(e.source,t,"Expression")},Ea.ExportAllDeclaration=function(e,t,n){n(e.source,t,"Expression")},Ea.ImportDeclaration=function(e,t,n){for(var r=0,i=e.specifiers;r<i.length;r+=1){n(i[r],t)}n(e.source,t,"Expression")},Ea.ImportSpecifier=Ea.ImportDefaultSpecifier=Ea.ImportNamespaceSpecifier=Ea.Identifier=Ea.Literal=va,Ea.TaggedTemplateExpression=function(e,t,n){n(e.tag,t,"Expression"),n(e.quasi,t,"Expression")},Ea.ClassDeclaration=Ea.ClassExpression=function(e,t,n){return n(e,t,"Class")},Ea.Class=function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression"),n(e.body,t)},Ea.ClassBody=function(e,t,n){for(var r=0,i=e.body;r<i.length;r+=1){n(i[r],t)}},Ea.MethodDefinition=Ea.Property=function(e,t,n){e.computed&&n(e.key,t,"Expression"),n(e.value,t,"Expression")};const Aa=/[@#]__PURE__/,Sa=e=>Aa.test(e.text);let Ia="sourceMa";Ia+="ppingURL";const wa=new RegExp(`^#\\s+${Ia}=.+\\n?`),Pa=()=>{};let ka=()=>0,Ca=()=>0,Na=()=>0,$a={};const Ra=e=>1e3*e[0]+e[1]/1e6;function Oa(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function Ma(e,t=3){e=Oa(e,t),$a.hasOwnProperty(e)||($a[e]={memory:0,startMemory:void 0,startTime:void 0,time:0,totalMemory:0});const n=Na();$a[e].startTime=ka(),$a[e].startMemory=n}function Ta(e,t=3){if(e=Oa(e,t),$a.hasOwnProperty(e)){const t=Na();$a[e].time+=Ca($a[e].startTime),$a[e].totalMemory=Math.max($a[e].totalMemory,t),$a[e].memory+=t-$a[e].startMemory}}function Da(){const e={};return Object.keys($a).forEach(t=>{e[t]=[$a[t].time,$a[t].memory,$a[t].totalMemory]}),e}let La=Pa,Va=Pa;const Ba={load:!0,ongenerate:!0,onwrite:!0,resolveDynamicImport:!0,resolveId:!0,transform:!0,transformBundle:!0};function za(e,t){const n={};for(const r of Object.keys(e))if(!0===Ba[r]){let i=`plugin ${t}`;e.name&&(i+=` (${e.name})`),i+=` - ${r}`,n[r]=function(){La(i,4);const t=e[r].apply(this===n?e:this,arguments);return Va(i,4),t&&"function"==typeof t.then&&(La(`${i} (async)`,4),t.then(()=>Va(`${i} (async)`,4))),t}}else n[r]=e[r];return n}function ja(e){e.perf?($a={},"undefined"!=typeof process&&"function"==typeof process.hrtime?(ka=process.hrtime.bind(process),Ca=(e=>Ra(process.hrtime(e)))):"undefined"!=typeof performance&&"function"==typeof performance.now&&(ka=performance.now.bind(performance),Ca=(e=>performance.now()-e)),"undefined"!=typeof process&&"function"==typeof process.memoryUsage&&(Na=(()=>process.memoryUsage().heapUsed)),La=Ma,Va=Ta,e.plugins=e.plugins.map(za)):(La=Pa,Va=Pa)}const Wa={ecmaVersion:2019,preserveParens:!1,sourceType:"module"};function Ua(e,t,n,r){t.error({code:"MISSING_EXPORT",message:`'${e}' is not exported by ${Ao(n)}`,url:"https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-"},r)}const Fa={identifier:null,localName:Zs};class qa{constructor(e,t,n,r){this.chunkAlias=null,this.comments=[],this.dependencies=[],this.dynamicallyImportedBy=[],this.dynamicDependencies=[],this.dynamicImports=[],this.entryPointsHash=new Uint8Array(10),this.execIndex=1/0,this.exportAllModules=null,this.exportAllSources=[],this.exports=Object.create(null),this.exportsAll=Object.create(null),this.exportShimVariable=new to(this),this.facadeChunk=null,this.importDescriptions=Object.create(null),this.importMetas=[],this.imports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.manualChunkAlias=null,this.reexports=Object.create(null),this.sources=[],this.usesTopLevelAwait=!1,this.namespaceVariable=void 0,this.id=t,this.graph=e,this.excludeFromSourcemap=/\0/.test(t),this.context=e.getModuleContext(t),this.moduleSideEffects=n,this.isEntryPoint=r}basename(){const e=lt(this.id),t=dt(this.id);return st(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){if(void 0!==t){e.pos=t;let n=bt(this.code,t,{offsetLine:1});try{n=function(e,t){const n=e.filter(e=>e.mappings);for(;n.length>0;){const e=n.pop(),r=e.mappings[t.line-1];let i=!1;if(void 0!==r)for(const n of r)if(n[0]>=t.column){if(n.length<4)break;t={column:n[3],line:n[2]+1,name:e.names[n[4]],source:e.sources[n[1]]},i=!0;break}if(!i)throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,n)}catch(e){this.warn({code:"SOURCEMAP_ERROR",loc:{column:n.column,file:this.id,line:n.line},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:t},void 0)}e.loc={column:n.column,file:this.id,line:n.line},e.frame=_o(this.originalCode,n.line,n.column)}Io(e)}getAllExports(){const e=Object.assign(Object.create(null),this.exports,this.reexports);return this.exportAllModules.forEach(t=>{if(t.isExternal)e[`*${t.id}`]=!0;else for(const n of t.getAllExports())"default"!==n&&(e[n]=!0)}),Object.keys(e)}getDynamicImportExpressions(){return this.dynamicImports.map(({node:e})=>{const t=e.parent.arguments[0];if(t instanceof da){if(0===t.expressions.length&&1===t.quasis.length)return t.quasis[0].value.cooked}else{if(!(t instanceof oa))return t;if("string"==typeof t.value)return t.value}})}getExports(){return Object.keys(this.exports)}getOrCreateNamespace(){return this.namespaceVariable||(this.namespaceVariable=new po(this.astContext))}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set;for(const t in this.reexports)e.add(t);for(const t of this.exportAllModules)if(t instanceof gt)e.add(`*${t.id}`);else for(const n of t.getExports().concat(t.getReexports()))"default"!==n&&e.add(n);return this.transitiveReexports=Array.from(e)}getRenderedExports(){const e=[],t=[];for(const n in this.exports){const r=this.getVariableForExportName(n);(r&&r.included?e:t).push(n)}return{renderedExports:e,removedExports:t}}getTransitiveDependencies(){return this.dependencies.concat(this.getReexports().map(e=>this.getVariableForExportName(e).module))}getVariableForExportName(e,t){if("*"===e[0]){if(1===e.length)return this.getOrCreateNamespace();return this.graph.moduleById.get(e.slice(1)).getVariableForExportName("*")}const n=this.reexports[e];if(n){const e=n.module.getVariableForExportName(n.localName);return e||Ua(n.localName,this,n.module.id,n.start),e}const r=this.exports[e];if(r){if(r===Fa)return this.exportShimVariable;const e=r.localName;return this.traceVariable(e)||this.graph.scope.findVariable(e)}if("default"!==e)for(let t=0;t<this.exportAllModules.length;t+=1){const n=this.exportAllModules[t].getVariableForExportName(e,!0);if(n)return n}if(this.graph.shimMissingExports&&!t)return this.shimMissingExport(e),this.exportShimVariable}include(){this.ast.shouldBeIncluded()&&this.ast.include(!1)}includeAllExports(){this.isExecuted||(this.graph.needsTreeshakingPass=!0,yt(this));for(const e of this.getExports()){const t=this.getVariableForExportName(e);t.deoptimizePath(Ae),t.included||(t.include(),this.graph.needsTreeshakingPass=!0)}for(const e of this.getReexports()){const t=this.getVariableForExportName(e);t.isExternal?t.reexported=t.module.reexported=!0:t.included||(t.include(),t.deoptimizePath(Ae),this.graph.needsTreeshakingPass=!0)}}includeAllInBundle(){this.ast.include(!0)}isIncluded(){return this.ast.included||this.namespaceVariable&&this.namespaceVariable.included}linkDependencies(){for(const e of this.sources){const t=this.resolvedIds[e].id;if(t){const e=this.graph.moduleById.get(t);this.dependencies.push(e)}}for(const{resolution:e}of this.dynamicImports)(e instanceof qa||e instanceof gt)&&this.dynamicDependencies.push(e);this.addModulesToSpecifiers(this.importDescriptions),this.addModulesToSpecifiers(this.reexports),this.exportAllModules=this.exportAllSources.map(e=>{const t=this.resolvedIds[e].id;return this.graph.moduleById.get(t)})}render(e){const t=this.magicString.clone();return this.ast.render(t,e),this.usesTopLevelAwait=this.astContext.usesTopLevelAwait,t}setSource({ast:e,code:t,customTransformCache:n,moduleSideEffects:r,originalCode:i,originalSourcemap:s,resolvedIds:o,sourcemapChain:a,transformDependencies:h}){var u;this.code=t,this.originalCode=i,this.originalSourcemap=s,this.sourcemapChain=a,this.transformDependencies=h,this.customTransformCache=n,"boolean"==typeof r&&(this.moduleSideEffects=r),La("generate ast",3),this.esTreeAst=e||function(e,t,n){try{return t.parse(e.code,Object.assign({},Wa,n,{onComment:(t,n,r,i)=>e.comments.push({block:t,text:n,start:r,end:i})}))}catch(t){let n=t.message.replace(/ \(\d+:\d+\)$/,"");e.id.endsWith(".json")?n+=" (Note that you need rollup-plugin-json to import JSON files)":e.id.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),e.error({code:"PARSE_ERROR",message:n},t.pos)}}(this,this.graph.acornParser,this.graph.acornOptions),u=this.comments,_a(this.esTreeAst,{commentIndex:0,commentNodes:u.filter(Sa)}),Va("generate ast",3),this.resolvedIds=o||Object.create(null);const c=this.id;this.magicString=new H(t,{filename:this.excludeFromSourcemap?null:c,indentExclusionRanges:[]}),this.removeExistingSourceMap(),La("analyse ast",3),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),annotations:this.graph.treeshake&&this.graph.treeshakingOptions.annotations,code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:c,getAssetFileName:this.graph.pluginDriver.getAssetFileName,getChunkFileName:this.graph.moduleLoader.getChunkFileName.bind(this.graph.moduleLoader),getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeDynamicImport:this.includeDynamicImport.bind(this),includeVariable:this.includeVariable.bind(this),isCrossChunkImport:e=>e.module.chunk!==this.chunk,magicString:this.magicString,module:this,moduleContext:this.context,nodeConstructors:ya,preserveModules:this.graph.preserveModules,propertyReadSideEffects:!this.graph.treeshake||this.graph.treeshakingOptions.propertyReadSideEffects,traceExport:this.getVariableForExportName.bind(this),traceVariable:this.traceVariable.bind(this),treeshake:this.graph.treeshake,usesTopLevelAwait:!1,warn:this.warn.bind(this)},this.scope=new fa(this.graph.scope,this.astContext),this.ast=new pa(this.esTreeAst,{type:"Module",context:this.astContext},this.scope),Va("analyse ast",3)}toJSON(){return{ast:this.esTreeAst,code:this.code,customTransformCache:this.customTransformCache,dependencies:this.dependencies.map(e=>e.id),id:this.id,moduleSideEffects:this.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,transformAssets:this.transformAssets,transformDependencies:this.transformDependencies}}traceVariable(e){if(e in this.scope.variables)return this.scope.variables[e];if(e in this.importDescriptions){const t=this.importDescriptions[e],n=t.module;if(!n.isExternal&&"*"===t.name)return n.getOrCreateNamespace();const r=n.getVariableForExportName(t.name);return r||Ua(t.name,this,n.id,t.start),r}return null}warn(e,t){if(void 0!==t){e.pos=t;const{line:n,column:r}=bt(this.code,t,{offsetLine:1});e.loc={file:this.id,line:n,column:r},e.frame=_o(this.code,n,r)}e.id=this.id,this.graph.warn(e)}addDynamicImport(e){this.dynamicImports.push({node:e,resolution:void 0})}addExport(e){const t=e.source&&e.source.value;if(t)if(-1===this.sources.indexOf(t)&&this.sources.push(t),e.type===Z)this.exportAllSources.push(t);else for(const n of e.specifiers){const e=n.exported.name;(this.exports[e]||this.reexports[e])&&this.error({code:"DUPLICATE_EXPORT",message:`A module cannot have multiple exports with the same name ('${e}')`},n.start),this.reexports[e]={localName:n.local.name,module:null,source:t,start:n.start}}else if(e instanceof Xs)this.exports.default&&this.error({code:"DUPLICATE_EXPORT",message:"A module can only have one default export"},e.start),this.exports.default={identifier:e.variable.getAssignedVariableName(),localName:"default"};else if(e.declaration){const t=e.declaration;if(t.type===he)for(const e of t.declarations)for(const t of Fo(e.id))this.exports[t]={identifier:null,localName:t};else{const e=t.id.name;this.exports[e]={identifier:null,localName:e}}}else for(const t of e.specifiers){const e=t.local.name,n=t.exported.name;(this.exports[n]||this.reexports[n])&&this.error({code:"DUPLICATE_EXPORT",message:`A module cannot have multiple exports with the same name ('${n}')`},t.start),this.exports[n]={identifier:null,localName:e}}}addImport(e){const t=e.source.value;-1===this.sources.indexOf(t)&&this.sources.push(t);for(const n of e.specifiers){const e=n.local.name;this.importDescriptions[e]&&this.error({code:"DUPLICATE_IMPORT",message:`Duplicated import '${e}'`},n.start);const r=n.type===re,i=n.type===ie,s=r?"default":i?"*":n.imported.name;this.importDescriptions[e]={source:t,start:n.start,name:s,module:null}}}addImportMeta(e){this.importMetas.push(e)}addModulesToSpecifiers(e){for(const t of Object.keys(e)){const n=e[t],r=this.resolvedIds[n.source].id;n.module=this.graph.moduleById.get(r)}}includeDynamicImport(e){const t=this.dynamicImports.find(t=>t.node===e).resolution;t instanceof qa&&(t.dynamicallyImportedBy.push(this),t.includeAllExports())}includeVariable(e){const t=e.module;e.included||(e.include(),this.graph.needsTreeshakingPass=!0),t&&t!==this&&this.imports.add(e)}removeExistingSourceMap(){for(const e of this.comments)!e.block&&wa.test(e.text)&&this.magicString.remove(e.start,e.end)}shimMissingExport(e){this.exports[e]||(this.graph.warn({code:"SHIMMED_EXPORT",exporter:Ao(this.id),exportName:e,message:`Missing export "${e}" has been shimmed in module ${Ao(this.id)}.`}),this.exports[e]=Fa)}}class Ga{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,n){return{line:e,column:t,name:n,source:this}}}class Ha{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=[],n=[],r=[];for(const i of this.mappings){const s=[];for(const r of i){const i=this.sources[r[1]];if(!i)continue;const o=i.traceSegment(r[2],r[3],this.names[r[4]]);if(o){let i=e.lastIndexOf(o.source.filename);-1===i?(i=e.length,e.push(o.source.filename),t[i]=o.source.content):null==t[i]?t[i]=o.source.content:null!=o.source.content&&t[i]!==o.source.content&&Io({message:`Multiple conflicting contents for sourcemap source ${o.source.filename}`});const a=[r[0],i,o.line,o.column];if(o.name){let e=n.indexOf(o.name);-1===e&&(e=n.length,n.push(o.name)),a[4]=e}s.push(a)}}r.push(s)}return{sources:e,sourcesContent:t,names:n,mappings:r}}traceSegment(e,t,n){const r=this.mappings[e];if(!r)return null;let i=0,s=r.length-1;for(;i<=s;){const e=i+s>>1,o=r[e];if(o[0]===t){const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],this.names[o[4]]||n):null}o[0]>t?s=e-1:i=e+1}return null}}const Ka={amd:Qa,cjs:Qa,es:Xa,iife:Qa,system:Xa,umd:Qa};function Ya(e,t,n,r,i,s,o){const{forbiddenNames:a,formatGlobals:h}=lo[i];Object.assign(r,a),Object.assign(r,h),function(e,t){const n=Object.assign({},...t.map(e=>e.scope.accessedOutsideVariables));for(const t of Object.keys(n)){const r=n[t];r.included&&(e[t]=!0)}}(r,e),function(e,t){for(const n of t){const t=n.scope.variables;for(const n of Object.keys(t)){const r=t[n];r.included&&!(r.renderBaseName||r instanceof Js&&r.getOriginalVariable()!==r)&&r.setRenderNames(null,ve(r.name,e))}const r=n.getOrCreateNamespace();r.included&&r.setRenderNames(null,ve(r.name,e))}}(r,e),Ka[i](r,n,t,s,o);for(const t of e)t.scope.deconflict(a)}function Xa(e,t,n,r){for(const n of t){const t=n.module,i=n.name;let s;s=t instanceof gt&&("*"===i||"default"===i)?"default"===i&&r&&t.exportsNamespace?t.variableName+"__default":t.variableName:i,n.setRenderNames(null,ve(s,e))}}function Qa(e,t,n,r,i){for(const t of n)t.variableName=ve(t.variableName,e);for(const e of t){const t=e.module;if(t instanceof gt){const n=e.name;"default"===n&&r&&(t.exportsNamespace||t.exportsNames)?e.setRenderNames(null,t.variableName+"__default"):"*"===n||"default"===n?e.setRenderNames(null,t.variableName):e.setRenderNames(t.variableName,null)}else{const n=t.chunk;"default"===n.exportMode||i&&e.isNamespace?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,n.getVariableExportName(e))}}}const Ja=(e,t)=>e.execIndex>t.execIndex?1:-1;function Za(e){e.sort(Ja)}function eh(e,t,n){const r=[Ao(e)];let i=t;for(;i!==e&&(r.push(Ao(i)),i=n[i]););return r.push(r[0]),r.reverse(),r}function th(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),r=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===r.length)return null;if(n.length>=r.length)return"\t";const i=r.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(" ")}function nh(e,t,n){return So(e)||Io({code:"INVALID_PATTERN",message:`Invalid output pattern "${e}" for ${t}, cannot be an absolute or relative URL or path.`}),e.replace(/\[(\w+)\]/g,(e,r)=>{const i=n(r);return void 0===i&&Io({code:"INVALID_PATTERN_REPLACEMENT",message:`"${r}" is not a valid substitution name in output option ${t} pattern.`}),So(i)||Io({code:"INVALID_PATTERN_REPLACEMENT",message:`Invalid replacement "${i}" for "${r}" in ${t} pattern, must be a plain path name.`}),i})}function rh(e,t){if(e in t==!1)return e;const n=dt(e);e=e.substr(0,e.length-n.length);let r,i=1;for(;t[r=e+ ++i+n];);return r}function ih(e){return e.replace(/[\0?*]/g,"_")}function sh(e,t,n,r){let i;return"function"==typeof t?i=t(e.id):t&&(i=t[e.id]),i||(r?(n.warn({code:"MISSING_GLOBAL_NAME",guess:e.variableName,message:`No name was provided for external module '${e.id}' in output.globals – guessing '${e.variableName}'`,source:e.id}),e.variableName):void 0)}function oh(e){return!e.isEmpty||e.entryModules.length>0||null!==e.manualChunkAlias}class ah{constructor(e,t){this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.hasDynamicImport=!1,this.id=void 0,this.indentString=void 0,this.manualChunkAlias=null,this.usedModules=void 0,this.dependencies=void 0,this.dynamicDependencies=void 0,this.exportNames=Object.create(null),this.exports=new Set,this.imports=new Set,this.needsExportsShim=!1,this.renderedDeclarations=void 0,this.renderedHash=void 0,this.renderedModuleSources=void 0,this.renderedSource=null,this.renderedSourceLength=void 0,this.sortedExportNames=null,this.graph=e,this.orderedModules=t,this.execIndex=t.length>0?t[0].execIndex:1/0,this.isEmpty=!0;for(const e of t)this.isEmpty&&e.isIncluded()&&(this.isEmpty=!1),e.manualChunkAlias&&(this.manualChunkAlias=e.manualChunkAlias),e.chunk=this,(e.isEntryPoint||e.dynamicallyImportedBy.some(e=>-1===t.indexOf(e)))&&this.entryModules.push(e);const n=this.entryModules[0];this.variableName=n?st(lt(n.chunkAlias||n.manualChunkAlias||bo(n.id))):"__chunk_"+ ++e.curChunkIndex}generateEntryExportsOrMarkAsTainted(){const e=this.entryModules.map(e=>({map:this.getVariableExportNamesForModule(e),module:e}));for(const{map:t}of e)for(const e of t.keys())this.exports.add(e);e:for(const{map:t,module:n}of e){if(!this.graph.preserveModules){if(this.manualChunkAlias&&n.chunkAlias&&this.manualChunkAlias!==n.chunkAlias)continue e;for(const e of this.exports)if(!t.has(e))continue e}this.facadeModule=n;for(const[e,n]of t)for(const t of n)this.exportNames[t]=e;return}}generateId(e,t,n,r,i){this.id=rh(nh(e,t,e=>{switch(e){case"format":return"es"===r.format?"esm":r.format;case"hash":return this.computeContentHashWithDependencies(n,r);case"name":return this.getChunkName()}}),i)}generateIdPreserveModules(e,t){const n=ih(this.orderedModules[0].id);this.id=rh(ct(ht(this.orderedModules[0].id)?ft(e,n):"_virtual/"+lt(n)),t)}generateInternalExports(e){if(null!==this.facadeModule)return;const t="system"===e.format||"es"===e.format||e.compact;let n,r=0;if(this.exportNames=Object.create(null),this.sortedExportNames=null,t)for(const e of this.exports){do{49===(n=xe(++r)).charCodeAt(0)&&(n=xe(r+=9*Math.pow(64,n.length-1)))}while(ho[n]);this.exportNames[n]=e}else for(const e of this.exports){for(r=0,n=e.name;this.exportNames[n];)n=e.name+"$"+ ++r;this.exportNames[n]=e}}getChunkName(){return this.chunkName||(this.chunkName=this.computeChunkName())}getDynamicImportIds(){return this.dynamicDependencies.map(e=>e.id).filter(Boolean)}getExportNames(){return this.sortedExportNames||(this.sortedExportNames=Object.keys(this.exportNames).sort())}getImportIds(){return this.dependencies.map(e=>e.id)}getRenderedHash(){if(this.renderedHash)return this.renderedHash;if(!this.renderedSource)return"";const e=N();return e.update(this.renderedSource.toString()),e.update(this.getExportNames().map(e=>{const t=this.exportNames[e];return`${Ao(t.module.id).replace(/\\/g,"/")}:${t.name}:${e}`}).join(",")),this.renderedHash=e.digest("hex")}getRenderedSourceLength(){return void 0!==this.renderedSourceLength?this.renderedSourceLength:this.renderedSourceLength=this.renderedSource.length()}getVariableExportName(e){if(this.graph.preserveModules&&e instanceof po)return"*";for(const t of Object.keys(this.exportNames))if(this.exportNames[t]===e)return t}link(){const e=new Set,t=new Set;for(const n of this.orderedModules)this.addChunksFromDependencies(n.getTransitiveDependencies(),e),this.addChunksFromDependencies(n.dynamicDependencies,t),this.setUpModuleImports(n);this.dependencies=Array.from(e),this.dynamicDependencies=Array.from(t)}merge(e,t,n,r){if(null!==this.facadeModule||null!==e.facadeModule)throw new Error("Internal error: Code splitting chunk merges not supported for facades");for(const t of e.orderedModules)t.chunk=this,this.orderedModules.push(t);for(const t of e.imports)this.imports.has(t)||t.module.chunk===this||this.imports.add(t);for(const t of e.exports)this.exports.has(t)||this.exports.add(t);const i=this.exportNames;this.generateInternalExports(n);const s=(e,t)=>{if(e.imports)for(const n of e.imports)n.imported=this.getVariableExportName(t[n.imported]);if(e.reexports)for(const n of e.reexports)n.imported=this.getVariableExportName(t[n.imported])},o=(e,t)=>{t.imports&&(e.imports?e.imports=e.imports.concat(t.imports):e.imports=t.imports),t.reexports&&(e.reexports?e.reexports=e.reexports.concat(t.reexports):e.reexports=t.reexports),!e.exportsNames&&t.exportsNames&&(e.exportsNames=!0),!e.exportsDefault&&t.exportsDefault&&(e.exportsDefault=!0),e.name=this.variableName};for(const n of t){let t=void 0;for(let r=0;r<n.dependencies.length;r++){const a=n.dependencies[r];if(a!==e&&a!==this||!t)a===e?(n.dependencies[r]=this,s(t=n.renderedDeclarations.dependencies[r],e.exportNames)):a===this&&s(t=n.renderedDeclarations.dependencies[r],i);else{const h=n.renderedDeclarations.dependencies[r];s(h,a===e?e.exportNames:i),o(t,h),n.renderedDeclarations.dependencies.splice(r,1),n.dependencies.splice(r--,1)}}}this.preRender(n,r)}preRender(e,t){La("render modules",3);const n=new Y({separator:e.compact?"":"\n\n"});this.usedModules=[],this.indentString=e.compact?"":function(e,t){if(!0!==t.indent)return t.indent||"";for(let t=0;t<e.length;t++){const n=th(e[t].originalCode);if(null!==n)return n}return"\t"}(this.orderedModules,e);const r=e.compact?"":"\n",i=e.compact?"":" ",s={compact:e.compact,dynamicImportFunction:e.dynamicImportFunction,format:e.format,freeze:!1!==e.freeze,indent:this.indentString,namespaceToStringTag:!0===e.namespaceToStringTag,varOrConst:e.preferConst?"const":"var"};for(const{module:e}of this.imports){const t=e instanceof qa?e.chunk:e;-1===this.dependencies.indexOf(t)&&this.dependencies.push(t)}if(!this.graph.preserveModules&&null!==this.facadeModule)for(const e of this.dependencies)e instanceof ah&&this.inlineChunkDependencies(e,!0);for(let e=0;e<this.dependencies.length;e++){const t=this.dependencies[e];t instanceof ah&&t.isEmpty&&(this.dependencies.splice(e--,1),this.inlineChunkDependencies(t,!1))}Za(this.dependencies),this.setIdentifierRenderResolutions(e),this.prepareDynamicImports();let o="";this.renderedModules=Object.create(null),this.renderedModuleSources=[];for(let t=0;t<this.orderedModules.length;t++){const i=this.orderedModules[t],a=i.render(s);a.trim(),e.compact&&-1!==a.lastLine().indexOf("//")&&a.append("\n"),this.renderedModuleSources.push(a);const{renderedExports:h,removedExports:u}=i.getRenderedExports();this.renderedModules[i.id]={originalLength:i.originalCode.length,removedExports:u,renderedExports:h,renderedLength:a.length()};const c=i.getOrCreateNamespace();if((c.included||!a.isEmpty())&&(n.addSource(a),this.usedModules.push(i),c.included&&!this.graph.preserveModules)){const e=c.renderBlock(s);c.renderFirst()?o+=r+e:n.addSource(new H(e))}}o&&n.prepend(o+r+r),this.needsExportsShim&&n.prepend(`${r}${s.varOrConst} ${Zs}${i}=${i}void 0;${r}${r}`),e.compact?this.renderedSource=n:this.renderedSource=n.trim(),this.renderedSourceLength=void 0,this.renderedHash=void 0,0===this.getExportNames().length&&0===this.getImportIds().length&&this.isEmpty&&this.graph.warn({code:"EMPTY_BUNDLE",message:"Generated an empty bundle"}),this.setExternalRenderPaths(e,t),this.renderedDeclarations={dependencies:this.getChunkDependencyDeclarations(e),exports:"none"===this.exportMode?[]:this.getChunkExportDeclarations()},Va("render modules",3)}render(e,t,n){if(La("render format",3),!this.renderedSource)throw new Error("Internal error: Chunk render called before preRender");const r=Wo[e.format];r||Io({code:"INVALID_OPTION",message:`Invalid format: ${e.format} - valid options are ${Object.keys(Wo).join(", ")}.`}),e.dynamicImportFunction&&"es"!==e.format&&this.graph.warn({code:"INVALID_OPTION",message:'"output.dynamicImportFunction" is ignored for formats other than "esm".'});for(let e=0;e<this.dependencies.length;e++){const t=this.dependencies[e];if(t instanceof gt&&!t.renormalizeRenderPath)continue;const n=this.renderedDeclarations.dependencies[e],r=t instanceof gt?n.id:t.id;let i=this.id?ct(ft(pt(this.id),r)):r;i.startsWith("../")||(i="./"+i),t instanceof ah&&(n.namedExportsMode="default"!==t.exportMode),n.id=i}this.finaliseDynamicImports(e.format);const i=this.finaliseImportMetas(e),s=0!==this.renderedDeclarations.exports.length||this.renderedDeclarations.dependencies.some(e=>e.reexports&&0!==e.reexports.length),o=this.orderedModules.some(e=>e.usesTopLevelAwait);o&&"es"!==e.format&&"system"!==e.format&&Io({code:"INVALID_TLA_FORMAT",message:`Module format ${e.format} does not support top-level await. Use the "es" or "system" output formats rather.`});const a=r(this.renderedSource,{dependencies:this.renderedDeclarations.dependencies,dynamicImport:this.hasDynamicImport,exports:this.renderedDeclarations.exports,hasExports:s,indentString:this.indentString,intro:t.intro,isEntryModuleFacade:null!==this.facadeModule&&this.facadeModule.isEntryPoint,namedExportsMode:"default"!==this.exportMode,needsAmdModule:i,outro:t.outro,usesTopLevelAwait:o,varOrConst:e.preferConst?"const":"var",warn:this.graph.warn.bind(this.graph)},e);t.banner&&a.prepend(t.banner),t.footer&&a.append(t.footer);const h=a.toString();Va("render format",3);let u=null;const c=[];return function({graph:e,chunk:t,renderChunk:n,code:r,sourcemapChain:i,options:s}){const o=(e,t,n)=>{if(null==t)return e;"string"==typeof t&&(t={code:t,map:void 0});const r="string"==typeof t.map?JSON.parse(t.map):t.map;return r&&"string"==typeof r.mappings&&(r.mappings=M(r.mappings)),null!==r&&i.push(r||{missing:!0,plugin:n.name}),t.code};let a=!1,h=!0;return e.pluginDriver.hookReduceArg0("renderChunk",[r,n,s],o).then(n=>(h=!1,e.pluginDriver.hookReduceArg0("transformChunk",[n,s,t],o))).then(n=>(a=!0,e.pluginDriver.hookReduceArg0("transformBundle",[n,s,t],o))).catch(e=>{if(h)throw e;Io(e,{code:a?"BAD_BUNDLE_TRANSFORMER":"BAD_CHUNK_TRANSFORMER",message:`Error transforming ${(a?"bundle":"chunk")+(e.plugin?` with '${e.plugin}' plugin`:"")}: ${e.message}`,plugin:e.plugin})})}({chunk:this,code:h,graph:this.graph,options:e,renderChunk:n,sourcemapChain:c}).then(t=>{if(e.sourcemap){let t;if(La("sourcemap",3),t=e.file?mt(e.sourcemapFile||e.file):e.dir?mt(e.dir,this.id):mt(this.id),this.graph.pluginDriver.hasLoadersOrTransforms){const n=a.generateDecodedMap({});u=function(e,t,n,r,i,s){function o(t,n){return n.missing&&(e.graph.warn({code:"SOURCEMAP_BROKEN",message:`Sourcemap is likely to be incorrect: a plugin${n.plugin?` ('${n.plugin}')`:""} was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:n.plugin,url:"https://rollupjs.org/guide/en#warning-sourcemap-is-likely-to-be-incorrect"}),n={mappings:"",names:[]}),new Ha(n,[t])}const a=r.filter(e=>!e.excludeFromSourcemap).map(e=>{let t,n=e.sourcemapChain;const r=e.originalSourcemap;if(r){const i=r.sources,s=r.sourcesContent||[];if(null==i||i.length<=1&&null==i[0])t=new Ga(e.id,s[0]),n=[r].concat(n);else{const n=pt(e.id)||".",o=r.sourceRoot||".",a=i.map((e,t)=>new Ga(mt(n,o,e),s[t]));t=new Ha(r,a)}}else t=new Ga(e.id,e.originalCode);return t=n.reduce(o,t)});let h=new Ha(n,a);h=i.reduce(o,h);let{sources:u,sourcesContent:c,names:l,mappings:p}=h.traceMappings();if(t){const e=pt(t);u=u.map(t=>ft(e,t)),t=lt(t)}return new V({file:t,sources:u,sourcesContent:c=s?null:c,names:l,mappings:p})}(this,t,n,this.usedModules,c,e.sourcemapExcludeSources)}else u=a.generateMap({file:t,includeContent:!e.sourcemapExcludeSources});u.sources=u.sources.map(t=>ct(e.sourcemapPathTransform?e.sourcemapPathTransform(t):t)),Va("sourcemap",3)}return!0!==e.compact&&"\n"!==t[t.length-1]&&(t+="\n"),{code:t,map:u}})}turnIntoFacade(e){this.dependencies=[e.chunk],this.dynamicDependencies=[],this.facadeModule=e,e.facadeChunk=this;for(const t of e.getAllExports()){const n=e.getVariableForExportName(t);this.exports.add(n),this.exportNames[t]=n}}visitDependencies(e){const t=[this],n=new Set;for(const r of t)if(e(r),!(r instanceof gt))for(const e of r.dependencies.concat(r.dynamicDependencies))n.has(e)||(n.add(e),t.push(e))}visitStaticDependenciesUntilCondition(e){const t=new Set;return function n(r){if(!t.has(r)){if(t.add(r),r instanceof ah)for(const e of r.dependencies)if(n(e))return!0;return!0===e(r)}}(this)}addChunksFromDependencies(e,t){for(const n of e){if(n.chunk===this)continue;let e;if(n instanceof qa)e=n.chunk;else{if(!n.used&&!n.moduleSideEffects)continue;e=n}t.add(e)}}computeChunkName(){if(this.manualChunkAlias)return ih(this.manualChunkAlias);if(null!==this.facadeModule)return ih(this.facadeModule.chunkAlias||bo(this.facadeModule.id));for(const e of this.orderedModules)if(e.chunkAlias)return ih(e.chunkAlias);return"chunk"}computeContentHashWithDependencies(e,t){const n=N();return n.update([e.intro,e.outro,e.banner,e.footer].map(e=>e||"").join(":")),n.update(t.format),this.visitDependencies(e=>{e instanceof gt?n.update(":"+e.renderPath):n.update(e.getRenderedHash())}),n.digest("hex").substr(0,8)}finaliseDynamicImports(e){for(let t=0;t<this.orderedModules.length;t++){const n=this.orderedModules[t],r=this.renderedModuleSources[t];for(const{node:t,resolution:i}of n.dynamicImports)if(i)if(i instanceof qa){if(i.chunk!==this&&oh(i.chunk)){const n=i.facadeChunk||i.chunk;let s=ct(ft(pt(this.id),n.id));s.startsWith("../")||(s="./"+s),t.renderFinalResolution(r,`'${s}'`,e)}}else if(i instanceof gt){let n=i.id;i.renormalizeRenderPath&&((n=ct(ft(pt(this.id),i.renderPath))).startsWith("../")||(n="./"+n)),t.renderFinalResolution(r,`'${n}'`,e)}else t.renderFinalResolution(r,i,e)}}finaliseImportMetas(e){let t=!1;for(let n=0;n<this.orderedModules.length;n++){const r=this.orderedModules[n],i=this.renderedModuleSources[n];for(const n of r.importMetas)n.renderFinalMechanism(i,this.id,e.format,this.graph.pluginDriver)&&(t=!0)}return t}getChunkDependencyDeclarations(e){const t=new Map;for(let e of this.getExportNames()){let n,r,i=!1;if("*"===e[0])n=this.graph.moduleById.get(e.substr(1)),r=e="*";else{const t=this.exportNames[e],s=t.module;if(!s||s.chunk===this)continue;s instanceof qa?(n=s.chunk,r=s.chunk.getVariableExportName(t),i=t.isReassigned):(n=s,r=t.name,i=!0)}let s=t.get(n);s||t.set(n,s=[]),s.push({imported:r,reexported:e,needsLiveBinding:i})}const n=new Set,r=[];for(const i of this.dependencies){const s=[];for(const e of this.imports){const t=e instanceof Js?e.getOriginalVariable():e;if((e.module instanceof qa?e.module.chunk===i:e.module===i)&&!n.has(t)){n.add(t);const r=e.getName(),i=e.module instanceof gt?e.name:e.module.chunk.getVariableExportName(e);s.push({local:r,imported:i})}}const o=t.get(i);let a,h,u=!0;i instanceof gt?(a=i.exportsNames||i.exportsNamespace,h="default"in i.declarations):(a=!0,h=!1,u="default"!==i.exportMode);let c=void 0,l=void 0;i instanceof gt&&(c=i.renderPath,"umd"!==e.format&&"iife"!==e.format||(l=sh(i,e.globals,this.graph,a||h))),r.push({exportsDefault:h,exportsNames:a,globalName:l,id:c,imports:s.length>0?s:null,isChunk:!i.isExternal,name:i.variableName,namedExportsMode:u,reexports:o})}return r}getChunkExportDeclarations(){const e=[];for(const t of this.getExportNames()){if("*"===t[0])continue;const n=this.exportNames[t],r=n.module;if(r&&r.chunk!==this)continue;let i=!1,s=!1;if(n instanceof vt){n.init===Pe&&(s=!0);for(const e of n.declarations)if(e.parent instanceof Ks||e instanceof Xs&&e.declaration instanceof Ks){i=!0;break}}else n instanceof ao&&(i=!0);const o=n.getName();e.push({exported:"*"===t?o:t,hoisted:i,local:o,uninitialized:s})}return e}getVariableExportNamesForModule(e){const t=new Map;for(const n of e.getAllExports()){const r=e.getVariableForExportName(n);if(!r||!r.included&&!r.isExternal)continue;const i=t.get(r);i?i.push(n):t.set(r,[n]);const s=r.module;s&&s.chunk&&s.chunk!==this&&s.chunk.exports.add(r)}return t}inlineChunkDependencies(e,t){for(const n of e.dependencies)if(n instanceof gt)-1===this.dependencies.indexOf(n)&&this.dependencies.push(n);else{if(n===this||-1!==this.dependencies.indexOf(n))continue;n.isEmpty||this.dependencies.push(n),t&&this.inlineChunkDependencies(n,!0)}}prepareDynamicImports(){for(const e of this.orderedModules)for(const{node:t,resolution:n}of e.dynamicImports)if(n)if(n instanceof qa)if(n.chunk===this){const e=n.getOrCreateNamespace();t.setResolution(!1,e.getName())}else t.setResolution(!1);else t.setResolution(!1)}setExternalRenderPaths(e,t){for(const n of this.dependencies.concat(this.dynamicDependencies))n instanceof gt&&n.setRenderPath(e,t)}setIdentifierRenderResolutions(e){for(const t of this.getExportNames()){const n=this.exportNames[t];n&&(n instanceof to&&(this.needsExportsShim=!0),n.exportName=t,"es"===e.format||"system"===e.format||!n.isReassigned||n.isId||n instanceof Js&&n.hasId?n.setRenderNames(null,null):n.setRenderNames("exports",t))}const t=Object.create(null);this.needsExportsShim&&(t[Zs]=!0),Ya(this.orderedModules,this.dependencies,this.imports,t,e.format,!1!==e.interop,this.graph.preserveModules)}setUpModuleImports(e){for(const t of e.imports)t.module.chunk!==this&&(this.imports.add(t),t.module instanceof qa&&t.module.chunk.exports.add(t));if(e.getOrCreateNamespace().included)for(const t of Object.keys(e.reexports)){const n=e.reexports[t],r=n.module.getVariableForExportName(n.localName);r.module.chunk!==this&&(this.imports.add(r),r.module instanceof qa&&r.module.chunk.exports.add(r))}for(const{node:t,resolution:n}of e.dynamicImports)t.included&&(this.hasDynamicImport=!0,n instanceof qa&&n.chunk===this&&n.getOrCreateNamespace().include())}}var hh={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},uh="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",ch={5:uh,6:uh+" const class extends export import super"},lh=/^in(stanceof)?$/,ph="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",dh="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-���ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",fh=new RegExp("["+ph+"]"),mh=new RegExp("["+ph+dh+"]");ph=dh=null;var gh=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],yh=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function xh(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}}function vh(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&fh.test(String.fromCharCode(e)):!1!==t&&xh(e,gh)))}function Eh(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&mh.test(String.fromCharCode(e)):!1!==t&&(xh(e,gh)||xh(e,yh)))))}var _h=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function bh(e,t){return new _h(e,{beforeExpr:!0,binop:t})}var Ah={beforeExpr:!0},Sh={startsExpr:!0},Ih={};function wh(e,t){return void 0===t&&(t={}),t.keyword=e,Ih[e]=new _h(e,t)}var Ph={num:new _h("num",Sh),regexp:new _h("regexp",Sh),string:new _h("string",Sh),name:new _h("name",Sh),eof:new _h("eof"),bracketL:new _h("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new _h("]"),braceL:new _h("{",{beforeExpr:!0,startsExpr:!0}),braceR:new _h("}"),parenL:new _h("(",{beforeExpr:!0,startsExpr:!0}),parenR:new _h(")"),comma:new _h(",",Ah),semi:new _h(";",Ah),colon:new _h(":",Ah),dot:new _h("."),question:new _h("?",Ah),arrow:new _h("=>",Ah),template:new _h("template"),invalidTemplate:new _h("invalidTemplate"),ellipsis:new _h("...",Ah),backQuote:new _h("`",Sh),dollarBraceL:new _h("${",{beforeExpr:!0,startsExpr:!0}),eq:new _h("=",{beforeExpr:!0,isAssign:!0}),assign:new _h("_=",{beforeExpr:!0,isAssign:!0}),incDec:new _h("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new _h("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:bh("||",1),logicalAND:bh("&&",2),bitwiseOR:bh("|",3),bitwiseXOR:bh("^",4),bitwiseAND:bh("&",5),equality:bh("==/!=/===/!==",6),relational:bh("</>/<=/>=",7),bitShift:bh("<</>>/>>>",8),plusMin:new _h("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:bh("%",10),star:bh("*",10),slash:bh("/",10),starstar:new _h("**",{beforeExpr:!0}),_break:wh("break"),_case:wh("case",Ah),_catch:wh("catch"),_continue:wh("continue"),_debugger:wh("debugger"),_default:wh("default",Ah),_do:wh("do",{isLoop:!0,beforeExpr:!0}),_else:wh("else",Ah),_finally:wh("finally"),_for:wh("for",{isLoop:!0}),_function:wh("function",Sh),_if:wh("if"),_return:wh("return",Ah),_switch:wh("switch"),_throw:wh("throw",Ah),_try:wh("try"),_var:wh("var"),_const:wh("const"),_while:wh("while",{isLoop:!0}),_with:wh("with"),_new:wh("new",{beforeExpr:!0,startsExpr:!0}),_this:wh("this",Sh),_super:wh("super",Sh),_class:wh("class",Sh),_extends:wh("extends",Ah),_export:wh("export"),_import:wh("import"),_null:wh("null",Sh),_true:wh("true",Sh),_false:wh("false",Sh),_in:wh("in",{beforeExpr:!0,binop:7}),_instanceof:wh("instanceof",{beforeExpr:!0,binop:7}),_typeof:wh("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:wh("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:wh("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},kh=/\r\n?|\n|\u2028|\u2029/,Ch=new RegExp(kh.source,"g");function Nh(e,t){return 10===e||13===e||!t&&(8232===e||8233===e)}var $h=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Rh=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Oh=Object.prototype,Mh=Oh.hasOwnProperty,Th=Oh.toString;function Dh(e,t){return Mh.call(e,t)}var Lh=Array.isArray||function(e){return"[object Array]"===Th.call(e)};function Vh(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var Bh=function(e,t){this.line=e,this.column=t};Bh.prototype.offset=function(e){return new Bh(this.line,this.column+e)};var zh=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function jh(e,t){for(var n=1,r=0;;){Ch.lastIndex=r;var i=Ch.exec(e);if(!(i&&i.index<t))return new Bh(n,t-r);++n,r=i.index+i[0].length}}var Wh={ecmaVersion:9,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function Uh(e){var t={};for(var n in Wh)t[n]=e&&Dh(e,n)?e[n]:Wh[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),Lh(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return Lh(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,s,o,a){var h={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(h.loc=new zh(this,o,a)),e.ranges&&(h.range=[i,s]),t.push(h)}}(t,t.onComment)),t}var Fh=2,qh=1|Fh,Gh=4,Hh=8;function Kh(e,t){return Fh|(e?Gh:0)|(t?Hh:0)}var Yh=function(e,t,n){this.options=e=Uh(e),this.sourceFile=e.sourceFile,this.keywords=Vh(ch[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=hh[i]);i--);"module"===e.sourceType&&(r+=" await")}this.reservedWords=Vh(r);var s=(r?r+" ":"")+hh.strict;this.reservedWordsStrict=Vh(s),this.reservedWordsStrictBind=Vh(s+" "+hh.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(kh).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=Ph.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},Xh={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};Yh.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Xh.inFunction.get=function(){return(this.currentVarScope().flags&Fh)>0},Xh.inGenerator.get=function(){return(this.currentVarScope().flags&Hh)>0},Xh.inAsync.get=function(){return(this.currentVarScope().flags&Gh)>0},Xh.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},Xh.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Xh.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Yh.prototype.inNonArrowFunction=function(){return(this.currentThisScope().flags&Fh)>0},Yh.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},Yh.parse=function(e,t){return new this(t,e).parse()},Yh.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},Yh.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(Yh.prototype,Xh);var Qh=Yh.prototype,Jh=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/;function Zh(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Qh.strictDirective=function(e){for(;;){Rh.lastIndex=e,e+=Rh.exec(this.input)[0].length;var t=Jh.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2]))return!0;e+=t[0].length,Rh.lastIndex=e,e+=Rh.exec(this.input)[0].length,";"===this.input[e]&&e++}},Qh.eat=function(e){return this.type===e&&(this.next(),!0)},Qh.isContextual=function(e){return this.type===Ph.name&&this.value===e&&!this.containsEsc},Qh.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Qh.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Qh.canInsertSemicolon=function(){return this.type===Ph.eof||this.type===Ph.braceR||kh.test(this.input.slice(this.lastTokEnd,this.start))},Qh.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Qh.semicolon=function(){this.eat(Ph.semi)||this.insertSemicolon()||this.unexpected()},Qh.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Qh.expect=function(e){this.eat(e)||this.unexpected()},Qh.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},Qh.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},Qh.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},Qh.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Qh.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var eu=Yh.prototype;eu.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==Ph.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var s=i[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var tu={kind:"loop"},nu={kind:"switch"};eu.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Rh.lastIndex=this.pos;var t=Rh.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r)return!0;if(e)return!1;if(123===r)return!0;if(vh(r,!0)){for(var i=n+1;Eh(this.input.charCodeAt(i),!0);)++i;var s=this.input.slice(n,i);if(!lh.test(s))return!0}return!1},eu.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Rh.lastIndex=this.pos;var e=Rh.exec(this.input),t=this.pos+e[0].length;return!(kh.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!==this.input.length&&Eh(this.input.charAt(t+8)))},eu.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=Ph._var,r="let"),i){case Ph._break:case Ph._continue:return this.parseBreakContinueStatement(s,i.keyword);case Ph._debugger:return this.parseDebuggerStatement(s);case Ph._do:return this.parseDoStatement(s);case Ph._for:return this.parseForStatement(s);case Ph._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case Ph._class:return e&&this.unexpected(),this.parseClass(s,!0);case Ph._if:return this.parseIfStatement(s);case Ph._return:return this.parseReturnStatement(s);case Ph._switch:return this.parseSwitchStatement(s);case Ph._throw:return this.parseThrowStatement(s);case Ph._try:return this.parseTryStatement(s);case Ph._const:case Ph._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case Ph._while:return this.parseWhileStatement(s);case Ph._with:return this.parseWithStatement(s);case Ph.braceL:return this.parseBlock(!0,s);case Ph.semi:return this.parseEmptyStatement(s);case Ph._export:case Ph._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===Ph._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var o=this.value,a=this.parseExpression();return i===Ph.name&&"Identifier"===a.type&&this.eat(Ph.colon)?this.parseLabeledStatement(s,o,a,e):this.parseExpressionStatement(s,a)}},eu.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(Ph.semi)||this.insertSemicolon()?e.label=null:this.type!==Ph.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},eu.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},eu.parseDoStatement=function(e){return this.next(),this.labels.push(tu),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(Ph._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(Ph.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},eu.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(tu),this.enterScope(0),this.expect(Ph.parenL),this.type===Ph.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===Ph._var||this.type===Ph._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),!(this.type===Ph._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==r.declarations.length||"var"!==i&&r.declarations[0].init?(t>-1&&this.unexpected(t),this.parseFor(e,r)):(this.options.ecmaVersion>=9&&(this.type===Ph._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r))}var s=new Zh,o=this.parseExpression(!0,s);return this.type===Ph._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===Ph._in?t>-1&&this.unexpected(t):e.await=t>-1),this.toAssignable(o,!1,s),this.checkLVal(o),this.parseForIn(e,o)):(this.checkExpressionErrors(s,!0),t>-1&&this.unexpected(t),this.parseFor(e,o))},eu.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,iu|(n?0:su),!1,t)},eu.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(Ph._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},eu.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(Ph.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},eu.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(Ph.braceL),this.labels.push(nu),this.enterScope(0);for(var n=!1;this.type!==Ph.braceR;)if(this.type===Ph._case||this.type===Ph._default){var r=this.type===Ph._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(Ph.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},eu.parseThrowStatement=function(e){return this.next(),kh.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ru=[];eu.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===Ph._catch){var t=this.startNode();if(this.next(),this.eat(Ph.parenL)){t.param=this.parseBindingAtom();var n="Identifier"===t.param.type;this.enterScope(n?32:0),this.checkLVal(t.param,n?4:2),this.expect(Ph.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(Ph._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},eu.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},eu.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(tu),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},eu.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},eu.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},eu.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i<s.length;i+=1){s[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var o=this.type.isLoop?"loop":this.type===Ph._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var h=this.labels[a];if(h.statementStart!==e.start)break;h.statementStart=this.start,h.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},eu.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},eu.parseBlock=function(e,t){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(Ph.braceL),e&&this.enterScope(0);!this.eat(Ph.braceR);){var n=this.parseStatement(null);t.body.push(n)}return e&&this.exitScope(),this.finishNode(t,"BlockStatement")},eu.parseFor=function(e,t){return e.init=t,this.expect(Ph.semi),e.test=this.type===Ph.semi?null:this.parseExpression(),this.expect(Ph.semi),e.update=this.type===Ph.parenR?null:this.parseExpression(),this.expect(Ph.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},eu.parseForIn=function(e,t){var n=this.type===Ph._in?"ForInStatement":"ForOfStatement";return this.next(),"ForInStatement"===n&&("AssignmentPattern"===t.type||"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(this.strict||"Identifier"!==t.declarations[0].id.type))&&this.raise(t.start,"Invalid assignment in for-in loop head"),e.left=t,e.right="ForInStatement"===n?this.parseExpression():this.parseMaybeAssign(),this.expect(Ph.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n)},eu.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(Ph.eq)?r.init=this.parseMaybeAssign(t):"const"!==n||this.type===Ph._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===r.id.type||t&&(this.type===Ph._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(Ph.comma))break}return e},eu.parseVarId=function(e,t){"const"!==t&&"let"!==t||!this.isContextual("let")||this.raiseRecoverable(this.start,"let is disallowed as a lexically bound name"),e.id=this.parseBindingAtom(),this.checkLVal(e.id,"var"===t?1:2,!1)};var iu=1,su=2;eu.parseFunction=function(e,t,n,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===Ph.star&&t&su&&this.unexpected(),e.generator=this.eat(Ph.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&iu&&(e.id=4&t&&this.type!==Ph.name?null:this.parseIdent(),!e.id||t&su||this.checkLVal(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Kh(e.async,e.generator)),t&iu||(e.id=this.type===Ph.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,t&iu?"FunctionDeclaration":"FunctionExpression")},eu.parseFunctionParams=function(e){this.expect(Ph.parenL),e.params=this.parseBindingList(Ph.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},eu.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),i=!1;for(r.body=[],this.expect(Ph.braceL);!this.eat(Ph.braceR);){var s=this.parseClassElement(null!==e.superClass);s&&(r.body.push(s),"MethodDefinition"===s.type&&"constructor"===s.kind&&(i&&this.raise(s.start,"Duplicate constructor in the same class"),i=!0))}return e.body=this.finishNode(r,"ClassBody"),this.strict=n,this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},eu.parseClassElement=function(e){var t=this;if(this.eat(Ph.semi))return null;var n=this.startNode(),r=function(e,r){void 0===r&&(r=!1);var i=t.start,s=t.startLoc;return!!t.eatContextual(e)&&(!(t.type===Ph.parenL||r&&t.canInsertSemicolon())||(n.key&&t.unexpected(),n.computed=!1,n.key=t.startNodeAt(i,s),n.key.name=e,t.finishNode(n.key,"Identifier"),!1))};n.kind="method",n.static=r("static");var i=this.eat(Ph.star),s=!1;i||(this.options.ecmaVersion>=8&&r("async",!0)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(Ph.star)):r("get")?n.kind="get":r("set")&&(n.kind="set")),n.key||this.parsePropertyName(n);var o=n.key,a=!1;return n.computed||n.static||!("Identifier"===o.type&&"constructor"===o.name||"Literal"===o.type&&"constructor"===o.value)?n.static&&"Identifier"===o.type&&"prototype"===o.name&&this.raise(o.start,"Classes may not have a static property named prototype"):("method"!==n.kind&&this.raise(o.start,"Constructor can't have get/set modifier"),i&&this.raise(o.start,"Constructor can't be a generator"),s&&this.raise(o.start,"Constructor can't be an async method"),n.kind="constructor",a=e),this.parseClassMethod(n,i,s,a),"get"===n.kind&&0!==n.value.params.length&&this.raiseRecoverable(n.value.start,"getter should have no params"),"set"===n.kind&&1!==n.value.params.length&&this.raiseRecoverable(n.value.start,"setter should have exactly one param"),"set"===n.kind&&"RestElement"===n.value.params[0].type&&this.raiseRecoverable(n.value.params[0].start,"Setter cannot use rest params"),n},eu.parseClassMethod=function(e,t,n,r){return e.value=this.parseMethod(t,n,r),this.finishNode(e,"MethodDefinition")},eu.parseClassId=function(e,t){this.type===Ph.name?(e.id=this.parseIdent(),t&&this.checkLVal(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},eu.parseClassSuper=function(e){e.superClass=this.eat(Ph._extends)?this.parseExprSubscripts():null},eu.parseExport=function(e,t){if(this.next(),this.eat(Ph.star))return this.expectContextual("from"),this.type!==Ph.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(Ph._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===Ph._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,4|iu,!1,n)}else if(this.type===Ph._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==Ph.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,o=e.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local),this.checkLocalExport(a.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},eu.checkExport=function(e,t,n){e&&(Dh(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},eu.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var o=0,a=t.elements;o<a.length;o+=1){var h=a[o];h&&this.checkPatternExport(e,h)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===n&&this.checkPatternExport(e,t.expression)},eu.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},eu.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},eu.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(Ph.braceL);!this.eat(Ph.braceR);){if(n)n=!1;else if(this.expect(Ph.comma),this.afterTrailingComma(Ph.braceR))break;var r=this.startNode();r.local=this.parseIdent(!0),r.exported=this.eatContextual("as")?this.parseIdent(!0):r.local,this.checkExport(e,r.exported.name,r.exported.start),t.push(this.finishNode(r,"ExportSpecifier"))}return t},eu.parseImport=function(e){return this.next(),this.type===Ph.string?(e.specifiers=ru,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===Ph.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},eu.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===Ph.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,2),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(Ph.comma))return e}if(this.type===Ph.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLVal(r.local,2),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(Ph.braceL);!this.eat(Ph.braceR);){if(t)t=!1;else if(this.expect(Ph.comma),this.afterTrailingComma(Ph.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLVal(i.local,2),e.push(this.finishNode(i,"ImportSpecifier"))}return e},eu.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},eu.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var ou=Yh.prototype;ou.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.toAssignable(s,t),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},ou.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},ou.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},ou.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==Ph.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},ou.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case Ph.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(Ph.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case Ph.braceL:return this.parseObj(!0)}return this.parseIdent()},ou.parseBindingList=function(e,t,n){for(var r=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(Ph.comma),t&&this.type===Ph.comma)r.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===Ph.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),r.push(s),this.type===Ph.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),r.push(o)}return r},ou.parseBindingListItem=function(e){return e},ou.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(Ph.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},ou.checkLVal=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(Dh(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),0!==t&&5!==t&&this.declareName(e.name,t,e.start);break;case"MemberExpression":t&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.checkLVal(s,t,n)}break;case"Property":this.checkLVal(e.value,t,n);break;case"ArrayPattern":for(var o=0,a=e.elements;o<a.length;o+=1){var h=a[o];h&&this.checkLVal(h,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var au=Yh.prototype;au.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===s&&(t.proto&&(n&&n.doubleProto<0?n.doubleProto=i.start:this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var o=t[r="$"+r];if(o)("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(i.start,"Redefinition of property");else o=t[r]={init:!1,get:!1,set:!1};o[s]=!0}}},au.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===Ph.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(Ph.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},au.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,s=-1,o=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,o=t.shorthandAssign,t.parenthesizedAssign=t.trailingComma=t.shorthandAssign=-1):(t=new Zh,r=!0);var a=this.start,h=this.startLoc;this.type!==Ph.parenL&&this.type!==Ph.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,a,h)),this.type.isAssign){var c=this.startNodeAt(a,h);return c.operator=this.value,c.left=this.type===Ph.eq?this.toAssignable(u,!1,t):u,r||Zh.call(t),t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),o>-1&&(t.shorthandAssign=o),u},au.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(Ph.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(Ph.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},au.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},au.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==Ph._in)&&s>r){var o=this.type===Ph.logicalOR||this.type===Ph.logicalAND,a=this.value;this.next();var h=this.start,u=this.startLoc,c=this.parseExprOp(this.parseMaybeUnary(null,!1),h,u,s,i),l=this.buildBinary(t,n,e,c,a,o);return this.parseExprOp(l,t,n,r,i)}return e},au.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},au.parseMaybeUnary=function(e,t){var n,r=this.start,i=this.startLoc;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))n=this.parseAwait(),t=!0;else if(this.type.prefix){var s=this.startNode(),o=this.type===Ph.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(s,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var a=this.startNodeAt(r,i);a.operator=this.value,a.prefix=!1,a.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(a,"UpdateExpression")}}return!t&&this.eat(Ph.starstar)?this.buildBinary(r,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},au.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},au.parseSubscripts=function(e,t,n,r){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(e.start,e.end);;){var s=this.parseSubscript(e,t,n,r,i);if(s===e||"ArrowFunctionExpression"===s.type)return s;e=s}},au.parseSubscript=function(e,t,n,r,i){var s=this.eat(Ph.bracketL);if(s||this.eat(Ph.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=s?this.parseExpression():this.parseIdent(!0),o.computed=!!s,s&&this.expect(Ph.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!r&&this.eat(Ph.parenL)){var a=new Zh,h=this.yieldPos,u=this.awaitPos,c=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var l=this.parseExprList(Ph.parenR,this.options.ecmaVersion>=8,!1,a);if(i&&!this.canInsertSemicolon()&&this.eat(Ph.arrow))return this.checkPatternErrors(a,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=u,this.awaitIdentPos=c,this.parseArrowExpression(this.startNodeAt(t,n),l,!0);this.checkExpressionErrors(a,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=u||this.awaitPos,this.awaitIdentPos=c||this.awaitIdentPos;var p=this.startNodeAt(t,n);p.callee=e,p.arguments=l,e=this.finishNode(p,"CallExpression")}else if(this.type===Ph.backQuote){var d=this.startNodeAt(t,n);d.tag=e,d.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(d,"TaggedTemplateExpression")}return e},au.parseExprAtom=function(e){this.type===Ph.slash&&this.readRegexp();var t,n=this.potentialArrowAt===this.start;switch(this.type){case Ph._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),t=this.startNode(),this.next(),this.type!==Ph.parenL||this.allowDirectSuper||this.raise(t.start,"super() call outside constructor of a subclass"),this.type!==Ph.dot&&this.type!==Ph.bracketL&&this.type!==Ph.parenL&&this.unexpected(),this.finishNode(t,"Super");case Ph._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case Ph.name:var r=this.start,i=this.startLoc,s=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(Ph._function))return this.parseFunction(this.startNodeAt(r,i),0,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(Ph.arrow))return this.parseArrowExpression(this.startNodeAt(r,i),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===Ph.name&&!s)return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(Ph.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,i),[o],!0)}return o;case Ph.regexp:var a=this.value;return(t=this.parseLiteral(a.value)).regex={pattern:a.pattern,flags:a.flags},t;case Ph.num:case Ph.string:return this.parseLiteral(this.value);case Ph._null:case Ph._true:case Ph._false:return(t=this.startNode()).value=this.type===Ph._null?null:this.type===Ph._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case Ph.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case Ph.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(Ph.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case Ph.braceL:return this.parseObj(!1,e);case Ph._function:return t=this.startNode(),this.next(),this.parseFunction(t,0);case Ph._class:return this.parseClass(this.startNode(),!1);case Ph._new:return this.parseNew();case Ph.backQuote:return this.parseTemplate();default:this.unexpected()}},au.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},au.parseParenExpression=function(){this.expect(Ph.parenL);var e=this.parseExpression();return this.expect(Ph.parenR),e},au.parseParenAndDistinguishExpression=function(e){var t,n=this.start,r=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o=this.start,a=this.startLoc,h=[],u=!0,c=!1,l=new Zh,p=this.yieldPos,d=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==Ph.parenR;){if(u?u=!1:this.expect(Ph.comma),i&&this.afterTrailingComma(Ph.parenR,!0)){c=!0;break}if(this.type===Ph.ellipsis){s=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===Ph.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}h.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var f=this.start,m=this.startLoc;if(this.expect(Ph.parenR),e&&!this.canInsertSemicolon()&&this.eat(Ph.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=d,this.parseParenArrowList(n,r,h);h.length&&!c||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(l,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=d||this.awaitPos,h.length>1?((t=this.startNodeAt(o,a)).expressions=h,this.finishNodeAt(t,"SequenceExpression",f,m)):t=h[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var g=this.startNodeAt(n,r);return g.expression=t,this.finishNode(g,"ParenthesizedExpression")}return t},au.parseParenItem=function(e){return e},au.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var hu=[];au.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(Ph.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),("target"!==e.property.name||n)&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inNonArrowFunction()||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),r,i,!0),this.eat(Ph.parenL)?e.arguments=this.parseExprList(Ph.parenR,this.options.ecmaVersion>=8,!1):e.arguments=hu,this.finishNode(e,"NewExpression")},au.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===Ph.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===Ph.backQuote,this.finishNode(n,"TemplateElement")},au.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===Ph.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(Ph.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(Ph.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},au.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===Ph.name||this.type===Ph.num||this.type===Ph.string||this.type===Ph.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===Ph.star)&&!kh.test(this.input.slice(this.lastTokEnd,this.start))},au.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(Ph.braceR);){if(r)r=!1;else if(this.expect(Ph.comma),this.afterTrailingComma(Ph.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},au.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(Ph.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===Ph.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(this.type===Ph.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),o.argument=this.parseMaybeAssign(!1,t),this.type===Ph.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(Ph.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(Ph.star),this.parsePropertyName(o,t)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t,a),this.finishNode(o,"Property")},au.parsePropertyValue=function(e,t,n,r,i,s,o,a){if((n||r)&&this.type===Ph.colon&&this.unexpected(),this.eat(Ph.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===Ph.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===Ph.comma||this.type===Ph.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===Ph.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var h="get"===e.kind?0:1;if(e.value.params.length!==h){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},au.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(Ph.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(Ph.bracketR),e.key;e.computed=!1}return e.key=this.type===Ph.num||this.type===Ph.string?this.parseExprAtom():this.parseIdent(!0)},au.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},au.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Kh(t,r.generator)|(n?128:0)),this.expect(Ph.parenL),r.params=this.parseBindingList(Ph.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},au.parseArrowExpression=function(e,t,n){var r=this.yieldPos,i=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(16|Kh(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1),this.yieldPos=r,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")},au.parseFunctionBody=function(e,t,n){var r=t&&this.type!==Ph.braceL,i=this.strict,s=!1;if(r)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var a=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!i&&!s&&!t&&!n&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=a}this.exitScope(),this.strict&&e.id&&this.checkLVal(e.id,5),this.strict=i},au.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){if("Identifier"!==n[t].type)return!1}return!0},au.checkParams=function(e,t){for(var n={},r=0,i=e.params;r<i.length;r+=1){var s=i[r];this.checkLVal(s,1,t?null:n)}},au.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(Ph.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===Ph.comma?o=null:this.type===Ph.ellipsis?(o=this.parseSpread(r),r&&this.type===Ph.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},au.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;(this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},au.parseIdent=function(e,t){var n=this.startNode();return e&&"never"===this.options.allowReserved&&(e=!1),this.type===Ph.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(),this.finishNode(n,"Identifier"),e||(this.checkUnreserved(n),"await"!==n.name||this.awaitIdentPos||(this.awaitIdentPos=n.start)),n},au.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===Ph.semi||this.canInsertSemicolon()||this.type!==Ph.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(Ph.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},au.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var uu=Yh.prototype;uu.raise=function(e,t){var n=jh(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},uu.raiseRecoverable=uu.raise,uu.curPosition=function(){if(this.options.locations)return new Bh(this.curLine,this.pos-this.lineStart)};var cu=Yh.prototype,lu=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};cu.enterScope=function(e){this.scopeStack.push(new lu(e))},cu.exitScope=function(){this.scopeStack.pop()},cu.treatFunctionsAsVarInScope=function(e){return e.flags&Fh||!this.inModule&&1&e.flags},cu.declareName=function(e,t,n){var r=!1;if(2===t){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){r=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],a.flags&qh)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},cu.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},cu.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},cu.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&qh)return t}},cu.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&qh&&!(16&t.flags))return t}};var pu=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new zh(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},du=Yh.prototype;function fu(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}du.startNode=function(){return new pu(this,this.start,this.startLoc)},du.startNodeAt=function(e,t){return new pu(this,e,t)},du.finishNode=function(e,t){return fu.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},du.finishNodeAt=function(e,t,n,r){return fu.call(this,e,t,n,r)};var mu=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},gu={b_stat:new mu("{",!1),b_expr:new mu("{",!0),b_tmpl:new mu("${",!1),p_stat:new mu("(",!1),p_expr:new mu("(",!0),q_tmpl:new mu("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new mu("function",!1),f_expr:new mu("function",!0),f_expr_gen:new mu("function",!0,!1,null,!0),f_gen:new mu("function",!1,!1,null,!0)},yu=Yh.prototype;yu.initialContext=function(){return[gu.b_stat]},yu.braceIsBlock=function(e){var t=this.curContext();return t===gu.f_expr||t===gu.f_stat||(e!==Ph.colon||t!==gu.b_stat&&t!==gu.b_expr?e===Ph._return||e===Ph.name&&this.exprAllowed?kh.test(this.input.slice(this.lastTokEnd,this.start)):e===Ph._else||e===Ph.semi||e===Ph.eof||e===Ph.parenR||e===Ph.arrow||(e===Ph.braceL?t===gu.b_stat:e!==Ph._var&&e!==Ph._const&&e!==Ph.name&&!this.exprAllowed):!t.isExpr)},yu.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},yu.updateContext=function(e){var t,n=this.type;n.keyword&&e===Ph.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},Ph.parenR.updateContext=Ph.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===gu.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},Ph.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?gu.b_stat:gu.b_expr),this.exprAllowed=!0},Ph.dollarBraceL.updateContext=function(){this.context.push(gu.b_tmpl),this.exprAllowed=!0},Ph.parenL.updateContext=function(e){var t=e===Ph._if||e===Ph._for||e===Ph._with||e===Ph._while;this.context.push(t?gu.p_stat:gu.p_expr),this.exprAllowed=!0},Ph.incDec.updateContext=function(){},Ph._function.updateContext=Ph._class.updateContext=function(e){!e.beforeExpr||e===Ph.semi||e===Ph._else||e===Ph._return&&kh.test(this.input.slice(this.lastTokEnd,this.start))||(e===Ph.colon||e===Ph.braceL)&&this.curContext()===gu.b_stat?this.context.push(gu.f_stat):this.context.push(gu.f_expr),this.exprAllowed=!1},Ph.backQuote.updateContext=function(){this.curContext()===gu.q_tmpl?this.context.pop():this.context.push(gu.q_tmpl),this.exprAllowed=!1},Ph.star.updateContext=function(e){if(e===Ph._function){var t=this.context.length-1;this.context[t]===gu.f_expr?this.context[t]=gu.f_expr_gen:this.context[t]=gu.f_gen}this.exprAllowed=!0},Ph.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==Ph.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var xu="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",vu={9:xu,10:xu+" Extended_Pictographic"},Eu="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",_u="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",bu={9:_u,10:_u+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"},Au={};function Su(e){var t=Au[e]={binary:Vh(vu[e]+" "+Eu),nonBinary:{General_Category:Vh(Eu),Script:Vh(bu[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}Su(9),Su(10);var Iu=Yh.prototype,wu=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":""),this.unicodeProperties=Au[e.options.ecmaVersion>=10?10:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function Pu(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function ku(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Cu(e){return e>=65&&e<=90||e>=97&&e<=122}function Nu(e){return Cu(e)||95===e}function $u(e){return Nu(e)||Ru(e)}function Ru(e){return e>=48&&e<=57}function Ou(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Mu(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Tu(e){return e>=48&&e<=55}wu.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchN=r&&this.parser.options.ecmaVersion>=9},wu.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},wu.prototype.at=function(e){var t=this.source,n=t.length;if(e>=n)return-1;var r=t.charCodeAt(e);return!this.switchU||r<=55295||r>=57344||e+1>=n?r:(r<<10)+t.charCodeAt(e+1)-56613888},wu.prototype.nextIndex=function(e){var t=this.source,n=t.length;if(e>=n)return n;var r=t.charCodeAt(e);return!this.switchU||r<=55295||r>=57344||e+1>=n?e+1:e+2},wu.prototype.current=function(){return this.at(this.pos)},wu.prototype.lookahead=function(){return this.at(this.nextIndex(this.pos))},wu.prototype.advance=function(){this.pos=this.nextIndex(this.pos)},wu.prototype.eat=function(e){return this.current()===e&&(this.advance(),!0)},Iu.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=0;r<n.length;r++){var i=n.charAt(r);-1===t.indexOf(i)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(i,r+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},Iu.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},Iu.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];-1===e.groupNames.indexOf(r)&&e.raise("Invalid named capture referenced")}},Iu.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},Iu.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Iu.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!(e.switchU?!this.regexp_eatAtom(e):!this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},Iu.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Iu.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Iu.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Iu.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},Iu.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Iu.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Iu.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},Iu.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Iu.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Iu.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Iu.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!ku(t)&&(e.lastIntValue=t,e.advance(),!0)},Iu.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!ku(n);)e.advance();return e.pos!==t},Iu.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},Iu.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},Iu.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Iu.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Pu(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Pu(e.lastIntValue);return!0}return!1},Iu.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return vh(e,!0)||36===e||95===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},Iu.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return Eh(e,!0)||36===e||95===e||8204===e||8205===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},Iu.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Iu.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Iu.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Iu.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Iu.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Iu.regexp_eatZero=function(e){return 48===e.current()&&!Ru(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Iu.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Iu.regexp_eatControlLetter=function(e){var t=e.current();return!!Cu(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Iu.regexp_eatRegExpUnicodeEscapeSequence=function(e){var t,n=e.pos;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(e.switchU&&r>=55296&&r<=56319){var i=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=1024*(r-55296)+(s-56320)+65536,!0}e.pos=i,e.lastIntValue=r}return!0}if(e.switchU&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((t=e.lastIntValue)>=0&&t<=1114111))return!0;e.switchU&&e.raise("Invalid unicode escape"),e.pos=n}return!1},Iu.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},Iu.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},Iu.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},Iu.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i),!0}return!1},Iu.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){Dh(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},Iu.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},Iu.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Nu(t=e.current());)e.lastStringValue+=Pu(t),e.advance();return""!==e.lastStringValue},Iu.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";$u(t=e.current());)e.lastStringValue+=Pu(t),e.advance();return""!==e.lastStringValue},Iu.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Iu.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},Iu.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},Iu.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||Tu(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},Iu.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Iu.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Ru(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},Iu.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Iu.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Ru(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},Iu.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Ou(n=e.current());)e.lastIntValue=16*e.lastIntValue+Mu(n),e.advance();return e.pos!==t},Iu.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},Iu.regexp_eatOctalDigit=function(e){var t=e.current();return Tu(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Iu.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!Ou(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Mu(i),e.advance()}return!0};var Du=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new zh(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Lu=Yh.prototype;function Vu(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Lu.next=function(){this.options.onToken&&this.options.onToken(new Du(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Lu.getToken=function(){return this.next(),new Du(this)},"undefined"!=typeof Symbol&&(Lu[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===Ph.eof,value:t}}}}),Lu.curContext=function(){return this.context[this.context.length-1]},Lu.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(Ph.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Lu.readToken=function(e){return vh(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Lu.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},Lu.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(-1===r&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(Ch.lastIndex=n;(e=Ch.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,r),n,this.pos,t,this.curPosition())},Lu.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Nh(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Lu.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&$h.test(String.fromCharCode(e))))break e;++this.pos}}},Lu.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Lu.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(Ph.ellipsis)):(++this.pos,this.finishToken(Ph.dot))},Lu.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(Ph.assign,2):this.finishOp(Ph.slash,1)},Lu.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?Ph.star:Ph.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=Ph.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(Ph.assign,n+1):this.finishOp(r,n)},Lu.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?Ph.logicalOR:Ph.logicalAND,2):61===t?this.finishOp(Ph.assign,2):this.finishOp(124===e?Ph.bitwiseOR:Ph.bitwiseAND,1)},Lu.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(Ph.assign,2):this.finishOp(Ph.bitwiseXOR,1)},Lu.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!kh.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(Ph.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(Ph.assign,2):this.finishOp(Ph.plusMin,1)},Lu.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(Ph.assign,n+1):this.finishOp(Ph.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(Ph.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Lu.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(Ph.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(Ph.arrow)):this.finishOp(61===e?Ph.eq:Ph.prefix,1)},Lu.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(Ph.parenL);case 41:return++this.pos,this.finishToken(Ph.parenR);case 59:return++this.pos,this.finishToken(Ph.semi);case 44:return++this.pos,this.finishToken(Ph.comma);case 91:return++this.pos,this.finishToken(Ph.bracketL);case 93:return++this.pos,this.finishToken(Ph.bracketR);case 123:return++this.pos,this.finishToken(Ph.braceL);case 125:return++this.pos,this.finishToken(Ph.braceR);case 58:return++this.pos,this.finishToken(Ph.colon);case 63:return++this.pos,this.finishToken(Ph.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(Ph.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(Ph.prefix,1)}this.raise(this.pos,"Unexpected character '"+Vu(e)+"'")},Lu.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Lu.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(kh.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new wu(this));a.reset(n,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var h=null;try{h=new RegExp(i,o)}catch(e){}return this.finishToken(Ph.regexp,{pattern:i,flags:o,value:h})},Lu.readInt=function(e,t){for(var n=this.pos,r=0,i=0,s=null==t?1/0:t;i<s;++i){var o=this.input.charCodeAt(this.pos),a=void 0;if((a=o>=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=e)break;++this.pos,r=r*e+a}return this.pos===n||null!=t&&this.pos-n!==t?null:r},Lu.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),vh(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Ph.num,t)},Lu.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number"),n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1);var r=this.input.charCodeAt(this.pos);46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),vh(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var i=this.input.slice(t,this.pos),s=n?parseInt(i,8):parseFloat(i);return this.finishToken(Ph.num,s)},Lu.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Lu.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(Nh(r,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(Ph.string,t)};var Bu={};Lu.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Bu)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Lu.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Bu;this.raise(e,t)},Lu.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==Ph.template&&this.type!==Ph.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(Ph.template,e)):36===n?(this.pos+=2,this.finishToken(Ph.dollarBraceL)):(++this.pos,this.finishToken(Ph.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Nh(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Lu.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(Ph.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Lu.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Vu(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),"0"===n&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Nh(t)?"":String.fromCharCode(t)}},Lu.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Lu.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(Eh(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?vh:Eh)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=Vu(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},Lu.readWord=function(){var e=this.readWord1(),t=Ph.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=Ih[e]),this.finishToken(t,e)};var zu=function(e){return e&&e.default||e}(Object.freeze({version:"6.1.1",parse:function(e,t){return Yh.parse(e,t)},parseExpressionAt:function(e,t,n){return Yh.parseExpressionAt(e,t,n)},tokenizer:function(e,t){return Yh.tokenizer(e,t)},Parser:Yh,defaultOptions:Wh,Position:Bh,SourceLocation:zh,getLineInfo:jh,Node:pu,TokenType:_h,tokTypes:Ph,keywordTypes:Ih,TokContext:mu,tokContexts:gu,isIdentifierChar:Eh,isIdentifierStart:vh,Token:Du,isNewLine:Nh,lineBreak:kh,lineBreakG:Ch,nonASCIIwhitespace:$h}));const ju=zu.tokTypes,Wu=zu.isIdentifierStart;var Uu=function(e){return class extends e{parseLiteral(e){const t=super.parseLiteral(e);return 110==t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=this.getNumberInput(t.start,t.end)),t}readRadixNumber(e){let t=this.pos;this.pos+=2;let n=this.readInt(e);if(null===n&&this.raise(this.start+2,`Expected number in radix ${e}`),110==this.input.charCodeAt(this.pos)){let e=this.getNumberInput(t,this.pos);n="undefined"!=typeof BigInt?BigInt(e):null,++this.pos}else Wu(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");return this.finishToken(ju.num,n)}readNumber(e){let t=this.pos;if(e)return super.readNumber(e);if(48===this.input.charCodeAt(t)&&110!==this.input.charCodeAt(t+1))return super.readNumber(e);if(null===this.readInt(10)&&this.raise(t,"Invalid number"),110!=this.input.charCodeAt(this.pos))return this.pos=t,super.readNumber(e);let n=this.getNumberInput(t,this.pos),r="undefined"!=typeof BigInt?BigInt(n):null;return++this.pos,this.finishToken(ju.num,r)}getNumberInput(e,t){return super.getNumberInput?super.getNumberInput(e,t):this.input.slice(e,t)}}};const Fu="Import";function qu(e){return class extends e{parseStatement(e,t,n){return this.type===Ph._import&&function(){return/^(\s|\/\/.*|\/\*[^]*?\*\/)*\(/.test(this.input.slice(this.pos))}.call(this)?this.parseExpressionStatement(this.startNode(),this.parseExpression()):super.parseStatement(e,t,n)}parseExprAtom(e){return this.type===Ph._import?function(){const e=this.startNode();return this.next(),this.type!==Ph.parenL&&this.unexpected(),this.finishNode(e,Fu)}.call(this):super.parseExprAtom(e)}}}Ph._import.startsExpr=!0;const Gu=zu.tokTypes,Hu=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ku=e=>{Hu.lastIndex=e.pos;let t=Hu.exec(e.input),n=e.pos+t[0].length;return"."===e.input.slice(n,n+1)};var Yu=function(e){return class extends e{parseExprAtom(e){if(this.type!==Gu._import||!Ku(this))return super.parseExprAtom(e);this.options.allowImportExportEverywhere||this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'");let t=this.startNode();return t.meta=this.parseIdent(!0),this.expect(Gu.dot),t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is import.meta"),this.containsEsc&&this.raiseRecoverable(t.property.start,'"meta" in import.meta must not contain escape sequences'),this.finishNode(t,"MetaProperty")}parseStatement(e,t,n){if(this.type!==Gu._import||!Ku(this))return super.parseStatement(e,t,n);let r=this.startNode(),i=this.parseExpression();return this.parseExpressionStatement(r,i)}}};class Xu extends Je{constructor(){super("undefined")}getLiteralValueAtPath(){}}class Qu extends Et{constructor(){super(),this.variables.undefined=new Xu}findVariable(e){return this.variables[e]?this.variables[e]:this.variables[e]=new ao(e)}}const Ju=()=>({paths:Object.create(null),tracked:!1,unknownPath:null});class Zu{constructor(){this.entityPaths=new Map}track(e,t){let n=this.entityPaths.get(e);n||(n=Ju(),this.entityPaths.set(e,n));let r,i=0;for(;i<t.length;){const e=t[i];"string"==typeof e?(r=n.paths[e])||(r=Ju(),n.paths[e]=r):(r=n.unknownPath)||(r=Ju(),n.unknownPath=r),n=r,i++}const s=n.tracked;return n.tracked=!0,s}}function ec(e,t,n){let r;do{const e=N();r?e.update(r):e.update(n),r=e.digest("hex").substr(0,8)}while(t.has(r));return t.set(r,e),r}function tc(e,t,n){return void 0===e.source&&Io(function(e){return{code:Po.ASSET_SOURCE_MISSING,message:`Plugin error creating asset "${e.name}" - no asset source set.`}}(e)),e.fileName?e.fileName:rh(nh(n,"assetFileNames",t=>{switch(t){case"hash":const n=N();return n.update(t),n.update(":"),n.update(e.source),n.digest("hex").substr(0,8);case"name":return e.name.substr(0,e.name.length-dt(e.name).length);case"extname":return dt(e.name);case"ext":return dt(e.name).substr(1)}}),t)}function nc(e,t,n){return{emitAsset(r,i){"string"==typeof r&&So(r)||Io(function(e){return{code:Po.INVALID_ASSET_NAME,message:`Plugin error creating asset, name "${e}" is not a plain (non relative or absolute URL) string name.`}}(r));const s={name:r,source:i,fileName:void 0};return t&&void 0!==i&&rc(s,t,n),ec(s,e,r)},setAssetSource(r,i){const s=e.get(r);return s?void 0!==s.source?Io(function(e){return{code:Po.ASSET_SOURCE_ALREADY_SET,message:`Plugin error - Unable to set the source for asset "${e.name}", source already set.`}}(s)):"string"==typeof i||i?(s.source=i,void(t&&rc(s,t,n))):Io(function(e){return{code:Po.ASSET_SOURCE_MISSING,message:`Plugin error creating asset "${e.name}", setAssetSource call without a source.`}}(s)):Io(function(e){return{code:Po.ASSET_NOT_FOUND,message:`Plugin error - Unable to set the source for unknown asset "${e}".`}}(r))},getAssetFileName(t){const n=e.get(t);return n?void 0===n.fileName?Io(function(e){return{code:Po.ASSET_NOT_FINALISED,message:`Plugin error - Unable to get file name for asset "${e.name}". Ensure that the source is set and that generate is called first.`}}(n)):n.fileName:Io(function(e){return{code:Po.ASSET_NOT_FOUND,message:`Plugin error - Unable to get file name for unknown asset "${e}".`}}(t))}}}function rc(e,t,n){const r=tc(e,t,n);e.fileName=r,t[r]={fileName:r,isAsset:!0,source:e.source}}var ic;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(ic||(ic={}));const sc=e=>(...t)=>{throw new Error(`Cannot use fs.${e} inside browser`)},oc=sc("lstatSync"),ac=sc("readdirSync"),hc=sc("readFileSync"),uc=sc("realpathSync"),cc=sc("writeFile");function lc(e,t){try{const n=oc(e);if(!t&&n.isSymbolicLink())return lc(uc(e),t);if(t&&n.isSymbolicLink()||n.isFile()){const t=lt(e);if(-1!==ac(pt(e)).indexOf(t))return e}}catch(e){}}function pc(e){return function(t,n){return"undefined"==typeof process&&Io({code:"MISSING_PROCESS",message:"It looks like you're using Rollup in a non-Node.js environment. This means you must supply a plugin with custom resolveId and load functions",url:"https://rollupjs.org/guide/en#a-simple-example"}),void 0===n||ht(t)||"."===t[0]?function(e,t){let n=lc(e,t);return n||((n=lc(e+".mjs",t))?n:n=lc(e+".js",t))}(mt(n?pt(n):mt(),t),e):null}}const dc=(e,t="URL")=>`new ${t}(${e}).href`,fc=e=>`(document.currentScript && document.currentScript.src || new URL('${e}', document.baseURI).href)`,mc=e=>(t,n)=>{const r=e(n);return null===t?`({ url: ${r} })`:"url"===t?r:"undefined"},gc={amd:mc(()=>dc("module.uri, document.baseURI")),cjs:mc(e=>`(typeof document === 'undefined' ? ${dc("'file:' + __filename","(require('u' + 'rl').URL)")} : ${fc(e)})`),iife:mc(e=>fc(e)),system:e=>null===e?"module.meta":`module.meta.${e}`,umd:mc(e=>`(typeof document === 'undefined' ? ${dc("'file:' + __filename","(require('u' + 'rl').URL)")} : ${fc(e)})`)},yc=e=>dc(`(document.currentScript && document.currentScript.src || document.baseURI) + '/../${e}'`),xc={amd:e=>dc(`module.uri + '/../${e}', document.baseURI`),cjs:e=>`(typeof document === 'undefined' ? ${dc(`'file:' + __dirname + '/${e}'`,"(require('u' + 'rl').URL)")} : ${yc(e)})`,es:e=>dc(`'${e}', import.meta.url`),iife:e=>yc(e),system:e=>dc(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' ? ${dc(`'file:' + __dirname + '/${e}'`,"(require('u' + 'rl').URL)")} : ${yc(e)})`},vc={ongenerate:"generateBundle",onwrite:"generateBundle",transformBundle:"renderChunk",transformChunk:"renderChunk"};function Ec(e,t,r,i){const s=[...t.plugins||[],(o=t.preserveSymlinks,{name:"Rollup Core",resolveId:pc(o),load:e=>hc(e,"utf-8"),resolveFileUrl:({relativePath:e,format:t})=>xc[t](e),resolveImportMeta(e,{chunkId:t,format:n}){const r=gc[n]&&gc[n](e,t);if(r)return r}})];var o;const{emitAsset:a,getAssetFileName:h,setAssetSource:u}=nc(e.assetsById),c={};let l=!1;const p=s.map((t,s)=>{let o,p=!0;if("string"!=typeof t.cacheKey&&("string"!=typeof t.name||c[t.name]?p=!1:c[t.name]=!0),!l&&(t.load||t.transform||t.transformBundle||t.transformChunk)&&(l=!0),r)if(p){const e=t.cacheKey||t.name;o=function(e){return{has(t){const n=e[t];return!!n&&(n[0]=0,!0)},get(t){const n=e[t];if(n)return n[0]=0,n[1]},set(t,n){e[t]=[0,n]},delete:t=>delete e[t]}}(r[e]||(r[e]=Object.create(null)))}else o=Ac(t.name);else o=_c;let d=!1;function f(e,t){return d||(m.warn({code:"PLUGIN_WATCHER_DEPRECATED",message:"this.watcher usage is deprecated in plugins. Use the watchChange plugin hook and this.addWatchFile() instead."}),d=!0),i.on(e,t)}const m={addWatchFile(t){e.phase>=ic.GENERATE&&this.error({code:Po.INVALID_ROLLUP_PHASE,message:"Cannot call addWatchFile after the build has finished."}),e.watchFiles[t]=!0},cache:o,emitAsset:a,emitChunk(t,n){return e.phase>ic.LOAD_AND_PARSE&&this.error({code:Po.INVALID_ROLLUP_PHASE,message:"Cannot call emitChunk after module loading has finished."}),e.moduleLoader.addEntryModuleAndGetReferenceId({alias:n&&n.name||null,unresolvedId:t})},error:e=>("string"==typeof e&&(e={message:e}),e.code&&(e.pluginCode=e.code),e.code="PLUGIN_ERROR",e.plugin=t.name||`Plugin at position ${s+1}`,Io(e)),isExternal:(t,n,r=!1)=>e.moduleLoader.isExternal(t,n,r),getAssetFileName:h,getChunkFileName:t=>e.moduleLoader.getChunkFileName(t),getModuleInfo(t){const n=e.moduleById.get(t);if(null==n)throw new Error(`Unable to find module ${t}`);return{hasModuleSideEffects:n.moduleSideEffects,id:n.id,importedIds:n instanceof gt?[]:n.sources.map(e=>n.resolvedIds[e].id),isEntry:n instanceof qa&&n.isEntryPoint,isExternal:n instanceof gt}},meta:{rollupVersion:n},get moduleIds(){return e.moduleById.keys()},parse:e.contextParse,resolveId:(t,n)=>e.moduleLoader.resolveId(t,n).then(e=>e&&e.id),resolve:(t,n,r)=>e.moduleLoader.resolveId(t,n,r&&r.skipSelf?s:null),setAssetSource:u,warn(n){"string"==typeof n&&(n={message:n}),n.code&&(n.pluginCode=n.code),n.code="PLUGIN_WARNING",n.plugin=t.name||`Plugin at position ${s+1}`,e.warn(n)},watcher:i?Object.assign({},i,{addListener:f,on:f}):void 0};return m});function d(e,t,n,r=!1,i){const o=s[n];let a=p[n];const h=o[e];if(!h)return;const u=vc[e];if(u&&a.warn(Sc(e,u,o,n)),i&&(!(a=i(a,o))||a===p[n]))throw new Error("Internal Rollup error: hookContext must return a new context object.");try{if("function"!=typeof h){if(r)return h;Io({code:"INVALID_PLUGIN_HOOK",message:`Error running plugin hook ${e} for ${o.name||`Plugin at position ${n+1}`}, expected a function hook.`})}return h.apply(a,t)}catch(t){"string"==typeof t&&(t={message:t}),"PLUGIN_ERROR"!==t.code&&(t.code&&(t.pluginCode=t.code),t.code="PLUGIN_ERROR"),t.plugin=o.name||`Plugin at position ${n+1}`,t.hook=e,Io(t)}}function f(e,t,n,r=!1,i){const o=s[n];let a=p[n];const h=o[e];if(!h)return;const u=vc[e];if(u&&a.warn(Sc(e,u,o,n)),i&&(!(a=i(a,o))||a===p[n]))throw new Error("Internal Rollup error: hookContext must return a new context object.");return Promise.resolve().then(()=>{if("function"!=typeof h){if(r)return h;Io({code:"INVALID_PLUGIN_HOOK",message:`Error running plugin hook ${e} for ${o.name||`Plugin at position ${n+1}`}, expected a function hook.`})}return h.apply(a,t)}).catch(t=>{"string"==typeof t&&(t={message:t}),"PLUGIN_ERROR"!==t.code&&(t.code&&(t.pluginCode=t.code),t.code="PLUGIN_ERROR"),t.plugin=o.name||`Plugin at position ${n+1}`,t.hook=e,Io(t)})}return{emitAsset:a,getAssetFileName:h,hasLoadersOrTransforms:l,hookSeq(e,t,n){let r=Promise.resolve();for(let i=0;i<s.length;i++)r=r.then(()=>f(e,t,i,!1,n));return r},hookSeqSync(e,t,n){for(let r=0;r<s.length;r++)d(e,t,r,!1,n)},hookFirst(e,t,n,r){let i=Promise.resolve();for(let o=0;o<s.length;o++)r!==o&&(i=i.then(r=>null!=r?r:f(e,t,o,!1,n)));return i},hookFirstSync(e,t,n){for(let r=0;r<s.length;r++){const i=d(e,t,r,!1,n);if(null!=i)return i}return null},hookParallel(e,t,n){const r=[];for(let i=0;i<s.length;i++){const s=f(e,t,i,!1,n);s&&r.push(s)}return Promise.all(r).then(()=>{})},hookReduceArg0(e,[t,...n],r,i){let o=Promise.resolve(t);for(let t=0;t<s.length;t++)o=o.then(o=>{const a=f(e,[o,...n],t,!1,i);return a?a.then(e=>r.call(p[t],o,e,s[t])):o});return o},hookReduceArg0Sync(e,[t,...n],r,i){for(let o=0;o<s.length;o++){const a=d(e,[t,...n],o,!1,i);t=r.call(p[o],t,a,s[o])}return t},hookReduceValue(e,t,n,r,i){let o=Promise.resolve(t);for(let t=0;t<s.length;t++)o=o.then(o=>{const a=f(e,n,t,!0,i);return a?a.then(e=>r.call(p[t],o,e,s[t])):o});return o}}}const _c={has:()=>!1,get(){},set(){},delete:()=>!1};function bc(e){Io(e?{code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`}:{code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."})}const Ac=e=>({has:()=>(bc(e),!1),get(){bc(e)},set(){bc(e)},delete:()=>(bc(e),!1)});function Sc(e,t,n,r){return{code:e.toUpperCase()+"_HOOK_DEPRECATED",message:`The ${e} hook used by plugin ${n.name||`at position ${r+1}`} is deprecated. The ${t} hook should be used instead.`}}function Ic(e,t){return ut(t)?mt(e,"..",t):t}function wc(e){if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>!t.startsWith("\0")&&e(t,...n)||!1;if(e){const t=new Set(Array.isArray(e)?e:e?[e]:[]);return e=>t.has(e)}return()=>!1}function Pc(e,t,n){if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>!!t.startsWith("\0")||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}var r,i;e&&n.warn((r="treeshake.moduleSideEffects",i='please use one of false, "no-external", a function or an array',{code:Po.INVALID_OPTION,message:`Invalid value for option "${r}" - ${i}.`}));const s=wc(t);return(e,t)=>!(t&&s(e))}class kc{constructor(e,t,n,r,i,s,o){this.entriesByReferenceId=new Map,this.entryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.manualChunkModules={},this.loadEntryModule=(({alias:e,unresolvedId:t},n)=>this.pluginDriver.hookFirst("resolveId",[t,void 0]).then(r=>{if(!1===r||r&&"object"==typeof r&&r.external)return Io(function(e){return{code:Po.UNRESOLVED_ENTRY,message:`Entry module cannot be external (${Ao(e)}).`}}(t));const i=r&&"object"==typeof r?r.id:r;return"string"==typeof i?this.fetchModule(i,void 0,!0,n).then(t=>{if(null!==e){if(null!==t.chunkAlias&&t.chunkAlias!==e)return Io(ko(t.id,e,t.chunkAlias));t.chunkAlias=e}return t}):Io(function(e){return{code:Po.UNRESOLVED_ENTRY,message:`Could not resolve entry module (${Ao(e)}).`}}(t))})),this.graph=e,this.modulesById=t,this.pluginDriver=n,this.isExternal=wc(r),this.hasModuleSideEffects=Pc(s,o,e),this.getManualChunk="function"==typeof i?i:()=>null}addEntryModuleAndGetReferenceId(e){const t={module:null,name:e.unresolvedId},n=ec(t,this.entriesByReferenceId,e.unresolvedId);return this.addEntryModules([e],!1).then(({newEntryModules:[e]})=>{t.module=e}).catch(()=>{}),n}addEntryModules(e,t){const n=Promise.all(e.map(e=>this.loadEntryModule(e,!0))).then(e=>{for(const n of e){n.isUserDefinedEntryPoint=n.isUserDefinedEntryPoint||t,this.entryModules.find(e=>e.id===n.id)||this.entryModules.push(n)}return e});return this.awaitLoadModulesPromise(n).then(e=>({entryModules:this.entryModules,manualChunkModulesByAlias:this.manualChunkModules,newEntryModules:e}))}addManualChunks(e){const t=[];for(const n of Object.keys(e)){const r=e[n];for(const e of r)t.push({alias:null,unresolvedId:e,manualChunkAlias:n})}const n=Promise.all(t.map(e=>this.loadEntryModule(e,!1))).then(e=>{for(let n=0;n<e.length;n++)this.addToManualChunk(t[n].manualChunkAlias,e[n])});return this.awaitLoadModulesPromise(n)}getChunkFileName(e){const t=this.entriesByReferenceId.get(e);if(!t)return Io((n=e,{code:Po.CHUNK_NOT_FOUND,message:`Plugin error - Unable to get file name for unknown chunk "${n}".`}));var n;const r=t.module&&(t.module.facadeChunk?t.module.facadeChunk.id:t.module.chunk.id);return r||Io((i=t,{code:Po.CHUNK_NOT_GENERATED,message:`Plugin error - Unable to get file name for chunk "${i.name}". Ensure that generate is called first.`}));var i}resolveId(e,t,n){return Promise.resolve(this.isExternal(e,t,!1)?{id:e,external:!0}:this.pluginDriver.hookFirst("resolveId",[e,t],null,n)).then(n=>this.normalizeResolveIdResult(n,t,e))}addToManualChunk(e,t){null!==t.manualChunkAlias&&t.manualChunkAlias!==e&&Io(ko(t.id,e,t.manualChunkAlias)),t.manualChunkAlias=e,this.manualChunkModules[e]||(this.manualChunkModules[e]=[]),this.manualChunkModules[e].push(t)}awaitLoadModulesPromise(e){this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]);const t=()=>{const e=this.latestLoadModulesPromise;return e.then(()=>{if(this.latestLoadModulesPromise!==e)return t()})};return t().then(()=>e)}fetchAllDependencies(e){const t=Promise.all(e.getDynamicImportExpressions().map((t,n)=>this.resolveDynamicImport(t,e.id).then(t=>{if(null===t)return;const r=e.dynamicImports[n];if("string"!=typeof t)return this.fetchResolvedDependency(Ao(t.id),e.id,t).then(e=>{r.resolution=e});r.resolution=t})));return t.catch(()=>{}),Promise.all(e.sources.map(t=>this.resolveAndFetchDependency(e,t))).then(()=>t)}fetchModule(e,t,n,r){const i=this.modulesById.get(e);if(i){if(i instanceof gt)throw new Error(`Cannot fetch external module ${e}`);return i.isEntryPoint=i.isEntryPoint||r,Promise.resolve(i)}const s=new qa(this.graph,e,n,r);this.modulesById.set(e,s);const o=this.getManualChunk(e);return"string"==typeof o&&this.addToManualChunk(o,s),La("load modules",3),Promise.resolve(this.pluginDriver.hookFirst("load",[e])).catch(n=>{Va("load modules",3);let r=`Could not load ${e}`;throw t&&(r+=` (imported by ${t})`),r+=`: ${n.message}`,new Error(r)}).then(t=>(Va("load modules",3),"string"==typeof t?{code:t}:t&&"object"==typeof t&&"string"==typeof t.code?t:Io(function(e){return{code:Po.BAD_LOADER,message:`Error loading ${Ao(e)}: plugin load hook should return a string, a { code, map } object, or nothing/null`}}(e)))).then(t=>{const n=this.graph.cachedModules.get(e);if(n&&!n.customTransformCache&&n.originalCode===t.code){if(n.transformAssets)for(const e of n.transformAssets)this.pluginDriver.emitAsset(e.name,e.source);return n}return"boolean"==typeof t.moduleSideEffects&&(s.moduleSideEffects=t.moduleSideEffects),function(e,t,n){const r=n.id,i=[],s="string"==typeof t.map?JSON.parse(t.map):t.map;s&&"string"==typeof s.mappings&&(s.mappings=M(s.mappings));const o=e.pluginDriver.emitAsset,a=t.code;let h,u,c,l,p=t.ast,d=!1,f=null;const m=t.code;let g;return e.pluginDriver.hookReduceArg0("transform",[m,r],function(t,s,o){if(!d&&c.used&&(d=!0),d){if(s&&"object"==typeof s&&Array.isArray(s.dependencies))for(const t of s.dependencies){const n=mt(pt(r),t);e.watchFiles[n]||(e.watchFiles[n]=!0)}}else if(u.length&&(n.transformAssets=u),s&&"object"==typeof s&&Array.isArray(s.dependencies)){l.warnedTransformDependencies||this.warn({code:"TRANSFORM_DEPENDENCIES_DEPRECATED",message:'Returning "dependencies" from plugin transform hook is deprecated for using this.addWatchFile() instead.'}),l.warnedTransformDependencies=!0,h||(h=[]);for(const e of s.dependencies)h.push(mt(pt(r),e))}if("string"==typeof s)s={ast:void 0,code:s,map:void 0};else{if(!s||"object"!=typeof s)return t;"string"==typeof s.map&&(s.map=JSON.parse(s.map)),"boolean"==typeof s.moduleSideEffects&&(f=s.moduleSideEffects)}return s.map&&"string"==typeof s.map.mappings&&(s.map.mappings=M(s.map.mappings)),null!==s.map&&i.push(s.map||{missing:!0,plugin:o.name}),p=s.ast,s.code},(t,n)=>{let i;return(l=n).cacheKey?d=!0:c=function(e){const t={used:!1,cache:void 0};return t.cache={has:n=>(t.used=!0,e.has(n)),get:n=>(t.used=!0,e.get(n)),set:(n,r)=>(t.used=!0,e.set(n,r)),delete:n=>(t.used=!0,e.delete(n))},t}(t.cache),({assets:u,emitAsset:i}=function(e,t){const n=[];return{assets:n,emitAsset:(r,i)=>{const s=t(r,i),o=e.get(s);return n.push({fileName:void 0,name:o.name,source:o.source}),s}}}(e.assetsById,o)),Object.assign({},t,{cache:c?c.cache:t.cache,warn(e,n){"string"==typeof e&&(e={message:e}),n&&wo(e,n,m,r),e.id=r,e.hook="transform",t.warn(e)},error:(e,n)=>("string"==typeof e&&(e={message:e}),n&&wo(e,n,m,r),e.id=r,e.hook="transform",t.error(e)),emitAsset:i,addWatchFile(e){h||(h=[]),h.push(e),t.addWatchFile(e)},setAssetSource(e,n){if(t.setAssetSource(e,n),!d&&!g)try{this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitAsset with a source, or call setAssetSource in another hook."})}catch(e){g=e}}})}).catch(e=>{"string"==typeof e&&(e={message:e}),"PLUGIN_ERROR"!==e.code&&(e.code&&(e.pluginCode=e.code),e.code="PLUGIN_ERROR"),e.id=r,Io(e)}).then(e=>{if(!d&&g)throw g;return{ast:p,code:e,customTransformCache:d,moduleSideEffects:f,originalCode:a,originalSourcemap:s,sourcemapChain:i,transformDependencies:h}})}(this.graph,t,s)}).then(t=>(s.setSource(t),this.modulesById.set(e,s),this.fetchAllDependencies(s).then(()=>{for(const e in s.exports)"default"!==e&&(s.exportsAll[e]=s.id);return s.exportAllSources.forEach(e=>{const t=s.resolvedIds[e].id,n=this.modulesById.get(t);if(!(n instanceof gt))for(const e in n.exportsAll)e in s.exportsAll?this.graph.warn(Co(e,s,n)):s.exportsAll[e]=n.exportsAll[e]}),s})))}fetchResolvedDependency(e,t,n){if(n.external){this.modulesById.has(n.id)||this.modulesById.set(n.id,new gt(this.graph,n.id,n.moduleSideEffects));const r=this.modulesById.get(n.id);return r instanceof gt?Promise.resolve(r):Io(function(e,t){return{code:Po.INVALID_EXTERNAL_ID,message:`'${e}' is imported as an external by ${Ao(t)}, but is already an existing non-external module id.`}}(e,t))}return this.fetchModule(n.id,t,n.moduleSideEffects,!1)}handleMissingImports(e,t,n){return null===e?(ut(t)&&Io(function(e,t){return{code:Po.UNRESOLVED_IMPORT,message:`Could not resolve '${e}' from ${Ao(t)}`}}(t,n)),this.graph.warn(function(e,t){return{code:Po.UNRESOLVED_IMPORT,importer:Ao(t),message:`'${e}' is imported by ${Ao(t)}, but could not be resolved – treating it as an external dependency`,source:e,url:"https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency"}}(t,n)),{id:t,external:!0,moduleSideEffects:!0}):e}normalizeResolveIdResult(e,t,n){let r="",i=!1,s=null;if(e)"object"==typeof e?(r=e.id,e.external&&(i=!0),"boolean"==typeof e.moduleSideEffects&&(s=e.moduleSideEffects)):(r=e,this.isExternal(r,t,!0)&&(i=!0)),i&&(r=Ic(t,r));else{if(r=Ic(t,n),!1!==e&&!this.isExternal(r,t,!0))return null;i=!0}return{external:i,id:r,moduleSideEffects:"boolean"==typeof s?s:this.hasModuleSideEffects(r,i)}}resolveAndFetchDependency(e,t){return Promise.resolve(e.resolvedIds[t]||this.resolveId(t,e.id).then(n=>this.handleMissingImports(n,t,e.id))).then(n=>(e.resolvedIds[t]=n,this.fetchResolvedDependency(t,e.id,n)))}resolveDynamicImport(e,t){return this.pluginDriver.hookFirst("resolveDynamicImport",[e,t]).then(n=>"string"!=typeof e?"string"==typeof n?n:n?Object.assign({external:!1,moduleSideEffects:!0},n):null:null==n?this.resolveId(e,t).then(n=>this.handleMissingImports(n,e,t)):this.handleMissingImports(this.normalizeResolveIdResult(n,t,e),e,t))}}const Cc=97,Nc=48;function $c(e){return e<10?String.fromCharCode(Nc+e):String.fromCharCode(Cc+(e-10))}function Rc(e){let t="";for(let n=0;n<e.length;n++){const r=e[n];t+=$c(r>>4),t+=$c(15&r)}return t}function Oc(e){const t=new Uint8Array(e);for(let e=0;e<t.length;e++)t[e]=512*Math.random();return t}function Mc(e){return"string"==typeof e?[{alias:null,unresolvedId:e}]:Array.isArray(e)?e.map(e=>({alias:null,unresolvedId:e})):Object.keys(e).map(t=>({alias:t,unresolvedId:e[t]}))}class Tc{constructor(e,t){if(this.assetsById=new Map,this.curChunkIndex=0,this.moduleById=new Map,this.needsTreeshakingPass=!1,this.phase=ic.LOAD_AND_PARSE,this.watchFiles=Object.create(null),this.externalModules=[],this.modules=[],this.curChunkIndex=0,this.deoptimizationTracker=new Zu,this.cachedModules=new Map,e.cache&&e.cache.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);if(!1!==e.cache){this.pluginCache=e.cache&&e.cache.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.keys(t))t[e][0]++}}if(this.preserveModules=e.preserveModules,this.cacheExpiry=e.experimentalCacheExpiry,this.treeshake=!1!==e.treeshake,this.treeshake&&(this.treeshakingOptions=e.treeshake?{annotations:!1!==e.treeshake.annotations,moduleSideEffects:e.treeshake.moduleSideEffects,propertyReadSideEffects:!1!==e.treeshake.propertyReadSideEffects,pureExternalModules:e.treeshake.pureExternalModules}:{annotations:!0,moduleSideEffects:!0,propertyReadSideEffects:!0,pureExternalModules:!1}),this.contextParse=((e,t={})=>this.acornParser.parse(e,Object.assign({},Wa,t,this.acornOptions))),this.pluginDriver=Ec(this,e,this.pluginCache,t),t){const e=e=>this.pluginDriver.hookSeqSync("watchChange",[e]);t.on("change",e),t.once("restart",()=>{t.removeListener("change",e)})}this.shimMissingExports=e.shimMissingExports,this.scope=new Qu,this.context=String(e.context);const n=e.moduleContext;if("function"==typeof n)this.getModuleContext=(e=>n(e)||this.context);else if("object"==typeof n){const e=new Map;for(const t in n)e.set(mt(t),n[t]);this.getModuleContext=(t=>e.get(t)||this.context)}else this.getModuleContext=(()=>this.context);this.onwarn=e.onwarn||function(){const e=Object.create(null);return t=>{const n=t.toString();n in e||(console.error(n),e[n]=!0)}}(),this.acornOptions=e.acorn||{};const r=[];r.push(qu),r.push(Yu),r.push(Uu),e.experimentalTopLevelAwait&&(this.acornOptions.allowAwaitOutsideFunction=!0);const i=e.acornInjectPlugins;r.push(...Array.isArray(i)?i:i?[i]:[]),this.acornParser=Yh.extend(...r),this.moduleLoader=new kc(this,this.moduleById,this.pluginDriver,e.external,"function"==typeof e.manualChunks&&e.manualChunks,this.treeshake?this.treeshakingOptions.moduleSideEffects:null,!!this.treeshake&&this.treeshakingOptions.pureExternalModules)}build(e,t,n){return La("parse modules",2),Promise.all([this.moduleLoader.addEntryModules(Mc(e),!0),t&&"object"==typeof t&&this.moduleLoader.addManualChunks(t)]).then(([{entryModules:e,manualChunkModulesByAlias:t}])=>{if(0===e.length)throw new Error("You must supply options.input to rollup");for(const e of this.moduleById.values())e instanceof qa?(this.modules.push(e),this.watchFiles[e.id]=!0):this.externalModules.push(e);if(Va("parse modules",2),this.phase=ic.ANALYSE,La("analyse dependency graph",2),this.link(e),Va("analyse dependency graph",2),La("mark included statements",2),n&&e.length>1)throw new Error("Internal Error: can only inline dynamic imports for single-file builds.");for(const t of e)t.includeAllExports();this.includeMarked(this.modules);for(const e of this.externalModules)e.warnUnusedImports();Va("mark included statements",2),La("generate chunks",2),this.preserveModules||n||function(e,t){let n,r,i;const s=new Set,o=[],a=e=>{n.manualChunkAlias?(e.manualChunkAlias=n.manualChunkAlias,e.entryPointsHash=r):function(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]^t[n]}(e.entryPointsHash,r);for(const t of e.dependencies)t instanceof gt||i.has(t.id)||(i.add(t.id),s.has(t.id)||t.manualChunkAlias||a(t));for(const{resolution:t}of e.dynamicImports)t instanceof qa&&t.dynamicallyImportedBy.length>0&&!t.manualChunkAlias&&o.push(t)};if(t)for(const e of Object.keys(t))for(n of(r=Oc(10),t[e]))i=new Set(n.id),a(n);for(n of e)s.add(n.id),r=Oc(10),i=new Set(n.id),n.manualChunkAlias||a(n);for(n of o)s.has(n.id)||(s.add(n.id),r=Oc(10),i=new Set(n.id),a(n))}(e,t);let r=[];if(this.preserveModules)for(const e of this.modules){const t=new ah(this,[e]);!e.isEntryPoint&&t.isEmpty||(t.entryModules=[e]),r.push(t)}else{const e={};for(const t of this.modules){const n=Rc(t.entryPointsHash),r=e[n];r?r.push(t):e[n]=[t]}for(const t in e){const n=e[t];Za(n);const i=new ah(this,n);r.push(i)}}for(const e of r)e.link();r=r.filter(oh);for(const e of r)(this.preserveModules||e.entryModules.length>0)&&e.generateEntryExportsOrMarkAsTainted();const i=[];if(!this.preserveModules)for(const e of r)for(const t of e.entryModules)if(e.facadeModule!==t){const e=new ah(this,[]);e.turnIntoFacade(t),i.push(e)}return Va("generate chunks",2),this.phase=ic.GENERATE,r.concat(i)})}finaliseAssets(e){const t=Object.create(null);return this.assetsById.forEach(n=>{void 0!==n.source&&rc(n,t,e)}),t}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let n=!0;for(const e of Object.keys(t))t[e][0]>=this.cacheExpiry?delete t[e]:n=!1;n&&delete this.pluginCache[e]}return{modules:this.modules.map(e=>e.toJSON()),plugins:this.pluginCache}}includeMarked(e){if(this.treeshake){let t=1;do{La(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const t of e)t.isExecuted&&t.include();Va(`treeshaking pass ${t++}`,3)}while(this.needsTreeshakingPass)}else for(const t of e)t.includeAllInBundle()}warn(e){e.toString=(()=>{let t="";return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${Ao(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+=e.message}),this.onwarn(e)}link(e){for(const e of this.modules)e.linkDependencies();const{orderedModules:t,cyclePaths:n}=function(e){let t=0;const n=[],r={},i=[],s=[],o={},a=e=>{if(!r[e.id]){if(e instanceof gt)return e.execIndex=t++,void(r[e.id]=!0);for(const t of e.dependencies)t.id in o?r[t.id]||n.push(eh(t.id,e.id,o)):(o[t.id]=e.id,a(t));for(const{resolution:t}of e.dynamicImports)t instanceof qa&&-1===s.indexOf(t)&&s.push(t);e.execIndex=t++,r[e.id]=!0,i.push(e)}};for(const t of e)o[t.id]||(o[t.id]=null,a(t));for(const e of s)o[e.id]||(o[e.id]=null,a(e));return{orderedModules:i,cyclePaths:n}}(e);for(const e of n)this.warn({code:"CIRCULAR_DEPENDENCY",importer:e[0],message:`Circular dependency: ${e.join(" -> ")}`});this.modules=t;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of Object.keys(e.importDescriptions)){const n=e.importDescriptions[t];"*"===n.name||n.module.getVariableForExportName(n.name)||e.warn({code:"NON_EXISTENT_EXPORT",message:`Non-existent export '${n.name}' is imported from ${Ao(n.module.id)}`,name:n.name,source:n.module.id},n.start)}}}function Dc(e){switch(typeof e){case"function":return e();case"string":return e;default:return""}}const Lc=(e,t)=>t?`${e}\n${t}`:e,Vc=(e,t)=>t?`${e}\n\n${t}`:e;function Bc(e,t){Io({code:"INVALID_EXPORT_OPTION",message:`'${e}' was specified for output.exports, but entry module has following exports: ${t.join(", ")}`})}function zc(e,{exports:t,name:n,format:r}){const i=e.getExportNames();return"default"===t?1===i.length&&"default"===i[0]||Bc("default",i):"none"===t&&i.length&&Bc("none",i),t&&"auto"!==t||(0===i.length?t="none":1===i.length&&"default"===i[0]?t="default":(null!==e.facadeModule&&e.facadeModule.isEntryPoint&&"es"!==r&&-1!==i.indexOf("default")&&e.graph.warn({code:"MIXED_EXPORTS",message:`Using named and default exports together. Consumers of your bundle will have to use ${n||"bundle"}['default'] to access the default export, which may not be what you want. Use \`output.exports: 'named'\` to disable this warning`,url:"https://rollupjs.org/guide/en#output-exports"}),t="named")),/(?:default|named|none)/.test(t)||Io({code:"INVALID_EXPORT_OPTION",message:"output.exports must be 'default', 'named', 'none', 'auto', or left unspecified (defaults to 'auto')",url:"https://rollupjs.org/guide/en#output-exports"}),t}const jc=(e,t)=>(n,r)=>void 0!==t[n]?t[n]:void 0!==e[n]?e[n]:r,Wc=e=>e&&"object"!=typeof e?{}:e,Uc=(e,t,n)=>{const r=Wc(t[n]),i=Wc(e[n]);return void 0!==r?r&&i?Object.assign({},i,r):r:i},Fc=(e,t,n=(e=>{"string"==typeof e?console.warn(e):console.warn(e.message)}))=>t.silent?()=>{}:e.onwarn?t=>e.onwarn(t,n):n,qc=(e,t)=>{const n=e.external;return"function"==typeof n?(e,...r)=>n(e,...r)||-1!==t.external.indexOf(e):("string"==typeof e.external?[n]:Array.isArray(n)?n:[]).concat(t.external)},Gc={c:"config",d:"dir",e:"external",f:"format",g:"globals",h:"help",i:"input",m:"sourcemap",n:"name",o:"file",v:"version",w:"watch"};function Hc({config:e={},command:t={},defaultOnWarnHandler:n}){const r=function(e){const t=e.external&&"string"==typeof e.external?e.external.split(","):[];return Object.assign({},e,{external:t,globals:"string"==typeof e.globals?e.globals.split(",").reduce((e,n)=>{const[r,i]=n.split(":");return e[r]=i,-1===t.indexOf(r)&&t.push(r),e},Object.create(null)):void 0})}(t),i=function(e,t={external:[],globals:void 0},n){const r=jc(e,t),i={acorn:e.acorn,acornInjectPlugins:e.acornInjectPlugins,cache:r("cache"),chunkGroupingSize:r("chunkGroupingSize",5e3),context:e.context,experimentalCacheExpiry:r("experimentalCacheExpiry",10),experimentalOptimizeChunks:r("experimentalOptimizeChunks"),experimentalTopLevelAwait:r("experimentalTopLevelAwait"),external:qc(e,t),inlineDynamicImports:r("inlineDynamicImports",!1),input:r("input",[]),manualChunks:r("manualChunks"),moduleContext:e.moduleContext,onwarn:Fc(e,t,n),perf:r("perf",!1),plugins:e.plugins,preserveModules:r("preserveModules"),preserveSymlinks:r("preserveSymlinks"),shimMissingExports:r("shimMissingExports"),treeshake:Uc(e,t,"treeshake"),watch:e.watch};i.cache&&i.cache.cache&&(i.cache=i.cache.cache);return i}(e,r,n);r.output&&Object.assign(r,r.output);const s=e.output,o=Array.isArray(s)?s:s?[s]:[];0===o.length&&o.push({});const a=o.map(e=>(function(e,t={}){const n=jc(e,t);let r=n("format");switch(r){case"esm":case"module":r="es";break;case"commonjs":r="cjs"}return{amd:Object.assign({},e.amd,t.amd),assetFileNames:n("assetFileNames"),banner:n("banner"),chunkFileNames:n("chunkFileNames"),compact:n("compact",!1),dir:n("dir"),dynamicImportFunction:n("dynamicImportFunction"),entryFileNames:n("entryFileNames"),esModule:n("esModule",!0),exports:n("exports"),extend:n("extend"),file:n("file"),footer:n("footer"),format:"esm"===r?"es":r,freeze:n("freeze",!0),globals:n("globals"),indent:n("indent",!0),interop:n("interop",!0),intro:n("intro"),name:n("name"),namespaceToStringTag:n("namespaceToStringTag",!1),noConflict:n("noConflict"),outro:n("outro"),paths:n("paths"),preferConst:n("preferConst"),sourcemap:n("sourcemap"),sourcemapExcludeSources:n("sourcemapExcludeSources"),sourcemapFile:n("sourcemapFile"),sourcemapPathTransform:n("sourcemapPathTransform"),strict:n("strict",!0)}})(e,r)),h=[],u=Object.keys(i);Kc(h,Object.keys(e),u,"input option",/^output$/);const c=Object.keys(a[0]);Kc(h,a.reduce((e,t)=>e.concat(Object.keys(t)),[]),c,"output option");const l=c.filter(e=>"sourcemapPathTransform"!==e);return Kc(h,Object.keys(r),u.concat(l,Object.keys(Gc),"config","environment","silent"),"CLI flag",/^_|output|(config.*)$/),{inputOptions:i,optionError:h.length>0?h.join("\n"):null,outputOptions:a}}function Kc(e,t,n,r,i=/$./){const s=t.filter(e=>-1===n.indexOf(e)&&!i.test(e));s.length>0&&e.push(`Unknown ${r}: ${s.join(", ")}. Allowed options: ${n.sort().join(", ")}`)}const Yc={get(){throw new Error("bundle.generate(...) now returns a Promise instead of a { code, map } object")}};function Xc(e,t){return t.options&&t.options.call({meta:{rollupVersion:n}},e)||e}let Qc;var Jc;function Zc(e){return e.isAsset?Jc.ASSET:e.isEntry?Jc.ENTRY_CHUNK:Jc.SECONDARY_CHUNK}function el(e){return{output:Object.keys(e).map(t=>e[t]).sort((e,t)=>{const n=Zc(e),r=Zc(t);return n===r?0:n<r?-1:1})}}function tl(e){return!0===e.isAsset}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(Jc||(Jc={})),e.VERSION=n,e.rollup=function(e){try{const t=function(e){if(!e)throw new Error("You must supply an options object to rollup");let{inputOptions:t,optionError:n}=Hc({config:e});n&&t.onwarn({message:n,code:"UNKNOWN_OPTION"});const r=t.plugins;return t.plugins=Array.isArray(r)?r.filter(Boolean):r?[r]:[],(t=t.plugins.reduce(Xc,t)).inlineDynamicImports?(t.preserveModules&&Io({code:"INVALID_OPTION",message:'"preserveModules" does not support the "inlineDynamicImports" option.'}),t.manualChunks&&Io({code:"INVALID_OPTION",message:'"manualChunks" option is not supported for "inlineDynamicImports".'}),t.experimentalOptimizeChunks&&Io({code:"INVALID_OPTION",message:'"experimentalOptimizeChunks" option is not supported for "inlineDynamicImports".'}),(t.input instanceof Array&&t.input.length>1||"object"==typeof t.input&&Object.keys(t.input).length>1)&&Io({code:"INVALID_OPTION",message:'Multiple inputs are not supported for "inlineDynamicImports".'})):t.preserveModules&&(t.manualChunks&&Io({code:"INVALID_OPTION",message:'"preserveModules" does not support the "manualChunks" option.'}),t.experimentalOptimizeChunks&&Io({code:"INVALID_OPTION",message:'"preserveModules" does not support the "experimentalOptimizeChunks" option.'})),t}(e);ja(t);const n=new Tc(t,Qc);Qc=void 0;const r=!1!==e.cache;return delete t.cache,delete e.cache,La("BUILD",1),n.pluginDriver.hookParallel("buildStart",[t]).then(()=>n.build(t.input,t.manualChunks,t.inlineDynamicImports)).then(e=>n.pluginDriver.hookParallel("buildEnd",[]).then(()=>e),e=>n.pluginDriver.hookParallel("buildEnd",[e]).then(()=>{throw e})).then(e=>{Va("BUILD",1);let i=!1;function s(r){return function(e,t,n,r){if(!t)throw new Error("You must supply an options object");const i=Hc({config:{output:Object.assign({},t,t.output,e.output)}});if(i.optionError)throw new Error(i.optionError);const s=i.outputOptions[0],o=r.hookReduceArg0Sync("outputOptions",[s],(e,t)=>t||e);var a;return"es6"===(a=o).format&&Io({message:'The "es6" output format is deprecated – use "esm" instead',url:"https://rollupjs.org/guide/en#output-format"}),["amd","cjs","system","es","iife","umd"].indexOf(a.format)<0&&Io({message:'You must specify "output.format", which can be one of "amd", "cjs", "system", "esm", "iife" or "umd".',url:"https://rollupjs.org/guide/en#output-format"}),"string"==typeof o.file&&("string"==typeof o.dir&&Io({code:"INVALID_OPTION",message:'You must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks.'}),e.preserveModules&&Io({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when using the "preserveModules" option.'}),"object"!=typeof e.input||Array.isArray(e.input)||Io({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when providing named inputs.'})),n&&("umd"!==o.format&&"iife"!==o.format||Io({code:"INVALID_OPTION",message:"UMD and IIFE output formats are not supported for code-splitting builds."}),"string"==typeof o.file&&Io({code:"INVALID_OPTION",message:'You must set "output.dir" instead of "output.file" when generating multiple chunks.'})),o}(t,r,e.length>1,n.pluginDriver)}function o(r,s){La("GENERATE",1);const o=r.assetFileNames||"assets/[name]-[hash][extname]",a=n.finaliseAssets(o),h=function(e){if(0===e.length)return"/";if(1===e.length)return pt(e[0]);const t=e.slice(1).reduce((e,t)=>{const n=t.split(/\/+|\\+/);let r;for(r=0;e[r]===n[r]&&r<Math.min(e.length,n.length);r++);return e.slice(0,r)},e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}(function(e){const t=[];for(const n of e)for(const e of n.entryModules)ht(e.id)&&t.push(e.id);return t}(e));return n.pluginDriver.hookParallel("renderStart",[]).then(()=>(function(e,t){const n=e.pluginDriver;return Promise.all([n.hookReduceValue("banner",Dc(t.banner),[],Lc),n.hookReduceValue("footer",Dc(t.footer),[],Lc),n.hookReduceValue("intro",Dc(t.intro),[],Vc),n.hookReduceValue("outro",Dc(t.outro),[],Vc)]).then(([e,t,n,r])=>(n&&(n+="\n\n"),r&&(r=`\n\n${r}`),e.length&&(e+="\n"),t.length&&(t="\n"+t),{intro:n,outro:r,banner:e,footer:t})).catch(e=>{Io({code:"ADDON_ERROR",message:`Could not retrieve ${e.hook}. Check configuration of ${e.plugin}.\n\tError Message: ${e.message}`})})})(n,r)).then(s=>{for(const n of e)t.preserveModules||n.generateInternalExports(r),n.facadeModule&&n.facadeModule.isEntryPoint&&(n.exportMode=zc(n,r));for(const t of e)t.preRender(r,h);!i&&t.experimentalOptimizeChunks&&(function(e,t,n,r){for(let i=0;i<e.length;i++){const s=e[i],o=[];if(s.visitStaticDependenciesUntilCondition(e=>{e instanceof ah&&o.push(e)}),o.length<2)continue;let a=1,h=!0,u=void 0,c=o[0],l=o[1];const p=e=>!(null!==e.facadeModule||null!==e.manualChunkAlias||!l||null!==l.facadeModule||e.getRenderedSourceLength()>n);do{if(h){p(c)&&(h=!1);continue}let s=n-u.getRenderedSourceLength()-c.getRenderedSourceLength();if(s<=0){p(c)||(h=!0);continue}const d=new Set;c.visitStaticDependenciesUntilCondition(e=>d.add(e));const f=new Set([c,u]);if(u.visitStaticDependenciesUntilCondition(e=>e!==c&&e!==u&&!d.has(e)&&(e instanceof gt||(s-=e.getRenderedSourceLength())<=0||void f.add(e)))){p(c)||(h=!0);continue}if(c.visitStaticDependenciesUntilCondition(e=>!f.has(e)&&(e instanceof gt||(s-=e.getRenderedSourceLength())<=0||void 0))){p(c)||(h=!0);continue}const m=e.indexOf(c);m<=i&&i--,e.splice(m,1),u.merge(c,e,t,r),o.splice(--a,1),c=u,l&&!p(l)&&(h=!0)}while(u=c,c=l,l=o[++a],c)}}(e,r,t.chunkGroupingSize,h),i=!0),function(e,t,n,r,i){const s={},[o,a]=e.reduce(([e,t],n)=>((n.facadeModule&&n.facadeModule.isUserDefinedEntryPoint?e:t).push(n),[e,t]),[[],[]]),h=o.concat(a);for(let e=0;e<h.length;e++){const o=h[e];if(n.file)o.id=lt(n.file);else if(t.preserveModules)o.generateIdPreserveModules(r,s);else{let e,t;o.facadeModule&&o.facadeModule.isUserDefinedEntryPoint?(e=n.entryFileNames||"[name].js",t="output.entryFileNames"):(e=n.chunkFileNames||"[name]-[hash].js",t="output.chunkFileNames"),o.generateId(e,t,i,n,s)}s[o.id]=!0}}(e,t,r,h,s);for(let t=0;t<e.length;t++){const n=e[t],r=n.facadeModule;a[n.id]={code:void 0,dynamicImports:n.getDynamicImportIds(),exports:n.getExportNames(),facadeModuleId:r&&r.id,fileName:n.id,imports:n.getImportIds(),isDynamicEntry:null!==r&&r.dynamicallyImportedBy.length>0,isEntry:null!==r&&r.isEntryPoint,map:void 0,modules:n.renderedModules,get name(){return n.getChunkName()}}}return Promise.all(e.map(e=>{const t=a[e.id];return e.render(r,s,t).then(e=>(t.code=e.code,t.map=e.map,n.pluginDriver.hookParallel("ongenerate",[Object.assign({bundle:t},r),t])))})).then(()=>{})}).catch(e=>n.pluginDriver.hookParallel("renderError",[e]).then(()=>{throw e})).then(()=>{const e=new Map(n.assetsById),t=nc(e,a,o);return n.pluginDriver.hookSeq("generateBundle",[r,a,s],e=>Object.assign({},e,t)).then(()=>{e.forEach(e=>{void 0===e.fileName&&rc(e,a,o)})})}).then(()=>(Va("GENERATE",1),a))}const a={cache:r?n.getCache():void 0,generate:e=>{const t=o(s(e),!1).then(e=>el(e));return Object.defineProperty(t,"code",Yc),Object.defineProperty(t,"map",Yc),t},watchFiles:Object.keys(n.watchFiles),write:e=>{const r=s(e);return r.dir||r.file||Io({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.'}),o(r,!0).then(e=>{let i=0;for(const t of Object.keys(e))if(!e[t].isAsset&&++i>1)break;return i>1&&(r.sourcemapFile&&Io({code:"INVALID_OPTION",message:'"output.sourcemapFile" is only supported for single-file builds.'}),"string"==typeof r.file&&Io({code:"INVALID_OPTION",message:'When building multiple chunks, the "output.dir" option must be used, not "output.file".'+("string"!=typeof t.input||!0===t.inlineDynamicImports?"":' To inline dynamic imports, set the "inlineDynamicImports" option.')})),Promise.all(Object.keys(e).map(t=>(function(e,t,n,r){const i=mt(r.dir||pt(r.file),n.fileName);let s,o;if(tl(n))o=n.source;else if(o=n.code,r.sourcemap&&n.map){let e;"inline"===r.sourcemap?e=n.map.toUrl():(e=`${lt(n.fileName)}.map`,s=cc(`${i}.map`,n.map.toString())),o+=`//# ${Ia}=${e}\n`}return cc(i,o).then(()=>s).then(()=>!tl(n)&&e.pluginDriver.hookSeq("onwrite",[Object.assign({bundle:t},r),n])).then(()=>{})})(n,a,e[t],r))).then(()=>n.pluginDriver.hookParallel("writeBundle",[e])).then(()=>el(e))})}};return!0===t.perf&&(a.getTimings=Da),a})}catch(e){return Promise.reject(e)}},Object.defineProperty(e,"__esModule",{value:!0})});

dist/rollup.d.ts

@@ -116,7 +116,7 @@
cache: PluginCache;
emitAsset: EmitAsset;
emitChunk: EmitChunk;
- error: (err: RollupError | string, pos?: { column: number; line: number }) => void;
+ error: (err: RollupError | string, pos?: { column: number; line: number }) => never;
getAssetFileName: (assetReferenceId: string) => string;
getChunkFileName: (chunkReferenceId: string) => string;
getModuleInfo: (
@@ -276,48 +276,48 @@
}
export interface PluginHooks {
- buildEnd?: (this: PluginContext, err?: Error) => Promise<void> | void;
- buildStart?: (this: PluginContext, options: InputOptions) => Promise<void> | void;
- generateBundle?: (
+ buildEnd: (this: PluginContext, err?: Error) => Promise<void> | void;
+ buildStart: (this: PluginContext, options: InputOptions) => Promise<void> | void;
+ generateBundle: (
this: PluginContext,
options: OutputOptions,
bundle: OutputBundle,
isWrite: boolean
) => void | Promise<void>;
- load?: LoadHook;
+ load: LoadHook;
/** @deprecated Use `generateBundle` instead */
- ongenerate?: (
+ ongenerate: (
this: PluginContext,
options: OnGenerateOptions,
chunk: OutputChunk
) => void | Promise<void>;
/** @deprecated Use `writeBundle` instead */
- onwrite?: (
+ onwrite: (
this: PluginContext,
options: OnWriteOptions,
chunk: OutputChunk
) => void | Promise<void>;
- options?: (this: MinimalPluginContext, options: InputOptions) => InputOptions | void | null;
- outputOptions?: (this: PluginContext, options: OutputOptions) => OutputOptions | void | null;
- renderChunk?: RenderChunkHook;
- renderError?: (this: PluginContext, err?: Error) => Promise<void> | void;
- renderStart?: (this: PluginContext) => Promise<void> | void;
+ options: (this: MinimalPluginContext, options: InputOptions) => InputOptions | void | null;
+ outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions | void | null;
+ renderChunk: RenderChunkHook;
+ renderError: (this: PluginContext, err?: Error) => Promise<void> | void;
+ renderStart: (this: PluginContext) => Promise<void> | void;
/** @deprecated Use `resolveFileUrl` instead */
- resolveAssetUrl?: ResolveAssetUrlHook;
- resolveDynamicImport?: ResolveDynamicImportHook;
- resolveFileUrl?: ResolveFileUrlHook;
- resolveId?: ResolveIdHook;
- resolveImportMeta?: ResolveImportMetaHook;
- transform?: TransformHook;
+ resolveAssetUrl: ResolveAssetUrlHook;
+ resolveDynamicImport: ResolveDynamicImportHook;
+ resolveFileUrl: ResolveFileUrlHook;
+ resolveId: ResolveIdHook;
+ resolveImportMeta: ResolveImportMetaHook;
+ transform: TransformHook;
/** @deprecated Use `renderChunk` instead */
- transformBundle?: TransformChunkHook;
+ transformBundle: TransformChunkHook;
/** @deprecated Use `renderChunk` instead */
- transformChunk?: TransformChunkHook;
- watchChange?: (id: string) => void;
- writeBundle?: (this: PluginContext, bundle: OutputBundle) => void | Promise<void>;
+ transformChunk: TransformChunkHook;
+ watchChange: (id: string) => void;
+ writeBundle: (this: PluginContext, bundle: OutputBundle) => void | Promise<void>;
}
-export interface Plugin extends PluginHooks {
+export interface Plugin extends Partial<PluginHooks> {
banner?: AddonHook;
cacheKey?: string;
footer?: AddonHook;
@@ -357,7 +357,7 @@
input?: InputOption;
manualChunks?: ManualChunksOption;
moduleContext?: ((id: string) => string) | { [id: string]: string };
- onwarn?: WarningHandler;
+ onwarn?: WarningHandlerWithDefault;
perf?: boolean;
plugins?: Plugin[];
preserveModules?: boolean;
@@ -421,6 +421,10 @@
strict?: boolean;
}
+export type WarningHandlerWithDefault = (
+ warning: string | RollupWarning,
+ defaultHandler: WarningHandler
+) => void;
export type WarningHandler = (warning: string | RollupWarning) => void;
export interface SerializedTimings {

dist/rollup.es.js

@@ -1,7 +1,7 @@
/*
@license
- Rollup.js v1.12.2
- Fri, 17 May 2019 12:41:59 GMT - commit a4fbc5374cb5fe43a2070855cea74cf7c0789543
+ Rollup.js v1.12.3
+ Sun, 19 May 2019 09:38:58 GMT - commit 455e99473173da50a6e3b30ed8bc9997f3f55afc
https://github.com/rollup/rollup
@@ -19,7 +19,7 @@
import url from 'url';
import module$1 from 'module';
-var version = "1.12.2";
+var version = "1.12.3";
var minimalisticAssert = assert;
function assert(val, msg) {
@@ -1825,25 +1825,192 @@
return this;
};
+const BLANK = Object.create(null);
+
const BlockStatement = 'BlockStatement';
const CallExpression = 'CallExpression';
-const ClassDeclaration = 'ClassDeclaration';
const ExportAllDeclaration = 'ExportAllDeclaration';
-const ExportDefaultDeclaration = 'ExportDefaultDeclaration';
const ExpressionStatement = 'ExpressionStatement';
-const FunctionDeclaration = 'FunctionDeclaration';
const FunctionExpression = 'FunctionExpression';
const Identifier = 'Identifier';
const ImportDefaultSpecifier = 'ImportDefaultSpecifier';
const ImportNamespaceSpecifier = 'ImportNamespaceSpecifier';
-const Literal = 'Literal';
-const MemberExpression = 'MemberExpression';
const Program = 'Program';
const Property = 'Property';
const ReturnStatement = 'ReturnStatement';
-const TemplateLiteral = 'TemplateLiteral';
const VariableDeclaration = 'VariableDeclaration';
+function treeshakeNode(node, code, start, end) {
+ code.remove(start, end);
+ if (node.annotations) {
+ for (const annotation of node.annotations) {
+ if (annotation.start < start) {
+ code.remove(annotation.start, annotation.end);
+ }
+ else {
+ return;
+ }
+ }
+ }
+}
+function removeAnnotations(node, code) {
+ if (!node.annotations && node.parent.type === ExpressionStatement) {
+ node = node.parent;
+ }
+ if (node.annotations) {
+ for (const annotation of node.annotations) {
+ code.remove(annotation.start, annotation.end);
+ }
+ }
+}
+
+const NO_SEMICOLON = { isNoStatement: true };
+function findFirstOccurrenceOutsideComment(code, searchString, start = 0) {
+ let searchPos, charCodeAfterSlash;
+ searchPos = code.indexOf(searchString, start);
+ while (true) {
+ start = code.indexOf('/', start);
+ if (start === -1 || start > searchPos)
+ return searchPos;
+ charCodeAfterSlash = code.charCodeAt(++start);
+ ++start;
+ if (charCodeAfterSlash === 47 /*"/"*/) {
+ start = code.indexOf('\n', start) + 1;
+ if (start === 0)
+ return -1;
+ if (start > searchPos) {
+ searchPos = code.indexOf(searchString, start);
+ }
+ }
+ else if (charCodeAfterSlash === 42 /*"*"*/) {
+ start = code.indexOf('*/', start) + 2;
+ if (start > searchPos) {
+ searchPos = code.indexOf(searchString, start);
+ }
+ }
+ }
+}
+function findFirstLineBreakOutsideComment(code, start = 0) {
+ let lineBreakPos, charCodeAfterSlash;
+ lineBreakPos = code.indexOf('\n', start);
+ while (true) {
+ start = code.indexOf('/', start);
+ if (start === -1 || start > lineBreakPos)
+ return lineBreakPos;
+ charCodeAfterSlash = code.charCodeAt(++start);
+ if (charCodeAfterSlash === 47 /*"/"*/)
+ return lineBreakPos;
+ ++start;
+ if (charCodeAfterSlash === 42 /*"*"*/) {
+ start = code.indexOf('*/', start) + 2;
+ if (start > lineBreakPos) {
+ lineBreakPos = code.indexOf('\n', start);
+ }
+ }
+ }
+}
+function renderStatementList(statements, code, start, end, options) {
+ if (statements.length === 0)
+ return;
+ let currentNode, currentNodeStart, currentNodeNeedsBoundaries, nextNodeStart;
+ let nextNode = statements[0];
+ let nextNodeNeedsBoundaries = !nextNode.included || nextNode.needsBoundaries;
+ if (nextNodeNeedsBoundaries) {
+ nextNodeStart =
+ start + findFirstLineBreakOutsideComment(code.original.slice(start, nextNode.start)) + 1;
+ }
+ for (let nextIndex = 1; nextIndex <= statements.length; nextIndex++) {
+ currentNode = nextNode;
+ currentNodeStart = nextNodeStart;
+ currentNodeNeedsBoundaries = nextNodeNeedsBoundaries;
+ nextNode = statements[nextIndex];
+ nextNodeNeedsBoundaries =
+ nextNode === undefined ? false : !nextNode.included || nextNode.needsBoundaries;
+ if (currentNodeNeedsBoundaries || nextNodeNeedsBoundaries) {
+ nextNodeStart =
+ currentNode.end +
+ findFirstLineBreakOutsideComment(code.original.slice(currentNode.end, nextNode === undefined ? end : nextNode.start)) +
+ 1;
+ if (currentNode.included) {
+ currentNodeNeedsBoundaries
+ ? currentNode.render(code, options, {
+ end: nextNodeStart,
+ start: currentNodeStart
+ })
+ : currentNode.render(code, options);
+ }
+ else {
+ treeshakeNode(currentNode, code, currentNodeStart, nextNodeStart);
+ }
+ }
+ else {
+ currentNode.render(code, options);
+ }
+ }
+}
+// This assumes that the first character is not part of the first node
+function getCommaSeparatedNodesWithBoundaries(nodes, code, start, end) {
+ const splitUpNodes = [];
+ let node, nextNode, nextNodeStart, contentEnd, char;
+ let separator = start - 1;
+ for (let nextIndex = 0; nextIndex < nodes.length; nextIndex++) {
+ nextNode = nodes[nextIndex];
+ if (node !== undefined) {
+ separator =
+ node.end +
+ findFirstOccurrenceOutsideComment(code.original.slice(node.end, nextNode.start), ',');
+ }
+ nextNodeStart = contentEnd =
+ separator +
+ 2 +
+ findFirstLineBreakOutsideComment(code.original.slice(separator + 1, nextNode.start));
+ while (((char = code.original.charCodeAt(nextNodeStart)),
+ char === 32 /*" "*/ || char === 9 /*"\t"*/ || char === 10 /*"\n"*/ || char === 13) /*"\r"*/)
+ nextNodeStart++;
+ if (node !== undefined) {
+ splitUpNodes.push({
+ contentEnd,
+ end: nextNodeStart,
+ node,
+ separator,
+ start
+ });
+ }
+ node = nextNode;
+ start = nextNodeStart;
+ }
+ splitUpNodes.push({
+ contentEnd: end,
+ end,
+ node: node,
+ separator: null,
+ start
+ });
+ return splitUpNodes;
+}
+
+const chars$1 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
+const base = 64;
+function toBase64(num) {
+ let outStr = '';
+ do {
+ const curDigit = num % base;
+ num = Math.floor(num / base);
+ outStr = chars$1[curDigit] + outStr;
+ } while (num !== 0);
+ return outStr;
+}
+
+function getSafeName(baseName, usedNames) {
+ let safeName = baseName;
+ let count = 1;
+ while (usedNames[safeName]) {
+ safeName = `${baseName}$${toBase64(count++)}`;
+ }
+ usedNames[safeName] = true;
+ return safeName;
+}
+
class CallOptions {
static create(callOptions) {
return new this(callOptions);
@@ -2569,1566 +2736,6 @@
}
LocalVariable.prototype.isLocal = true;
-function isExportDefaultVariable(variable) {
- return variable.isDefault;
-}
-class ExportDefaultVariable extends LocalVariable {
- constructor(name, exportDefaultDeclaration, context) {
- super(name, exportDefaultDeclaration, exportDefaultDeclaration.declaration, context);
- // Not initialised during construction
- this.originalId = null;
- const declaration = exportDefaultDeclaration.declaration;
- if ((declaration.type === FunctionDeclaration ||
- declaration.type === ClassDeclaration) &&
- declaration.id) {
- this.hasId = true;
- this.originalId = declaration.id;
- }
- else if (declaration.type === Identifier) {
- this.originalId = declaration;
- }
- }
- addReference(identifier) {
- if (!this.hasId) {
- this.name = identifier.name;
- }
- }
- getName() {
- return this.referencesOriginal() ? this.originalId.variable.getName() : super.getName();
- }
- getOriginalVariable() {
- return (this.originalId && this.originalId.variable) || null;
- }
- getOriginalVariableName() {
- return (this.originalId && this.originalId.name) || null;
- }
- referencesOriginal() {
- return this.originalId && (this.hasId || !this.originalId.variable.isReassigned);
- }
- setRenderNames(baseName, name) {
- if (this.referencesOriginal()) {
- this.originalId.variable.setRenderNames(baseName, name);
- }
- else {
- super.setRenderNames(baseName, name);
- }
- }
- setSafeName(name) {
- if (this.referencesOriginal()) {
- this.originalId.variable.setSafeName(name);
- }
- else {
- super.setSafeName(name);
- }
- }
-}
-ExportDefaultVariable.prototype.getBaseVariableName = ExportDefaultVariable.prototype.getName;
-ExportDefaultVariable.prototype.isDefault = true;
-
-const MISSING_EXPORT_SHIM_VARIABLE = '_missingExportShim';
-const INTEROP_DEFAULT_VARIABLE = '_interopDefault';
-
-class ExportShimVariable extends Variable {
- constructor(module) {
- super(MISSING_EXPORT_SHIM_VARIABLE);
- this.module = module;
- }
-}
-
-const pureFunctions = {};
-const arrayTypes = 'Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' ');
-const simdTypes = 'Int8x16 Int16x8 Int32x4 Float32x4 Float64x2'.split(' ');
-const simdMethods = 'abs add and bool check div equal extractLane fromFloat32x4 fromFloat32x4Bits fromFloat64x2 fromFloat64x2Bits fromInt16x8Bits fromInt32x4 fromInt32x4Bits fromInt8x16Bits greaterThan greaterThanOrEqual lessThan lessThanOrEqual load max maxNum min minNum mul neg not notEqual or reciprocalApproximation reciprocalSqrtApproximation replaceLane select selectBits shiftLeftByScalar shiftRightArithmeticByScalar shiftRightLogicalByScalar shuffle splat sqrt store sub swizzle xor'.split(' ');
-const allSimdMethods = [];
-simdTypes.forEach(t => {
- simdMethods.forEach(m => {
- allSimdMethods.push(`SIMD.${t}.${m}`);
- });
-});
-[
- 'Array.isArray',
- 'Error',
- 'EvalError',
- 'InternalError',
- 'RangeError',
- 'ReferenceError',
- 'SyntaxError',
- 'TypeError',
- 'URIError',
- 'isFinite',
- 'isNaN',
- 'parseFloat',
- 'parseInt',
- 'decodeURI',
- 'decodeURIComponent',
- 'encodeURI',
- 'encodeURIComponent',
- 'escape',
- 'unescape',
- 'Object',
- 'Object.create',
- 'Object.getNotifier',
- 'Object.getOwn',
- 'Object.getOwnPropertyDescriptor',
- 'Object.getOwnPropertyNames',
- 'Object.getOwnPropertySymbols',
- 'Object.getPrototypeOf',
- 'Object.is',
- 'Object.isExtensible',
- 'Object.isFrozen',
- 'Object.isSealed',
- 'Object.keys',
- 'Boolean',
- 'Number',
- 'Number.isFinite',
- 'Number.isInteger',
- 'Number.isNaN',
- 'Number.isSafeInteger',
- 'Number.parseFloat',
- 'Number.parseInt',
- 'Symbol',
- 'Symbol.for',
- 'Symbol.keyFor',
- 'Math.abs',
- 'Math.acos',
- 'Math.acosh',
- 'Math.asin',
- 'Math.asinh',
- 'Math.atan',
- 'Math.atan2',
- 'Math.atanh',
- 'Math.cbrt',
- 'Math.ceil',
- 'Math.clz32',
- 'Math.cos',
- 'Math.cosh',
- 'Math.exp',
- 'Math.expm1',
- 'Math.floor',
- 'Math.fround',
- 'Math.hypot',
- 'Math.imul',
- 'Math.log',
- 'Math.log10',
- 'Math.log1p',
- 'Math.log2',
- 'Math.max',
- 'Math.min',
- 'Math.pow',
- 'Math.random',
- 'Math.round',
- 'Math.sign',
- 'Math.sin',
- 'Math.sinh',
- 'Math.sqrt',
- 'Math.tan',
- 'Math.tanh',
- 'Math.trunc',
- 'Date',
- 'Date.UTC',
- 'Date.now',
- 'Date.parse',
- 'String',
- 'String.fromCharCode',
- 'String.fromCodePoint',
- 'String.raw',
- 'RegExp',
- 'Map',
- 'Set',
- 'WeakMap',
- 'WeakSet',
- 'ArrayBuffer',
- 'ArrayBuffer.isView',
- 'DataView',
- 'Promise.all',
- 'Promise.race',
- 'Promise.resolve',
- 'Intl.Collator',
- 'Intl.Collator.supportedLocalesOf',
- 'Intl.DateTimeFormat',
- 'Intl.DateTimeFormat.supportedLocalesOf',
- 'Intl.NumberFormat',
- 'Intl.NumberFormat.supportedLocalesOf'
- // TODO properties of e.g. window...
-]
- .concat(arrayTypes, arrayTypes.map(t => `${t}.from`), arrayTypes.map(t => `${t}.of`), simdTypes.map(t => `SIMD.${t}`), allSimdMethods)
- .forEach(name => (pureFunctions[name] = true));
-
-class GlobalVariable extends Variable {
- hasEffectsWhenAccessedAtPath(path) {
- // path.length == 0 can also have an effect but we postpone this for now
- return (path.length > 0 &&
- !this.isPureFunctionMember(path) &&
- !(this.name === 'Reflect' && path.length === 1));
- }
- hasEffectsWhenCalledAtPath(path) {
- return !pureFunctions[[this.name, ...path].join('.')];
- }
- isPureFunctionMember(path) {
- return (pureFunctions[[this.name, ...path].join('.')] ||
- (path.length >= 1 && pureFunctions[[this.name, ...path.slice(0, -1)].join('.')]) ||
- (path.length >= 2 &&
- pureFunctions[[this.name, ...path.slice(0, -2)].join('.')] &&
- path[path.length - 2] === 'prototype'));
- }
-}
-
-// Verified on IE 6/7 that these keywords can't be used for object properties without escaping:
-// break case catch class const continue debugger default delete do
-// else enum export extends false finally for function if import
-// in instanceof new null return super switch this throw true
-// try typeof var void while with
-const RESERVED_NAMES = Object.assign(Object.create(null), {
- await: true,
- break: true,
- case: true,
- catch: true,
- class: true,
- const: true,
- continue: true,
- debugger: true,
- default: true,
- delete: true,
- do: true,
- else: true,
- enum: true,
- eval: true,
- export: true,
- extends: true,
- false: true,
- finally: true,
- for: true,
- function: true,
- if: true,
- implements: true,
- import: true,
- in: true,
- instanceof: true,
- interface: true,
- let: true,
- new: true,
- null: true,
- package: true,
- private: true,
- protected: true,
- public: true,
- return: true,
- static: true,
- super: true,
- switch: true,
- this: true,
- throw: true,
- true: true,
- try: true,
- typeof: true,
- undefined: true,
- var: true,
- void: true,
- while: true,
- with: true,
- yield: true
-});
-const NONE = {};
-const EXPORTS = { exports: true };
-const RESERVED_NAMES_BY_FORMAT = {
- amd: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES },
- cjs: {
- forbiddenNames: RESERVED_NAMES,
- formatGlobals: { exports: true, module: true, [INTEROP_DEFAULT_VARIABLE]: true }
- },
- es: { formatGlobals: NONE, forbiddenNames: RESERVED_NAMES },
- iife: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES },
- system: {
- forbiddenNames: Object.assign(Object.create(null), RESERVED_NAMES, EXPORTS),
- formatGlobals: NONE
- },
- umd: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES }
-};
-
-class NamespaceVariable extends Variable {
- constructor(context) {
- super(context.getModuleName());
- this.memberVariables = Object.create(null);
- this.containsExternalNamespace = false;
- this.referencedEarly = false;
- this.references = [];
- this.context = context;
- this.module = context.module;
- for (const name of this.context.getExports().concat(this.context.getReexports())) {
- if (name[0] === '*' && name.length > 1)
- this.containsExternalNamespace = true;
- this.memberVariables[name] = this.context.traceExport(name);
- }
- }
- addReference(identifier) {
- this.references.push(identifier);
- this.name = identifier.name;
- }
- // This is only called if "UNKNOWN_PATH" is reassigned as in all other situations, either the
- // build fails due to an illegal namespace reassignment or MemberExpression already forwards
- // the reassignment to the right variable. This means we lost track of this variable and thus
- // need to reassign all exports.
- deoptimizePath() {
- for (const key in this.memberVariables) {
- this.memberVariables[key].deoptimizePath(UNKNOWN_PATH);
- }
- }
- include() {
- if (!this.included) {
- if (this.containsExternalNamespace) {
- this.context.error({
- code: 'NAMESPACE_CANNOT_CONTAIN_EXTERNAL',
- id: this.module.id,
- message: `Cannot create an explicit namespace object for module "${this.context.getModuleName()}" because it contains a reexported external namespace`
- }, undefined);
- }
- this.included = true;
- for (const identifier of this.references) {
- if (identifier.context.getModuleExecIndex() <= this.context.getModuleExecIndex()) {
- this.referencedEarly = true;
- break;
- }
- }
- if (this.context.preserveModules) {
- for (const memberName of Object.keys(this.memberVariables))
- this.memberVariables[memberName].include();
- }
- else {
- for (const memberName of Object.keys(this.memberVariables))
- this.context.includeVariable(this.memberVariables[memberName]);
- }
- }
- }
- renderBlock(options) {
- const _ = options.compact ? '' : ' ';
- const n = options.compact ? '' : '\n';
- const t = options.indent;
- const members = Object.keys(this.memberVariables).map(name => {
- const original = this.memberVariables[name];
- if (this.referencedEarly || original.isReassigned) {
- return `${t}get ${name}${_}()${_}{${_}return ${original.getName()}${options.compact ? '' : ';'}${_}}`;
- }
- const safeName = RESERVED_NAMES[name] ? `'${name}'` : name;
- return `${t}${safeName}: ${original.getName()}`;
- });
- const name = this.getName();
- const callee = options.freeze ? `/*#__PURE__*/Object.freeze` : '';
- let output = `${options.varOrConst} ${name} = ${options.namespaceToStringTag
- ? `{${n}${members.join(`,${n}`)}${n}};`
- : `${callee}({${n}${members.join(`,${n}`)}${n}});`}`;
- if (options.namespaceToStringTag) {
- output += `${n}if${_}(typeof Symbol${_}!==${_}'undefined'${_}&&${_}Symbol.toStringTag)${n}`;
- output += `${t}Object.defineProperty(${name},${_}Symbol.toStringTag,${_}{${_}value:${_}'Module'${_}});${n}`;
- output += `else${n || ' '}`;
- output += `${t}Object.defineProperty(${name},${_}'toString',${_}{${_}value:${_}function${_}()${_}{${_}return${_}'[object Module]'${options.compact ? ';' : ''}${_}}${_}});${n}`;
- output += `${callee}(${name});`;
- }
- if (options.format === 'system' && this.exportName) {
- output += `${n}exports('${this.exportName}',${_}${name});`;
- }
- return output;
- }
- renderFirst() {
- return this.referencedEarly;
- }
-}
-NamespaceVariable.prototype.isNamespace = true;
-
-const esModuleExport = `Object.defineProperty(exports, '__esModule', { value: true });`;
-const compactEsModuleExport = `Object.defineProperty(exports,'__esModule',{value:true});`;
-
-function getExportBlock(exports, dependencies, namedExportsMode, interop, compact, t, mechanism = 'return ') {
- const _ = compact ? '' : ' ';
- const n = compact ? '' : '\n';
- if (!namedExportsMode) {
- let local;
- exports.some(expt => {
- if (expt.exported === 'default') {
- local = expt.local;
- return true;
- }
- return false;
- });
- // search for reexported default otherwise
- if (!local) {
- dependencies.some(dep => {
- if (!dep.reexports)
- return false;
- return dep.reexports.some(expt => {
- if (expt.reexported === 'default') {
- local = dep.namedExportsMode ? `${dep.name}.${expt.imported}` : dep.name;
- return true;
- }
- return false;
- });
- });
- }
- return `${mechanism}${local};`;
- }
- let exportBlock = '';
- // star exports must always output first for precedence
- dependencies.forEach(({ name, reexports }) => {
- if (reexports && namedExportsMode) {
- reexports.forEach(specifier => {
- if (specifier.reexported === '*') {
- if (!compact && exportBlock)
- exportBlock += '\n';
- exportBlock +=
- `Object.keys(${name}).forEach(function${_}(key)${_}{${n}` +
- `${t}Object.defineProperty(exports,${_}key,${_}{${n}` +
- `${t}${t}enumerable:${_}true,${n}` +
- `${t}${t}get:${_}function${_}()${_}{${n}` +
- `${t}${t}${t}return ${name}[key];${n}` +
- `${t}${t}}${n}${t}});${n}});`;
- }
- });
- }
- });
- dependencies.forEach(({ name, imports, reexports, isChunk, namedExportsMode: depNamedExportsMode }) => {
- if (reexports && namedExportsMode) {
- reexports.forEach(specifier => {
- if (specifier.imported === 'default' && !isChunk) {
- const exportsNamesOrNamespace = (imports && imports.some(specifier => specifier.imported !== 'default')) ||
- (reexports &&
- reexports.some(specifier => specifier.imported !== 'default' && specifier.imported !== '*'));
- const reexportsDefaultAsDefault = reexports &&
- reexports.some(specifier => specifier.imported === 'default' && specifier.reexported === 'default');
- if (exportBlock && !compact)
- exportBlock += '\n';
- if (exportsNamesOrNamespace || reexportsDefaultAsDefault)
- exportBlock += `exports.${specifier.reexported}${_}=${_}${name}${interop !== false ? '__default' : '.default'};`;
- else
- exportBlock += `exports.${specifier.reexported}${_}=${_}${name};`;
- }
- else if (specifier.imported !== '*') {
- if (exportBlock && !compact)
- exportBlock += '\n';
- const importName = specifier.imported === 'default' && !depNamedExportsMode
- ? name
- : `${name}.${specifier.imported}`;
- exportBlock += specifier.needsLiveBinding
- ? `Object.defineProperty(exports,${_}'${specifier.reexported}',${_}{${n}` +
- `${t}enumerable:${_}true,${n}` +
- `${t}get:${_}function${_}()${_}{${n}` +
- `${t}${t}return ${importName};${n}${t}}${n}});`
- : `exports.${specifier.reexported}${_}=${_}${importName};`;
- }
- else if (specifier.reexported !== '*') {
- if (exportBlock && !compact)
- exportBlock += '\n';
- exportBlock += `exports.${specifier.reexported}${_}=${_}${name};`;
- }
- });
- }
- });
- exports.forEach(expt => {
- const lhs = `exports.${expt.exported}`;
- const rhs = expt.local;
- if (lhs === rhs) {
- return;
- }
- if (exportBlock && !compact)
- exportBlock += '\n';
- exportBlock += `${lhs}${_}=${_}${rhs};`;
- });
- return exportBlock;
-}
-
-function getInteropBlock(dependencies, options, varOrConst) {
- return dependencies
- .map(({ name, exportsNames, exportsDefault, namedExportsMode }) => {
- if (!namedExportsMode)
- return;
- if (!exportsDefault || options.interop === false)
- return null;
- if (exportsNames) {
- if (options.compact)
- return `${varOrConst} ${name}__default='default'in ${name}?${name}['default']:${name};`;
- return `${varOrConst} ${name}__default = 'default' in ${name} ? ${name}['default'] : ${name};`;
- }
- if (options.compact)
- return `${name}=${name}&&${name}.hasOwnProperty('default')?${name}['default']:${name};`;
- return `${name} = ${name} && ${name}.hasOwnProperty('default') ? ${name}['default'] : ${name};`;
- })
- .filter(Boolean)
- .join(options.compact ? '' : '\n');
-}
-
-const builtins$1 = {
- assert: true,
- buffer: true,
- console: true,
- constants: true,
- domain: true,
- events: true,
- http: true,
- https: true,
- os: true,
- path: true,
- process: true,
- punycode: true,
- querystring: true,
- stream: true,
- string_decoder: true,
- timers: true,
- tty: true,
- url: true,
- util: true,
- vm: true,
- zlib: true
-};
-// Creating a browser chunk that depends on Node.js built-in modules ('util'). You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins
-function warnOnBuiltins(warn, dependencies) {
- const externalBuiltins = dependencies.map(({ id }) => id).filter(id => id in builtins$1);
- if (!externalBuiltins.length)
- return;
- const detail = externalBuiltins.length === 1
- ? `module ('${externalBuiltins[0]}')`
- : `modules (${externalBuiltins
- .slice(0, -1)
- .map(name => `'${name}'`)
- .join(', ')} and '${externalBuiltins.slice(-1)}')`;
- warn({
- code: 'MISSING_NODE_BUILTINS',
- message: `Creating a browser bundle that depends on Node.js built-in ${detail}. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins`,
- modules: externalBuiltins
- });
-}
-
-// TODO consider using improved AMD relative imports:
-// https://requirejs.org/docs/api.html#modulenotes-urls
-// AMD resolution will only respect the AMD baseUrl if the .js extension is omitted.
-// The assumption is that this makes sense for all relative ids:
-// https://requirejs.org/docs/api.html#jsfiles
-function removeExtensionFromRelativeAmdId(id) {
- if (id[0] === '.' && id.endsWith('.js')) {
- return id.slice(0, -3);
- }
- return id;
-}
-function amd(magicString, { dependencies, dynamicImport, exports, hasExports, indentString: t, intro, isEntryModuleFacade, namedExportsMode, needsAmdModule, outro, varOrConst, warn }, options) {
- warnOnBuiltins(warn, dependencies);
- const deps = dependencies.map(m => `'${removeExtensionFromRelativeAmdId(m.id)}'`);
- const args = dependencies.map(m => m.name);
- const n = options.compact ? '' : '\n';
- const _ = options.compact ? '' : ' ';
- if (namedExportsMode && hasExports) {
- args.unshift(`exports`);
- deps.unshift(`'exports'`);
- }
- if (dynamicImport) {
- args.unshift('require');
- deps.unshift(`'require'`);
- }
- if (needsAmdModule) {
- args.unshift('module');
- deps.unshift(`'module'`);
- }
- const amdOptions = options.amd || {};
- const params = (amdOptions.id ? `'${amdOptions.id}',${_}` : ``) +
- (deps.length ? `[${deps.join(`,${_}`)}],${_}` : ``);
- const useStrict = options.strict !== false ? `${_}'use strict';` : ``;
- const define = amdOptions.define || 'define';
- const wrapperStart = `${define}(${params}function${_}(${args.join(`,${_}`)})${_}{${useStrict}${n}${n}`;
- // var foo__default = 'default' in foo ? foo['default'] : foo;
- const interopBlock = getInteropBlock(dependencies, options, varOrConst);
- if (interopBlock)
- magicString.prepend(interopBlock + n + n);
- if (intro)
- magicString.prepend(intro);
- const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
- if (exportBlock)
- magicString.append(n + n + exportBlock);
- if (namedExportsMode && hasExports && isEntryModuleFacade && options.esModule)
- magicString.append(`${n}${n}${options.compact ? compactEsModuleExport : esModuleExport}`);
- if (outro)
- magicString.append(outro);
- return magicString
- .indent(t)
- .append(n + n + '});')
- .prepend(wrapperStart);
-}
-
-function cjs(magicString, { dependencies, exports, hasExports, indentString: t, intro, isEntryModuleFacade, namedExportsMode, outro, varOrConst }, options) {
- const n = options.compact ? '' : '\n';
- const _ = options.compact ? '' : ' ';
- intro =
- (options.strict === false ? intro : `'use strict';${n}${n}${intro}`) +
- (namedExportsMode && hasExports && isEntryModuleFacade && options.esModule
- ? `${options.compact ? compactEsModuleExport : esModuleExport}${n}${n}`
- : '');
- let needsInterop = false;
- const interop = options.interop !== false;
- let importBlock;
- let definingVariable = false;
- importBlock = '';
- for (const { id, namedExportsMode, isChunk, name, reexports, imports, exportsNames, exportsDefault } of dependencies) {
- if (!reexports && !imports) {
- if (importBlock) {
- importBlock += !options.compact || definingVariable ? `;${n}` : ',';
- }
- definingVariable = false;
- importBlock += `require('${id}')`;
- }
- else {
- importBlock +=
- options.compact && definingVariable ? ',' : `${importBlock ? `;${n}` : ''}${varOrConst} `;
- definingVariable = true;
- if (!interop || isChunk || !exportsDefault || !namedExportsMode) {
- importBlock += `${name}${_}=${_}require('${id}')`;
- }
- else {
- needsInterop = true;
- if (exportsNames)
- importBlock += `${name}${_}=${_}require('${id}')${options.compact ? ',' : `;\n${varOrConst} `}${name}__default${_}=${_}${INTEROP_DEFAULT_VARIABLE}(${name})`;
- else
- importBlock += `${name}${_}=${_}${INTEROP_DEFAULT_VARIABLE}(require('${id}'))`;
- }
- }
- }
- if (importBlock)
- importBlock += ';';
- if (needsInterop) {
- const ex = options.compact ? 'e' : 'ex';
- intro +=
- `function ${INTEROP_DEFAULT_VARIABLE}${_}(${ex})${_}{${_}return${_}` +
- `(${ex}${_}&&${_}(typeof ${ex}${_}===${_}'object')${_}&&${_}'default'${_}in ${ex})${_}` +
- `?${_}${ex}['default']${_}:${_}${ex}${options.compact ? '' : '; '}}${n}${n}`;
- }
- if (importBlock)
- intro += importBlock + n + n;
- const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t, `module.exports${_}=${_}`);
- magicString.prepend(intro);
- if (exportBlock)
- magicString.append(n + n + exportBlock);
- if (outro)
- magicString.append(outro);
- return magicString;
-}
-
-function esm(magicString, { intro, outro, dependencies, exports }, options) {
- const _ = options.compact ? '' : ' ';
- const n = options.compact ? '' : '\n';
- const importBlock = dependencies
- .map(({ id, reexports, imports, name }) => {
- if (!reexports && !imports) {
- return `import${_}'${id}';`;
- }
- let output = '';
- if (imports) {
- const defaultImport = imports.find(specifier => specifier.imported === 'default');
- const starImport = imports.find(specifier => specifier.imported === '*');
- if (starImport) {
- output += `import${_}*${_}as ${starImport.local} from${_}'${id}';`;
- if (imports.length > 1)
- output += n;
- }
- if (defaultImport && imports.length === 1) {
- output += `import ${defaultImport.local} from${_}'${id}';`;
- }
- else if (!starImport || imports.length > 1) {
- output += `import ${defaultImport ? `${defaultImport.local},${_}` : ''}{${_}${imports
- .filter(specifier => specifier !== defaultImport && specifier !== starImport)
- .map(specifier => {
- if (specifier.imported === specifier.local) {
- return specifier.imported;
- }
- else {
- return `${specifier.imported} as ${specifier.local}`;
- }
- })
- .join(`,${_}`)}${_}}${_}from${_}'${id}';`;
- }
- }
- if (reexports) {
- if (imports)
- output += n;
- const starExport = reexports.find(specifier => specifier.reexported === '*');
- const namespaceReexport = reexports.find(specifier => specifier.imported === '*' && specifier.reexported !== '*');
- if (starExport) {
- output += `export${_}*${_}from${_}'${id}';`;
- if (reexports.length === 1) {
- return output;
- }
- output += n;
- }
- if (namespaceReexport) {
- if (!imports ||
- !imports.some(specifier => specifier.imported === '*' && specifier.local === name))
- output += `import${_}*${_}as ${name} from${_}'${id}';${n}`;
- output += `export${_}{${_}${name === namespaceReexport.reexported
- ? name
- : `${name} as ${namespaceReexport.reexported}`} };`;
- if (reexports.length === (starExport ? 2 : 1)) {
- return output;
- }
- output += n;
- }
- output += `export${_}{${_}${reexports
- .filter(specifier => specifier !== starExport && specifier !== namespaceReexport)
- .map(specifier => {
- if (specifier.imported === specifier.reexported) {
- return specifier.imported;
- }
- else {
- return `${specifier.imported} as ${specifier.reexported}`;
- }
- })
- .join(`,${_}`)}${_}}${_}from${_}'${id}';`;
- }
- return output;
- })
- .join(n);
- if (importBlock)
- intro += importBlock + n + n;
- if (intro)
- magicString.prepend(intro);
- const exportBlock = [];
- const exportDeclaration = [];
- exports.forEach(specifier => {
- if (specifier.exported === 'default') {
- exportBlock.push(`export default ${specifier.local};`);
- }
- else {
- exportDeclaration.push(specifier.exported === specifier.local
- ? specifier.local
- : `${specifier.local} as ${specifier.exported}`);
- }
- });
- if (exportDeclaration.length) {
- exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
- }
- if (exportBlock.length)
- magicString.append(n + n + exportBlock.join(n).trim());
- if (outro)
- magicString.append(outro);
- return magicString.trim();
-}
-
-function getLocator$1(source, options) {
- if (options === void 0) {
- options = {};
- }
- var offsetLine = options.offsetLine || 0;
- var offsetColumn = options.offsetColumn || 0;
- var originalLines = source.split('\n');
- var start = 0;
- var lineRanges = originalLines.map(function (line, i) {
- var end = start + line.length + 1;
- var range = { start: start, end: end, line: i };
- start = end;
- return range;
- });
- var i = 0;
- function rangeContains(range, index) {
- return range.start <= index && index < range.end;
- }
- function getLocation(range, index) {
- return { line: offsetLine + range.line, column: offsetColumn + index - range.start, character: index };
- }
- function locate(search, startIndex) {
- if (typeof search === 'string') {
- search = source.indexOf(search, startIndex || 0);
- }
- var range = lineRanges[i];
- var d = search >= range.end ? 1 : -1;
- while (range) {
- if (rangeContains(range, search))
- return getLocation(range, search);
- i += d;
- range = lineRanges[i];
- }
- }
- return locate;
-}
-function locate(source, search, options) {
- if (typeof options === 'number') {
- throw new Error('locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument');
- }
- return getLocator$1(source, options)(search, options && options.startIndex);
-}
-
-function spaces(i) {
- let result = '';
- while (i--)
- result += ' ';
- return result;
-}
-function tabsToSpaces(str) {
- return str.replace(/^\t+/, match => match.split('\t').join(' '));
-}
-function getCodeFrame(source, line, column) {
- let lines = source.split('\n');
- const frameStart = Math.max(0, line - 3);
- let frameEnd = Math.min(line + 2, lines.length);
- lines = lines.slice(frameStart, frameEnd);
- while (!/\S/.test(lines[lines.length - 1])) {
- lines.pop();
- frameEnd -= 1;
- }
- const digits = String(frameEnd).length;
- return lines
- .map((str, i) => {
- const isErrorLine = frameStart + i + 1 === line;
- let lineNum = String(i + frameStart + 1);
- while (lineNum.length < digits)
- lineNum = ` ${lineNum}`;
- if (isErrorLine) {
- const indicator = spaces(digits + 2 + tabsToSpaces(str.slice(0, column)).length) + '^';
- return `${lineNum}: ${tabsToSpaces(str)}\n${indicator}`;
- }
- return `${lineNum}: ${tabsToSpaces(str)}`;
- })
- .join('\n');
-}
-
-function getAliasName(id) {
- const base = basename(id);
- return base.substr(0, base.length - extname(id).length);
-}
-function relativeId(id) {
- if (typeof process === 'undefined' || !isAbsolute(id))
- return id;
- return relative(process.cwd(), id);
-}
-function isPlainName(name) {
- // not starting with "./", "/". "../"
- return !(name[0] === '/' ||
- (name[1] === '.' && (name[2] === '/' || (name[2] === '.' && name[3] === '/'))));
-}
-
-function error(base, props) {
- if (base instanceof Error === false)
- base = Object.assign(new Error(base.message), base);
- if (props)
- Object.assign(base, props);
- throw base;
-}
-function augmentCodeLocation(object, pos, source, id) {
- if (pos.line !== undefined && pos.column !== undefined) {
- const { line, column } = pos;
- object.loc = { file: id, line, column };
- }
- else {
- object.pos = pos;
- const { line, column } = locate(source, pos, { offsetLine: 1 });
- object.loc = { file: id, line, column };
- }
- if (object.frame === undefined) {
- const { line, column } = object.loc;
- object.frame = getCodeFrame(source, line, column);
- }
-}
-var Errors;
-(function (Errors) {
- Errors["ASSET_NOT_FINALISED"] = "ASSET_NOT_FINALISED";
- Errors["ASSET_NOT_FOUND"] = "ASSET_NOT_FOUND";
- Errors["ASSET_SOURCE_ALREADY_SET"] = "ASSET_SOURCE_ALREADY_SET";
- Errors["ASSET_SOURCE_MISSING"] = "ASSET_SOURCE_MISSING";
- Errors["BAD_LOADER"] = "BAD_LOADER";
- Errors["CHUNK_NOT_FOUND"] = "CHUNK_NOT_FOUND";
- Errors["CHUNK_NOT_GENERATED"] = "CHUNK_NOT_GENERATED";
- Errors["INVALID_ASSET_NAME"] = "INVALID_ASSET_NAME";
- Errors["INVALID_CHUNK"] = "INVALID_CHUNK";
- Errors["INVALID_EXTERNAL_ID"] = "INVALID_EXTERNAL_ID";
- Errors["INVALID_OPTION"] = "INVALID_OPTION";
- Errors["INVALID_PLUGIN_HOOK"] = "INVALID_PLUGIN_HOOK";
- Errors["INVALID_ROLLUP_PHASE"] = "INVALID_ROLLUP_PHASE";
- Errors["NAMESPACE_CONFLICT"] = "NAMESPACE_CONFLICT";
- Errors["UNRESOLVED_ENTRY"] = "UNRESOLVED_ENTRY";
- Errors["UNRESOLVED_IMPORT"] = "UNRESOLVED_IMPORT";
-})(Errors || (Errors = {}));
-function errAssetNotFinalisedForFileName(asset) {
- return {
- code: Errors.ASSET_NOT_FINALISED,
- message: `Plugin error - Unable to get file name for asset "${asset.name}". Ensure that the source is set and that generate is called first.`
- };
-}
-function errChunkNotGeneratedForFileName(entry) {
- return {
- code: Errors.CHUNK_NOT_GENERATED,
- message: `Plugin error - Unable to get file name for chunk "${entry.name}". Ensure that generate is called first.`
- };
-}
-function errAssetReferenceIdNotFoundForFilename(assetReferenceId) {
- return {
- code: Errors.ASSET_NOT_FOUND,
- message: `Plugin error - Unable to get file name for unknown asset "${assetReferenceId}".`
- };
-}
-function errAssetReferenceIdNotFoundForSetSource(assetReferenceId) {
- return {
- code: Errors.ASSET_NOT_FOUND,
- message: `Plugin error - Unable to set the source for unknown asset "${assetReferenceId}".`
- };
-}
-function errAssetSourceAlreadySet(asset) {
- return {
- code: Errors.ASSET_SOURCE_ALREADY_SET,
- message: `Plugin error - Unable to set the source for asset "${asset.name}", source already set.`
- };
-}
-function errAssetSourceMissingForSetSource(asset) {
- return {
- code: Errors.ASSET_SOURCE_MISSING,
- message: `Plugin error creating asset "${asset.name}", setAssetSource call without a source.`
- };
-}
-function errNoAssetSourceSet(asset) {
- return {
- code: Errors.ASSET_SOURCE_MISSING,
- message: `Plugin error creating asset "${asset.name}" - no asset source set.`
- };
-}
-function errBadLoader(id) {
- return {
- code: Errors.BAD_LOADER,
- message: `Error loading ${relativeId(id)}: plugin load hook should return a string, a { code, map } object, or nothing/null`
- };
-}
-function errChunkReferenceIdNotFoundForFilename(chunkReferenceId) {
- return {
- code: Errors.CHUNK_NOT_FOUND,
- message: `Plugin error - Unable to get file name for unknown chunk "${chunkReferenceId}".`
- };
-}
-function errInvalidAssetName(name) {
- return {
- code: Errors.INVALID_ASSET_NAME,
- message: `Plugin error creating asset, name "${name}" is not a plain (non relative or absolute URL) string name.`
- };
-}
-function errCannotAssignModuleToChunk(moduleId, assignToAlias, currentAlias) {
- return {
- code: Errors.INVALID_CHUNK,
- message: `Cannot assign ${relativeId(moduleId)} to the "${assignToAlias}" chunk as it is already in the "${currentAlias}" chunk.`
- };
-}
-function errInternalIdCannotBeExternal(source, importer) {
- return {
- code: Errors.INVALID_EXTERNAL_ID,
- message: `'${source}' is imported as an external by ${relativeId(importer)}, but is already an existing non-external module id.`
- };
-}
-function errInvalidOption(option, explanation) {
- return {
- code: Errors.INVALID_OPTION,
- message: `Invalid value for option "${option}" - ${explanation}.`
- };
-}
-function errInvalidRollupPhaseForAddWatchFile() {
- return {
- code: Errors.INVALID_ROLLUP_PHASE,
- message: `Cannot call addWatchFile after the build has finished.`
- };
-}
-function errInvalidRollupPhaseForEmitChunk() {
- return {
- code: Errors.INVALID_ROLLUP_PHASE,
- message: `Cannot call emitChunk after module loading has finished.`
- };
-}
-function errNamespaceConflict(name, reexportingModule, additionalExportAllModule) {
- return {
- code: Errors.NAMESPACE_CONFLICT,
- message: `Conflicting namespaces: ${relativeId(reexportingModule.id)} re-exports '${name}' from both ${relativeId(reexportingModule.exportsAll[name])} and ${relativeId(additionalExportAllModule.exportsAll[name])} (will be ignored)`,
- name,
- reexporter: reexportingModule.id,
- sources: [reexportingModule.exportsAll[name], additionalExportAllModule.exportsAll[name]]
- };
-}
-function errEntryCannotBeExternal(unresolvedId) {
- return {
- code: Errors.UNRESOLVED_ENTRY,
- message: `Entry module cannot be external (${relativeId(unresolvedId)}).`
- };
-}
-function errUnresolvedEntry(unresolvedId) {
- return {
- code: Errors.UNRESOLVED_ENTRY,
- message: `Could not resolve entry module (${relativeId(unresolvedId)}).`
- };
-}
-function errUnresolvedImport(source, importer) {
- return {
- code: Errors.UNRESOLVED_IMPORT,
- message: `Could not resolve '${source}' from ${relativeId(importer)}`
- };
-}
-function errUnresolvedImportTreatedAsExternal(source, importer) {
- return {
- code: Errors.UNRESOLVED_IMPORT,
- importer: relativeId(importer),
- message: `'${source}' is imported by ${relativeId(importer)}, but could not be resolved – treating it as an external dependency`,
- source,
- url: 'https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency'
- };
-}
-
-// Generate strings which dereference dotted properties, but use array notation `['prop-deref']`
-// if the property name isn't trivial
-const shouldUseDot = /^[a-zA-Z$_][a-zA-Z0-9$_]*$/;
-function property(prop) {
- return shouldUseDot.test(prop) ? `.${prop}` : `['${prop}']`;
-}
-function keypath(keypath) {
- return keypath
- .split('.')
- .map(property)
- .join('');
-}
-
-function setupNamespace(name, root, globals, compact) {
- const parts = name.split('.');
- if (globals) {
- parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
- }
- const _ = compact ? '' : ' ';
- parts.pop();
- let acc = root;
- return (parts
- .map(part => ((acc += property(part)), `${acc}${_}=${_}${acc}${_}||${_}{}${compact ? '' : ';'}`))
- .join(compact ? ',' : '\n') + (compact && parts.length ? ';' : '\n'));
-}
-function assignToDeepVariable(deepName, root, globals, compact, assignment) {
- const _ = compact ? '' : ' ';
- const parts = deepName.split('.');
- if (globals) {
- parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
- }
- const last = parts.pop();
- let acc = root;
- let deepAssignment = parts
- .map(part => ((acc += property(part)), `${acc}${_}=${_}${acc}${_}||${_}{}`))
- .concat(`${acc}${property(last)}`)
- .join(`,${_}`)
- .concat(`${_}=${_}${assignment}`);
- if (parts.length > 0) {
- deepAssignment = `(${deepAssignment})`;
- }
- return deepAssignment;
-}
-
-function trimEmptyImports(dependencies) {
- let i = dependencies.length;
- while (i--) {
- const dependency = dependencies[i];
- if (dependency.exportsDefault || dependency.exportsNames) {
- return dependencies.slice(0, i + 1);
- }
- }
- return [];
-}
-
-const thisProp = (name) => `this${keypath(name)}`;
-function iife(magicString, { dependencies, exports, hasExports, indentString: t, intro, namedExportsMode, outro, varOrConst, warn }, options) {
- const _ = options.compact ? '' : ' ';
- const n = options.compact ? '' : '\n';
- const { extend, name } = options;
- const isNamespaced = name && name.indexOf('.') !== -1;
- const useVariableAssignment = !extend && !isNamespaced;
- if (name && useVariableAssignment && !isLegal(name)) {
- error({
- code: 'ILLEGAL_IDENTIFIER_AS_NAME',
- message: `Given name (${name}) is not legal JS identifier. If you need this you can try --extend option`
- });
- }
- warnOnBuiltins(warn, dependencies);
- const external = trimEmptyImports(dependencies);
- const deps = external.map(dep => dep.globalName || 'null');
- const args = external.map(m => m.name);
- if (hasExports && !name) {
- error({
- code: 'INVALID_OPTION',
- message: `You must supply "output.name" for IIFE bundles.`
- });
- }
- if (namedExportsMode && hasExports) {
- if (extend) {
- deps.unshift(`${thisProp(name)}${_}=${_}${thisProp(name)}${_}||${_}{}`);
- args.unshift('exports');
- }
- else {
- deps.unshift('{}');
- args.unshift('exports');
- }
- }
- const useStrict = options.strict !== false ? `${t}'use strict';${n}${n}` : ``;
- let wrapperIntro = `(function${_}(${args.join(`,${_}`)})${_}{${n}${useStrict}`;
- if (hasExports && (!extend || !namedExportsMode)) {
- wrapperIntro =
- (useVariableAssignment ? `${varOrConst} ${name}` : thisProp(name)) +
- `${_}=${_}${wrapperIntro}`;
- }
- if (isNamespaced && hasExports) {
- wrapperIntro = setupNamespace(name, 'this', options.globals, options.compact) + wrapperIntro;
- }
- let wrapperOutro = `${n}${n}}(${deps.join(`,${_}`)}));`;
- if (!extend && namedExportsMode && hasExports) {
- wrapperOutro = `${n}${n}${t}return exports;${wrapperOutro}`;
- }
- // var foo__default = 'default' in foo ? foo['default'] : foo;
- const interopBlock = getInteropBlock(dependencies, options, varOrConst);
- if (interopBlock)
- magicString.prepend(interopBlock + n + n);
- if (intro)
- magicString.prepend(intro);
- const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
- if (exportBlock)
- magicString.append(n + n + exportBlock);
- if (outro)
- magicString.append(outro);
- return magicString
- .indent(t)
- .prepend(wrapperIntro)
- .append(wrapperOutro);
-}
-
-function getStarExcludes({ dependencies, exports }) {
- const starExcludes = new Set(exports.map(expt => expt.exported));
- if (!starExcludes.has('default'))
- starExcludes.add('default');
- // also include reexport names
- dependencies.forEach(({ reexports }) => {
- if (reexports)
- reexports.forEach(reexport => {
- if (reexport.imported !== '*' && !starExcludes.has(reexport.reexported))
- starExcludes.add(reexport.reexported);
- });
- });
- return starExcludes;
-}
-const getStarExcludesBlock = (starExcludes, varOrConst, _, t, n) => starExcludes
- ? `${n}${t}${varOrConst} _starExcludes${_}=${_}{${_}${Array.from(starExcludes).join(`:${_}1,${_}`)}${starExcludes.size ? `:${_}1` : ''}${_}};`
- : '';
-const getImportBindingsBlock = (importBindings, _, t, n) => (importBindings.length ? `${n}${t}var ${importBindings.join(`,${_}`)};` : '');
-function getExportsBlock(exports, _, t, n) {
- if (exports.length === 0) {
- return '';
- }
- if (exports.length === 1) {
- return `${t}${t}${t}exports('${exports[0].name}',${_}${exports[0].value});${n}${n}`;
- }
- return (`${t}${t}${t}exports({${n}` +
- exports.map(({ name, value }) => `${t}${t}${t}${t}${name}:${_}${value}`).join(`,${n}`) +
- `${n}${t}${t}${t}});${n}${n}`);
-}
-const getHoistedExportsBlock = (exports, _, t, n) => getExportsBlock(exports
- .filter(expt => expt.hoisted || expt.uninitialized)
- .map(expt => ({ name: expt.exported, value: expt.uninitialized ? 'void 0' : expt.local })), _, t, n);
-const getMissingExportsBlock = (exports, _, t, n) => getExportsBlock(exports
- .filter(expt => expt.local === MISSING_EXPORT_SHIM_VARIABLE)
- .map(expt => ({ name: expt.exported, value: MISSING_EXPORT_SHIM_VARIABLE })), _, t, n);
-function system(magicString, { dependencies, exports, indentString: t, intro, outro, usesTopLevelAwait, varOrConst }, options) {
- const n = options.compact ? '' : '\n';
- const _ = options.compact ? '' : ' ';
- const dependencyIds = dependencies.map(m => `'${m.id}'`);
- const importBindings = [];
- let starExcludes;
- const setters = [];
- dependencies.forEach(({ imports, reexports }) => {
- const setter = [];
- if (imports) {
- imports.forEach(specifier => {
- importBindings.push(specifier.local);
- if (specifier.imported === '*') {
- setter.push(`${specifier.local}${_}=${_}module;`);
- }
- else {
- setter.push(`${specifier.local}${_}=${_}module.${specifier.imported};`);
- }
- });
- }
- if (reexports) {
- let createdSetter = false;
- // bulk-reexport form
- if (reexports.length > 1 ||
- (reexports.length === 1 &&
- (reexports[0].reexported === '*' || reexports[0].imported === '*'))) {
- // star reexports
- reexports.forEach(specifier => {
- if (specifier.reexported !== '*')
- return;
- // need own exports list for deduping in star export case
- if (!starExcludes) {
- starExcludes = getStarExcludes({ dependencies, exports });
- }
- if (!createdSetter) {
- setter.push(`${varOrConst} _setter${_}=${_}{};`);
- createdSetter = true;
- }
- setter.push(`for${_}(var _$p${_}in${_}module)${_}{`);
- setter.push(`${t}if${_}(!_starExcludes[_$p])${_}_setter[_$p]${_}=${_}module[_$p];`);
- setter.push('}');
- });
- // star import reexport
- reexports.forEach(specifier => {
- if (specifier.imported !== '*' || specifier.reexported === '*')
- return;
- setter.push(`exports('${specifier.reexported}',${_}module);`);
- });
- // reexports
- reexports.forEach(specifier => {
- if (specifier.reexported === '*' || specifier.imported === '*')
- return;
- if (!createdSetter) {
- setter.push(`${varOrConst} _setter${_}=${_}{};`);
- createdSetter = true;
- }
- setter.push(`_setter.${specifier.reexported}${_}=${_}module.${specifier.imported};`);
- });
- if (createdSetter) {
- setter.push('exports(_setter);');
- }
- }
- else {
- // single reexport
- reexports.forEach(specifier => {
- setter.push(`exports('${specifier.reexported}',${_}module.${specifier.imported});`);
- });
- }
- }
- setters.push(setter.join(`${n}${t}${t}${t}`));
- });
- const registeredName = options.name ? `'${options.name}',${_}` : '';
- let wrapperStart = `System.register(${registeredName}[` +
- dependencyIds.join(`,${_}`) +
- `],${_}function${_}(exports,${_}module)${_}{${n}${t}'use strict';` +
- getStarExcludesBlock(starExcludes, varOrConst, _, t, n) +
- getImportBindingsBlock(importBindings, _, t, n) +
- `${n}${t}return${_}{${setters.length
- ? `${n}${t}${t}setters:${_}[${setters
- .map(s => s
- ? `function${_}(module)${_}{${n}${t}${t}${t}${s}${n}${t}${t}}`
- : `function${_}()${_}{}`)
- .join(`,${_}`)}],`
- : ''}${n}`;
- wrapperStart +=
- `${t}${t}execute:${_}${usesTopLevelAwait ? `async${_}` : ''}function${_}()${_}{${n}${n}` +
- getHoistedExportsBlock(exports, _, t, n);
- const wrapperEnd = `${n}${n}` +
- getMissingExportsBlock(exports, _, t, n) +
- `${t}${t}}${n}${t}}${options.compact ? '' : ';'}${n}});`;
- if (intro)
- magicString.prepend(intro);
- if (outro)
- magicString.append(outro);
- return magicString
- .indent(`${t}${t}${t}`)
- .append(wrapperEnd)
- .prepend(wrapperStart);
-}
-
-function globalProp(name, globalVar) {
- if (!name)
- return 'null';
- return `${globalVar}${keypath(name)}`;
-}
-function safeAccess(name, globalVar, _) {
- const parts = name.split('.');
- let acc = globalVar;
- return parts.map(part => ((acc += property(part)), acc)).join(`${_}&&${_}`);
-}
-function umd(magicString, { dependencies, exports, hasExports, indentString: t, intro, namedExportsMode, outro, varOrConst, warn }, options) {
- const _ = options.compact ? '' : ' ';
- const n = options.compact ? '' : '\n';
- const factoryVar = options.compact ? 'f' : 'factory';
- const globalVar = options.compact ? 'g' : 'global';
- if (hasExports && !options.name) {
- error({
- code: 'INVALID_OPTION',
- message: 'You must supply "output.name" for UMD bundles.'
- });
- }
- warnOnBuiltins(warn, dependencies);
- const amdDeps = dependencies.map(m => `'${m.id}'`);
- const cjsDeps = dependencies.map(m => `require('${m.id}')`);
- const trimmedImports = trimEmptyImports(dependencies);
- const globalDeps = trimmedImports.map(module => globalProp(module.globalName, globalVar));
- const factoryArgs = trimmedImports.map(m => m.name);
- if (namedExportsMode && (hasExports || options.noConflict === true)) {
- amdDeps.unshift(`'exports'`);
- cjsDeps.unshift(`exports`);
- globalDeps.unshift(assignToDeepVariable(options.name, globalVar, options.globals, options.compact, `${options.extend ? `${globalProp(options.name, globalVar)}${_}||${_}` : ''}{}`));
- factoryArgs.unshift('exports');
- }
- const amdOptions = options.amd || {};
- const amdParams = (amdOptions.id ? `'${amdOptions.id}',${_}` : ``) +
- (amdDeps.length ? `[${amdDeps.join(`,${_}`)}],${_}` : ``);
- const define = amdOptions.define || 'define';
- const cjsExport = !namedExportsMode && hasExports ? `module.exports${_}=${_}` : ``;
- const useStrict = options.strict !== false ? `${_}'use strict';${n}` : ``;
- let iifeExport;
- if (options.noConflict === true) {
- const noConflictExportsVar = options.compact ? 'e' : 'exports';
- let factory;
- if (!namedExportsMode && hasExports) {
- factory = `var ${noConflictExportsVar}${_}=${_}${assignToDeepVariable(options.name, globalVar, options.globals, options.compact, `${factoryVar}(${globalDeps.join(`,${_}`)})`)};`;
- }
- else if (namedExportsMode) {
- const module = globalDeps.shift();
- factory =
- `var ${noConflictExportsVar}${_}=${_}${module};${n}` +
- `${t}${t}${factoryVar}(${[noConflictExportsVar].concat(globalDeps).join(`,${_}`)});`;
- }
- iifeExport =
- `(function${_}()${_}{${n}` +
- `${t}${t}var current${_}=${_}${safeAccess(options.name, globalVar, _)};${n}` +
- `${t}${t}${factory}${n}` +
- `${t}${t}${noConflictExportsVar}.noConflict${_}=${_}function${_}()${_}{${_}` +
- `${globalProp(options.name, globalVar)}${_}=${_}current;${_}return ${noConflictExportsVar}${options.compact ? '' : '; '}};${n}` +
- `${t}}())`;
- }
- else {
- iifeExport = `${factoryVar}(${globalDeps.join(`,${_}`)})`;
- if (!namedExportsMode && hasExports) {
- iifeExport = assignToDeepVariable(options.name, globalVar, options.globals, options.compact, iifeExport);
- }
- }
- const iifeNeedsGlobal = hasExports || (options.noConflict === true && namedExportsMode) || globalDeps.length > 0;
- const globalParam = iifeNeedsGlobal ? `${globalVar},${_}` : '';
- const globalArg = iifeNeedsGlobal ? `this,${_}` : '';
- const iifeStart = iifeNeedsGlobal ? `(${globalVar}${_}=${_}${globalVar}${_}||${_}self,${_}` : '';
- const iifeEnd = iifeNeedsGlobal ? ')' : '';
- const cjsIntro = iifeNeedsGlobal
- ? `${t}typeof exports${_}===${_}'object'${_}&&${_}typeof module${_}!==${_}'undefined'${_}?` +
- `${_}${cjsExport}${factoryVar}(${cjsDeps.join(`,${_}`)})${_}:${n}`
- : '';
- const wrapperIntro = `(function${_}(${globalParam}${factoryVar})${_}{${n}` +
- cjsIntro +
- `${t}typeof ${define}${_}===${_}'function'${_}&&${_}${define}.amd${_}?${_}${define}(${amdParams}${factoryVar})${_}:${n}` +
- `${t}${iifeStart}${iifeExport}${iifeEnd};${n}` +
- `}(${globalArg}function${_}(${factoryArgs.join(', ')})${_}{${useStrict}${n}`;
- const wrapperOutro = n + n + '}));';
- // var foo__default = 'default' in foo ? foo['default'] : foo;
- const interopBlock = getInteropBlock(dependencies, options, varOrConst);
- if (interopBlock)
- magicString.prepend(interopBlock + n + n);
- if (intro)
- magicString.prepend(intro);
- const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
- if (exportBlock)
- magicString.append(n + n + exportBlock);
- if (namedExportsMode && hasExports && options.esModule)
- magicString.append(n + n + (options.compact ? compactEsModuleExport : esModuleExport));
- if (outro)
- magicString.append(outro);
- return magicString
- .trim()
- .indent(t)
- .append(wrapperOutro)
- .prepend(wrapperIntro);
-}
-
-var finalisers = { system, amd, cjs, es: esm, iife, umd };
-
-const extractors = {
- ArrayPattern(names, param) {
- for (const element of param.elements) {
- if (element)
- extractors[element.type](names, element);
- }
- },
- AssignmentPattern(names, param) {
- extractors[param.left.type](names, param.left);
- },
- Identifier(names, param) {
- names.push(param.name);
- },
- MemberExpression() { },
- ObjectPattern(names, param) {
- for (const prop of param.properties) {
- if (prop.type === 'RestElement') {
- extractors.RestElement(names, prop);
- }
- else {
- extractors[prop.value.type](names, prop.value);
- }
- }
- },
- RestElement(names, param) {
- extractors[param.argument.type](names, param.argument);
- }
-};
-const extractAssignedNames = function extractAssignedNames(param) {
- const names = [];
- extractors[param.type](names, param);
- return names;
-};
-
-const BLANK = Object.create(null);
-
-function treeshakeNode(node, code, start, end) {
- code.remove(start, end);
- if (node.annotations) {
- for (const annotation of node.annotations) {
- if (annotation.start < start) {
- code.remove(annotation.start, annotation.end);
- }
- else {
- return;
- }
- }
- }
-}
-function removeAnnotations(node, code) {
- if (!node.annotations && node.parent.type === ExpressionStatement) {
- node = node.parent;
- }
- if (node.annotations) {
- for (const annotation of node.annotations) {
- code.remove(annotation.start, annotation.end);
- }
- }
-}
-
-const NO_SEMICOLON = { isNoStatement: true };
-function findFirstOccurrenceOutsideComment(code, searchString, start = 0) {
- let searchPos, charCodeAfterSlash;
- searchPos = code.indexOf(searchString, start);
- while (true) {
- start = code.indexOf('/', start);
- if (start === -1 || start > searchPos)
- return searchPos;
- charCodeAfterSlash = code.charCodeAt(++start);
- ++start;
- if (charCodeAfterSlash === 47 /*"/"*/) {
- start = code.indexOf('\n', start) + 1;
- if (start === 0)
- return -1;
- if (start > searchPos) {
- searchPos = code.indexOf(searchString, start);
- }
- }
- else if (charCodeAfterSlash === 42 /*"*"*/) {
- start = code.indexOf('*/', start) + 2;
- if (start > searchPos) {
- searchPos = code.indexOf(searchString, start);
- }
- }
- }
-}
-function findFirstLineBreakOutsideComment(code, start = 0) {
- let lineBreakPos, charCodeAfterSlash;
- lineBreakPos = code.indexOf('\n', start);
- while (true) {
- start = code.indexOf('/', start);
- if (start === -1 || start > lineBreakPos)
- return lineBreakPos;
- charCodeAfterSlash = code.charCodeAt(++start);
- if (charCodeAfterSlash === 47 /*"/"*/)
- return lineBreakPos;
- ++start;
- if (charCodeAfterSlash === 42 /*"*"*/) {
- start = code.indexOf('*/', start) + 2;
- if (start > lineBreakPos) {
- lineBreakPos = code.indexOf('\n', start);
- }
- }
- }
-}
-function renderStatementList(statements, code, start, end, options) {
- if (statements.length === 0)
- return;
- let currentNode, currentNodeStart, currentNodeNeedsBoundaries, nextNodeStart;
- let nextNode = statements[0];
- let nextNodeNeedsBoundaries = !nextNode.included || nextNode.needsBoundaries;
- if (nextNodeNeedsBoundaries) {
- nextNodeStart =
- start + findFirstLineBreakOutsideComment(code.original.slice(start, nextNode.start)) + 1;
- }
- for (let nextIndex = 1; nextIndex <= statements.length; nextIndex++) {
- currentNode = nextNode;
- currentNodeStart = nextNodeStart;
- currentNodeNeedsBoundaries = nextNodeNeedsBoundaries;
- nextNode = statements[nextIndex];
- nextNodeNeedsBoundaries =
- nextNode === undefined ? false : !nextNode.included || nextNode.needsBoundaries;
- if (currentNodeNeedsBoundaries || nextNodeNeedsBoundaries) {
- nextNodeStart =
- currentNode.end +
- findFirstLineBreakOutsideComment(code.original.slice(currentNode.end, nextNode === undefined ? end : nextNode.start)) +
- 1;
- if (currentNode.included) {
- currentNodeNeedsBoundaries
- ? currentNode.render(code, options, {
- end: nextNodeStart,
- start: currentNodeStart
- })
- : currentNode.render(code, options);
- }
- else {
- treeshakeNode(currentNode, code, currentNodeStart, nextNodeStart);
- }
- }
- else {
- currentNode.render(code, options);
- }
- }
-}
-// This assumes that the first character is not part of the first node
-function getCommaSeparatedNodesWithBoundaries(nodes, code, start, end) {
- const splitUpNodes = [];
- let node, nextNode, nextNodeStart, contentEnd, char;
- let separator = start - 1;
- for (let nextIndex = 0; nextIndex < nodes.length; nextIndex++) {
- nextNode = nodes[nextIndex];
- if (node !== undefined) {
- separator =
- node.end +
- findFirstOccurrenceOutsideComment(code.original.slice(node.end, nextNode.start), ',');
- }
- nextNodeStart = contentEnd =
- separator +
- 2 +
- findFirstLineBreakOutsideComment(code.original.slice(separator + 1, nextNode.start));
- while (((char = code.original.charCodeAt(nextNodeStart)),
- char === 32 /*" "*/ || char === 9 /*"\t"*/ || char === 10 /*"\n"*/ || char === 13) /*"\r"*/)
- nextNodeStart++;
- if (node !== undefined) {
- splitUpNodes.push({
- contentEnd,
- end: nextNodeStart,
- node,
- separator,
- start
- });
- }
- node = nextNode;
- start = nextNodeStart;
- }
- splitUpNodes.push({
- contentEnd: end,
- end,
- node,
- separator: null,
- start
- });
- return splitUpNodes;
-}
-
-const chars$1 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
-const base = 64;
-function toBase64(num) {
- let outStr = '';
- do {
- const curDigit = num % base;
- num = Math.floor(num / base);
- outStr = chars$1[curDigit] + outStr;
- } while (num !== 0);
- return outStr;
-}
-
-function getSafeName(baseName, usedNames) {
- let safeName = baseName;
- let count = 1;
- while (usedNames[safeName]) {
- safeName = `${baseName}$${toBase64(count++)}`;
- }
- usedNames[safeName] = true;
- return safeName;
-}
-
class Scope {
constructor() {
this.children = [];
@@ -4201,6 +2808,49 @@
}
}
+function getLocator$1(source, options) {
+ if (options === void 0) {
+ options = {};
+ }
+ var offsetLine = options.offsetLine || 0;
+ var offsetColumn = options.offsetColumn || 0;
+ var originalLines = source.split('\n');
+ var start = 0;
+ var lineRanges = originalLines.map(function (line, i) {
+ var end = start + line.length + 1;
+ var range = { start: start, end: end, line: i };
+ start = end;
+ return range;
+ });
+ var i = 0;
+ function rangeContains(range, index) {
+ return range.start <= index && index < range.end;
+ }
+ function getLocation(range, index) {
+ return { line: offsetLine + range.line, column: offsetColumn + index - range.start, character: index };
+ }
+ function locate(search, startIndex) {
+ if (typeof search === 'string') {
+ search = source.indexOf(search, startIndex || 0);
+ }
+ var range = lineRanges[i];
+ var d = search >= range.end ? 1 : -1;
+ while (range) {
+ if (rangeContains(range, search))
+ return getLocation(range, search);
+ i += d;
+ range = lineRanges[i];
+ }
+ }
+ return locate;
+}
+function locate(source, search, options) {
+ if (typeof options === 'number') {
+ throw new Error('locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument');
+ }
+ return getLocator$1(source, options)(search, options && options.startIndex);
+}
+
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
@@ -9286,7 +7936,8 @@
}
hasEffectsWhenCalledAtPath(path, callOptions, options) {
return (this.body.hasEffectsWhenCalledAtPath(path, callOptions, options) ||
- (this.superClass && this.superClass.hasEffectsWhenCalledAtPath(path, callOptions, options)));
+ (this.superClass !== null &&
+ this.superClass.hasEffectsWhenCalledAtPath(path, callOptions, options)));
}
initialise() {
this.included = false;
@@ -9296,10 +7947,7 @@
}
}
-function isClassDeclaration(node) {
- return node.type === ClassDeclaration;
-}
-class ClassDeclaration$1 extends ClassNode {
+class ClassDeclaration extends ClassNode {
initialise() {
super.initialise();
if (this.id !== null) {
@@ -9308,7 +7956,8 @@
}
parseNode(esTreeNode) {
if (esTreeNode.id !== null) {
- this.id = (new this.context.nodeConstructors.Identifier(esTreeNode.id, this, (this.scope.parent)));
+ this.id = new this.context.nodeConstructors.Identifier(esTreeNode.id, this, this.scope
+ .parent);
}
super.parseNode(esTreeNode);
}
@@ -9474,7 +8123,7 @@
return path.length === 0 ? this.scope.getReturnExpression() : UNKNOWN_EXPRESSION;
}
hasEffects(options) {
- return this.id && this.id.hasEffects(options);
+ return this.id !== null && this.id.hasEffects(options);
}
hasEffectsWhenAccessedAtPath(path) {
if (path.length <= 1) {
@@ -9515,16 +8164,13 @@
this.body.addImplicitReturnExpressionToScope();
}
parseNode(esTreeNode) {
- this.body = (new this.context.nodeConstructors.BlockStatement(esTreeNode.body, this, this.scope.hoistedBodyVarScope));
+ this.body = new this.context.nodeConstructors.BlockStatement(esTreeNode.body, this, this.scope.hoistedBodyVarScope);
super.parseNode(esTreeNode);
}
}
FunctionNode.prototype.preventChildBlockScope = true;
-function isFunctionDeclaration(node) {
- return node.type === FunctionDeclaration;
-}
-class FunctionDeclaration$1 extends FunctionNode {
+class FunctionDeclaration extends FunctionNode {
initialise() {
super.initialise();
if (this.id !== null) {
@@ -9533,7 +8179,8 @@
}
parseNode(esTreeNode) {
if (esTreeNode.id !== null) {
- this.id = (new this.context.nodeConstructors.Identifier(esTreeNode.id, this, (this.scope.parent)));
+ this.id = new this.context.nodeConstructors.Identifier(esTreeNode.id, this, this.scope
+ .parent);
}
super.parseNode(esTreeNode);
}
@@ -9556,10 +8203,7 @@
}
return declarationEnd + generatorStarPos + 1;
}
-function isExportDefaultDeclaration(node) {
- return node.type === ExportDefaultDeclaration;
-}
-class ExportDefaultDeclaration$1 extends NodeBase {
+class ExportDefaultDeclaration extends NodeBase {
include(includeAllChildrenRecursively) {
super.include(includeAllChildrenRecursively);
if (includeAllChildrenRecursively) {
@@ -9568,22 +8212,21 @@
}
initialise() {
this.included = false;
+ const declaration = this.declaration;
this.declarationName =
- (this.declaration.id &&
- this.declaration.id.name) ||
- this.declaration.name;
+ (declaration.id && declaration.id.name) || this.declaration.name;
this.variable = this.scope.addExportDefaultDeclaration(this.declarationName || this.context.getModuleName(), this, this.context);
this.context.addExport(this);
}
render(code, options, { start, end } = BLANK) {
const declarationStart = getDeclarationStart(code.original, this.start);
- if (isFunctionDeclaration(this.declaration)) {
+ if (this.declaration instanceof FunctionDeclaration) {
this.renderNamedDeclaration(code, declarationStart, 'function', this.declaration.id === null, options);
}
- else if (isClassDeclaration(this.declaration)) {
+ else if (this.declaration instanceof ClassDeclaration) {
this.renderNamedDeclaration(code, declarationStart, 'class', this.declaration.id === null, options);
}
- else if (this.variable.referencesOriginal()) {
+ else if (this.variable.getOriginalVariable() !== this.variable) {
// Remove altogether to prevent re-declaring the same variable
if (options.format === 'system' && this.variable.exportName) {
code.overwrite(start, end, `exports('${this.variable.exportName}', ${this.variable.getName()});`);
@@ -9617,7 +8260,7 @@
code.appendLeft(getIdInsertPosition(code.original, declarationKeyword, declarationStart), ` ${name}`);
}
if (options.format === 'system' &&
- isClassDeclaration(this.declaration) &&
+ this.declaration instanceof ClassDeclaration &&
this.variable.exportName) {
code.appendLeft(this.end, ` exports('${this.variable.exportName}', ${name});`);
}
@@ -9636,7 +8279,1509 @@
}
}
}
-ExportDefaultDeclaration$1.prototype.needsBoundaries = true;
+ExportDefaultDeclaration.prototype.needsBoundaries = true;
+
+function isReference(node, parent) {
+ if (node.type === 'MemberExpression') {
+ return !node.computed && isReference(node.object, node);
+ }
+ if (node.type === 'Identifier') {
+ switch (parent.type) {
+ // disregard `bar` in `foo.bar`
+ case 'MemberExpression': return parent.computed || node === parent.object;
+ // disregard the `foo` in `class {foo(){}}` but keep it in `class {[foo](){}}`
+ case 'MethodDefinition': return parent.computed;
+ // disregard the `bar` in `{ bar: foo }`, but keep it in `{ [bar]: foo }`
+ case 'Property': return parent.computed || node === parent.value;
+ // disregard the `bar` in `export { foo as bar }`
+ case 'ExportSpecifier': return node === parent.local;
+ // disregard the `foo` in `foo: while (...) { ... break foo; ... continue foo;}`
+ case 'LabeledStatement':
+ case 'BreakStatement':
+ case 'ContinueStatement': return false;
+ default: return true;
+ }
+ }
+ return false;
+}
+
+class Identifier$1 extends NodeBase {
+ addExportedVariables(variables) {
+ if (this.variable !== null && this.variable.exportName) {
+ variables.push(this.variable);
+ }
+ }
+ bind() {
+ if (this.bound)
+ return;
+ this.bound = true;
+ if (this.variable === null && isReference(this, this.parent)) {
+ this.variable = this.scope.findVariable(this.name);
+ this.variable.addReference(this);
+ }
+ if (this.variable !== null &&
+ this.variable.isLocal &&
+ this.variable.additionalInitializers !== null) {
+ this.variable.consolidateInitializers();
+ }
+ }
+ declare(kind, init) {
+ switch (kind) {
+ case 'var':
+ case 'function':
+ this.variable = this.scope.addDeclaration(this, this.context, init, true);
+ break;
+ case 'let':
+ case 'const':
+ case 'class':
+ this.variable = this.scope.addDeclaration(this, this.context, init, false);
+ break;
+ case 'parameter':
+ this.variable = this.scope.addParameterDeclaration(this);
+ break;
+ default:
+ throw new Error(`Unexpected identifier kind ${kind}.`);
+ }
+ }
+ deoptimizePath(path) {
+ if (!this.bound)
+ this.bind();
+ if (this.variable !== null) {
+ if (path.length === 0 &&
+ this.name in this.context.importDescriptions &&
+ !this.scope.contains(this.name)) {
+ this.disallowImportReassignment();
+ }
+ this.variable.deoptimizePath(path);
+ }
+ }
+ getLiteralValueAtPath(path, recursionTracker, origin) {
+ if (!this.bound)
+ this.bind();
+ if (this.variable !== null) {
+ return this.variable.getLiteralValueAtPath(path, recursionTracker, origin);
+ }
+ return UNKNOWN_VALUE;
+ }
+ getReturnExpressionWhenCalledAtPath(path, recursionTracker, origin) {
+ if (!this.bound)
+ this.bind();
+ if (this.variable !== null) {
+ return this.variable.getReturnExpressionWhenCalledAtPath(path, recursionTracker, origin);
+ }
+ return UNKNOWN_EXPRESSION;
+ }
+ hasEffectsWhenAccessedAtPath(path, options) {
+ return this.variable !== null && this.variable.hasEffectsWhenAccessedAtPath(path, options);
+ }
+ hasEffectsWhenAssignedAtPath(path, options) {
+ return !this.variable || this.variable.hasEffectsWhenAssignedAtPath(path, options);
+ }
+ hasEffectsWhenCalledAtPath(path, callOptions, options) {
+ return !this.variable || this.variable.hasEffectsWhenCalledAtPath(path, callOptions, options);
+ }
+ include(_includeAllChildrenRecursively) {
+ if (!this.included) {
+ this.included = true;
+ if (this.variable !== null) {
+ this.context.includeVariable(this.variable);
+ }
+ }
+ }
+ initialise() {
+ this.included = false;
+ this.bound = false;
+ // To avoid later shape mutations
+ if (!this.variable) {
+ this.variable = null;
+ }
+ }
+ render(code, _options, { renderedParentType, isCalleeOfRenderedParent, isShorthandProperty } = BLANK) {
+ if (this.variable) {
+ const name = this.variable.getName();
+ if (name !== this.name) {
+ code.overwrite(this.start, this.end, name, {
+ contentOnly: true,
+ storeName: true
+ });
+ if (isShorthandProperty) {
+ code.prependRight(this.start, `${this.name}: `);
+ }
+ }
+ // In strict mode, any variable named "eval" must be the actual "eval" function
+ if (name === 'eval' &&
+ renderedParentType === CallExpression &&
+ isCalleeOfRenderedParent) {
+ code.appendRight(this.start, '0, ');
+ }
+ }
+ }
+ disallowImportReassignment() {
+ this.context.error({
+ code: 'ILLEGAL_REASSIGNMENT',
+ message: `Illegal reassignment to import '${this.name}'`
+ }, this.start);
+ }
+}
+
+class ExportDefaultVariable extends LocalVariable {
+ constructor(name, exportDefaultDeclaration, context) {
+ super(name, exportDefaultDeclaration, exportDefaultDeclaration.declaration, context);
+ // Not initialised during construction
+ this.originalId = null;
+ this.originalVariable = null;
+ const declaration = exportDefaultDeclaration.declaration;
+ if ((declaration instanceof FunctionDeclaration || declaration instanceof ClassDeclaration) &&
+ declaration.id) {
+ this.hasId = true;
+ this.originalId = declaration.id;
+ }
+ else if (declaration instanceof Identifier$1) {
+ this.originalId = declaration;
+ }
+ }
+ addReference(identifier) {
+ if (!this.hasId) {
+ this.name = identifier.name;
+ }
+ }
+ getAssignedVariableName() {
+ return (this.originalId && this.originalId.name) || null;
+ }
+ getName() {
+ const original = this.getOriginalVariable();
+ if (original === this) {
+ return super.getName();
+ }
+ else {
+ return original.getName();
+ }
+ }
+ getOriginalVariable() {
+ if (this.originalVariable === null) {
+ if (!this.originalId || (!this.hasId && this.originalId.variable.isReassigned)) {
+ this.originalVariable = this;
+ }
+ else {
+ const assignedOriginal = this.originalId.variable;
+ this.originalVariable =
+ assignedOriginal instanceof ExportDefaultVariable
+ ? assignedOriginal.getOriginalVariable()
+ : assignedOriginal;
+ }
+ }
+ return this.originalVariable;
+ }
+ setRenderNames(baseName, name) {
+ const original = this.getOriginalVariable();
+ if (original === this) {
+ super.setRenderNames(baseName, name);
+ }
+ else {
+ original.setRenderNames(baseName, name);
+ }
+ }
+ setSafeName(name) {
+ const original = this.getOriginalVariable();
+ if (original === this) {
+ super.setSafeName(name);
+ }
+ else {
+ original.setSafeName(name);
+ }
+ }
+}
+ExportDefaultVariable.prototype.getBaseVariableName = ExportDefaultVariable.prototype.getName;
+ExportDefaultVariable.prototype.isDefault = true;
+
+const MISSING_EXPORT_SHIM_VARIABLE = '_missingExportShim';
+const INTEROP_DEFAULT_VARIABLE = '_interopDefault';
+
+class ExportShimVariable extends Variable {
+ constructor(module) {
+ super(MISSING_EXPORT_SHIM_VARIABLE);
+ this.module = module;
+ }
+}
+
+const pureFunctions = {};
+const arrayTypes = 'Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' ');
+const simdTypes = 'Int8x16 Int16x8 Int32x4 Float32x4 Float64x2'.split(' ');
+const simdMethods = 'abs add and bool check div equal extractLane fromFloat32x4 fromFloat32x4Bits fromFloat64x2 fromFloat64x2Bits fromInt16x8Bits fromInt32x4 fromInt32x4Bits fromInt8x16Bits greaterThan greaterThanOrEqual lessThan lessThanOrEqual load max maxNum min minNum mul neg not notEqual or reciprocalApproximation reciprocalSqrtApproximation replaceLane select selectBits shiftLeftByScalar shiftRightArithmeticByScalar shiftRightLogicalByScalar shuffle splat sqrt store sub swizzle xor'.split(' ');
+const allSimdMethods = [];
+simdTypes.forEach(t => {
+ simdMethods.forEach(m => {
+ allSimdMethods.push(`SIMD.${t}.${m}`);
+ });
+});
+[
+ 'Array.isArray',
+ 'Error',
+ 'EvalError',
+ 'InternalError',
+ 'RangeError',
+ 'ReferenceError',
+ 'SyntaxError',
+ 'TypeError',
+ 'URIError',
+ 'isFinite',
+ 'isNaN',
+ 'parseFloat',
+ 'parseInt',
+ 'decodeURI',
+ 'decodeURIComponent',
+ 'encodeURI',
+ 'encodeURIComponent',
+ 'escape',
+ 'unescape',
+ 'Object',
+ 'Object.create',
+ 'Object.getNotifier',
+ 'Object.getOwn',
+ 'Object.getOwnPropertyDescriptor',
+ 'Object.getOwnPropertyNames',
+ 'Object.getOwnPropertySymbols',
+ 'Object.getPrototypeOf',
+ 'Object.is',
+ 'Object.isExtensible',
+ 'Object.isFrozen',
+ 'Object.isSealed',
+ 'Object.keys',
+ 'Boolean',
+ 'Number',
+ 'Number.isFinite',
+ 'Number.isInteger',
+ 'Number.isNaN',
+ 'Number.isSafeInteger',
+ 'Number.parseFloat',
+ 'Number.parseInt',
+ 'Symbol',
+ 'Symbol.for',
+ 'Symbol.keyFor',
+ 'Math.abs',
+ 'Math.acos',
+ 'Math.acosh',
+ 'Math.asin',
+ 'Math.asinh',
+ 'Math.atan',
+ 'Math.atan2',
+ 'Math.atanh',
+ 'Math.cbrt',
+ 'Math.ceil',
+ 'Math.clz32',
+ 'Math.cos',
+ 'Math.cosh',
+ 'Math.exp',
+ 'Math.expm1',
+ 'Math.floor',
+ 'Math.fround',
+ 'Math.hypot',
+ 'Math.imul',
+ 'Math.log',
+ 'Math.log10',
+ 'Math.log1p',
+ 'Math.log2',
+ 'Math.max',
+ 'Math.min',
+ 'Math.pow',
+ 'Math.random',
+ 'Math.round',
+ 'Math.sign',
+ 'Math.sin',
+ 'Math.sinh',
+ 'Math.sqrt',
+ 'Math.tan',
+ 'Math.tanh',
+ 'Math.trunc',
+ 'Date',
+ 'Date.UTC',
+ 'Date.now',
+ 'Date.parse',
+ 'String',
+ 'String.fromCharCode',
+ 'String.fromCodePoint',
+ 'String.raw',
+ 'RegExp',
+ 'Map',
+ 'Set',
+ 'WeakMap',
+ 'WeakSet',
+ 'ArrayBuffer',
+ 'ArrayBuffer.isView',
+ 'DataView',
+ 'Promise.all',
+ 'Promise.race',
+ 'Promise.resolve',
+ 'Intl.Collator',
+ 'Intl.Collator.supportedLocalesOf',
+ 'Intl.DateTimeFormat',
+ 'Intl.DateTimeFormat.supportedLocalesOf',
+ 'Intl.NumberFormat',
+ 'Intl.NumberFormat.supportedLocalesOf'
+ // TODO properties of e.g. window...
+]
+ .concat(arrayTypes, arrayTypes.map(t => `${t}.from`), arrayTypes.map(t => `${t}.of`), simdTypes.map(t => `SIMD.${t}`), allSimdMethods)
+ .forEach(name => (pureFunctions[name] = true));
+
+class GlobalVariable extends Variable {
+ hasEffectsWhenAccessedAtPath(path) {
+ // path.length == 0 can also have an effect but we postpone this for now
+ return (path.length > 0 &&
+ !this.isPureFunctionMember(path) &&
+ !(this.name === 'Reflect' && path.length === 1));
+ }
+ hasEffectsWhenCalledAtPath(path) {
+ return !pureFunctions[[this.name, ...path].join('.')];
+ }
+ isPureFunctionMember(path) {
+ return (pureFunctions[[this.name, ...path].join('.')] ||
+ (path.length >= 1 && pureFunctions[[this.name, ...path.slice(0, -1)].join('.')]) ||
+ (path.length >= 2 &&
+ pureFunctions[[this.name, ...path.slice(0, -2)].join('.')] &&
+ path[path.length - 2] === 'prototype'));
+ }
+}
+
+// Verified on IE 6/7 that these keywords can't be used for object properties without escaping:
+// break case catch class const continue debugger default delete do
+// else enum export extends false finally for function if import
+// in instanceof new null return super switch this throw true
+// try typeof var void while with
+const RESERVED_NAMES = Object.assign(Object.create(null), {
+ await: true,
+ break: true,
+ case: true,
+ catch: true,
+ class: true,
+ const: true,
+ continue: true,
+ debugger: true,
+ default: true,
+ delete: true,
+ do: true,
+ else: true,
+ enum: true,
+ eval: true,
+ export: true,
+ extends: true,
+ false: true,
+ finally: true,
+ for: true,
+ function: true,
+ if: true,
+ implements: true,
+ import: true,
+ in: true,
+ instanceof: true,
+ interface: true,
+ let: true,
+ new: true,
+ null: true,
+ package: true,
+ private: true,
+ protected: true,
+ public: true,
+ return: true,
+ static: true,
+ super: true,
+ switch: true,
+ this: true,
+ throw: true,
+ true: true,
+ try: true,
+ typeof: true,
+ undefined: true,
+ var: true,
+ void: true,
+ while: true,
+ with: true,
+ yield: true
+});
+const NONE = {};
+const EXPORTS = { exports: true };
+const RESERVED_NAMES_BY_FORMAT = {
+ amd: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES },
+ cjs: {
+ forbiddenNames: RESERVED_NAMES,
+ formatGlobals: { exports: true, module: true, [INTEROP_DEFAULT_VARIABLE]: true }
+ },
+ es: { formatGlobals: NONE, forbiddenNames: RESERVED_NAMES },
+ iife: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES },
+ system: {
+ forbiddenNames: Object.assign(Object.create(null), RESERVED_NAMES, EXPORTS),
+ formatGlobals: NONE
+ },
+ umd: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES }
+};
+
+class NamespaceVariable extends Variable {
+ constructor(context) {
+ super(context.getModuleName());
+ this.memberVariables = Object.create(null);
+ this.containsExternalNamespace = false;
+ this.referencedEarly = false;
+ this.references = [];
+ this.context = context;
+ this.module = context.module;
+ for (const name of this.context.getExports().concat(this.context.getReexports())) {
+ if (name[0] === '*' && name.length > 1)
+ this.containsExternalNamespace = true;
+ this.memberVariables[name] = this.context.traceExport(name);
+ }
+ }
+ addReference(identifier) {
+ this.references.push(identifier);
+ this.name = identifier.name;
+ }
+ // This is only called if "UNKNOWN_PATH" is reassigned as in all other situations, either the
+ // build fails due to an illegal namespace reassignment or MemberExpression already forwards
+ // the reassignment to the right variable. This means we lost track of this variable and thus
+ // need to reassign all exports.
+ deoptimizePath() {
+ for (const key in this.memberVariables) {
+ this.memberVariables[key].deoptimizePath(UNKNOWN_PATH);
+ }
+ }
+ include() {
+ if (!this.included) {
+ if (this.containsExternalNamespace) {
+ this.context.error({
+ code: 'NAMESPACE_CANNOT_CONTAIN_EXTERNAL',
+ id: this.module.id,
+ message: `Cannot create an explicit namespace object for module "${this.context.getModuleName()}" because it contains a reexported external namespace`
+ }, undefined);
+ }
+ this.included = true;
+ for (const identifier of this.references) {
+ if (identifier.context.getModuleExecIndex() <= this.context.getModuleExecIndex()) {
+ this.referencedEarly = true;
+ break;
+ }
+ }
+ if (this.context.preserveModules) {
+ for (const memberName of Object.keys(this.memberVariables))
+ this.memberVariables[memberName].include();
+ }
+ else {
+ for (const memberName of Object.keys(this.memberVariables))
+ this.context.includeVariable(this.memberVariables[memberName]);
+ }
+ }
+ }
+ renderBlock(options) {
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const t = options.indent;
+ const members = Object.keys(this.memberVariables).map(name => {
+ const original = this.memberVariables[name];
+ if (this.referencedEarly || original.isReassigned) {
+ return `${t}get ${name}${_}()${_}{${_}return ${original.getName()}${options.compact ? '' : ';'}${_}}`;
+ }
+ const safeName = RESERVED_NAMES[name] ? `'${name}'` : name;
+ return `${t}${safeName}: ${original.getName()}`;
+ });
+ const name = this.getName();
+ const callee = options.freeze ? `/*#__PURE__*/Object.freeze` : '';
+ let output = `${options.varOrConst} ${name} = ${options.namespaceToStringTag
+ ? `{${n}${members.join(`,${n}`)}${n}};`
+ : `${callee}({${n}${members.join(`,${n}`)}${n}});`}`;
+ if (options.namespaceToStringTag) {
+ output += `${n}if${_}(typeof Symbol${_}!==${_}'undefined'${_}&&${_}Symbol.toStringTag)${n}`;
+ output += `${t}Object.defineProperty(${name},${_}Symbol.toStringTag,${_}{${_}value:${_}'Module'${_}});${n}`;
+ output += `else${n || ' '}`;
+ output += `${t}Object.defineProperty(${name},${_}'toString',${_}{${_}value:${_}function${_}()${_}{${_}return${_}'[object Module]'${options.compact ? ';' : ''}${_}}${_}});${n}`;
+ output += `${callee}(${name});`;
+ }
+ if (options.format === 'system' && this.exportName) {
+ output += `${n}exports('${this.exportName}',${_}${name});`;
+ }
+ return output;
+ }
+ renderFirst() {
+ return this.referencedEarly;
+ }
+}
+NamespaceVariable.prototype.isNamespace = true;
+
+const esModuleExport = `Object.defineProperty(exports, '__esModule', { value: true });`;
+const compactEsModuleExport = `Object.defineProperty(exports,'__esModule',{value:true});`;
+
+function getExportBlock(exports, dependencies, namedExportsMode, interop, compact, t, mechanism = 'return ') {
+ const _ = compact ? '' : ' ';
+ const n = compact ? '' : '\n';
+ if (!namedExportsMode) {
+ let local;
+ exports.some(expt => {
+ if (expt.exported === 'default') {
+ local = expt.local;
+ return true;
+ }
+ return false;
+ });
+ // search for reexported default otherwise
+ if (!local) {
+ dependencies.some(dep => {
+ if (!dep.reexports)
+ return false;
+ return dep.reexports.some(expt => {
+ if (expt.reexported === 'default') {
+ local = dep.namedExportsMode ? `${dep.name}.${expt.imported}` : dep.name;
+ return true;
+ }
+ return false;
+ });
+ });
+ }
+ return `${mechanism}${local};`;
+ }
+ let exportBlock = '';
+ // star exports must always output first for precedence
+ dependencies.forEach(({ name, reexports }) => {
+ if (reexports && namedExportsMode) {
+ reexports.forEach(specifier => {
+ if (specifier.reexported === '*') {
+ if (!compact && exportBlock)
+ exportBlock += '\n';
+ exportBlock +=
+ `Object.keys(${name}).forEach(function${_}(key)${_}{${n}` +
+ `${t}Object.defineProperty(exports,${_}key,${_}{${n}` +
+ `${t}${t}enumerable:${_}true,${n}` +
+ `${t}${t}get:${_}function${_}()${_}{${n}` +
+ `${t}${t}${t}return ${name}[key];${n}` +
+ `${t}${t}}${n}${t}});${n}});`;
+ }
+ });
+ }
+ });
+ dependencies.forEach(({ name, imports, reexports, isChunk, namedExportsMode: depNamedExportsMode }) => {
+ if (reexports && namedExportsMode) {
+ reexports.forEach(specifier => {
+ if (specifier.imported === 'default' && !isChunk) {
+ const exportsNamesOrNamespace = (imports && imports.some(specifier => specifier.imported !== 'default')) ||
+ (reexports &&
+ reexports.some(specifier => specifier.imported !== 'default' && specifier.imported !== '*'));
+ const reexportsDefaultAsDefault = reexports &&
+ reexports.some(specifier => specifier.imported === 'default' && specifier.reexported === 'default');
+ if (exportBlock && !compact)
+ exportBlock += '\n';
+ if (exportsNamesOrNamespace || reexportsDefaultAsDefault)
+ exportBlock += `exports.${specifier.reexported}${_}=${_}${name}${interop !== false ? '__default' : '.default'};`;
+ else
+ exportBlock += `exports.${specifier.reexported}${_}=${_}${name};`;
+ }
+ else if (specifier.imported !== '*') {
+ if (exportBlock && !compact)
+ exportBlock += '\n';
+ const importName = specifier.imported === 'default' && !depNamedExportsMode
+ ? name
+ : `${name}.${specifier.imported}`;
+ exportBlock += specifier.needsLiveBinding
+ ? `Object.defineProperty(exports,${_}'${specifier.reexported}',${_}{${n}` +
+ `${t}enumerable:${_}true,${n}` +
+ `${t}get:${_}function${_}()${_}{${n}` +
+ `${t}${t}return ${importName};${n}${t}}${n}});`
+ : `exports.${specifier.reexported}${_}=${_}${importName};`;
+ }
+ else if (specifier.reexported !== '*') {
+ if (exportBlock && !compact)
+ exportBlock += '\n';
+ exportBlock += `exports.${specifier.reexported}${_}=${_}${name};`;
+ }
+ });
+ }
+ });
+ exports.forEach(expt => {
+ const lhs = `exports.${expt.exported}`;
+ const rhs = expt.local;
+ if (lhs === rhs) {
+ return;
+ }
+ if (exportBlock && !compact)
+ exportBlock += '\n';
+ exportBlock += `${lhs}${_}=${_}${rhs};`;
+ });
+ return exportBlock;
+}
+
+function getInteropBlock(dependencies, options, varOrConst) {
+ return dependencies
+ .map(({ name, exportsNames, exportsDefault, namedExportsMode }) => {
+ if (!namedExportsMode)
+ return;
+ if (!exportsDefault || options.interop === false)
+ return null;
+ if (exportsNames) {
+ if (options.compact)
+ return `${varOrConst} ${name}__default='default'in ${name}?${name}['default']:${name};`;
+ return `${varOrConst} ${name}__default = 'default' in ${name} ? ${name}['default'] : ${name};`;
+ }
+ if (options.compact)
+ return `${name}=${name}&&${name}.hasOwnProperty('default')?${name}['default']:${name};`;
+ return `${name} = ${name} && ${name}.hasOwnProperty('default') ? ${name}['default'] : ${name};`;
+ })
+ .filter(Boolean)
+ .join(options.compact ? '' : '\n');
+}
+
+const builtins$1 = {
+ assert: true,
+ buffer: true,
+ console: true,
+ constants: true,
+ domain: true,
+ events: true,
+ http: true,
+ https: true,
+ os: true,
+ path: true,
+ process: true,
+ punycode: true,
+ querystring: true,
+ stream: true,
+ string_decoder: true,
+ timers: true,
+ tty: true,
+ url: true,
+ util: true,
+ vm: true,
+ zlib: true
+};
+// Creating a browser chunk that depends on Node.js built-in modules ('util'). You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins
+function warnOnBuiltins(warn, dependencies) {
+ const externalBuiltins = dependencies.map(({ id }) => id).filter(id => id in builtins$1);
+ if (!externalBuiltins.length)
+ return;
+ const detail = externalBuiltins.length === 1
+ ? `module ('${externalBuiltins[0]}')`
+ : `modules (${externalBuiltins
+ .slice(0, -1)
+ .map(name => `'${name}'`)
+ .join(', ')} and '${externalBuiltins.slice(-1)}')`;
+ warn({
+ code: 'MISSING_NODE_BUILTINS',
+ message: `Creating a browser bundle that depends on Node.js built-in ${detail}. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins`,
+ modules: externalBuiltins
+ });
+}
+
+// TODO consider using improved AMD relative imports:
+// https://requirejs.org/docs/api.html#modulenotes-urls
+// AMD resolution will only respect the AMD baseUrl if the .js extension is omitted.
+// The assumption is that this makes sense for all relative ids:
+// https://requirejs.org/docs/api.html#jsfiles
+function removeExtensionFromRelativeAmdId(id) {
+ if (id[0] === '.' && id.endsWith('.js')) {
+ return id.slice(0, -3);
+ }
+ return id;
+}
+function amd(magicString, { dependencies, dynamicImport, exports, hasExports, indentString: t, intro, isEntryModuleFacade, namedExportsMode, needsAmdModule, outro, varOrConst, warn }, options) {
+ warnOnBuiltins(warn, dependencies);
+ const deps = dependencies.map(m => `'${removeExtensionFromRelativeAmdId(m.id)}'`);
+ const args = dependencies.map(m => m.name);
+ const n = options.compact ? '' : '\n';
+ const _ = options.compact ? '' : ' ';
+ if (namedExportsMode && hasExports) {
+ args.unshift(`exports`);
+ deps.unshift(`'exports'`);
+ }
+ if (dynamicImport) {
+ args.unshift('require');
+ deps.unshift(`'require'`);
+ }
+ if (needsAmdModule) {
+ args.unshift('module');
+ deps.unshift(`'module'`);
+ }
+ const amdOptions = options.amd || {};
+ const params = (amdOptions.id ? `'${amdOptions.id}',${_}` : ``) +
+ (deps.length ? `[${deps.join(`,${_}`)}],${_}` : ``);
+ const useStrict = options.strict !== false ? `${_}'use strict';` : ``;
+ const define = amdOptions.define || 'define';
+ const wrapperStart = `${define}(${params}function${_}(${args.join(`,${_}`)})${_}{${useStrict}${n}${n}`;
+ // var foo__default = 'default' in foo ? foo['default'] : foo;
+ const interopBlock = getInteropBlock(dependencies, options, varOrConst);
+ if (interopBlock)
+ magicString.prepend(interopBlock + n + n);
+ if (intro)
+ magicString.prepend(intro);
+ const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
+ if (exportBlock)
+ magicString.append(n + n + exportBlock);
+ if (namedExportsMode && hasExports && isEntryModuleFacade && options.esModule)
+ magicString.append(`${n}${n}${options.compact ? compactEsModuleExport : esModuleExport}`);
+ if (outro)
+ magicString.append(outro);
+ return magicString
+ .indent(t)
+ .append(n + n + '});')
+ .prepend(wrapperStart);
+}
+
+function cjs(magicString, { dependencies, exports, hasExports, indentString: t, intro, isEntryModuleFacade, namedExportsMode, outro, varOrConst }, options) {
+ const n = options.compact ? '' : '\n';
+ const _ = options.compact ? '' : ' ';
+ intro =
+ (options.strict === false ? intro : `'use strict';${n}${n}${intro}`) +
+ (namedExportsMode && hasExports && isEntryModuleFacade && options.esModule
+ ? `${options.compact ? compactEsModuleExport : esModuleExport}${n}${n}`
+ : '');
+ let needsInterop = false;
+ const interop = options.interop !== false;
+ let importBlock;
+ let definingVariable = false;
+ importBlock = '';
+ for (const { id, namedExportsMode, isChunk, name, reexports, imports, exportsNames, exportsDefault } of dependencies) {
+ if (!reexports && !imports) {
+ if (importBlock) {
+ importBlock += !options.compact || definingVariable ? `;${n}` : ',';
+ }
+ definingVariable = false;
+ importBlock += `require('${id}')`;
+ }
+ else {
+ importBlock +=
+ options.compact && definingVariable ? ',' : `${importBlock ? `;${n}` : ''}${varOrConst} `;
+ definingVariable = true;
+ if (!interop || isChunk || !exportsDefault || !namedExportsMode) {
+ importBlock += `${name}${_}=${_}require('${id}')`;
+ }
+ else {
+ needsInterop = true;
+ if (exportsNames)
+ importBlock += `${name}${_}=${_}require('${id}')${options.compact ? ',' : `;\n${varOrConst} `}${name}__default${_}=${_}${INTEROP_DEFAULT_VARIABLE}(${name})`;
+ else
+ importBlock += `${name}${_}=${_}${INTEROP_DEFAULT_VARIABLE}(require('${id}'))`;
+ }
+ }
+ }
+ if (importBlock)
+ importBlock += ';';
+ if (needsInterop) {
+ const ex = options.compact ? 'e' : 'ex';
+ intro +=
+ `function ${INTEROP_DEFAULT_VARIABLE}${_}(${ex})${_}{${_}return${_}` +
+ `(${ex}${_}&&${_}(typeof ${ex}${_}===${_}'object')${_}&&${_}'default'${_}in ${ex})${_}` +
+ `?${_}${ex}['default']${_}:${_}${ex}${options.compact ? '' : '; '}}${n}${n}`;
+ }
+ if (importBlock)
+ intro += importBlock + n + n;
+ const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t, `module.exports${_}=${_}`);
+ magicString.prepend(intro);
+ if (exportBlock)
+ magicString.append(n + n + exportBlock);
+ if (outro)
+ magicString.append(outro);
+ return magicString;
+}
+
+function esm(magicString, { intro, outro, dependencies, exports }, options) {
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const importBlock = dependencies
+ .map(({ id, reexports, imports, name }) => {
+ if (!reexports && !imports) {
+ return `import${_}'${id}';`;
+ }
+ let output = '';
+ if (imports) {
+ const defaultImport = imports.find(specifier => specifier.imported === 'default');
+ const starImport = imports.find(specifier => specifier.imported === '*');
+ if (starImport) {
+ output += `import${_}*${_}as ${starImport.local} from${_}'${id}';`;
+ if (imports.length > 1)
+ output += n;
+ }
+ if (defaultImport && imports.length === 1) {
+ output += `import ${defaultImport.local} from${_}'${id}';`;
+ }
+ else if (!starImport || imports.length > 1) {
+ output += `import ${defaultImport ? `${defaultImport.local},${_}` : ''}{${_}${imports
+ .filter(specifier => specifier !== defaultImport && specifier !== starImport)
+ .map(specifier => {
+ if (specifier.imported === specifier.local) {
+ return specifier.imported;
+ }
+ else {
+ return `${specifier.imported} as ${specifier.local}`;
+ }
+ })
+ .join(`,${_}`)}${_}}${_}from${_}'${id}';`;
+ }
+ }
+ if (reexports) {
+ if (imports)
+ output += n;
+ const starExport = reexports.find(specifier => specifier.reexported === '*');
+ const namespaceReexport = reexports.find(specifier => specifier.imported === '*' && specifier.reexported !== '*');
+ if (starExport) {
+ output += `export${_}*${_}from${_}'${id}';`;
+ if (reexports.length === 1) {
+ return output;
+ }
+ output += n;
+ }
+ if (namespaceReexport) {
+ if (!imports ||
+ !imports.some(specifier => specifier.imported === '*' && specifier.local === name))
+ output += `import${_}*${_}as ${name} from${_}'${id}';${n}`;
+ output += `export${_}{${_}${name === namespaceReexport.reexported
+ ? name
+ : `${name} as ${namespaceReexport.reexported}`} };`;
+ if (reexports.length === (starExport ? 2 : 1)) {
+ return output;
+ }
+ output += n;
+ }
+ output += `export${_}{${_}${reexports
+ .filter(specifier => specifier !== starExport && specifier !== namespaceReexport)
+ .map(specifier => {
+ if (specifier.imported === specifier.reexported) {
+ return specifier.imported;
+ }
+ else {
+ return `${specifier.imported} as ${specifier.reexported}`;
+ }
+ })
+ .join(`,${_}`)}${_}}${_}from${_}'${id}';`;
+ }
+ return output;
+ })
+ .join(n);
+ if (importBlock)
+ intro += importBlock + n + n;
+ if (intro)
+ magicString.prepend(intro);
+ const exportBlock = [];
+ const exportDeclaration = [];
+ exports.forEach(specifier => {
+ if (specifier.exported === 'default') {
+ exportBlock.push(`export default ${specifier.local};`);
+ }
+ else {
+ exportDeclaration.push(specifier.exported === specifier.local
+ ? specifier.local
+ : `${specifier.local} as ${specifier.exported}`);
+ }
+ });
+ if (exportDeclaration.length) {
+ exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
+ }
+ if (exportBlock.length)
+ magicString.append(n + n + exportBlock.join(n).trim());
+ if (outro)
+ magicString.append(outro);
+ return magicString.trim();
+}
+
+function spaces(i) {
+ let result = '';
+ while (i--)
+ result += ' ';
+ return result;
+}
+function tabsToSpaces(str) {
+ return str.replace(/^\t+/, match => match.split('\t').join(' '));
+}
+function getCodeFrame(source, line, column) {
+ let lines = source.split('\n');
+ const frameStart = Math.max(0, line - 3);
+ let frameEnd = Math.min(line + 2, lines.length);
+ lines = lines.slice(frameStart, frameEnd);
+ while (!/\S/.test(lines[lines.length - 1])) {
+ lines.pop();
+ frameEnd -= 1;
+ }
+ const digits = String(frameEnd).length;
+ return lines
+ .map((str, i) => {
+ const isErrorLine = frameStart + i + 1 === line;
+ let lineNum = String(i + frameStart + 1);
+ while (lineNum.length < digits)
+ lineNum = ` ${lineNum}`;
+ if (isErrorLine) {
+ const indicator = spaces(digits + 2 + tabsToSpaces(str.slice(0, column)).length) + '^';
+ return `${lineNum}: ${tabsToSpaces(str)}\n${indicator}`;
+ }
+ return `${lineNum}: ${tabsToSpaces(str)}`;
+ })
+ .join('\n');
+}
+
+function getAliasName(id) {
+ const base = basename(id);
+ return base.substr(0, base.length - extname(id).length);
+}
+function relativeId(id) {
+ if (typeof process === 'undefined' || !isAbsolute(id))
+ return id;
+ return relative(process.cwd(), id);
+}
+function isPlainName(name) {
+ // not starting with "./", "/". "../"
+ return !(name[0] === '/' ||
+ (name[1] === '.' && (name[2] === '/' || (name[2] === '.' && name[3] === '/'))));
+}
+
+function error(base, props) {
+ if (base instanceof Error === false)
+ base = Object.assign(new Error(base.message), base);
+ if (props)
+ Object.assign(base, props);
+ throw base;
+}
+function augmentCodeLocation(object, pos, source, id) {
+ if (pos.line !== undefined && pos.column !== undefined) {
+ const { line, column } = pos;
+ object.loc = { file: id, line, column };
+ }
+ else {
+ object.pos = pos;
+ const { line, column } = locate(source, pos, { offsetLine: 1 });
+ object.loc = { file: id, line, column };
+ }
+ if (object.frame === undefined) {
+ const { line, column } = object.loc;
+ object.frame = getCodeFrame(source, line, column);
+ }
+}
+var Errors;
+(function (Errors) {
+ Errors["ASSET_NOT_FINALISED"] = "ASSET_NOT_FINALISED";
+ Errors["ASSET_NOT_FOUND"] = "ASSET_NOT_FOUND";
+ Errors["ASSET_SOURCE_ALREADY_SET"] = "ASSET_SOURCE_ALREADY_SET";
+ Errors["ASSET_SOURCE_MISSING"] = "ASSET_SOURCE_MISSING";
+ Errors["BAD_LOADER"] = "BAD_LOADER";
+ Errors["CHUNK_NOT_FOUND"] = "CHUNK_NOT_FOUND";
+ Errors["CHUNK_NOT_GENERATED"] = "CHUNK_NOT_GENERATED";
+ Errors["INVALID_ASSET_NAME"] = "INVALID_ASSET_NAME";
+ Errors["INVALID_CHUNK"] = "INVALID_CHUNK";
+ Errors["INVALID_EXTERNAL_ID"] = "INVALID_EXTERNAL_ID";
+ Errors["INVALID_OPTION"] = "INVALID_OPTION";
+ Errors["INVALID_PLUGIN_HOOK"] = "INVALID_PLUGIN_HOOK";
+ Errors["INVALID_ROLLUP_PHASE"] = "INVALID_ROLLUP_PHASE";
+ Errors["NAMESPACE_CONFLICT"] = "NAMESPACE_CONFLICT";
+ Errors["UNRESOLVED_ENTRY"] = "UNRESOLVED_ENTRY";
+ Errors["UNRESOLVED_IMPORT"] = "UNRESOLVED_IMPORT";
+})(Errors || (Errors = {}));
+function errAssetNotFinalisedForFileName(asset) {
+ return {
+ code: Errors.ASSET_NOT_FINALISED,
+ message: `Plugin error - Unable to get file name for asset "${asset.name}". Ensure that the source is set and that generate is called first.`
+ };
+}
+function errChunkNotGeneratedForFileName(entry) {
+ return {
+ code: Errors.CHUNK_NOT_GENERATED,
+ message: `Plugin error - Unable to get file name for chunk "${entry.name}". Ensure that generate is called first.`
+ };
+}
+function errAssetReferenceIdNotFoundForFilename(assetReferenceId) {
+ return {
+ code: Errors.ASSET_NOT_FOUND,
+ message: `Plugin error - Unable to get file name for unknown asset "${assetReferenceId}".`
+ };
+}
+function errAssetReferenceIdNotFoundForSetSource(assetReferenceId) {
+ return {
+ code: Errors.ASSET_NOT_FOUND,
+ message: `Plugin error - Unable to set the source for unknown asset "${assetReferenceId}".`
+ };
+}
+function errAssetSourceAlreadySet(asset) {
+ return {
+ code: Errors.ASSET_SOURCE_ALREADY_SET,
+ message: `Plugin error - Unable to set the source for asset "${asset.name}", source already set.`
+ };
+}
+function errAssetSourceMissingForSetSource(asset) {
+ return {
+ code: Errors.ASSET_SOURCE_MISSING,
+ message: `Plugin error creating asset "${asset.name}", setAssetSource call without a source.`
+ };
+}
+function errNoAssetSourceSet(asset) {
+ return {
+ code: Errors.ASSET_SOURCE_MISSING,
+ message: `Plugin error creating asset "${asset.name}" - no asset source set.`
+ };
+}
+function errBadLoader(id) {
+ return {
+ code: Errors.BAD_LOADER,
+ message: `Error loading ${relativeId(id)}: plugin load hook should return a string, a { code, map } object, or nothing/null`
+ };
+}
+function errChunkReferenceIdNotFoundForFilename(chunkReferenceId) {
+ return {
+ code: Errors.CHUNK_NOT_FOUND,
+ message: `Plugin error - Unable to get file name for unknown chunk "${chunkReferenceId}".`
+ };
+}
+function errInvalidAssetName(name) {
+ return {
+ code: Errors.INVALID_ASSET_NAME,
+ message: `Plugin error creating asset, name "${name}" is not a plain (non relative or absolute URL) string name.`
+ };
+}
+function errCannotAssignModuleToChunk(moduleId, assignToAlias, currentAlias) {
+ return {
+ code: Errors.INVALID_CHUNK,
+ message: `Cannot assign ${relativeId(moduleId)} to the "${assignToAlias}" chunk as it is already in the "${currentAlias}" chunk.`
+ };
+}
+function errInternalIdCannotBeExternal(source, importer) {
+ return {
+ code: Errors.INVALID_EXTERNAL_ID,
+ message: `'${source}' is imported as an external by ${relativeId(importer)}, but is already an existing non-external module id.`
+ };
+}
+function errInvalidOption(option, explanation) {
+ return {
+ code: Errors.INVALID_OPTION,
+ message: `Invalid value for option "${option}" - ${explanation}.`
+ };
+}
+function errInvalidRollupPhaseForAddWatchFile() {
+ return {
+ code: Errors.INVALID_ROLLUP_PHASE,
+ message: `Cannot call addWatchFile after the build has finished.`
+ };
+}
+function errInvalidRollupPhaseForEmitChunk() {
+ return {
+ code: Errors.INVALID_ROLLUP_PHASE,
+ message: `Cannot call emitChunk after module loading has finished.`
+ };
+}
+function errNamespaceConflict(name, reexportingModule, additionalExportAllModule) {
+ return {
+ code: Errors.NAMESPACE_CONFLICT,
+ message: `Conflicting namespaces: ${relativeId(reexportingModule.id)} re-exports '${name}' from both ${relativeId(reexportingModule.exportsAll[name])} and ${relativeId(additionalExportAllModule.exportsAll[name])} (will be ignored)`,
+ name,
+ reexporter: reexportingModule.id,
+ sources: [reexportingModule.exportsAll[name], additionalExportAllModule.exportsAll[name]]
+ };
+}
+function errEntryCannotBeExternal(unresolvedId) {
+ return {
+ code: Errors.UNRESOLVED_ENTRY,
+ message: `Entry module cannot be external (${relativeId(unresolvedId)}).`
+ };
+}
+function errUnresolvedEntry(unresolvedId) {
+ return {
+ code: Errors.UNRESOLVED_ENTRY,
+ message: `Could not resolve entry module (${relativeId(unresolvedId)}).`
+ };
+}
+function errUnresolvedImport(source, importer) {
+ return {
+ code: Errors.UNRESOLVED_IMPORT,
+ message: `Could not resolve '${source}' from ${relativeId(importer)}`
+ };
+}
+function errUnresolvedImportTreatedAsExternal(source, importer) {
+ return {
+ code: Errors.UNRESOLVED_IMPORT,
+ importer: relativeId(importer),
+ message: `'${source}' is imported by ${relativeId(importer)}, but could not be resolved – treating it as an external dependency`,
+ source,
+ url: 'https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency'
+ };
+}
+
+// Generate strings which dereference dotted properties, but use array notation `['prop-deref']`
+// if the property name isn't trivial
+const shouldUseDot = /^[a-zA-Z$_][a-zA-Z0-9$_]*$/;
+function property(prop) {
+ return shouldUseDot.test(prop) ? `.${prop}` : `['${prop}']`;
+}
+function keypath(keypath) {
+ return keypath
+ .split('.')
+ .map(property)
+ .join('');
+}
+
+function setupNamespace(name, root, globals, compact) {
+ const parts = name.split('.');
+ if (globals) {
+ parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
+ }
+ const _ = compact ? '' : ' ';
+ parts.pop();
+ let acc = root;
+ return (parts
+ .map(part => ((acc += property(part)), `${acc}${_}=${_}${acc}${_}||${_}{}${compact ? '' : ';'}`))
+ .join(compact ? ',' : '\n') + (compact && parts.length ? ';' : '\n'));
+}
+function assignToDeepVariable(deepName, root, globals, compact, assignment) {
+ const _ = compact ? '' : ' ';
+ const parts = deepName.split('.');
+ if (globals) {
+ parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
+ }
+ const last = parts.pop();
+ let acc = root;
+ let deepAssignment = parts
+ .map(part => ((acc += property(part)), `${acc}${_}=${_}${acc}${_}||${_}{}`))
+ .concat(`${acc}${property(last)}`)
+ .join(`,${_}`)
+ .concat(`${_}=${_}${assignment}`);
+ if (parts.length > 0) {
+ deepAssignment = `(${deepAssignment})`;
+ }
+ return deepAssignment;
+}
+
+function trimEmptyImports(dependencies) {
+ let i = dependencies.length;
+ while (i--) {
+ const dependency = dependencies[i];
+ if (dependency.exportsDefault || dependency.exportsNames) {
+ return dependencies.slice(0, i + 1);
+ }
+ }
+ return [];
+}
+
+const thisProp = (name) => `this${keypath(name)}`;
+function iife(magicString, { dependencies, exports, hasExports, indentString: t, intro, namedExportsMode, outro, varOrConst, warn }, options) {
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const { extend, name } = options;
+ const isNamespaced = name && name.indexOf('.') !== -1;
+ const useVariableAssignment = !extend && !isNamespaced;
+ if (name && useVariableAssignment && !isLegal(name)) {
+ error({
+ code: 'ILLEGAL_IDENTIFIER_AS_NAME',
+ message: `Given name (${name}) is not legal JS identifier. If you need this you can try --extend option`
+ });
+ }
+ warnOnBuiltins(warn, dependencies);
+ const external = trimEmptyImports(dependencies);
+ const deps = external.map(dep => dep.globalName || 'null');
+ const args = external.map(m => m.name);
+ if (hasExports && !name) {
+ error({
+ code: 'INVALID_OPTION',
+ message: `You must supply "output.name" for IIFE bundles.`
+ });
+ }
+ if (namedExportsMode && hasExports) {
+ if (extend) {
+ deps.unshift(`${thisProp(name)}${_}=${_}${thisProp(name)}${_}||${_}{}`);
+ args.unshift('exports');
+ }
+ else {
+ deps.unshift('{}');
+ args.unshift('exports');
+ }
+ }
+ const useStrict = options.strict !== false ? `${t}'use strict';${n}${n}` : ``;
+ let wrapperIntro = `(function${_}(${args.join(`,${_}`)})${_}{${n}${useStrict}`;
+ if (hasExports && (!extend || !namedExportsMode)) {
+ wrapperIntro =
+ (useVariableAssignment ? `${varOrConst} ${name}` : thisProp(name)) +
+ `${_}=${_}${wrapperIntro}`;
+ }
+ if (isNamespaced && hasExports) {
+ wrapperIntro =
+ setupNamespace(name, 'this', options.globals, options.compact) + wrapperIntro;
+ }
+ let wrapperOutro = `${n}${n}}(${deps.join(`,${_}`)}));`;
+ if (!extend && namedExportsMode && hasExports) {
+ wrapperOutro = `${n}${n}${t}return exports;${wrapperOutro}`;
+ }
+ // var foo__default = 'default' in foo ? foo['default'] : foo;
+ const interopBlock = getInteropBlock(dependencies, options, varOrConst);
+ if (interopBlock)
+ magicString.prepend(interopBlock + n + n);
+ if (intro)
+ magicString.prepend(intro);
+ const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
+ if (exportBlock)
+ magicString.append(n + n + exportBlock);
+ if (outro)
+ magicString.append(outro);
+ return magicString
+ .indent(t)
+ .prepend(wrapperIntro)
+ .append(wrapperOutro);
+}
+
+function getStarExcludes({ dependencies, exports }) {
+ const starExcludes = new Set(exports.map(expt => expt.exported));
+ if (!starExcludes.has('default'))
+ starExcludes.add('default');
+ // also include reexport names
+ dependencies.forEach(({ reexports }) => {
+ if (reexports)
+ reexports.forEach(reexport => {
+ if (reexport.imported !== '*' && !starExcludes.has(reexport.reexported))
+ starExcludes.add(reexport.reexported);
+ });
+ });
+ return starExcludes;
+}
+const getStarExcludesBlock = (starExcludes, varOrConst, _, t, n) => starExcludes
+ ? `${n}${t}${varOrConst} _starExcludes${_}=${_}{${_}${Array.from(starExcludes).join(`:${_}1,${_}`)}${starExcludes.size ? `:${_}1` : ''}${_}};`
+ : '';
+const getImportBindingsBlock = (importBindings, _, t, n) => (importBindings.length ? `${n}${t}var ${importBindings.join(`,${_}`)};` : '');
+function getExportsBlock(exports, _, t, n) {
+ if (exports.length === 0) {
+ return '';
+ }
+ if (exports.length === 1) {
+ return `${t}${t}${t}exports('${exports[0].name}',${_}${exports[0].value});${n}${n}`;
+ }
+ return (`${t}${t}${t}exports({${n}` +
+ exports.map(({ name, value }) => `${t}${t}${t}${t}${name}:${_}${value}`).join(`,${n}`) +
+ `${n}${t}${t}${t}});${n}${n}`);
+}
+const getHoistedExportsBlock = (exports, _, t, n) => getExportsBlock(exports
+ .filter(expt => expt.hoisted || expt.uninitialized)
+ .map(expt => ({ name: expt.exported, value: expt.uninitialized ? 'void 0' : expt.local })), _, t, n);
+const getMissingExportsBlock = (exports, _, t, n) => getExportsBlock(exports
+ .filter(expt => expt.local === MISSING_EXPORT_SHIM_VARIABLE)
+ .map(expt => ({ name: expt.exported, value: MISSING_EXPORT_SHIM_VARIABLE })), _, t, n);
+function system(magicString, { dependencies, exports, indentString: t, intro, outro, usesTopLevelAwait, varOrConst }, options) {
+ const n = options.compact ? '' : '\n';
+ const _ = options.compact ? '' : ' ';
+ const dependencyIds = dependencies.map(m => `'${m.id}'`);
+ const importBindings = [];
+ let starExcludes;
+ const setters = [];
+ dependencies.forEach(({ imports, reexports }) => {
+ const setter = [];
+ if (imports) {
+ imports.forEach(specifier => {
+ importBindings.push(specifier.local);
+ if (specifier.imported === '*') {
+ setter.push(`${specifier.local}${_}=${_}module;`);
+ }
+ else {
+ setter.push(`${specifier.local}${_}=${_}module.${specifier.imported};`);
+ }
+ });
+ }
+ if (reexports) {
+ let createdSetter = false;
+ // bulk-reexport form
+ if (reexports.length > 1 ||
+ (reexports.length === 1 &&
+ (reexports[0].reexported === '*' || reexports[0].imported === '*'))) {
+ // star reexports
+ reexports.forEach(specifier => {
+ if (specifier.reexported !== '*')
+ return;
+ // need own exports list for deduping in star export case
+ if (!starExcludes) {
+ starExcludes = getStarExcludes({ dependencies, exports });
+ }
+ if (!createdSetter) {
+ setter.push(`${varOrConst} _setter${_}=${_}{};`);
+ createdSetter = true;
+ }
+ setter.push(`for${_}(var _$p${_}in${_}module)${_}{`);
+ setter.push(`${t}if${_}(!_starExcludes[_$p])${_}_setter[_$p]${_}=${_}module[_$p];`);
+ setter.push('}');
+ });
+ // star import reexport
+ reexports.forEach(specifier => {
+ if (specifier.imported !== '*' || specifier.reexported === '*')
+ return;
+ setter.push(`exports('${specifier.reexported}',${_}module);`);
+ });
+ // reexports
+ reexports.forEach(specifier => {
+ if (specifier.reexported === '*' || specifier.imported === '*')
+ return;
+ if (!createdSetter) {
+ setter.push(`${varOrConst} _setter${_}=${_}{};`);
+ createdSetter = true;
+ }
+ setter.push(`_setter.${specifier.reexported}${_}=${_}module.${specifier.imported};`);
+ });
+ if (createdSetter) {
+ setter.push('exports(_setter);');
+ }
+ }
+ else {
+ // single reexport
+ reexports.forEach(specifier => {
+ setter.push(`exports('${specifier.reexported}',${_}module.${specifier.imported});`);
+ });
+ }
+ }
+ setters.push(setter.join(`${n}${t}${t}${t}`));
+ });
+ const registeredName = options.name ? `'${options.name}',${_}` : '';
+ let wrapperStart = `System.register(${registeredName}[` +
+ dependencyIds.join(`,${_}`) +
+ `],${_}function${_}(exports,${_}module)${_}{${n}${t}'use strict';` +
+ getStarExcludesBlock(starExcludes, varOrConst, _, t, n) +
+ getImportBindingsBlock(importBindings, _, t, n) +
+ `${n}${t}return${_}{${setters.length
+ ? `${n}${t}${t}setters:${_}[${setters
+ .map(s => s
+ ? `function${_}(module)${_}{${n}${t}${t}${t}${s}${n}${t}${t}}`
+ : `function${_}()${_}{}`)
+ .join(`,${_}`)}],`
+ : ''}${n}`;
+ wrapperStart +=
+ `${t}${t}execute:${_}${usesTopLevelAwait ? `async${_}` : ''}function${_}()${_}{${n}${n}` +
+ getHoistedExportsBlock(exports, _, t, n);
+ const wrapperEnd = `${n}${n}` +
+ getMissingExportsBlock(exports, _, t, n) +
+ `${t}${t}}${n}${t}}${options.compact ? '' : ';'}${n}});`;
+ if (intro)
+ magicString.prepend(intro);
+ if (outro)
+ magicString.append(outro);
+ return magicString
+ .indent(`${t}${t}${t}`)
+ .append(wrapperEnd)
+ .prepend(wrapperStart);
+}
+
+function globalProp(name, globalVar) {
+ if (!name)
+ return 'null';
+ return `${globalVar}${keypath(name)}`;
+}
+function safeAccess(name, globalVar, _) {
+ const parts = name.split('.');
+ let acc = globalVar;
+ return parts.map(part => ((acc += property(part)), acc)).join(`${_}&&${_}`);
+}
+function umd(magicString, { dependencies, exports, hasExports, indentString: t, intro, namedExportsMode, outro, varOrConst, warn }, options) {
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const factoryVar = options.compact ? 'f' : 'factory';
+ const globalVar = options.compact ? 'g' : 'global';
+ if (hasExports && !options.name) {
+ error({
+ code: 'INVALID_OPTION',
+ message: 'You must supply "output.name" for UMD bundles.'
+ });
+ }
+ warnOnBuiltins(warn, dependencies);
+ const amdDeps = dependencies.map(m => `'${m.id}'`);
+ const cjsDeps = dependencies.map(m => `require('${m.id}')`);
+ const trimmedImports = trimEmptyImports(dependencies);
+ const globalDeps = trimmedImports.map(module => globalProp(module.globalName, globalVar));
+ const factoryArgs = trimmedImports.map(m => m.name);
+ if (namedExportsMode && (hasExports || options.noConflict === true)) {
+ amdDeps.unshift(`'exports'`);
+ cjsDeps.unshift(`exports`);
+ globalDeps.unshift(assignToDeepVariable(options.name, globalVar, options.globals, options.compact, `${options.extend ? `${globalProp(options.name, globalVar)}${_}||${_}` : ''}{}`));
+ factoryArgs.unshift('exports');
+ }
+ const amdOptions = options.amd || {};
+ const amdParams = (amdOptions.id ? `'${amdOptions.id}',${_}` : ``) +
+ (amdDeps.length ? `[${amdDeps.join(`,${_}`)}],${_}` : ``);
+ const define = amdOptions.define || 'define';
+ const cjsExport = !namedExportsMode && hasExports ? `module.exports${_}=${_}` : ``;
+ const useStrict = options.strict !== false ? `${_}'use strict';${n}` : ``;
+ let iifeExport;
+ if (options.noConflict === true) {
+ const noConflictExportsVar = options.compact ? 'e' : 'exports';
+ let factory;
+ if (!namedExportsMode && hasExports) {
+ factory = `var ${noConflictExportsVar}${_}=${_}${assignToDeepVariable(options.name, globalVar, options.globals, options.compact, `${factoryVar}(${globalDeps.join(`,${_}`)})`)};`;
+ }
+ else if (namedExportsMode) {
+ const module = globalDeps.shift();
+ factory =
+ `var ${noConflictExportsVar}${_}=${_}${module};${n}` +
+ `${t}${t}${factoryVar}(${[noConflictExportsVar].concat(globalDeps).join(`,${_}`)});`;
+ }
+ iifeExport =
+ `(function${_}()${_}{${n}` +
+ `${t}${t}var current${_}=${_}${safeAccess(options.name, globalVar, _)};${n}` +
+ `${t}${t}${factory}${n}` +
+ `${t}${t}${noConflictExportsVar}.noConflict${_}=${_}function${_}()${_}{${_}` +
+ `${globalProp(options.name, globalVar)}${_}=${_}current;${_}return ${noConflictExportsVar}${options.compact ? '' : '; '}};${n}` +
+ `${t}}())`;
+ }
+ else {
+ iifeExport = `${factoryVar}(${globalDeps.join(`,${_}`)})`;
+ if (!namedExportsMode && hasExports) {
+ iifeExport = assignToDeepVariable(options.name, globalVar, options.globals, options.compact, iifeExport);
+ }
+ }
+ const iifeNeedsGlobal = hasExports || (options.noConflict === true && namedExportsMode) || globalDeps.length > 0;
+ const globalParam = iifeNeedsGlobal ? `${globalVar},${_}` : '';
+ const globalArg = iifeNeedsGlobal ? `this,${_}` : '';
+ const iifeStart = iifeNeedsGlobal ? `(${globalVar}${_}=${_}${globalVar}${_}||${_}self,${_}` : '';
+ const iifeEnd = iifeNeedsGlobal ? ')' : '';
+ const cjsIntro = iifeNeedsGlobal
+ ? `${t}typeof exports${_}===${_}'object'${_}&&${_}typeof module${_}!==${_}'undefined'${_}?` +
+ `${_}${cjsExport}${factoryVar}(${cjsDeps.join(`,${_}`)})${_}:${n}`
+ : '';
+ const wrapperIntro = `(function${_}(${globalParam}${factoryVar})${_}{${n}` +
+ cjsIntro +
+ `${t}typeof ${define}${_}===${_}'function'${_}&&${_}${define}.amd${_}?${_}${define}(${amdParams}${factoryVar})${_}:${n}` +
+ `${t}${iifeStart}${iifeExport}${iifeEnd};${n}` +
+ `}(${globalArg}function${_}(${factoryArgs.join(', ')})${_}{${useStrict}${n}`;
+ const wrapperOutro = n + n + '}));';
+ // var foo__default = 'default' in foo ? foo['default'] : foo;
+ const interopBlock = getInteropBlock(dependencies, options, varOrConst);
+ if (interopBlock)
+ magicString.prepend(interopBlock + n + n);
+ if (intro)
+ magicString.prepend(intro);
+ const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
+ if (exportBlock)
+ magicString.append(n + n + exportBlock);
+ if (namedExportsMode && hasExports && options.esModule)
+ magicString.append(n + n + (options.compact ? compactEsModuleExport : esModuleExport));
+ if (outro)
+ magicString.append(outro);
+ return magicString
+ .trim()
+ .indent(t)
+ .append(wrapperOutro)
+ .prepend(wrapperIntro);
+}
+
+var finalisers = { system, amd, cjs, es: esm, iife, umd };
+
+const extractors = {
+ ArrayPattern(names, param) {
+ for (const element of param.elements) {
+ if (element)
+ extractors[element.type](names, element);
+ }
+ },
+ AssignmentPattern(names, param) {
+ extractors[param.left.type](names, param.left);
+ },
+ Identifier(names, param) {
+ names.push(param.name);
+ },
+ MemberExpression() { },
+ ObjectPattern(names, param) {
+ for (const prop of param.properties) {
+ if (prop.type === 'RestElement') {
+ extractors.RestElement(names, prop);
+ }
+ else {
+ extractors[prop.value.type](names, prop.value);
+ }
+ }
+ },
+ RestElement(names, param) {
+ extractors[param.argument.type](names, param.argument);
+ }
+};
+const extractAssignedNames = function extractAssignedNames(param) {
+ const names = [];
+ extractors[param.type](names, param);
+ return names;
+};
class ArrayExpression extends NodeBase {
bind() {
@@ -9725,6 +9870,7 @@
if (node.hasEffects(options))
return true;
}
+ return false;
}
include(includeAllChildrenRecursively) {
this.included = true;
@@ -9937,7 +10083,7 @@
hasEffects(options) {
return (super.hasEffects(options) ||
!options.ignoreBreakStatements() ||
- (this.label && !options.ignoreLabel(this.label.name)));
+ (this.label !== null && !options.ignoreLabel(this.label.name)));
}
}
@@ -9955,152 +10101,6 @@
}
const EMPTY_IMMUTABLE_TRACKER = new ImmutableEntityPathTracker();
-function isReference(node, parent) {
- if (node.type === 'MemberExpression') {
- return !node.computed && isReference(node.object, node);
- }
- if (node.type === 'Identifier') {
- switch (parent.type) {
- // disregard `bar` in `foo.bar`
- case 'MemberExpression': return parent.computed || node === parent.object;
- // disregard the `foo` in `class {foo(){}}` but keep it in `class {[foo](){}}`
- case 'MethodDefinition': return parent.computed;
- // disregard the `bar` in `{ bar: foo }`, but keep it in `{ [bar]: foo }`
- case 'Property': return parent.computed || node === parent.value;
- // disregard the `bar` in `export { foo as bar }`
- case 'ExportSpecifier': return node === parent.local;
- // disregard the `foo` in `foo: while (...) { ... break foo; ... continue foo;}`
- case 'LabeledStatement':
- case 'BreakStatement':
- case 'ContinueStatement': return false;
- default: return true;
- }
- }
- return false;
-}
-
-function isIdentifier(node) {
- return node.type === Identifier;
-}
-class Identifier$1 extends NodeBase {
- addExportedVariables(variables) {
- if (this.variable.exportName) {
- variables.push(this.variable);
- }
- }
- bind() {
- if (this.bound)
- return;
- this.bound = true;
- if (this.variable === null && isReference(this, this.parent)) {
- this.variable = this.scope.findVariable(this.name);
- this.variable.addReference(this);
- }
- if (this.variable !== null &&
- this.variable.isLocal &&
- this.variable.additionalInitializers !== null) {
- this.variable.consolidateInitializers();
- }
- }
- declare(kind, init) {
- switch (kind) {
- case 'var':
- case 'function':
- this.variable = this.scope.addDeclaration(this, this.context, init, true);
- break;
- case 'let':
- case 'const':
- case 'class':
- this.variable = this.scope.addDeclaration(this, this.context, init, false);
- break;
- case 'parameter':
- this.variable = this.scope.addParameterDeclaration(this);
- break;
- default:
- throw new Error(`Unexpected identifier kind ${kind}.`);
- }
- }
- deoptimizePath(path) {
- if (!this.bound)
- this.bind();
- if (this.variable !== null) {
- if (path.length === 0 &&
- this.name in this.context.importDescriptions &&
- !this.scope.contains(this.name)) {
- this.disallowImportReassignment();
- }
- this.variable.deoptimizePath(path);
- }
- }
- getLiteralValueAtPath(path, recursionTracker, origin) {
- if (!this.bound)
- this.bind();
- if (this.variable !== null) {
- return this.variable.getLiteralValueAtPath(path, recursionTracker, origin);
- }
- return UNKNOWN_VALUE;
- }
- getReturnExpressionWhenCalledAtPath(path, recursionTracker, origin) {
- if (!this.bound)
- this.bind();
- if (this.variable !== null) {
- return this.variable.getReturnExpressionWhenCalledAtPath(path, recursionTracker, origin);
- }
- return UNKNOWN_EXPRESSION;
- }
- hasEffectsWhenAccessedAtPath(path, options) {
- return this.variable && this.variable.hasEffectsWhenAccessedAtPath(path, options);
- }
- hasEffectsWhenAssignedAtPath(path, options) {
- return !this.variable || this.variable.hasEffectsWhenAssignedAtPath(path, options);
- }
- hasEffectsWhenCalledAtPath(path, callOptions, options) {
- return !this.variable || this.variable.hasEffectsWhenCalledAtPath(path, callOptions, options);
- }
- include(_includeAllChildrenRecursively) {
- if (!this.included) {
- this.included = true;
- if (this.variable !== null) {
- this.context.includeVariable(this.variable);
- }
- }
- }
- initialise() {
- this.included = false;
- this.bound = false;
- // To avoid later shape mutations
- if (!this.variable) {
- this.variable = null;
- }
- }
- render(code, _options, { renderedParentType, isCalleeOfRenderedParent, isShorthandProperty } = BLANK) {
- if (this.variable) {
- const name = this.variable.getName();
- if (name !== this.name) {
- code.overwrite(this.start, this.end, name, {
- contentOnly: true,
- storeName: true
- });
- if (isShorthandProperty) {
- code.prependRight(this.start, `${this.name}: `);
- }
- }
- // In strict mode, any variable named "eval" must be the actual "eval" function
- if (name === 'eval' &&
- renderedParentType === CallExpression &&
- isCalleeOfRenderedParent) {
- code.appendRight(this.start, '0, ');
- }
- }
- }
- disallowImportReassignment() {
- this.context.error({
- code: 'ILLEGAL_REASSIGNMENT',
- message: `Illegal reassignment to import '${this.name}'`
- }, this.start);
- }
-}
-
class CallExpression$1 extends NodeBase {
bind() {
super.bind();
@@ -10239,7 +10239,7 @@
}
}
parseNode(esTreeNode) {
- this.body = (new this.context.nodeConstructors.BlockStatement(esTreeNode.body, this, this.scope));
+ this.body = new this.context.nodeConstructors.BlockStatement(esTreeNode.body, this, this.scope);
super.parseNode(esTreeNode);
}
}
@@ -10472,7 +10472,7 @@
this.declaration.bind();
}
hasEffects(options) {
- return this.declaration && this.declaration.hasEffects(options);
+ return this.declaration !== null && this.declaration.hasEffects(options);
}
initialise() {
this.included = false;
@@ -10657,7 +10657,9 @@
(this.testValue
? this.alternate === null || !this.alternate.included
: !this.consequent.included)) {
- const singleRetainedBranch = this.testValue ? this.consequent : this.alternate;
+ const singleRetainedBranch = (this.testValue
+ ? this.consequent
+ : this.alternate);
code.remove(this.start, singleRetainedBranch.start);
code.remove(singleRetainedBranch.end, this.end);
removeAnnotations(this, code);
@@ -10721,6 +10723,7 @@
right: ')'
};
}
+ return undefined;
};
class Import extends NodeBase {
include() {
@@ -10757,7 +10760,7 @@
code.overwrite(this.parent.arguments[0].start, this.parent.arguments[0].end, resolution);
}
}
- setResolution(interop, namespace = undefined) {
+ setResolution(interop, namespace) {
this.resolutionInterop = interop;
this.resolutionNamespace = namespace;
}
@@ -10784,10 +10787,7 @@
}
}
-function isLiteral(node) {
- return node.type === Literal;
-}
-class Literal$1 extends NodeBase {
+class Literal extends NodeBase {
getLiteralValueAtPath(path) {
if (path.length > 0 ||
// unknown literals such as bigints can also be null but do not start with an "n"
@@ -10965,7 +10965,7 @@
: memberExpression.property.name;
}
function getResolvableComputedPropertyKey(propertyKey) {
- if (propertyKey instanceof Literal$1) {
+ if (propertyKey instanceof Literal) {
return String(propertyKey.value);
}
return null;
@@ -10980,7 +10980,7 @@
{ key: nextPathKey, pos: memberExpression.property.start }
];
}
- if (isMemberExpression(object)) {
+ if (object instanceof MemberExpression) {
const parentPath = getPathIfNotComputed(object);
return (parentPath && [...parentPath, { key: nextPathKey, pos: memberExpression.property.start }]);
}
@@ -10994,10 +10994,7 @@
}
return pathString;
}
-function isMemberExpression(node) {
- return node.type === MemberExpression;
-}
-class MemberExpression$1 extends NodeBase {
+class MemberExpression extends NodeBase {
constructor() {
super(...arguments);
this.variable = null;
@@ -11188,7 +11185,7 @@
if (!this.included)
return false;
const parent = this.parent;
- const importMetaProperty = parent instanceof MemberExpression$1 && typeof parent.propertyKey === 'string'
+ const importMetaProperty = parent instanceof MemberExpression && typeof parent.propertyKey === 'string'
? parent.propertyKey
: null;
if (importMetaProperty &&
@@ -11243,7 +11240,7 @@
}
]);
if (typeof replacement === 'string') {
- if (parent instanceof MemberExpression$1) {
+ if (parent instanceof MemberExpression) {
code.overwrite(parent.start, parent.end, replacement);
}
else {
@@ -11380,7 +11377,8 @@
else {
this.expressionsToBeDeoptimized[key].push(origin);
}
- return this.propertyMap[key].exactMatchRead.getLiteralValueAtPath(path.slice(1), recursionTracker, origin);
+ return this.propertyMap[key]
+ .exactMatchRead.getLiteralValueAtPath(path.slice(1), recursionTracker, origin);
}
getReturnExpressionWhenCalledAtPath(path, recursionTracker, origin) {
if (this.propertyMap === null)
@@ -11394,7 +11392,8 @@
if (path.length === 1 &&
objectMembers[key] &&
this.unmatchablePropertiesRead.length === 0 &&
- (!this.propertyMap[key] || this.propertyMap[key].exactMatchRead === null))
+ (!this.propertyMap[key] ||
+ this.propertyMap[key].exactMatchRead === null))
return getMemberReturnExpressionWhenCalled(objectMembers, key);
if (!this.propertyMap[key] ||
this.propertyMap[key].exactMatchRead === null ||
@@ -11406,7 +11405,8 @@
else {
this.expressionsToBeDeoptimized[key].push(origin);
}
- return this.propertyMap[key].exactMatchRead.getReturnExpressionWhenCalledAtPath(path.slice(1), recursionTracker, origin);
+ return this.propertyMap[key]
+ .exactMatchRead.getReturnExpressionWhenCalledAtPath(path.slice(1), recursionTracker, origin);
}
hasEffectsWhenAccessedAtPath(path, options) {
if (path.length === 0)
@@ -11465,7 +11465,9 @@
: path.length > 1 || !objectMembers[key]))
return true;
const subPath = path.slice(1);
- for (const property of this.propertyMap[key] ? this.propertyMap[key].propertiesRead : []) {
+ for (const property of this.propertyMap[key]
+ ? this.propertyMap[key].propertiesRead
+ : []) {
if (property.hasEffectsWhenCalledAtPath(subPath, callOptions, options))
return true;
}
@@ -11592,6 +11594,7 @@
if (node.hasEffects(options))
return true;
}
+ return false;
}
include(includeAllChildrenRecursively) {
this.included = true;
@@ -11673,13 +11676,15 @@
hasEffectsWhenAccessedAtPath(path, options) {
if (this.kind === 'get') {
return (this.value.hasEffectsWhenCalledAtPath(EMPTY_PATH, this.accessorCallOptions, options.getHasEffectsWhenCalledOptions()) ||
- (path.length > 0 && this.returnExpression.hasEffectsWhenAccessedAtPath(path, options)));
+ (path.length > 0 &&
+ this.returnExpression.hasEffectsWhenAccessedAtPath(path, options)));
}
return this.value.hasEffectsWhenAccessedAtPath(path, options);
}
hasEffectsWhenAssignedAtPath(path, options) {
if (this.kind === 'get') {
- return path.length === 0 || this.returnExpression.hasEffectsWhenAssignedAtPath(path, options);
+ return (path.length === 0 ||
+ this.returnExpression.hasEffectsWhenAssignedAtPath(path, options));
}
if (this.kind === 'set') {
return (path.length > 0 ||
@@ -11741,7 +11746,8 @@
class ReturnStatement$1 extends NodeBase {
hasEffects(options) {
- return (!options.ignoreReturnAwaitYield() || (this.argument && this.argument.hasEffects(options)));
+ return (!options.ignoreReturnAwaitYield() ||
+ (this.argument !== null && this.argument.hasEffects(options)));
}
initialise() {
this.included = false;
@@ -11896,10 +11902,7 @@
}
}
-function isTemplateLiteral(node) {
- return node.type === TemplateLiteral;
-}
-class TemplateLiteral$1 extends NodeBase {
+class TemplateLiteral extends NodeBase {
getLiteralValueAtPath(path) {
if (path.length > 0 || this.quasis.length !== 1) {
return UNKNOWN_VALUE;
@@ -12037,7 +12040,7 @@
bind() {
super.bind();
this.argument.deoptimizePath(EMPTY_PATH);
- if (isIdentifier(this.argument)) {
+ if (this.argument instanceof Identifier$1) {
const variable = this.scope.findVariable(this.argument.name);
variable.isReassigned = true;
}
@@ -12074,7 +12077,7 @@
}
function isReassignedExportsMember(variable) {
- return variable.renderBaseName && variable.exportName && variable.isReassigned;
+ return variable.renderBaseName !== null && variable.exportName !== null && variable.isReassigned;
}
function areAllDeclarationsIncludedAndNotExported(declarations) {
for (const declarator of declarations) {
@@ -12184,13 +12187,16 @@
const systemPatternExports = [];
for (const { node, start, separator, contentEnd, end } of separatedNodes) {
if (!node.included ||
- (isIdentifier(node.id) && isReassignedExportsMember(node.id.variable) && node.init === null)) {
+ (node.id instanceof Identifier$1 &&
+ isReassignedExportsMember(node.id.variable) &&
+ node.init === null)) {
code.remove(start, end);
continue;
}
leadingString = '';
nextSeparatorString = '';
- if (isIdentifier(node.id) && isReassignedExportsMember(node.id.variable)) {
+ if (node.id instanceof Identifier$1 &&
+ isReassignedExportsMember(node.id.variable)) {
if (hasRenderedContent) {
separatorString += ';';
}
@@ -12202,7 +12208,8 @@
node.id.addExportedVariables(systemPatternExports);
}
else if (node.id.variable.exportName) {
- code.prependLeft(code.original.indexOf('=', node.id.end) + 1, ` exports('${node.id.variable.safeExportName || node.id.variable.exportName}',`);
+ code.prependLeft(code.original.indexOf('=', node.id.end) + 1, ` exports('${node.id.variable.safeExportName ||
+ node.id.variable.exportName}',`);
nextSeparatorString += ')';
}
}
@@ -12273,7 +12280,8 @@
}
}
hasEffects(options) {
- return (!options.ignoreReturnAwaitYield() || (this.argument && this.argument.hasEffects(options)));
+ return (!options.ignoreReturnAwaitYield() ||
+ (this.argument !== null && this.argument.hasEffects(options)));
}
render(code, options) {
if (this.argument) {
@@ -12298,28 +12306,28 @@
CallExpression: CallExpression$1,
CatchClause,
ClassBody,
- ClassDeclaration: ClassDeclaration$1,
+ ClassDeclaration,
ClassExpression,
ConditionalExpression,
DoWhileStatement,
EmptyStatement,
ExportAllDeclaration: ExportAllDeclaration$1,
- ExportDefaultDeclaration: ExportDefaultDeclaration$1,
+ ExportDefaultDeclaration,
ExportNamedDeclaration,
ExpressionStatement: ExpressionStatement$1,
ForInStatement,
ForOfStatement,
ForStatement,
- FunctionDeclaration: FunctionDeclaration$1,
+ FunctionDeclaration,
FunctionExpression: FunctionExpression$1,
Identifier: Identifier$1,
IfStatement,
Import,
ImportDeclaration,
LabeledStatement,
- Literal: Literal$1,
+ Literal,
LogicalExpression,
- MemberExpression: MemberExpression$1,
+ MemberExpression,
MetaProperty,
MethodDefinition,
NewExpression,
@@ -12335,7 +12343,7 @@
SwitchStatement,
TaggedTemplateExpression,
TemplateElement,
- TemplateLiteral: TemplateLiteral$1,
+ TemplateLiteral,
ThisExpression,
ThrowStatement,
TryStatement: NodeBase,
@@ -12820,6 +12828,7 @@
}, importerStart);
}
const MISSING_EXPORT_SHIM_DESCRIPTION = {
+ identifier: null,
localName: MISSING_EXPORT_SHIM_VARIABLE
};
class Module {
@@ -12908,12 +12917,12 @@
getDynamicImportExpressions() {
return this.dynamicImports.map(({ node }) => {
const importArgument = node.parent.arguments[0];
- if (isTemplateLiteral(importArgument)) {
+ if (importArgument instanceof TemplateLiteral) {
if (importArgument.expressions.length === 0 && importArgument.quasis.length === 1) {
return importArgument.quasis[0].value.cooked;
}
}
- else if (isLiteral(importArgument)) {
+ else if (importArgument instanceof Literal) {
if (typeof importArgument.value === 'string') {
return importArgument.value;
}
@@ -12921,6 +12930,7 @@
else {
return importArgument;
}
+ return undefined;
});
}
getExports() {
@@ -13007,6 +13017,7 @@
this.shimMissingExport(name);
return this.exportShimVariable;
}
+ return undefined;
}
include() {
if (this.ast.shouldBeIncluded())
@@ -13080,7 +13091,7 @@
this.moduleSideEffects = moduleSideEffects;
}
timeStart('generate ast', 3);
- this.esTreeAst = ((ast || tryParse(this, this.graph.acornParser, this.graph.acornOptions)));
+ this.esTreeAst = ast || tryParse(this, this.graph.acornParser, this.graph.acornOptions);
markPureCallExpressions(this.comments, this.esTreeAst);
timeEnd('generate ast', 3);
this.resolvedIds = resolvedIds || Object.create(null);
@@ -13088,7 +13099,7 @@
// can change that, but it makes sense to use it for the source file name
const fileName = this.id;
this.magicString = new MagicString(code, {
- filename: this.excludeFromSourcemap ? null : fileName,
+ filename: (this.excludeFromSourcemap ? null : fileName),
indentExclusionRanges: []
});
this.removeExistingSourceMap();
@@ -13098,7 +13109,7 @@
addExport: this.addExport.bind(this),
addImport: this.addImport.bind(this),
addImportMeta: this.addImportMeta.bind(this),
- annotations: this.graph.treeshake && this.graph.treeshakingOptions.annotations,
+ annotations: (this.graph.treeshake && this.graph.treeshakingOptions.annotations),
code,
deoptimizationTracker: this.graph.deoptimizationTracker,
error: this.error.bind(this),
@@ -13118,7 +13129,8 @@
moduleContext: this.context,
nodeConstructors,
preserveModules: this.graph.preserveModules,
- propertyReadSideEffects: !this.graph.treeshake || this.graph.treeshakingOptions.propertyReadSideEffects,
+ propertyReadSideEffects: (!this.graph.treeshake ||
+ this.graph.treeshakingOptions.propertyReadSideEffects),
traceExport: this.getVariableForExportName.bind(this),
traceVariable: this.traceVariable.bind(this),
treeshake: this.graph.treeshake,
@@ -13205,7 +13217,7 @@
}
}
}
- else if (isExportDefaultDeclaration(node)) {
+ else if (node instanceof ExportDefaultDeclaration) {
// export default function foo () {}
// export default foo;
// export default 42;
@@ -13216,7 +13228,7 @@
}, node.start);
}
this.exports.default = {
- identifier: node.variable.getOriginalVariableName(),
+ identifier: node.variable.getAssignedVariableName(),
localName: 'default'
};
}
@@ -13229,14 +13241,14 @@
if (declaration.type === VariableDeclaration) {
for (const decl of declaration.declarations) {
for (const localName of extractAssignedNames(decl.id)) {
- this.exports[localName] = { localName };
+ this.exports[localName] = { identifier: null, localName };
}
}
}
else {
// export function foo () {}
const localName = declaration.id.name;
- this.exports[localName] = { localName };
+ this.exports[localName] = { identifier: null, localName };
}
}
else {
@@ -13250,7 +13262,7 @@
message: `A module cannot have multiple exports with the same name ('${exportedName}')`
}, specifier.start);
}
- this.exports[exportedName] = { localName };
+ this.exports[exportedName] = { identifier: null, localName };
}
}
}
@@ -13287,8 +13299,7 @@
}
}
includeDynamicImport(node) {
- const resolution = this.dynamicImports.find(dynamicImport => dynamicImport.node === node)
- .resolution;
+ const resolution = this.dynamicImports.find(dynamicImport => dynamicImport.node === node).resolution;
if (resolution instanceof Module) {
resolution.dynamicallyImportedBy.push(this);
resolution.includeAllExports();
@@ -13468,7 +13479,7 @@
sources = sources.map((source) => relative(directory, source));
file = basename(file);
}
- sourcesContent = excludeContent ? null : sourcesContent;
+ sourcesContent = (excludeContent ? null : sourcesContent);
return new SourceMap({ file, sources, sourcesContent, names, mappings });
}
@@ -13543,7 +13554,7 @@
variable.setRenderNames(null, chunk.variableName);
}
else {
- variable.setRenderNames(chunk.variableName, module.chunk.getVariableExportName(variable));
+ variable.setRenderNames(chunk.variableName, chunk.getVariableExportName(variable));
}
}
}
@@ -13556,7 +13567,7 @@
if (variable.included &&
// this will only happen for exports in some formats
!(variable.renderBaseName ||
- (variable instanceof ExportDefaultVariable && variable.referencesOriginal()))) {
+ (variable instanceof ExportDefaultVariable && variable.getOriginalVariable() !== variable))) {
variable.setRenderNames(null, getSafeName(variable.name, usedNames));
}
}
@@ -13854,6 +13865,7 @@
case 'name':
return this.getChunkName();
}
+ return undefined;
}), existingNames);
}
generateIdPreserveModules(preserveModulesRelativeDir, existingNames) {
@@ -14012,7 +14024,7 @@
// go through the other chunks and update their dependencies
// also update their import and reexport names in the process
for (const c of chunkList) {
- let includedDeclaration;
+ let includedDeclaration = undefined;
for (let i = 0; i < c.dependencies.length; i++) {
const dep = c.dependencies[i];
if ((dep === chunk || dep === this) && includedDeclaration) {
@@ -14055,7 +14067,7 @@
};
// Make sure the direct dependencies of a chunk are present to maintain execution order
for (const { module } of this.imports) {
- const chunkOrExternal = module instanceof Module ? module.chunk : module;
+ const chunkOrExternal = (module instanceof Module ? module.chunk : module);
if (this.dependencies.indexOf(chunkOrExternal) === -1) {
this.dependencies.push(chunkOrExternal);
}
@@ -14169,7 +14181,7 @@
this.finaliseDynamicImports(options.format);
const needsAmdModule = this.finaliseImportMetas(options);
const hasExports = this.renderedDeclarations.exports.length !== 0 ||
- this.renderedDeclarations.dependencies.some(dep => dep.reexports && dep.reexports.length !== 0);
+ this.renderedDeclarations.dependencies.some(dep => (dep.reexports && dep.reexports.length !== 0));
const usesTopLevelAwait = this.orderedModules.some(module => module.usesTopLevelAwait);
if (usesTopLevelAwait && options.format !== 'es' && options.format !== 'system') {
error({
@@ -14262,7 +14274,7 @@
const seen = new Set();
function visitDep(dep) {
if (seen.has(dep))
- return;
+ return undefined;
seen.add(dep);
if (dep instanceof Chunk$1) {
for (const subDep of dep.dependencies) {
@@ -14398,9 +14410,7 @@
for (const dep of this.dependencies) {
const imports = [];
for (const variable of this.imports) {
- const renderedVariable = variable instanceof ExportDefaultVariable && variable.referencesOriginal()
- ? variable.getOriginalVariable()
- : variable;
+ const renderedVariable = variable instanceof ExportDefaultVariable ? variable.getOriginalVariable() : variable;
if ((variable.module instanceof Module
? variable.module.chunk === dep
: variable.module === dep) &&
@@ -14410,7 +14420,7 @@
const imported = variable.module instanceof ExternalModule
? variable.name
: variable.module.chunk.getVariableExportName(variable);
- imports.push({ local, imported });
+ imports.push({ local, imported: imported });
}
}
const reexports = reexportDeclarations.get(dep);
@@ -14426,8 +14436,8 @@
exportsDefault = false;
namedExportsMode = dep.exportMode !== 'default';
}
- let id;
- let globalName;
+ let id = undefined;
+ let globalName = undefined;
if (dep instanceof ExternalModule) {
id = dep.renderPath;
if (options.format === 'umd' || options.format === 'iife') {
@@ -14463,15 +14473,14 @@
if (variable.init === UNDEFINED_EXPRESSION) {
uninitialized = true;
}
- variable.declarations.forEach(decl => {
- if (decl.type === ExportDefaultDeclaration) {
- if (decl.declaration.type === FunctionDeclaration)
+ for (const declaration of variable.declarations) {
+ if (declaration.parent instanceof FunctionDeclaration ||
+ (declaration instanceof ExportDefaultDeclaration &&
+ declaration.declaration instanceof FunctionDeclaration)) {
hoisted = true;
+ break;
}
- else if (decl.parent.type === FunctionDeclaration) {
- hoisted = true;
}
- });
}
else if (variable instanceof GlobalVariable) {
hoisted = true;
@@ -14565,7 +14574,7 @@
options.format !== 'system' &&
exportVariable.isReassigned &&
!exportVariable.isId &&
- (!isExportDefaultVariable(exportVariable) || !exportVariable.hasId)) {
+ !(exportVariable instanceof ExportDefaultVariable && exportVariable.hasId)) {
exportVariable.setRenderNames('exports', exportName);
}
else {
@@ -14632,7 +14641,7 @@
}
let execGroupIndex = 1;
let seekingFirstMergeCandidate = true;
- let lastChunk, chunk = execGroup[0], nextChunk = execGroup[1];
+ let lastChunk = undefined, chunk = execGroup[0], nextChunk = execGroup[1];
const isMergeCandidate = (chunk) => {
if (chunk.facadeModule !== null || chunk.manualChunkAlias !== null) {
return false;
@@ -14943,6 +14952,7 @@
case 'ext':
return extname(asset.name).substr(1);
}
+ return undefined;
}), existingNames);
}
function createAssetPluginHooks(assetsByReferenceId, outputBundle, assetFileNames) {
@@ -14950,7 +14960,7 @@
emitAsset(name, source) {
if (typeof name !== 'string' || !isPlainName(name))
error(errInvalidAssetName(name));
- const asset = { name, source, fileName: undefined };
+ const asset = { name, source: source, fileName: undefined };
if (outputBundle && source !== undefined)
finaliseAsset(asset, outputBundle, assetFileNames);
return addWithNewReferenceId(asset, assetsByReferenceId, name);
@@ -14958,11 +14968,11 @@
setAssetSource(assetReferenceId, source) {
const asset = assetsByReferenceId.get(assetReferenceId);
if (!asset)
- error(errAssetReferenceIdNotFoundForSetSource(assetReferenceId));
+ return error(errAssetReferenceIdNotFoundForSetSource(assetReferenceId));
if (asset.source !== undefined)
- error(errAssetSourceAlreadySet(asset));
+ return error(errAssetSourceAlreadySet(asset));
if (typeof source !== 'string' && !source)
- error(errAssetSourceMissingForSetSource(asset));
+ return error(errAssetSourceMissingForSetSource(asset));
asset.source = source;
if (outputBundle)
finaliseAsset(asset, outputBundle, assetFileNames);
@@ -14970,10 +14980,10 @@
getAssetFileName(assetReferenceId) {
const asset = assetsByReferenceId.get(assetReferenceId);
if (!asset)
- error(errAssetReferenceIdNotFoundForFilename(assetReferenceId));
- if (asset.fileName === undefined)
- error(errAssetNotFinalisedForFileName(asset));
- return asset.fileName;
+ return error(errAssetReferenceIdNotFoundForFilename(assetReferenceId));
+ if ((asset).fileName === undefined)
+ return error(errAssetNotFinalisedForFileName(asset));
+ return (asset).fileName;
}
};
}
@@ -15136,7 +15146,10 @@
transformChunk: 'renderChunk'
};
function createPluginDriver(graph, options, pluginCache, watcher) {
- const plugins = [...(options.plugins || []), getRollupDefaultPlugin(options.preserveSymlinks)];
+ const plugins = [
+ ...(options.plugins || []),
+ getRollupDefaultPlugin(options.preserveSymlinks)
+ ];
const { emitAsset, getAssetFileName, setAssetSource } = createAssetPluginHooks(graph.assetsById);
const existingPluginKeys = {};
let hasLoadersOrTransforms = false;
@@ -15198,12 +15211,12 @@
err.pluginCode = err.code;
err.code = 'PLUGIN_ERROR';
err.plugin = plugin.name || `Plugin at position ${pidx + 1}`;
- error(err);
+ return error(err);
},
isExternal(id, parentId, isResolved = false) {
return graph.moduleLoader.isExternal(id, parentId, isResolved);
},
- getAssetFileName,
+ getAssetFileName: getAssetFileName,
getChunkFileName(chunkReferenceId) {
return graph.moduleLoader.getChunkFileName(chunkReferenceId);
},
@@ -15258,7 +15271,7 @@
let context = pluginContexts[pluginIndex];
const hook = plugin[hookName];
if (!hook)
- return;
+ return undefined;
const deprecatedHookNewName = deprecatedHookNames[hookName];
if (deprecatedHookNewName)
context.warn(hookDeprecationWarning(hookName, deprecatedHookNewName, plugin, pluginIndex));
@@ -15292,13 +15305,14 @@
err.hook = hookName;
error(err);
}
+ return undefined;
}
function runHook(hookName, args, pluginIndex, permitValues = false, hookContext) {
const plugin = plugins[pluginIndex];
let context = pluginContexts[pluginIndex];
const hook = plugin[hookName];
if (!hook)
- return;
+ return undefined;
const deprecatedHookNewName = deprecatedHookNames[hookName];
if (deprecatedHookNewName)
context.warn(hookDeprecationWarning(hookName, deprecatedHookNewName, plugin, pluginIndex));
@@ -15336,7 +15350,7 @@
}
const pluginDriver = {
emitAsset,
- getAssetFileName,
+ getAssetFileName: getAssetFileName,
hasLoadersOrTransforms,
// chains, ignores returns
hookSeq(name, args, hookContext) {
@@ -15595,7 +15609,7 @@
return graph.pluginDriver
.hookReduceArg0('transform', [curSource, id], transformReducer, (pluginContext, plugin) => {
curPlugin = plugin;
- if (plugin.cacheKey)
+ if (curPlugin.cacheKey)
customTransformCache = true;
else
trackedPluginCache = trackPluginCache(pluginContext.cache);
@@ -15617,7 +15631,7 @@
augmentCodeLocation(err, pos, curSource, id);
err.id = id;
err.hook = 'transform';
- pluginContext.error(err);
+ return pluginContext.error(err);
},
emitAsset,
addWatchFile(id) {
@@ -15656,7 +15670,7 @@
if (!customTransformCache && setAssetSourceErr)
throw setAssetSourceErr;
return {
- ast,
+ ast: ast,
code,
customTransformCache,
moduleSideEffects,
@@ -15717,7 +15731,7 @@
.then((resolveIdResult) => {
if (resolveIdResult === false ||
(resolveIdResult && typeof resolveIdResult === 'object' && resolveIdResult.external)) {
- error(errEntryCannotBeExternal(unresolvedId));
+ return error(errEntryCannotBeExternal(unresolvedId));
}
const id = resolveIdResult && typeof resolveIdResult === 'object'
? resolveIdResult.id
@@ -15726,21 +15740,22 @@
return this.fetchModule(id, undefined, true, isEntry).then(module => {
if (alias !== null) {
if (module.chunkAlias !== null && module.chunkAlias !== alias) {
- error(errCannotAssignModuleToChunk(module.id, alias, module.chunkAlias));
+ return error(errCannotAssignModuleToChunk(module.id, alias, module.chunkAlias));
}
module.chunkAlias = alias;
}
return module;
});
}
- error(errUnresolvedEntry(unresolvedId));
+ return error(errUnresolvedEntry(unresolvedId));
});
this.graph = graph;
this.modulesById = modulesById;
this.pluginDriver = pluginDriver;
this.isExternal = getIdMatcher(external);
this.hasModuleSideEffects = getHasModuleSideEffects(moduleSideEffects, pureExternalModules, graph);
- this.getManualChunk = typeof getManualChunk === 'function' ? getManualChunk : () => null;
+ this.getManualChunk =
+ typeof getManualChunk === 'function' ? getManualChunk : () => null;
}
addEntryModuleAndGetReferenceId(unresolvedEntryModule) {
const entryRecord = {
@@ -15793,13 +15808,13 @@
getChunkFileName(referenceId) {
const entryRecord = this.entriesByReferenceId.get(referenceId);
if (!entryRecord)
- error(errChunkReferenceIdNotFoundForFilename(referenceId));
+ return error(errChunkReferenceIdNotFoundForFilename(referenceId));
const fileName = entryRecord.module &&
(entryRecord.module.facadeChunk
? entryRecord.module.facadeChunk.id
: entryRecord.module.chunk.id);
if (!fileName)
- error(errChunkNotGeneratedForFileName(entryRecord));
+ return error(errChunkNotGeneratedForFileName(entryRecord));
return fileName;
}
resolveId(source, importer, skip) {
@@ -15878,7 +15893,7 @@
return { code: source };
if (source && typeof source === 'object' && typeof source.code === 'string')
return source;
- error(errBadLoader(id));
+ return error(errBadLoader(id));
})
.then(sourceDescription => {
const cachedModule = this.graph.cachedModules.get(id);
@@ -15930,8 +15945,8 @@
this.modulesById.set(resolvedId.id, new ExternalModule(this.graph, resolvedId.id, resolvedId.moduleSideEffects));
}
const externalModule = this.modulesById.get(resolvedId.id);
- if (externalModule instanceof ExternalModule === false) {
- error(errInternalIdCannotBeExternal(source, importer));
+ if (!(externalModule instanceof ExternalModule)) {
+ return error(errInternalIdCannotBeExternal(source, importer));
}
return Promise.resolve(externalModule);
}
@@ -16216,7 +16231,9 @@
? [acornInjectPlugins]
: []));
this.acornParser = Parser$1.extend(...acornPluginsToInject);
- this.moduleLoader = new ModuleLoader(this, this.moduleById, this.pluginDriver, options.external, typeof options.manualChunks === 'function' && options.manualChunks, this.treeshake ? this.treeshakingOptions.moduleSideEffects : null, this.treeshake ? this.treeshakingOptions.pureExternalModules : false);
+ this.moduleLoader = new ModuleLoader(this, this.moduleById, this.pluginDriver, options.external, (typeof options.manualChunks === 'function' && options.manualChunks), (this.treeshake
+ ? this.treeshakingOptions.moduleSideEffects
+ : null), (this.treeshake ? this.treeshakingOptions.pureExternalModules : false));
}
build(entryModules, manualChunks, inlineDynamicImports) {
// Phase 1 – discovery. We load the entry module and find which
@@ -16225,9 +16242,9 @@
timeStart('parse modules', 2);
return Promise.all([
this.moduleLoader.addEntryModules(normalizeEntryModules(entryModules), true),
- manualChunks &&
+ (manualChunks &&
typeof manualChunks === 'object' &&
- this.moduleLoader.addManualChunks(manualChunks)
+ this.moduleLoader.addManualChunks(manualChunks))
]).then(([{ entryModules, manualChunkModulesByAlias }]) => {
if (entryModules.length === 0) {
throw new Error('You must supply options.input to rollup');
@@ -16606,7 +16623,11 @@
const configExternal = config.external;
return typeof configExternal === 'function'
? (id, ...rest) => configExternal(id, ...rest) || command.external.indexOf(id) !== -1
- : (configExternal || []).concat(command.external);
+ : (typeof config.external === 'string'
+ ? [configExternal]
+ : Array.isArray(configExternal)
+ ? configExternal
+ : []).concat(command.external);
};
const commandAliases = {
c: 'config',
@@ -16652,22 +16673,21 @@
errors.push(`Unknown ${optionType}: ${unknownOptions.join(', ')}. Allowed options: ${validOptions.sort().join(', ')}`);
}
function getCommandOptions(rawCommandOptions) {
- const command = Object.assign({}, rawCommandOptions);
- command.external = rawCommandOptions.external ? rawCommandOptions.external.split(',') : [];
- if (rawCommandOptions.globals) {
- command.globals = Object.create(null);
- rawCommandOptions.globals.split(',').forEach((str) => {
- const names = str.split(':');
- command.globals[names[0]] = names[1];
- // Add missing Module IDs to external.
- if (command.external.indexOf(names[0]) === -1) {
- command.external.push(names[0]);
- }
- });
- }
- return command;
+ const external = rawCommandOptions.external && typeof rawCommandOptions.external === 'string'
+ ? rawCommandOptions.external.split(',')
+ : [];
+ return Object.assign({}, rawCommandOptions, { external, globals: typeof rawCommandOptions.globals === 'string'
+ ? rawCommandOptions.globals.split(',').reduce((globals, globalDefinition) => {
+ const [id, variableName] = globalDefinition.split(':');
+ globals[id] = variableName;
+ if (external.indexOf(id) === -1) {
+ external.push(id);
+ }
+ return globals;
+ }, Object.create(null))
+ : undefined });
}
-function getInputOptions(config, command = {}, defaultOnWarnHandler) {
+function getInputOptions(config, command = { external: [], globals: undefined }, defaultOnWarnHandler) {
const getOption = createGetOption(config, command);
const inputOptions = {
acorn: config.acorn,
@@ -16940,7 +16960,7 @@
}
const cache = useCache ? graph.getCache() : undefined;
const result = {
- cache,
+ cache: cache,
generate: ((rawOutputOptions) => {
const promise = generate(getOutputOptions(rawOutputOptions), false).then(result => createOutput(result));
Object.defineProperty(promise, 'code', throwAsyncGenerateError);
@@ -33980,6 +34000,7 @@
this.outputFiles = this.outputs.map(output => {
if (output.file || output.dir)
return path.resolve(output.file || output.dir);
+ return undefined;
});
const watchOptions = inputOptions.watch || {};
if ('useChokidar' in watchOptions)
@@ -34028,7 +34049,7 @@
return rollup(options)
.then(result => {
if (this.closed)
- return;
+ return undefined;
const watched = (this.watched = new Set());
this.cache = result.cache;
this.watchFiles = result.watchFiles;

dist/rollup.js

@@ -1,7 +1,7 @@
/*
@license
- Rollup.js v1.12.2
- Fri, 17 May 2019 12:41:59 GMT - commit a4fbc5374cb5fe43a2070855cea74cf7c0789543
+ Rollup.js v1.12.3
+ Sun, 19 May 2019 09:38:58 GMT - commit 455e99473173da50a6e3b30ed8bc9997f3f55afc
https://github.com/rollup/rollup
@@ -27,7 +27,7 @@
var url = _interopDefault(require('url'));
var module$1 = _interopDefault(require('module'));
-var version = "1.12.2";
+var version = "1.12.3";
var minimalisticAssert = assert;
function assert(val, msg) {
@@ -1833,25 +1833,192 @@
return this;
};
+const BLANK = Object.create(null);
+
const BlockStatement = 'BlockStatement';
const CallExpression = 'CallExpression';
-const ClassDeclaration = 'ClassDeclaration';
const ExportAllDeclaration = 'ExportAllDeclaration';
-const ExportDefaultDeclaration = 'ExportDefaultDeclaration';
const ExpressionStatement = 'ExpressionStatement';
-const FunctionDeclaration = 'FunctionDeclaration';
const FunctionExpression = 'FunctionExpression';
const Identifier = 'Identifier';
const ImportDefaultSpecifier = 'ImportDefaultSpecifier';
const ImportNamespaceSpecifier = 'ImportNamespaceSpecifier';
-const Literal = 'Literal';
-const MemberExpression = 'MemberExpression';
const Program = 'Program';
const Property = 'Property';
const ReturnStatement = 'ReturnStatement';
-const TemplateLiteral = 'TemplateLiteral';
const VariableDeclaration = 'VariableDeclaration';
+function treeshakeNode(node, code, start, end) {
+ code.remove(start, end);
+ if (node.annotations) {
+ for (const annotation of node.annotations) {
+ if (annotation.start < start) {
+ code.remove(annotation.start, annotation.end);
+ }
+ else {
+ return;
+ }
+ }
+ }
+}
+function removeAnnotations(node, code) {
+ if (!node.annotations && node.parent.type === ExpressionStatement) {
+ node = node.parent;
+ }
+ if (node.annotations) {
+ for (const annotation of node.annotations) {
+ code.remove(annotation.start, annotation.end);
+ }
+ }
+}
+
+const NO_SEMICOLON = { isNoStatement: true };
+function findFirstOccurrenceOutsideComment(code, searchString, start = 0) {
+ let searchPos, charCodeAfterSlash;
+ searchPos = code.indexOf(searchString, start);
+ while (true) {
+ start = code.indexOf('/', start);
+ if (start === -1 || start > searchPos)
+ return searchPos;
+ charCodeAfterSlash = code.charCodeAt(++start);
+ ++start;
+ if (charCodeAfterSlash === 47 /*"/"*/) {
+ start = code.indexOf('\n', start) + 1;
+ if (start === 0)
+ return -1;
+ if (start > searchPos) {
+ searchPos = code.indexOf(searchString, start);
+ }
+ }
+ else if (charCodeAfterSlash === 42 /*"*"*/) {
+ start = code.indexOf('*/', start) + 2;
+ if (start > searchPos) {
+ searchPos = code.indexOf(searchString, start);
+ }
+ }
+ }
+}
+function findFirstLineBreakOutsideComment(code, start = 0) {
+ let lineBreakPos, charCodeAfterSlash;
+ lineBreakPos = code.indexOf('\n', start);
+ while (true) {
+ start = code.indexOf('/', start);
+ if (start === -1 || start > lineBreakPos)
+ return lineBreakPos;
+ charCodeAfterSlash = code.charCodeAt(++start);
+ if (charCodeAfterSlash === 47 /*"/"*/)
+ return lineBreakPos;
+ ++start;
+ if (charCodeAfterSlash === 42 /*"*"*/) {
+ start = code.indexOf('*/', start) + 2;
+ if (start > lineBreakPos) {
+ lineBreakPos = code.indexOf('\n', start);
+ }
+ }
+ }
+}
+function renderStatementList(statements, code, start, end, options) {
+ if (statements.length === 0)
+ return;
+ let currentNode, currentNodeStart, currentNodeNeedsBoundaries, nextNodeStart;
+ let nextNode = statements[0];
+ let nextNodeNeedsBoundaries = !nextNode.included || nextNode.needsBoundaries;
+ if (nextNodeNeedsBoundaries) {
+ nextNodeStart =
+ start + findFirstLineBreakOutsideComment(code.original.slice(start, nextNode.start)) + 1;
+ }
+ for (let nextIndex = 1; nextIndex <= statements.length; nextIndex++) {
+ currentNode = nextNode;
+ currentNodeStart = nextNodeStart;
+ currentNodeNeedsBoundaries = nextNodeNeedsBoundaries;
+ nextNode = statements[nextIndex];
+ nextNodeNeedsBoundaries =
+ nextNode === undefined ? false : !nextNode.included || nextNode.needsBoundaries;
+ if (currentNodeNeedsBoundaries || nextNodeNeedsBoundaries) {
+ nextNodeStart =
+ currentNode.end +
+ findFirstLineBreakOutsideComment(code.original.slice(currentNode.end, nextNode === undefined ? end : nextNode.start)) +
+ 1;
+ if (currentNode.included) {
+ currentNodeNeedsBoundaries
+ ? currentNode.render(code, options, {
+ end: nextNodeStart,
+ start: currentNodeStart
+ })
+ : currentNode.render(code, options);
+ }
+ else {
+ treeshakeNode(currentNode, code, currentNodeStart, nextNodeStart);
+ }
+ }
+ else {
+ currentNode.render(code, options);
+ }
+ }
+}
+// This assumes that the first character is not part of the first node
+function getCommaSeparatedNodesWithBoundaries(nodes, code, start, end) {
+ const splitUpNodes = [];
+ let node, nextNode, nextNodeStart, contentEnd, char;
+ let separator = start - 1;
+ for (let nextIndex = 0; nextIndex < nodes.length; nextIndex++) {
+ nextNode = nodes[nextIndex];
+ if (node !== undefined) {
+ separator =
+ node.end +
+ findFirstOccurrenceOutsideComment(code.original.slice(node.end, nextNode.start), ',');
+ }
+ nextNodeStart = contentEnd =
+ separator +
+ 2 +
+ findFirstLineBreakOutsideComment(code.original.slice(separator + 1, nextNode.start));
+ while (((char = code.original.charCodeAt(nextNodeStart)),
+ char === 32 /*" "*/ || char === 9 /*"\t"*/ || char === 10 /*"\n"*/ || char === 13) /*"\r"*/)
+ nextNodeStart++;
+ if (node !== undefined) {
+ splitUpNodes.push({
+ contentEnd,
+ end: nextNodeStart,
+ node,
+ separator,
+ start
+ });
+ }
+ node = nextNode;
+ start = nextNodeStart;
+ }
+ splitUpNodes.push({
+ contentEnd: end,
+ end,
+ node: node,
+ separator: null,
+ start
+ });
+ return splitUpNodes;
+}
+
+const chars$1 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
+const base = 64;
+function toBase64(num) {
+ let outStr = '';
+ do {
+ const curDigit = num % base;
+ num = Math.floor(num / base);
+ outStr = chars$1[curDigit] + outStr;
+ } while (num !== 0);
+ return outStr;
+}
+
+function getSafeName(baseName, usedNames) {
+ let safeName = baseName;
+ let count = 1;
+ while (usedNames[safeName]) {
+ safeName = `${baseName}$${toBase64(count++)}`;
+ }
+ usedNames[safeName] = true;
+ return safeName;
+}
+
class CallOptions {
static create(callOptions) {
return new this(callOptions);
@@ -2577,1566 +2744,6 @@
}
LocalVariable.prototype.isLocal = true;
-function isExportDefaultVariable(variable) {
- return variable.isDefault;
-}
-class ExportDefaultVariable extends LocalVariable {
- constructor(name, exportDefaultDeclaration, context) {
- super(name, exportDefaultDeclaration, exportDefaultDeclaration.declaration, context);
- // Not initialised during construction
- this.originalId = null;
- const declaration = exportDefaultDeclaration.declaration;
- if ((declaration.type === FunctionDeclaration ||
- declaration.type === ClassDeclaration) &&
- declaration.id) {
- this.hasId = true;
- this.originalId = declaration.id;
- }
- else if (declaration.type === Identifier) {
- this.originalId = declaration;
- }
- }
- addReference(identifier) {
- if (!this.hasId) {
- this.name = identifier.name;
- }
- }
- getName() {
- return this.referencesOriginal() ? this.originalId.variable.getName() : super.getName();
- }
- getOriginalVariable() {
- return (this.originalId && this.originalId.variable) || null;
- }
- getOriginalVariableName() {
- return (this.originalId && this.originalId.name) || null;
- }
- referencesOriginal() {
- return this.originalId && (this.hasId || !this.originalId.variable.isReassigned);
- }
- setRenderNames(baseName, name) {
- if (this.referencesOriginal()) {
- this.originalId.variable.setRenderNames(baseName, name);
- }
- else {
- super.setRenderNames(baseName, name);
- }
- }
- setSafeName(name) {
- if (this.referencesOriginal()) {
- this.originalId.variable.setSafeName(name);
- }
- else {
- super.setSafeName(name);
- }
- }
-}
-ExportDefaultVariable.prototype.getBaseVariableName = ExportDefaultVariable.prototype.getName;
-ExportDefaultVariable.prototype.isDefault = true;
-
-const MISSING_EXPORT_SHIM_VARIABLE = '_missingExportShim';
-const INTEROP_DEFAULT_VARIABLE = '_interopDefault';
-
-class ExportShimVariable extends Variable {
- constructor(module) {
- super(MISSING_EXPORT_SHIM_VARIABLE);
- this.module = module;
- }
-}
-
-const pureFunctions = {};
-const arrayTypes = 'Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' ');
-const simdTypes = 'Int8x16 Int16x8 Int32x4 Float32x4 Float64x2'.split(' ');
-const simdMethods = 'abs add and bool check div equal extractLane fromFloat32x4 fromFloat32x4Bits fromFloat64x2 fromFloat64x2Bits fromInt16x8Bits fromInt32x4 fromInt32x4Bits fromInt8x16Bits greaterThan greaterThanOrEqual lessThan lessThanOrEqual load max maxNum min minNum mul neg not notEqual or reciprocalApproximation reciprocalSqrtApproximation replaceLane select selectBits shiftLeftByScalar shiftRightArithmeticByScalar shiftRightLogicalByScalar shuffle splat sqrt store sub swizzle xor'.split(' ');
-const allSimdMethods = [];
-simdTypes.forEach(t => {
- simdMethods.forEach(m => {
- allSimdMethods.push(`SIMD.${t}.${m}`);
- });
-});
-[
- 'Array.isArray',
- 'Error',
- 'EvalError',
- 'InternalError',
- 'RangeError',
- 'ReferenceError',
- 'SyntaxError',
- 'TypeError',
- 'URIError',
- 'isFinite',
- 'isNaN',
- 'parseFloat',
- 'parseInt',
- 'decodeURI',
- 'decodeURIComponent',
- 'encodeURI',
- 'encodeURIComponent',
- 'escape',
- 'unescape',
- 'Object',
- 'Object.create',
- 'Object.getNotifier',
- 'Object.getOwn',
- 'Object.getOwnPropertyDescriptor',
- 'Object.getOwnPropertyNames',
- 'Object.getOwnPropertySymbols',
- 'Object.getPrototypeOf',
- 'Object.is',
- 'Object.isExtensible',
- 'Object.isFrozen',
- 'Object.isSealed',
- 'Object.keys',
- 'Boolean',
- 'Number',
- 'Number.isFinite',
- 'Number.isInteger',
- 'Number.isNaN',
- 'Number.isSafeInteger',
- 'Number.parseFloat',
- 'Number.parseInt',
- 'Symbol',
- 'Symbol.for',
- 'Symbol.keyFor',
- 'Math.abs',
- 'Math.acos',
- 'Math.acosh',
- 'Math.asin',
- 'Math.asinh',
- 'Math.atan',
- 'Math.atan2',
- 'Math.atanh',
- 'Math.cbrt',
- 'Math.ceil',
- 'Math.clz32',
- 'Math.cos',
- 'Math.cosh',
- 'Math.exp',
- 'Math.expm1',
- 'Math.floor',
- 'Math.fround',
- 'Math.hypot',
- 'Math.imul',
- 'Math.log',
- 'Math.log10',
- 'Math.log1p',
- 'Math.log2',
- 'Math.max',
- 'Math.min',
- 'Math.pow',
- 'Math.random',
- 'Math.round',
- 'Math.sign',
- 'Math.sin',
- 'Math.sinh',
- 'Math.sqrt',
- 'Math.tan',
- 'Math.tanh',
- 'Math.trunc',
- 'Date',
- 'Date.UTC',
- 'Date.now',
- 'Date.parse',
- 'String',
- 'String.fromCharCode',
- 'String.fromCodePoint',
- 'String.raw',
- 'RegExp',
- 'Map',
- 'Set',
- 'WeakMap',
- 'WeakSet',
- 'ArrayBuffer',
- 'ArrayBuffer.isView',
- 'DataView',
- 'Promise.all',
- 'Promise.race',
- 'Promise.resolve',
- 'Intl.Collator',
- 'Intl.Collator.supportedLocalesOf',
- 'Intl.DateTimeFormat',
- 'Intl.DateTimeFormat.supportedLocalesOf',
- 'Intl.NumberFormat',
- 'Intl.NumberFormat.supportedLocalesOf'
- // TODO properties of e.g. window...
-]
- .concat(arrayTypes, arrayTypes.map(t => `${t}.from`), arrayTypes.map(t => `${t}.of`), simdTypes.map(t => `SIMD.${t}`), allSimdMethods)
- .forEach(name => (pureFunctions[name] = true));
-
-class GlobalVariable extends Variable {
- hasEffectsWhenAccessedAtPath(path) {
- // path.length == 0 can also have an effect but we postpone this for now
- return (path.length > 0 &&
- !this.isPureFunctionMember(path) &&
- !(this.name === 'Reflect' && path.length === 1));
- }
- hasEffectsWhenCalledAtPath(path) {
- return !pureFunctions[[this.name, ...path].join('.')];
- }
- isPureFunctionMember(path) {
- return (pureFunctions[[this.name, ...path].join('.')] ||
- (path.length >= 1 && pureFunctions[[this.name, ...path.slice(0, -1)].join('.')]) ||
- (path.length >= 2 &&
- pureFunctions[[this.name, ...path.slice(0, -2)].join('.')] &&
- path[path.length - 2] === 'prototype'));
- }
-}
-
-// Verified on IE 6/7 that these keywords can't be used for object properties without escaping:
-// break case catch class const continue debugger default delete do
-// else enum export extends false finally for function if import
-// in instanceof new null return super switch this throw true
-// try typeof var void while with
-const RESERVED_NAMES = Object.assign(Object.create(null), {
- await: true,
- break: true,
- case: true,
- catch: true,
- class: true,
- const: true,
- continue: true,
- debugger: true,
- default: true,
- delete: true,
- do: true,
- else: true,
- enum: true,
- eval: true,
- export: true,
- extends: true,
- false: true,
- finally: true,
- for: true,
- function: true,
- if: true,
- implements: true,
- import: true,
- in: true,
- instanceof: true,
- interface: true,
- let: true,
- new: true,
- null: true,
- package: true,
- private: true,
- protected: true,
- public: true,
- return: true,
- static: true,
- super: true,
- switch: true,
- this: true,
- throw: true,
- true: true,
- try: true,
- typeof: true,
- undefined: true,
- var: true,
- void: true,
- while: true,
- with: true,
- yield: true
-});
-const NONE = {};
-const EXPORTS = { exports: true };
-const RESERVED_NAMES_BY_FORMAT = {
- amd: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES },
- cjs: {
- forbiddenNames: RESERVED_NAMES,
- formatGlobals: { exports: true, module: true, [INTEROP_DEFAULT_VARIABLE]: true }
- },
- es: { formatGlobals: NONE, forbiddenNames: RESERVED_NAMES },
- iife: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES },
- system: {
- forbiddenNames: Object.assign(Object.create(null), RESERVED_NAMES, EXPORTS),
- formatGlobals: NONE
- },
- umd: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES }
-};
-
-class NamespaceVariable extends Variable {
- constructor(context) {
- super(context.getModuleName());
- this.memberVariables = Object.create(null);
- this.containsExternalNamespace = false;
- this.referencedEarly = false;
- this.references = [];
- this.context = context;
- this.module = context.module;
- for (const name of this.context.getExports().concat(this.context.getReexports())) {
- if (name[0] === '*' && name.length > 1)
- this.containsExternalNamespace = true;
- this.memberVariables[name] = this.context.traceExport(name);
- }
- }
- addReference(identifier) {
- this.references.push(identifier);
- this.name = identifier.name;
- }
- // This is only called if "UNKNOWN_PATH" is reassigned as in all other situations, either the
- // build fails due to an illegal namespace reassignment or MemberExpression already forwards
- // the reassignment to the right variable. This means we lost track of this variable and thus
- // need to reassign all exports.
- deoptimizePath() {
- for (const key in this.memberVariables) {
- this.memberVariables[key].deoptimizePath(UNKNOWN_PATH);
- }
- }
- include() {
- if (!this.included) {
- if (this.containsExternalNamespace) {
- this.context.error({
- code: 'NAMESPACE_CANNOT_CONTAIN_EXTERNAL',
- id: this.module.id,
- message: `Cannot create an explicit namespace object for module "${this.context.getModuleName()}" because it contains a reexported external namespace`
- }, undefined);
- }
- this.included = true;
- for (const identifier of this.references) {
- if (identifier.context.getModuleExecIndex() <= this.context.getModuleExecIndex()) {
- this.referencedEarly = true;
- break;
- }
- }
- if (this.context.preserveModules) {
- for (const memberName of Object.keys(this.memberVariables))
- this.memberVariables[memberName].include();
- }
- else {
- for (const memberName of Object.keys(this.memberVariables))
- this.context.includeVariable(this.memberVariables[memberName]);
- }
- }
- }
- renderBlock(options) {
- const _ = options.compact ? '' : ' ';
- const n = options.compact ? '' : '\n';
- const t = options.indent;
- const members = Object.keys(this.memberVariables).map(name => {
- const original = this.memberVariables[name];
- if (this.referencedEarly || original.isReassigned) {
- return `${t}get ${name}${_}()${_}{${_}return ${original.getName()}${options.compact ? '' : ';'}${_}}`;
- }
- const safeName = RESERVED_NAMES[name] ? `'${name}'` : name;
- return `${t}${safeName}: ${original.getName()}`;
- });
- const name = this.getName();
- const callee = options.freeze ? `/*#__PURE__*/Object.freeze` : '';
- let output = `${options.varOrConst} ${name} = ${options.namespaceToStringTag
- ? `{${n}${members.join(`,${n}`)}${n}};`
- : `${callee}({${n}${members.join(`,${n}`)}${n}});`}`;
- if (options.namespaceToStringTag) {
- output += `${n}if${_}(typeof Symbol${_}!==${_}'undefined'${_}&&${_}Symbol.toStringTag)${n}`;
- output += `${t}Object.defineProperty(${name},${_}Symbol.toStringTag,${_}{${_}value:${_}'Module'${_}});${n}`;
- output += `else${n || ' '}`;
- output += `${t}Object.defineProperty(${name},${_}'toString',${_}{${_}value:${_}function${_}()${_}{${_}return${_}'[object Module]'${options.compact ? ';' : ''}${_}}${_}});${n}`;
- output += `${callee}(${name});`;
- }
- if (options.format === 'system' && this.exportName) {
- output += `${n}exports('${this.exportName}',${_}${name});`;
- }
- return output;
- }
- renderFirst() {
- return this.referencedEarly;
- }
-}
-NamespaceVariable.prototype.isNamespace = true;
-
-const esModuleExport = `Object.defineProperty(exports, '__esModule', { value: true });`;
-const compactEsModuleExport = `Object.defineProperty(exports,'__esModule',{value:true});`;
-
-function getExportBlock(exports, dependencies, namedExportsMode, interop, compact, t, mechanism = 'return ') {
- const _ = compact ? '' : ' ';
- const n = compact ? '' : '\n';
- if (!namedExportsMode) {
- let local;
- exports.some(expt => {
- if (expt.exported === 'default') {
- local = expt.local;
- return true;
- }
- return false;
- });
- // search for reexported default otherwise
- if (!local) {
- dependencies.some(dep => {
- if (!dep.reexports)
- return false;
- return dep.reexports.some(expt => {
- if (expt.reexported === 'default') {
- local = dep.namedExportsMode ? `${dep.name}.${expt.imported}` : dep.name;
- return true;
- }
- return false;
- });
- });
- }
- return `${mechanism}${local};`;
- }
- let exportBlock = '';
- // star exports must always output first for precedence
- dependencies.forEach(({ name, reexports }) => {
- if (reexports && namedExportsMode) {
- reexports.forEach(specifier => {
- if (specifier.reexported === '*') {
- if (!compact && exportBlock)
- exportBlock += '\n';
- exportBlock +=
- `Object.keys(${name}).forEach(function${_}(key)${_}{${n}` +
- `${t}Object.defineProperty(exports,${_}key,${_}{${n}` +
- `${t}${t}enumerable:${_}true,${n}` +
- `${t}${t}get:${_}function${_}()${_}{${n}` +
- `${t}${t}${t}return ${name}[key];${n}` +
- `${t}${t}}${n}${t}});${n}});`;
- }
- });
- }
- });
- dependencies.forEach(({ name, imports, reexports, isChunk, namedExportsMode: depNamedExportsMode }) => {
- if (reexports && namedExportsMode) {
- reexports.forEach(specifier => {
- if (specifier.imported === 'default' && !isChunk) {
- const exportsNamesOrNamespace = (imports && imports.some(specifier => specifier.imported !== 'default')) ||
- (reexports &&
- reexports.some(specifier => specifier.imported !== 'default' && specifier.imported !== '*'));
- const reexportsDefaultAsDefault = reexports &&
- reexports.some(specifier => specifier.imported === 'default' && specifier.reexported === 'default');
- if (exportBlock && !compact)
- exportBlock += '\n';
- if (exportsNamesOrNamespace || reexportsDefaultAsDefault)
- exportBlock += `exports.${specifier.reexported}${_}=${_}${name}${interop !== false ? '__default' : '.default'};`;
- else
- exportBlock += `exports.${specifier.reexported}${_}=${_}${name};`;
- }
- else if (specifier.imported !== '*') {
- if (exportBlock && !compact)
- exportBlock += '\n';
- const importName = specifier.imported === 'default' && !depNamedExportsMode
- ? name
- : `${name}.${specifier.imported}`;
- exportBlock += specifier.needsLiveBinding
- ? `Object.defineProperty(exports,${_}'${specifier.reexported}',${_}{${n}` +
- `${t}enumerable:${_}true,${n}` +
- `${t}get:${_}function${_}()${_}{${n}` +
- `${t}${t}return ${importName};${n}${t}}${n}});`
- : `exports.${specifier.reexported}${_}=${_}${importName};`;
- }
- else if (specifier.reexported !== '*') {
- if (exportBlock && !compact)
- exportBlock += '\n';
- exportBlock += `exports.${specifier.reexported}${_}=${_}${name};`;
- }
- });
- }
- });
- exports.forEach(expt => {
- const lhs = `exports.${expt.exported}`;
- const rhs = expt.local;
- if (lhs === rhs) {
- return;
- }
- if (exportBlock && !compact)
- exportBlock += '\n';
- exportBlock += `${lhs}${_}=${_}${rhs};`;
- });
- return exportBlock;
-}
-
-function getInteropBlock(dependencies, options, varOrConst) {
- return dependencies
- .map(({ name, exportsNames, exportsDefault, namedExportsMode }) => {
- if (!namedExportsMode)
- return;
- if (!exportsDefault || options.interop === false)
- return null;
- if (exportsNames) {
- if (options.compact)
- return `${varOrConst} ${name}__default='default'in ${name}?${name}['default']:${name};`;
- return `${varOrConst} ${name}__default = 'default' in ${name} ? ${name}['default'] : ${name};`;
- }
- if (options.compact)
- return `${name}=${name}&&${name}.hasOwnProperty('default')?${name}['default']:${name};`;
- return `${name} = ${name} && ${name}.hasOwnProperty('default') ? ${name}['default'] : ${name};`;
- })
- .filter(Boolean)
- .join(options.compact ? '' : '\n');
-}
-
-const builtins$1 = {
- assert: true,
- buffer: true,
- console: true,
- constants: true,
- domain: true,
- events: true,
- http: true,
- https: true,
- os: true,
- path: true,
- process: true,
- punycode: true,
- querystring: true,
- stream: true,
- string_decoder: true,
- timers: true,
- tty: true,
- url: true,
- util: true,
- vm: true,
- zlib: true
-};
-// Creating a browser chunk that depends on Node.js built-in modules ('util'). You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins
-function warnOnBuiltins(warn, dependencies) {
- const externalBuiltins = dependencies.map(({ id }) => id).filter(id => id in builtins$1);
- if (!externalBuiltins.length)
- return;
- const detail = externalBuiltins.length === 1
- ? `module ('${externalBuiltins[0]}')`
- : `modules (${externalBuiltins
- .slice(0, -1)
- .map(name => `'${name}'`)
- .join(', ')} and '${externalBuiltins.slice(-1)}')`;
- warn({
- code: 'MISSING_NODE_BUILTINS',
- message: `Creating a browser bundle that depends on Node.js built-in ${detail}. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins`,
- modules: externalBuiltins
- });
-}
-
-// TODO consider using improved AMD relative imports:
-// https://requirejs.org/docs/api.html#modulenotes-urls
-// AMD resolution will only respect the AMD baseUrl if the .js extension is omitted.
-// The assumption is that this makes sense for all relative ids:
-// https://requirejs.org/docs/api.html#jsfiles
-function removeExtensionFromRelativeAmdId(id) {
- if (id[0] === '.' && id.endsWith('.js')) {
- return id.slice(0, -3);
- }
- return id;
-}
-function amd(magicString, { dependencies, dynamicImport, exports, hasExports, indentString: t, intro, isEntryModuleFacade, namedExportsMode, needsAmdModule, outro, varOrConst, warn }, options) {
- warnOnBuiltins(warn, dependencies);
- const deps = dependencies.map(m => `'${removeExtensionFromRelativeAmdId(m.id)}'`);
- const args = dependencies.map(m => m.name);
- const n = options.compact ? '' : '\n';
- const _ = options.compact ? '' : ' ';
- if (namedExportsMode && hasExports) {
- args.unshift(`exports`);
- deps.unshift(`'exports'`);
- }
- if (dynamicImport) {
- args.unshift('require');
- deps.unshift(`'require'`);
- }
- if (needsAmdModule) {
- args.unshift('module');
- deps.unshift(`'module'`);
- }
- const amdOptions = options.amd || {};
- const params = (amdOptions.id ? `'${amdOptions.id}',${_}` : ``) +
- (deps.length ? `[${deps.join(`,${_}`)}],${_}` : ``);
- const useStrict = options.strict !== false ? `${_}'use strict';` : ``;
- const define = amdOptions.define || 'define';
- const wrapperStart = `${define}(${params}function${_}(${args.join(`,${_}`)})${_}{${useStrict}${n}${n}`;
- // var foo__default = 'default' in foo ? foo['default'] : foo;
- const interopBlock = getInteropBlock(dependencies, options, varOrConst);
- if (interopBlock)
- magicString.prepend(interopBlock + n + n);
- if (intro)
- magicString.prepend(intro);
- const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
- if (exportBlock)
- magicString.append(n + n + exportBlock);
- if (namedExportsMode && hasExports && isEntryModuleFacade && options.esModule)
- magicString.append(`${n}${n}${options.compact ? compactEsModuleExport : esModuleExport}`);
- if (outro)
- magicString.append(outro);
- return magicString
- .indent(t)
- .append(n + n + '});')
- .prepend(wrapperStart);
-}
-
-function cjs(magicString, { dependencies, exports, hasExports, indentString: t, intro, isEntryModuleFacade, namedExportsMode, outro, varOrConst }, options) {
- const n = options.compact ? '' : '\n';
- const _ = options.compact ? '' : ' ';
- intro =
- (options.strict === false ? intro : `'use strict';${n}${n}${intro}`) +
- (namedExportsMode && hasExports && isEntryModuleFacade && options.esModule
- ? `${options.compact ? compactEsModuleExport : esModuleExport}${n}${n}`
- : '');
- let needsInterop = false;
- const interop = options.interop !== false;
- let importBlock;
- let definingVariable = false;
- importBlock = '';
- for (const { id, namedExportsMode, isChunk, name, reexports, imports, exportsNames, exportsDefault } of dependencies) {
- if (!reexports && !imports) {
- if (importBlock) {
- importBlock += !options.compact || definingVariable ? `;${n}` : ',';
- }
- definingVariable = false;
- importBlock += `require('${id}')`;
- }
- else {
- importBlock +=
- options.compact && definingVariable ? ',' : `${importBlock ? `;${n}` : ''}${varOrConst} `;
- definingVariable = true;
- if (!interop || isChunk || !exportsDefault || !namedExportsMode) {
- importBlock += `${name}${_}=${_}require('${id}')`;
- }
- else {
- needsInterop = true;
- if (exportsNames)
- importBlock += `${name}${_}=${_}require('${id}')${options.compact ? ',' : `;\n${varOrConst} `}${name}__default${_}=${_}${INTEROP_DEFAULT_VARIABLE}(${name})`;
- else
- importBlock += `${name}${_}=${_}${INTEROP_DEFAULT_VARIABLE}(require('${id}'))`;
- }
- }
- }
- if (importBlock)
- importBlock += ';';
- if (needsInterop) {
- const ex = options.compact ? 'e' : 'ex';
- intro +=
- `function ${INTEROP_DEFAULT_VARIABLE}${_}(${ex})${_}{${_}return${_}` +
- `(${ex}${_}&&${_}(typeof ${ex}${_}===${_}'object')${_}&&${_}'default'${_}in ${ex})${_}` +
- `?${_}${ex}['default']${_}:${_}${ex}${options.compact ? '' : '; '}}${n}${n}`;
- }
- if (importBlock)
- intro += importBlock + n + n;
- const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t, `module.exports${_}=${_}`);
- magicString.prepend(intro);
- if (exportBlock)
- magicString.append(n + n + exportBlock);
- if (outro)
- magicString.append(outro);
- return magicString;
-}
-
-function esm(magicString, { intro, outro, dependencies, exports }, options) {
- const _ = options.compact ? '' : ' ';
- const n = options.compact ? '' : '\n';
- const importBlock = dependencies
- .map(({ id, reexports, imports, name }) => {
- if (!reexports && !imports) {
- return `import${_}'${id}';`;
- }
- let output = '';
- if (imports) {
- const defaultImport = imports.find(specifier => specifier.imported === 'default');
- const starImport = imports.find(specifier => specifier.imported === '*');
- if (starImport) {
- output += `import${_}*${_}as ${starImport.local} from${_}'${id}';`;
- if (imports.length > 1)
- output += n;
- }
- if (defaultImport && imports.length === 1) {
- output += `import ${defaultImport.local} from${_}'${id}';`;
- }
- else if (!starImport || imports.length > 1) {
- output += `import ${defaultImport ? `${defaultImport.local},${_}` : ''}{${_}${imports
- .filter(specifier => specifier !== defaultImport && specifier !== starImport)
- .map(specifier => {
- if (specifier.imported === specifier.local) {
- return specifier.imported;
- }
- else {
- return `${specifier.imported} as ${specifier.local}`;
- }
- })
- .join(`,${_}`)}${_}}${_}from${_}'${id}';`;
- }
- }
- if (reexports) {
- if (imports)
- output += n;
- const starExport = reexports.find(specifier => specifier.reexported === '*');
- const namespaceReexport = reexports.find(specifier => specifier.imported === '*' && specifier.reexported !== '*');
- if (starExport) {
- output += `export${_}*${_}from${_}'${id}';`;
- if (reexports.length === 1) {
- return output;
- }
- output += n;
- }
- if (namespaceReexport) {
- if (!imports ||
- !imports.some(specifier => specifier.imported === '*' && specifier.local === name))
- output += `import${_}*${_}as ${name} from${_}'${id}';${n}`;
- output += `export${_}{${_}${name === namespaceReexport.reexported
- ? name
- : `${name} as ${namespaceReexport.reexported}`} };`;
- if (reexports.length === (starExport ? 2 : 1)) {
- return output;
- }
- output += n;
- }
- output += `export${_}{${_}${reexports
- .filter(specifier => specifier !== starExport && specifier !== namespaceReexport)
- .map(specifier => {
- if (specifier.imported === specifier.reexported) {
- return specifier.imported;
- }
- else {
- return `${specifier.imported} as ${specifier.reexported}`;
- }
- })
- .join(`,${_}`)}${_}}${_}from${_}'${id}';`;
- }
- return output;
- })
- .join(n);
- if (importBlock)
- intro += importBlock + n + n;
- if (intro)
- magicString.prepend(intro);
- const exportBlock = [];
- const exportDeclaration = [];
- exports.forEach(specifier => {
- if (specifier.exported === 'default') {
- exportBlock.push(`export default ${specifier.local};`);
- }
- else {
- exportDeclaration.push(specifier.exported === specifier.local
- ? specifier.local
- : `${specifier.local} as ${specifier.exported}`);
- }
- });
- if (exportDeclaration.length) {
- exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
- }
- if (exportBlock.length)
- magicString.append(n + n + exportBlock.join(n).trim());
- if (outro)
- magicString.append(outro);
- return magicString.trim();
-}
-
-function getLocator$1(source, options) {
- if (options === void 0) {
- options = {};
- }
- var offsetLine = options.offsetLine || 0;
- var offsetColumn = options.offsetColumn || 0;
- var originalLines = source.split('\n');
- var start = 0;
- var lineRanges = originalLines.map(function (line, i) {
- var end = start + line.length + 1;
- var range = { start: start, end: end, line: i };
- start = end;
- return range;
- });
- var i = 0;
- function rangeContains(range, index) {
- return range.start <= index && index < range.end;
- }
- function getLocation(range, index) {
- return { line: offsetLine + range.line, column: offsetColumn + index - range.start, character: index };
- }
- function locate(search, startIndex) {
- if (typeof search === 'string') {
- search = source.indexOf(search, startIndex || 0);
- }
- var range = lineRanges[i];
- var d = search >= range.end ? 1 : -1;
- while (range) {
- if (rangeContains(range, search))
- return getLocation(range, search);
- i += d;
- range = lineRanges[i];
- }
- }
- return locate;
-}
-function locate(source, search, options) {
- if (typeof options === 'number') {
- throw new Error('locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument');
- }
- return getLocator$1(source, options)(search, options && options.startIndex);
-}
-
-function spaces(i) {
- let result = '';
- while (i--)
- result += ' ';
- return result;
-}
-function tabsToSpaces(str) {
- return str.replace(/^\t+/, match => match.split('\t').join(' '));
-}
-function getCodeFrame(source, line, column) {
- let lines = source.split('\n');
- const frameStart = Math.max(0, line - 3);
- let frameEnd = Math.min(line + 2, lines.length);
- lines = lines.slice(frameStart, frameEnd);
- while (!/\S/.test(lines[lines.length - 1])) {
- lines.pop();
- frameEnd -= 1;
- }
- const digits = String(frameEnd).length;
- return lines
- .map((str, i) => {
- const isErrorLine = frameStart + i + 1 === line;
- let lineNum = String(i + frameStart + 1);
- while (lineNum.length < digits)
- lineNum = ` ${lineNum}`;
- if (isErrorLine) {
- const indicator = spaces(digits + 2 + tabsToSpaces(str.slice(0, column)).length) + '^';
- return `${lineNum}: ${tabsToSpaces(str)}\n${indicator}`;
- }
- return `${lineNum}: ${tabsToSpaces(str)}`;
- })
- .join('\n');
-}
-
-function getAliasName(id) {
- const base = path.basename(id);
- return base.substr(0, base.length - path.extname(id).length);
-}
-function relativeId(id) {
- if (typeof process === 'undefined' || !isAbsolute(id))
- return id;
- return path.relative(process.cwd(), id);
-}
-function isPlainName(name) {
- // not starting with "./", "/". "../"
- return !(name[0] === '/' ||
- (name[1] === '.' && (name[2] === '/' || (name[2] === '.' && name[3] === '/'))));
-}
-
-function error(base, props) {
- if (base instanceof Error === false)
- base = Object.assign(new Error(base.message), base);
- if (props)
- Object.assign(base, props);
- throw base;
-}
-function augmentCodeLocation(object, pos, source, id) {
- if (pos.line !== undefined && pos.column !== undefined) {
- const { line, column } = pos;
- object.loc = { file: id, line, column };
- }
- else {
- object.pos = pos;
- const { line, column } = locate(source, pos, { offsetLine: 1 });
- object.loc = { file: id, line, column };
- }
- if (object.frame === undefined) {
- const { line, column } = object.loc;
- object.frame = getCodeFrame(source, line, column);
- }
-}
-var Errors;
-(function (Errors) {
- Errors["ASSET_NOT_FINALISED"] = "ASSET_NOT_FINALISED";
- Errors["ASSET_NOT_FOUND"] = "ASSET_NOT_FOUND";
- Errors["ASSET_SOURCE_ALREADY_SET"] = "ASSET_SOURCE_ALREADY_SET";
- Errors["ASSET_SOURCE_MISSING"] = "ASSET_SOURCE_MISSING";
- Errors["BAD_LOADER"] = "BAD_LOADER";
- Errors["CHUNK_NOT_FOUND"] = "CHUNK_NOT_FOUND";
- Errors["CHUNK_NOT_GENERATED"] = "CHUNK_NOT_GENERATED";
- Errors["INVALID_ASSET_NAME"] = "INVALID_ASSET_NAME";
- Errors["INVALID_CHUNK"] = "INVALID_CHUNK";
- Errors["INVALID_EXTERNAL_ID"] = "INVALID_EXTERNAL_ID";
- Errors["INVALID_OPTION"] = "INVALID_OPTION";
- Errors["INVALID_PLUGIN_HOOK"] = "INVALID_PLUGIN_HOOK";
- Errors["INVALID_ROLLUP_PHASE"] = "INVALID_ROLLUP_PHASE";
- Errors["NAMESPACE_CONFLICT"] = "NAMESPACE_CONFLICT";
- Errors["UNRESOLVED_ENTRY"] = "UNRESOLVED_ENTRY";
- Errors["UNRESOLVED_IMPORT"] = "UNRESOLVED_IMPORT";
-})(Errors || (Errors = {}));
-function errAssetNotFinalisedForFileName(asset) {
- return {
- code: Errors.ASSET_NOT_FINALISED,
- message: `Plugin error - Unable to get file name for asset "${asset.name}". Ensure that the source is set and that generate is called first.`
- };
-}
-function errChunkNotGeneratedForFileName(entry) {
- return {
- code: Errors.CHUNK_NOT_GENERATED,
- message: `Plugin error - Unable to get file name for chunk "${entry.name}". Ensure that generate is called first.`
- };
-}
-function errAssetReferenceIdNotFoundForFilename(assetReferenceId) {
- return {
- code: Errors.ASSET_NOT_FOUND,
- message: `Plugin error - Unable to get file name for unknown asset "${assetReferenceId}".`
- };
-}
-function errAssetReferenceIdNotFoundForSetSource(assetReferenceId) {
- return {
- code: Errors.ASSET_NOT_FOUND,
- message: `Plugin error - Unable to set the source for unknown asset "${assetReferenceId}".`
- };
-}
-function errAssetSourceAlreadySet(asset) {
- return {
- code: Errors.ASSET_SOURCE_ALREADY_SET,
- message: `Plugin error - Unable to set the source for asset "${asset.name}", source already set.`
- };
-}
-function errAssetSourceMissingForSetSource(asset) {
- return {
- code: Errors.ASSET_SOURCE_MISSING,
- message: `Plugin error creating asset "${asset.name}", setAssetSource call without a source.`
- };
-}
-function errNoAssetSourceSet(asset) {
- return {
- code: Errors.ASSET_SOURCE_MISSING,
- message: `Plugin error creating asset "${asset.name}" - no asset source set.`
- };
-}
-function errBadLoader(id) {
- return {
- code: Errors.BAD_LOADER,
- message: `Error loading ${relativeId(id)}: plugin load hook should return a string, a { code, map } object, or nothing/null`
- };
-}
-function errChunkReferenceIdNotFoundForFilename(chunkReferenceId) {
- return {
- code: Errors.CHUNK_NOT_FOUND,
- message: `Plugin error - Unable to get file name for unknown chunk "${chunkReferenceId}".`
- };
-}
-function errInvalidAssetName(name) {
- return {
- code: Errors.INVALID_ASSET_NAME,
- message: `Plugin error creating asset, name "${name}" is not a plain (non relative or absolute URL) string name.`
- };
-}
-function errCannotAssignModuleToChunk(moduleId, assignToAlias, currentAlias) {
- return {
- code: Errors.INVALID_CHUNK,
- message: `Cannot assign ${relativeId(moduleId)} to the "${assignToAlias}" chunk as it is already in the "${currentAlias}" chunk.`
- };
-}
-function errInternalIdCannotBeExternal(source, importer) {
- return {
- code: Errors.INVALID_EXTERNAL_ID,
- message: `'${source}' is imported as an external by ${relativeId(importer)}, but is already an existing non-external module id.`
- };
-}
-function errInvalidOption(option, explanation) {
- return {
- code: Errors.INVALID_OPTION,
- message: `Invalid value for option "${option}" - ${explanation}.`
- };
-}
-function errInvalidRollupPhaseForAddWatchFile() {
- return {
- code: Errors.INVALID_ROLLUP_PHASE,
- message: `Cannot call addWatchFile after the build has finished.`
- };
-}
-function errInvalidRollupPhaseForEmitChunk() {
- return {
- code: Errors.INVALID_ROLLUP_PHASE,
- message: `Cannot call emitChunk after module loading has finished.`
- };
-}
-function errNamespaceConflict(name, reexportingModule, additionalExportAllModule) {
- return {
- code: Errors.NAMESPACE_CONFLICT,
- message: `Conflicting namespaces: ${relativeId(reexportingModule.id)} re-exports '${name}' from both ${relativeId(reexportingModule.exportsAll[name])} and ${relativeId(additionalExportAllModule.exportsAll[name])} (will be ignored)`,
- name,
- reexporter: reexportingModule.id,
- sources: [reexportingModule.exportsAll[name], additionalExportAllModule.exportsAll[name]]
- };
-}
-function errEntryCannotBeExternal(unresolvedId) {
- return {
- code: Errors.UNRESOLVED_ENTRY,
- message: `Entry module cannot be external (${relativeId(unresolvedId)}).`
- };
-}
-function errUnresolvedEntry(unresolvedId) {
- return {
- code: Errors.UNRESOLVED_ENTRY,
- message: `Could not resolve entry module (${relativeId(unresolvedId)}).`
- };
-}
-function errUnresolvedImport(source, importer) {
- return {
- code: Errors.UNRESOLVED_IMPORT,
- message: `Could not resolve '${source}' from ${relativeId(importer)}`
- };
-}
-function errUnresolvedImportTreatedAsExternal(source, importer) {
- return {
- code: Errors.UNRESOLVED_IMPORT,
- importer: relativeId(importer),
- message: `'${source}' is imported by ${relativeId(importer)}, but could not be resolved – treating it as an external dependency`,
- source,
- url: 'https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency'
- };
-}
-
-// Generate strings which dereference dotted properties, but use array notation `['prop-deref']`
-// if the property name isn't trivial
-const shouldUseDot = /^[a-zA-Z$_][a-zA-Z0-9$_]*$/;
-function property(prop) {
- return shouldUseDot.test(prop) ? `.${prop}` : `['${prop}']`;
-}
-function keypath(keypath) {
- return keypath
- .split('.')
- .map(property)
- .join('');
-}
-
-function setupNamespace(name, root, globals, compact) {
- const parts = name.split('.');
- if (globals) {
- parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
- }
- const _ = compact ? '' : ' ';
- parts.pop();
- let acc = root;
- return (parts
- .map(part => ((acc += property(part)), `${acc}${_}=${_}${acc}${_}||${_}{}${compact ? '' : ';'}`))
- .join(compact ? ',' : '\n') + (compact && parts.length ? ';' : '\n'));
-}
-function assignToDeepVariable(deepName, root, globals, compact, assignment) {
- const _ = compact ? '' : ' ';
- const parts = deepName.split('.');
- if (globals) {
- parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
- }
- const last = parts.pop();
- let acc = root;
- let deepAssignment = parts
- .map(part => ((acc += property(part)), `${acc}${_}=${_}${acc}${_}||${_}{}`))
- .concat(`${acc}${property(last)}`)
- .join(`,${_}`)
- .concat(`${_}=${_}${assignment}`);
- if (parts.length > 0) {
- deepAssignment = `(${deepAssignment})`;
- }
- return deepAssignment;
-}
-
-function trimEmptyImports(dependencies) {
- let i = dependencies.length;
- while (i--) {
- const dependency = dependencies[i];
- if (dependency.exportsDefault || dependency.exportsNames) {
- return dependencies.slice(0, i + 1);
- }
- }
- return [];
-}
-
-const thisProp = (name) => `this${keypath(name)}`;
-function iife(magicString, { dependencies, exports, hasExports, indentString: t, intro, namedExportsMode, outro, varOrConst, warn }, options) {
- const _ = options.compact ? '' : ' ';
- const n = options.compact ? '' : '\n';
- const { extend, name } = options;
- const isNamespaced = name && name.indexOf('.') !== -1;
- const useVariableAssignment = !extend && !isNamespaced;
- if (name && useVariableAssignment && !isLegal(name)) {
- error({
- code: 'ILLEGAL_IDENTIFIER_AS_NAME',
- message: `Given name (${name}) is not legal JS identifier. If you need this you can try --extend option`
- });
- }
- warnOnBuiltins(warn, dependencies);
- const external = trimEmptyImports(dependencies);
- const deps = external.map(dep => dep.globalName || 'null');
- const args = external.map(m => m.name);
- if (hasExports && !name) {
- error({
- code: 'INVALID_OPTION',
- message: `You must supply "output.name" for IIFE bundles.`
- });
- }
- if (namedExportsMode && hasExports) {
- if (extend) {
- deps.unshift(`${thisProp(name)}${_}=${_}${thisProp(name)}${_}||${_}{}`);
- args.unshift('exports');
- }
- else {
- deps.unshift('{}');
- args.unshift('exports');
- }
- }
- const useStrict = options.strict !== false ? `${t}'use strict';${n}${n}` : ``;
- let wrapperIntro = `(function${_}(${args.join(`,${_}`)})${_}{${n}${useStrict}`;
- if (hasExports && (!extend || !namedExportsMode)) {
- wrapperIntro =
- (useVariableAssignment ? `${varOrConst} ${name}` : thisProp(name)) +
- `${_}=${_}${wrapperIntro}`;
- }
- if (isNamespaced && hasExports) {
- wrapperIntro = setupNamespace(name, 'this', options.globals, options.compact) + wrapperIntro;
- }
- let wrapperOutro = `${n}${n}}(${deps.join(`,${_}`)}));`;
- if (!extend && namedExportsMode && hasExports) {
- wrapperOutro = `${n}${n}${t}return exports;${wrapperOutro}`;
- }
- // var foo__default = 'default' in foo ? foo['default'] : foo;
- const interopBlock = getInteropBlock(dependencies, options, varOrConst);
- if (interopBlock)
- magicString.prepend(interopBlock + n + n);
- if (intro)
- magicString.prepend(intro);
- const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
- if (exportBlock)
- magicString.append(n + n + exportBlock);
- if (outro)
- magicString.append(outro);
- return magicString
- .indent(t)
- .prepend(wrapperIntro)
- .append(wrapperOutro);
-}
-
-function getStarExcludes({ dependencies, exports }) {
- const starExcludes = new Set(exports.map(expt => expt.exported));
- if (!starExcludes.has('default'))
- starExcludes.add('default');
- // also include reexport names
- dependencies.forEach(({ reexports }) => {
- if (reexports)
- reexports.forEach(reexport => {
- if (reexport.imported !== '*' && !starExcludes.has(reexport.reexported))
- starExcludes.add(reexport.reexported);
- });
- });
- return starExcludes;
-}
-const getStarExcludesBlock = (starExcludes, varOrConst, _, t, n) => starExcludes
- ? `${n}${t}${varOrConst} _starExcludes${_}=${_}{${_}${Array.from(starExcludes).join(`:${_}1,${_}`)}${starExcludes.size ? `:${_}1` : ''}${_}};`
- : '';
-const getImportBindingsBlock = (importBindings, _, t, n) => (importBindings.length ? `${n}${t}var ${importBindings.join(`,${_}`)};` : '');
-function getExportsBlock(exports, _, t, n) {
- if (exports.length === 0) {
- return '';
- }
- if (exports.length === 1) {
- return `${t}${t}${t}exports('${exports[0].name}',${_}${exports[0].value});${n}${n}`;
- }
- return (`${t}${t}${t}exports({${n}` +
- exports.map(({ name, value }) => `${t}${t}${t}${t}${name}:${_}${value}`).join(`,${n}`) +
- `${n}${t}${t}${t}});${n}${n}`);
-}
-const getHoistedExportsBlock = (exports, _, t, n) => getExportsBlock(exports
- .filter(expt => expt.hoisted || expt.uninitialized)
- .map(expt => ({ name: expt.exported, value: expt.uninitialized ? 'void 0' : expt.local })), _, t, n);
-const getMissingExportsBlock = (exports, _, t, n) => getExportsBlock(exports
- .filter(expt => expt.local === MISSING_EXPORT_SHIM_VARIABLE)
- .map(expt => ({ name: expt.exported, value: MISSING_EXPORT_SHIM_VARIABLE })), _, t, n);
-function system(magicString, { dependencies, exports, indentString: t, intro, outro, usesTopLevelAwait, varOrConst }, options) {
- const n = options.compact ? '' : '\n';
- const _ = options.compact ? '' : ' ';
- const dependencyIds = dependencies.map(m => `'${m.id}'`);
- const importBindings = [];
- let starExcludes;
- const setters = [];
- dependencies.forEach(({ imports, reexports }) => {
- const setter = [];
- if (imports) {
- imports.forEach(specifier => {
- importBindings.push(specifier.local);
- if (specifier.imported === '*') {
- setter.push(`${specifier.local}${_}=${_}module;`);
- }
- else {
- setter.push(`${specifier.local}${_}=${_}module.${specifier.imported};`);
- }
- });
- }
- if (reexports) {
- let createdSetter = false;
- // bulk-reexport form
- if (reexports.length > 1 ||
- (reexports.length === 1 &&
- (reexports[0].reexported === '*' || reexports[0].imported === '*'))) {
- // star reexports
- reexports.forEach(specifier => {
- if (specifier.reexported !== '*')
- return;
- // need own exports list for deduping in star export case
- if (!starExcludes) {
- starExcludes = getStarExcludes({ dependencies, exports });
- }
- if (!createdSetter) {
- setter.push(`${varOrConst} _setter${_}=${_}{};`);
- createdSetter = true;
- }
- setter.push(`for${_}(var _$p${_}in${_}module)${_}{`);
- setter.push(`${t}if${_}(!_starExcludes[_$p])${_}_setter[_$p]${_}=${_}module[_$p];`);
- setter.push('}');
- });
- // star import reexport
- reexports.forEach(specifier => {
- if (specifier.imported !== '*' || specifier.reexported === '*')
- return;
- setter.push(`exports('${specifier.reexported}',${_}module);`);
- });
- // reexports
- reexports.forEach(specifier => {
- if (specifier.reexported === '*' || specifier.imported === '*')
- return;
- if (!createdSetter) {
- setter.push(`${varOrConst} _setter${_}=${_}{};`);
- createdSetter = true;
- }
- setter.push(`_setter.${specifier.reexported}${_}=${_}module.${specifier.imported};`);
- });
- if (createdSetter) {
- setter.push('exports(_setter);');
- }
- }
- else {
- // single reexport
- reexports.forEach(specifier => {
- setter.push(`exports('${specifier.reexported}',${_}module.${specifier.imported});`);
- });
- }
- }
- setters.push(setter.join(`${n}${t}${t}${t}`));
- });
- const registeredName = options.name ? `'${options.name}',${_}` : '';
- let wrapperStart = `System.register(${registeredName}[` +
- dependencyIds.join(`,${_}`) +
- `],${_}function${_}(exports,${_}module)${_}{${n}${t}'use strict';` +
- getStarExcludesBlock(starExcludes, varOrConst, _, t, n) +
- getImportBindingsBlock(importBindings, _, t, n) +
- `${n}${t}return${_}{${setters.length
- ? `${n}${t}${t}setters:${_}[${setters
- .map(s => s
- ? `function${_}(module)${_}{${n}${t}${t}${t}${s}${n}${t}${t}}`
- : `function${_}()${_}{}`)
- .join(`,${_}`)}],`
- : ''}${n}`;
- wrapperStart +=
- `${t}${t}execute:${_}${usesTopLevelAwait ? `async${_}` : ''}function${_}()${_}{${n}${n}` +
- getHoistedExportsBlock(exports, _, t, n);
- const wrapperEnd = `${n}${n}` +
- getMissingExportsBlock(exports, _, t, n) +
- `${t}${t}}${n}${t}}${options.compact ? '' : ';'}${n}});`;
- if (intro)
- magicString.prepend(intro);
- if (outro)
- magicString.append(outro);
- return magicString
- .indent(`${t}${t}${t}`)
- .append(wrapperEnd)
- .prepend(wrapperStart);
-}
-
-function globalProp(name, globalVar) {
- if (!name)
- return 'null';
- return `${globalVar}${keypath(name)}`;
-}
-function safeAccess(name, globalVar, _) {
- const parts = name.split('.');
- let acc = globalVar;
- return parts.map(part => ((acc += property(part)), acc)).join(`${_}&&${_}`);
-}
-function umd(magicString, { dependencies, exports, hasExports, indentString: t, intro, namedExportsMode, outro, varOrConst, warn }, options) {
- const _ = options.compact ? '' : ' ';
- const n = options.compact ? '' : '\n';
- const factoryVar = options.compact ? 'f' : 'factory';
- const globalVar = options.compact ? 'g' : 'global';
- if (hasExports && !options.name) {
- error({
- code: 'INVALID_OPTION',
- message: 'You must supply "output.name" for UMD bundles.'
- });
- }
- warnOnBuiltins(warn, dependencies);
- const amdDeps = dependencies.map(m => `'${m.id}'`);
- const cjsDeps = dependencies.map(m => `require('${m.id}')`);
- const trimmedImports = trimEmptyImports(dependencies);
- const globalDeps = trimmedImports.map(module => globalProp(module.globalName, globalVar));
- const factoryArgs = trimmedImports.map(m => m.name);
- if (namedExportsMode && (hasExports || options.noConflict === true)) {
- amdDeps.unshift(`'exports'`);
- cjsDeps.unshift(`exports`);
- globalDeps.unshift(assignToDeepVariable(options.name, globalVar, options.globals, options.compact, `${options.extend ? `${globalProp(options.name, globalVar)}${_}||${_}` : ''}{}`));
- factoryArgs.unshift('exports');
- }
- const amdOptions = options.amd || {};
- const amdParams = (amdOptions.id ? `'${amdOptions.id}',${_}` : ``) +
- (amdDeps.length ? `[${amdDeps.join(`,${_}`)}],${_}` : ``);
- const define = amdOptions.define || 'define';
- const cjsExport = !namedExportsMode && hasExports ? `module.exports${_}=${_}` : ``;
- const useStrict = options.strict !== false ? `${_}'use strict';${n}` : ``;
- let iifeExport;
- if (options.noConflict === true) {
- const noConflictExportsVar = options.compact ? 'e' : 'exports';
- let factory;
- if (!namedExportsMode && hasExports) {
- factory = `var ${noConflictExportsVar}${_}=${_}${assignToDeepVariable(options.name, globalVar, options.globals, options.compact, `${factoryVar}(${globalDeps.join(`,${_}`)})`)};`;
- }
- else if (namedExportsMode) {
- const module = globalDeps.shift();
- factory =
- `var ${noConflictExportsVar}${_}=${_}${module};${n}` +
- `${t}${t}${factoryVar}(${[noConflictExportsVar].concat(globalDeps).join(`,${_}`)});`;
- }
- iifeExport =
- `(function${_}()${_}{${n}` +
- `${t}${t}var current${_}=${_}${safeAccess(options.name, globalVar, _)};${n}` +
- `${t}${t}${factory}${n}` +
- `${t}${t}${noConflictExportsVar}.noConflict${_}=${_}function${_}()${_}{${_}` +
- `${globalProp(options.name, globalVar)}${_}=${_}current;${_}return ${noConflictExportsVar}${options.compact ? '' : '; '}};${n}` +
- `${t}}())`;
- }
- else {
- iifeExport = `${factoryVar}(${globalDeps.join(`,${_}`)})`;
- if (!namedExportsMode && hasExports) {
- iifeExport = assignToDeepVariable(options.name, globalVar, options.globals, options.compact, iifeExport);
- }
- }
- const iifeNeedsGlobal = hasExports || (options.noConflict === true && namedExportsMode) || globalDeps.length > 0;
- const globalParam = iifeNeedsGlobal ? `${globalVar},${_}` : '';
- const globalArg = iifeNeedsGlobal ? `this,${_}` : '';
- const iifeStart = iifeNeedsGlobal ? `(${globalVar}${_}=${_}${globalVar}${_}||${_}self,${_}` : '';
- const iifeEnd = iifeNeedsGlobal ? ')' : '';
- const cjsIntro = iifeNeedsGlobal
- ? `${t}typeof exports${_}===${_}'object'${_}&&${_}typeof module${_}!==${_}'undefined'${_}?` +
- `${_}${cjsExport}${factoryVar}(${cjsDeps.join(`,${_}`)})${_}:${n}`
- : '';
- const wrapperIntro = `(function${_}(${globalParam}${factoryVar})${_}{${n}` +
- cjsIntro +
- `${t}typeof ${define}${_}===${_}'function'${_}&&${_}${define}.amd${_}?${_}${define}(${amdParams}${factoryVar})${_}:${n}` +
- `${t}${iifeStart}${iifeExport}${iifeEnd};${n}` +
- `}(${globalArg}function${_}(${factoryArgs.join(', ')})${_}{${useStrict}${n}`;
- const wrapperOutro = n + n + '}));';
- // var foo__default = 'default' in foo ? foo['default'] : foo;
- const interopBlock = getInteropBlock(dependencies, options, varOrConst);
- if (interopBlock)
- magicString.prepend(interopBlock + n + n);
- if (intro)
- magicString.prepend(intro);
- const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
- if (exportBlock)
- magicString.append(n + n + exportBlock);
- if (namedExportsMode && hasExports && options.esModule)
- magicString.append(n + n + (options.compact ? compactEsModuleExport : esModuleExport));
- if (outro)
- magicString.append(outro);
- return magicString
- .trim()
- .indent(t)
- .append(wrapperOutro)
- .prepend(wrapperIntro);
-}
-
-var finalisers = { system, amd, cjs, es: esm, iife, umd };
-
-const extractors = {
- ArrayPattern(names, param) {
- for (const element of param.elements) {
- if (element)
- extractors[element.type](names, element);
- }
- },
- AssignmentPattern(names, param) {
- extractors[param.left.type](names, param.left);
- },
- Identifier(names, param) {
- names.push(param.name);
- },
- MemberExpression() { },
- ObjectPattern(names, param) {
- for (const prop of param.properties) {
- if (prop.type === 'RestElement') {
- extractors.RestElement(names, prop);
- }
- else {
- extractors[prop.value.type](names, prop.value);
- }
- }
- },
- RestElement(names, param) {
- extractors[param.argument.type](names, param.argument);
- }
-};
-const extractAssignedNames = function extractAssignedNames(param) {
- const names = [];
- extractors[param.type](names, param);
- return names;
-};
-
-const BLANK = Object.create(null);
-
-function treeshakeNode(node, code, start, end) {
- code.remove(start, end);
- if (node.annotations) {
- for (const annotation of node.annotations) {
- if (annotation.start < start) {
- code.remove(annotation.start, annotation.end);
- }
- else {
- return;
- }
- }
- }
-}
-function removeAnnotations(node, code) {
- if (!node.annotations && node.parent.type === ExpressionStatement) {
- node = node.parent;
- }
- if (node.annotations) {
- for (const annotation of node.annotations) {
- code.remove(annotation.start, annotation.end);
- }
- }
-}
-
-const NO_SEMICOLON = { isNoStatement: true };
-function findFirstOccurrenceOutsideComment(code, searchString, start = 0) {
- let searchPos, charCodeAfterSlash;
- searchPos = code.indexOf(searchString, start);
- while (true) {
- start = code.indexOf('/', start);
- if (start === -1 || start > searchPos)
- return searchPos;
- charCodeAfterSlash = code.charCodeAt(++start);
- ++start;
- if (charCodeAfterSlash === 47 /*"/"*/) {
- start = code.indexOf('\n', start) + 1;
- if (start === 0)
- return -1;
- if (start > searchPos) {
- searchPos = code.indexOf(searchString, start);
- }
- }
- else if (charCodeAfterSlash === 42 /*"*"*/) {
- start = code.indexOf('*/', start) + 2;
- if (start > searchPos) {
- searchPos = code.indexOf(searchString, start);
- }
- }
- }
-}
-function findFirstLineBreakOutsideComment(code, start = 0) {
- let lineBreakPos, charCodeAfterSlash;
- lineBreakPos = code.indexOf('\n', start);
- while (true) {
- start = code.indexOf('/', start);
- if (start === -1 || start > lineBreakPos)
- return lineBreakPos;
- charCodeAfterSlash = code.charCodeAt(++start);
- if (charCodeAfterSlash === 47 /*"/"*/)
- return lineBreakPos;
- ++start;
- if (charCodeAfterSlash === 42 /*"*"*/) {
- start = code.indexOf('*/', start) + 2;
- if (start > lineBreakPos) {
- lineBreakPos = code.indexOf('\n', start);
- }
- }
- }
-}
-function renderStatementList(statements, code, start, end, options) {
- if (statements.length === 0)
- return;
- let currentNode, currentNodeStart, currentNodeNeedsBoundaries, nextNodeStart;
- let nextNode = statements[0];
- let nextNodeNeedsBoundaries = !nextNode.included || nextNode.needsBoundaries;
- if (nextNodeNeedsBoundaries) {
- nextNodeStart =
- start + findFirstLineBreakOutsideComment(code.original.slice(start, nextNode.start)) + 1;
- }
- for (let nextIndex = 1; nextIndex <= statements.length; nextIndex++) {
- currentNode = nextNode;
- currentNodeStart = nextNodeStart;
- currentNodeNeedsBoundaries = nextNodeNeedsBoundaries;
- nextNode = statements[nextIndex];
- nextNodeNeedsBoundaries =
- nextNode === undefined ? false : !nextNode.included || nextNode.needsBoundaries;
- if (currentNodeNeedsBoundaries || nextNodeNeedsBoundaries) {
- nextNodeStart =
- currentNode.end +
- findFirstLineBreakOutsideComment(code.original.slice(currentNode.end, nextNode === undefined ? end : nextNode.start)) +
- 1;
- if (currentNode.included) {
- currentNodeNeedsBoundaries
- ? currentNode.render(code, options, {
- end: nextNodeStart,
- start: currentNodeStart
- })
- : currentNode.render(code, options);
- }
- else {
- treeshakeNode(currentNode, code, currentNodeStart, nextNodeStart);
- }
- }
- else {
- currentNode.render(code, options);
- }
- }
-}
-// This assumes that the first character is not part of the first node
-function getCommaSeparatedNodesWithBoundaries(nodes, code, start, end) {
- const splitUpNodes = [];
- let node, nextNode, nextNodeStart, contentEnd, char;
- let separator = start - 1;
- for (let nextIndex = 0; nextIndex < nodes.length; nextIndex++) {
- nextNode = nodes[nextIndex];
- if (node !== undefined) {
- separator =
- node.end +
- findFirstOccurrenceOutsideComment(code.original.slice(node.end, nextNode.start), ',');
- }
- nextNodeStart = contentEnd =
- separator +
- 2 +
- findFirstLineBreakOutsideComment(code.original.slice(separator + 1, nextNode.start));
- while (((char = code.original.charCodeAt(nextNodeStart)),
- char === 32 /*" "*/ || char === 9 /*"\t"*/ || char === 10 /*"\n"*/ || char === 13) /*"\r"*/)
- nextNodeStart++;
- if (node !== undefined) {
- splitUpNodes.push({
- contentEnd,
- end: nextNodeStart,
- node,
- separator,
- start
- });
- }
- node = nextNode;
- start = nextNodeStart;
- }
- splitUpNodes.push({
- contentEnd: end,
- end,
- node,
- separator: null,
- start
- });
- return splitUpNodes;
-}
-
-const chars$1 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
-const base = 64;
-function toBase64(num) {
- let outStr = '';
- do {
- const curDigit = num % base;
- num = Math.floor(num / base);
- outStr = chars$1[curDigit] + outStr;
- } while (num !== 0);
- return outStr;
-}
-
-function getSafeName(baseName, usedNames) {
- let safeName = baseName;
- let count = 1;
- while (usedNames[safeName]) {
- safeName = `${baseName}$${toBase64(count++)}`;
- }
- usedNames[safeName] = true;
- return safeName;
-}
-
class Scope {
constructor() {
this.children = [];
@@ -4209,6 +2816,49 @@
}
}
+function getLocator$1(source, options) {
+ if (options === void 0) {
+ options = {};
+ }
+ var offsetLine = options.offsetLine || 0;
+ var offsetColumn = options.offsetColumn || 0;
+ var originalLines = source.split('\n');
+ var start = 0;
+ var lineRanges = originalLines.map(function (line, i) {
+ var end = start + line.length + 1;
+ var range = { start: start, end: end, line: i };
+ start = end;
+ return range;
+ });
+ var i = 0;
+ function rangeContains(range, index) {
+ return range.start <= index && index < range.end;
+ }
+ function getLocation(range, index) {
+ return { line: offsetLine + range.line, column: offsetColumn + index - range.start, character: index };
+ }
+ function locate(search, startIndex) {
+ if (typeof search === 'string') {
+ search = source.indexOf(search, startIndex || 0);
+ }
+ var range = lineRanges[i];
+ var d = search >= range.end ? 1 : -1;
+ while (range) {
+ if (rangeContains(range, search))
+ return getLocation(range, search);
+ i += d;
+ range = lineRanges[i];
+ }
+ }
+ return locate;
+}
+function locate(source, search, options) {
+ if (typeof options === 'number') {
+ throw new Error('locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument');
+ }
+ return getLocator$1(source, options)(search, options && options.startIndex);
+}
+
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
@@ -9294,7 +7944,8 @@
}
hasEffectsWhenCalledAtPath(path, callOptions, options) {
return (this.body.hasEffectsWhenCalledAtPath(path, callOptions, options) ||
- (this.superClass && this.superClass.hasEffectsWhenCalledAtPath(path, callOptions, options)));
+ (this.superClass !== null &&
+ this.superClass.hasEffectsWhenCalledAtPath(path, callOptions, options)));
}
initialise() {
this.included = false;
@@ -9304,10 +7955,7 @@
}
}
-function isClassDeclaration(node) {
- return node.type === ClassDeclaration;
-}
-class ClassDeclaration$1 extends ClassNode {
+class ClassDeclaration extends ClassNode {
initialise() {
super.initialise();
if (this.id !== null) {
@@ -9316,7 +7964,8 @@
}
parseNode(esTreeNode) {
if (esTreeNode.id !== null) {
- this.id = (new this.context.nodeConstructors.Identifier(esTreeNode.id, this, (this.scope.parent)));
+ this.id = new this.context.nodeConstructors.Identifier(esTreeNode.id, this, this.scope
+ .parent);
}
super.parseNode(esTreeNode);
}
@@ -9482,7 +8131,7 @@
return path.length === 0 ? this.scope.getReturnExpression() : UNKNOWN_EXPRESSION;
}
hasEffects(options) {
- return this.id && this.id.hasEffects(options);
+ return this.id !== null && this.id.hasEffects(options);
}
hasEffectsWhenAccessedAtPath(path) {
if (path.length <= 1) {
@@ -9523,16 +8172,13 @@
this.body.addImplicitReturnExpressionToScope();
}
parseNode(esTreeNode) {
- this.body = (new this.context.nodeConstructors.BlockStatement(esTreeNode.body, this, this.scope.hoistedBodyVarScope));
+ this.body = new this.context.nodeConstructors.BlockStatement(esTreeNode.body, this, this.scope.hoistedBodyVarScope);
super.parseNode(esTreeNode);
}
}
FunctionNode.prototype.preventChildBlockScope = true;
-function isFunctionDeclaration(node) {
- return node.type === FunctionDeclaration;
-}
-class FunctionDeclaration$1 extends FunctionNode {
+class FunctionDeclaration extends FunctionNode {
initialise() {
super.initialise();
if (this.id !== null) {
@@ -9541,7 +8187,8 @@
}
parseNode(esTreeNode) {
if (esTreeNode.id !== null) {
- this.id = (new this.context.nodeConstructors.Identifier(esTreeNode.id, this, (this.scope.parent)));
+ this.id = new this.context.nodeConstructors.Identifier(esTreeNode.id, this, this.scope
+ .parent);
}
super.parseNode(esTreeNode);
}
@@ -9564,10 +8211,7 @@
}
return declarationEnd + generatorStarPos + 1;
}
-function isExportDefaultDeclaration(node) {
- return node.type === ExportDefaultDeclaration;
-}
-class ExportDefaultDeclaration$1 extends NodeBase {
+class ExportDefaultDeclaration extends NodeBase {
include(includeAllChildrenRecursively) {
super.include(includeAllChildrenRecursively);
if (includeAllChildrenRecursively) {
@@ -9576,22 +8220,21 @@
}
initialise() {
this.included = false;
+ const declaration = this.declaration;
this.declarationName =
- (this.declaration.id &&
- this.declaration.id.name) ||
- this.declaration.name;
+ (declaration.id && declaration.id.name) || this.declaration.name;
this.variable = this.scope.addExportDefaultDeclaration(this.declarationName || this.context.getModuleName(), this, this.context);
this.context.addExport(this);
}
render(code, options, { start, end } = BLANK) {
const declarationStart = getDeclarationStart(code.original, this.start);
- if (isFunctionDeclaration(this.declaration)) {
+ if (this.declaration instanceof FunctionDeclaration) {
this.renderNamedDeclaration(code, declarationStart, 'function', this.declaration.id === null, options);
}
- else if (isClassDeclaration(this.declaration)) {
+ else if (this.declaration instanceof ClassDeclaration) {
this.renderNamedDeclaration(code, declarationStart, 'class', this.declaration.id === null, options);
}
- else if (this.variable.referencesOriginal()) {
+ else if (this.variable.getOriginalVariable() !== this.variable) {
// Remove altogether to prevent re-declaring the same variable
if (options.format === 'system' && this.variable.exportName) {
code.overwrite(start, end, `exports('${this.variable.exportName}', ${this.variable.getName()});`);
@@ -9625,7 +8268,7 @@
code.appendLeft(getIdInsertPosition(code.original, declarationKeyword, declarationStart), ` ${name}`);
}
if (options.format === 'system' &&
- isClassDeclaration(this.declaration) &&
+ this.declaration instanceof ClassDeclaration &&
this.variable.exportName) {
code.appendLeft(this.end, ` exports('${this.variable.exportName}', ${name});`);
}
@@ -9644,7 +8287,1509 @@
}
}
}
-ExportDefaultDeclaration$1.prototype.needsBoundaries = true;
+ExportDefaultDeclaration.prototype.needsBoundaries = true;
+
+function isReference(node, parent) {
+ if (node.type === 'MemberExpression') {
+ return !node.computed && isReference(node.object, node);
+ }
+ if (node.type === 'Identifier') {
+ switch (parent.type) {
+ // disregard `bar` in `foo.bar`
+ case 'MemberExpression': return parent.computed || node === parent.object;
+ // disregard the `foo` in `class {foo(){}}` but keep it in `class {[foo](){}}`
+ case 'MethodDefinition': return parent.computed;
+ // disregard the `bar` in `{ bar: foo }`, but keep it in `{ [bar]: foo }`
+ case 'Property': return parent.computed || node === parent.value;
+ // disregard the `bar` in `export { foo as bar }`
+ case 'ExportSpecifier': return node === parent.local;
+ // disregard the `foo` in `foo: while (...) { ... break foo; ... continue foo;}`
+ case 'LabeledStatement':
+ case 'BreakStatement':
+ case 'ContinueStatement': return false;
+ default: return true;
+ }
+ }
+ return false;
+}
+
+class Identifier$1 extends NodeBase {
+ addExportedVariables(variables) {
+ if (this.variable !== null && this.variable.exportName) {
+ variables.push(this.variable);
+ }
+ }
+ bind() {
+ if (this.bound)
+ return;
+ this.bound = true;
+ if (this.variable === null && isReference(this, this.parent)) {
+ this.variable = this.scope.findVariable(this.name);
+ this.variable.addReference(this);
+ }
+ if (this.variable !== null &&
+ this.variable.isLocal &&
+ this.variable.additionalInitializers !== null) {
+ this.variable.consolidateInitializers();
+ }
+ }
+ declare(kind, init) {
+ switch (kind) {
+ case 'var':
+ case 'function':
+ this.variable = this.scope.addDeclaration(this, this.context, init, true);
+ break;
+ case 'let':
+ case 'const':
+ case 'class':
+ this.variable = this.scope.addDeclaration(this, this.context, init, false);
+ break;
+ case 'parameter':
+ this.variable = this.scope.addParameterDeclaration(this);
+ break;
+ default:
+ throw new Error(`Unexpected identifier kind ${kind}.`);
+ }
+ }
+ deoptimizePath(path) {
+ if (!this.bound)
+ this.bind();
+ if (this.variable !== null) {
+ if (path.length === 0 &&
+ this.name in this.context.importDescriptions &&
+ !this.scope.contains(this.name)) {
+ this.disallowImportReassignment();
+ }
+ this.variable.deoptimizePath(path);
+ }
+ }
+ getLiteralValueAtPath(path, recursionTracker, origin) {
+ if (!this.bound)
+ this.bind();
+ if (this.variable !== null) {
+ return this.variable.getLiteralValueAtPath(path, recursionTracker, origin);
+ }
+ return UNKNOWN_VALUE;
+ }
+ getReturnExpressionWhenCalledAtPath(path, recursionTracker, origin) {
+ if (!this.bound)
+ this.bind();
+ if (this.variable !== null) {
+ return this.variable.getReturnExpressionWhenCalledAtPath(path, recursionTracker, origin);
+ }
+ return UNKNOWN_EXPRESSION;
+ }
+ hasEffectsWhenAccessedAtPath(path, options) {
+ return this.variable !== null && this.variable.hasEffectsWhenAccessedAtPath(path, options);
+ }
+ hasEffectsWhenAssignedAtPath(path, options) {
+ return !this.variable || this.variable.hasEffectsWhenAssignedAtPath(path, options);
+ }
+ hasEffectsWhenCalledAtPath(path, callOptions, options) {
+ return !this.variable || this.variable.hasEffectsWhenCalledAtPath(path, callOptions, options);
+ }
+ include(_includeAllChildrenRecursively) {
+ if (!this.included) {
+ this.included = true;
+ if (this.variable !== null) {
+ this.context.includeVariable(this.variable);
+ }
+ }
+ }
+ initialise() {
+ this.included = false;
+ this.bound = false;
+ // To avoid later shape mutations
+ if (!this.variable) {
+ this.variable = null;
+ }
+ }
+ render(code, _options, { renderedParentType, isCalleeOfRenderedParent, isShorthandProperty } = BLANK) {
+ if (this.variable) {
+ const name = this.variable.getName();
+ if (name !== this.name) {
+ code.overwrite(this.start, this.end, name, {
+ contentOnly: true,
+ storeName: true
+ });
+ if (isShorthandProperty) {
+ code.prependRight(this.start, `${this.name}: `);
+ }
+ }
+ // In strict mode, any variable named "eval" must be the actual "eval" function
+ if (name === 'eval' &&
+ renderedParentType === CallExpression &&
+ isCalleeOfRenderedParent) {
+ code.appendRight(this.start, '0, ');
+ }
+ }
+ }
+ disallowImportReassignment() {
+ this.context.error({
+ code: 'ILLEGAL_REASSIGNMENT',
+ message: `Illegal reassignment to import '${this.name}'`
+ }, this.start);
+ }
+}
+
+class ExportDefaultVariable extends LocalVariable {
+ constructor(name, exportDefaultDeclaration, context) {
+ super(name, exportDefaultDeclaration, exportDefaultDeclaration.declaration, context);
+ // Not initialised during construction
+ this.originalId = null;
+ this.originalVariable = null;
+ const declaration = exportDefaultDeclaration.declaration;
+ if ((declaration instanceof FunctionDeclaration || declaration instanceof ClassDeclaration) &&
+ declaration.id) {
+ this.hasId = true;
+ this.originalId = declaration.id;
+ }
+ else if (declaration instanceof Identifier$1) {
+ this.originalId = declaration;
+ }
+ }
+ addReference(identifier) {
+ if (!this.hasId) {
+ this.name = identifier.name;
+ }
+ }
+ getAssignedVariableName() {
+ return (this.originalId && this.originalId.name) || null;
+ }
+ getName() {
+ const original = this.getOriginalVariable();
+ if (original === this) {
+ return super.getName();
+ }
+ else {
+ return original.getName();
+ }
+ }
+ getOriginalVariable() {
+ if (this.originalVariable === null) {
+ if (!this.originalId || (!this.hasId && this.originalId.variable.isReassigned)) {
+ this.originalVariable = this;
+ }
+ else {
+ const assignedOriginal = this.originalId.variable;
+ this.originalVariable =
+ assignedOriginal instanceof ExportDefaultVariable
+ ? assignedOriginal.getOriginalVariable()
+ : assignedOriginal;
+ }
+ }
+ return this.originalVariable;
+ }
+ setRenderNames(baseName, name) {
+ const original = this.getOriginalVariable();
+ if (original === this) {
+ super.setRenderNames(baseName, name);
+ }
+ else {
+ original.setRenderNames(baseName, name);
+ }
+ }
+ setSafeName(name) {
+ const original = this.getOriginalVariable();
+ if (original === this) {
+ super.setSafeName(name);
+ }
+ else {
+ original.setSafeName(name);
+ }
+ }
+}
+ExportDefaultVariable.prototype.getBaseVariableName = ExportDefaultVariable.prototype.getName;
+ExportDefaultVariable.prototype.isDefault = true;
+
+const MISSING_EXPORT_SHIM_VARIABLE = '_missingExportShim';
+const INTEROP_DEFAULT_VARIABLE = '_interopDefault';
+
+class ExportShimVariable extends Variable {
+ constructor(module) {
+ super(MISSING_EXPORT_SHIM_VARIABLE);
+ this.module = module;
+ }
+}
+
+const pureFunctions = {};
+const arrayTypes = 'Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' ');
+const simdTypes = 'Int8x16 Int16x8 Int32x4 Float32x4 Float64x2'.split(' ');
+const simdMethods = 'abs add and bool check div equal extractLane fromFloat32x4 fromFloat32x4Bits fromFloat64x2 fromFloat64x2Bits fromInt16x8Bits fromInt32x4 fromInt32x4Bits fromInt8x16Bits greaterThan greaterThanOrEqual lessThan lessThanOrEqual load max maxNum min minNum mul neg not notEqual or reciprocalApproximation reciprocalSqrtApproximation replaceLane select selectBits shiftLeftByScalar shiftRightArithmeticByScalar shiftRightLogicalByScalar shuffle splat sqrt store sub swizzle xor'.split(' ');
+const allSimdMethods = [];
+simdTypes.forEach(t => {
+ simdMethods.forEach(m => {
+ allSimdMethods.push(`SIMD.${t}.${m}`);
+ });
+});
+[
+ 'Array.isArray',
+ 'Error',
+ 'EvalError',
+ 'InternalError',
+ 'RangeError',
+ 'ReferenceError',
+ 'SyntaxError',
+ 'TypeError',
+ 'URIError',
+ 'isFinite',
+ 'isNaN',
+ 'parseFloat',
+ 'parseInt',
+ 'decodeURI',
+ 'decodeURIComponent',
+ 'encodeURI',
+ 'encodeURIComponent',
+ 'escape',
+ 'unescape',
+ 'Object',
+ 'Object.create',
+ 'Object.getNotifier',
+ 'Object.getOwn',
+ 'Object.getOwnPropertyDescriptor',
+ 'Object.getOwnPropertyNames',
+ 'Object.getOwnPropertySymbols',
+ 'Object.getPrototypeOf',
+ 'Object.is',
+ 'Object.isExtensible',
+ 'Object.isFrozen',
+ 'Object.isSealed',
+ 'Object.keys',
+ 'Boolean',
+ 'Number',
+ 'Number.isFinite',
+ 'Number.isInteger',
+ 'Number.isNaN',
+ 'Number.isSafeInteger',
+ 'Number.parseFloat',
+ 'Number.parseInt',
+ 'Symbol',
+ 'Symbol.for',
+ 'Symbol.keyFor',
+ 'Math.abs',
+ 'Math.acos',
+ 'Math.acosh',
+ 'Math.asin',
+ 'Math.asinh',
+ 'Math.atan',
+ 'Math.atan2',
+ 'Math.atanh',
+ 'Math.cbrt',
+ 'Math.ceil',
+ 'Math.clz32',
+ 'Math.cos',
+ 'Math.cosh',
+ 'Math.exp',
+ 'Math.expm1',
+ 'Math.floor',
+ 'Math.fround',
+ 'Math.hypot',
+ 'Math.imul',
+ 'Math.log',
+ 'Math.log10',
+ 'Math.log1p',
+ 'Math.log2',
+ 'Math.max',
+ 'Math.min',
+ 'Math.pow',
+ 'Math.random',
+ 'Math.round',
+ 'Math.sign',
+ 'Math.sin',
+ 'Math.sinh',
+ 'Math.sqrt',
+ 'Math.tan',
+ 'Math.tanh',
+ 'Math.trunc',
+ 'Date',
+ 'Date.UTC',
+ 'Date.now',
+ 'Date.parse',
+ 'String',
+ 'String.fromCharCode',
+ 'String.fromCodePoint',
+ 'String.raw',
+ 'RegExp',
+ 'Map',
+ 'Set',
+ 'WeakMap',
+ 'WeakSet',
+ 'ArrayBuffer',
+ 'ArrayBuffer.isView',
+ 'DataView',
+ 'Promise.all',
+ 'Promise.race',
+ 'Promise.resolve',
+ 'Intl.Collator',
+ 'Intl.Collator.supportedLocalesOf',
+ 'Intl.DateTimeFormat',
+ 'Intl.DateTimeFormat.supportedLocalesOf',
+ 'Intl.NumberFormat',
+ 'Intl.NumberFormat.supportedLocalesOf'
+ // TODO properties of e.g. window...
+]
+ .concat(arrayTypes, arrayTypes.map(t => `${t}.from`), arrayTypes.map(t => `${t}.of`), simdTypes.map(t => `SIMD.${t}`), allSimdMethods)
+ .forEach(name => (pureFunctions[name] = true));
+
+class GlobalVariable extends Variable {
+ hasEffectsWhenAccessedAtPath(path) {
+ // path.length == 0 can also have an effect but we postpone this for now
+ return (path.length > 0 &&
+ !this.isPureFunctionMember(path) &&
+ !(this.name === 'Reflect' && path.length === 1));
+ }
+ hasEffectsWhenCalledAtPath(path) {
+ return !pureFunctions[[this.name, ...path].join('.')];
+ }
+ isPureFunctionMember(path) {
+ return (pureFunctions[[this.name, ...path].join('.')] ||
+ (path.length >= 1 && pureFunctions[[this.name, ...path.slice(0, -1)].join('.')]) ||
+ (path.length >= 2 &&
+ pureFunctions[[this.name, ...path.slice(0, -2)].join('.')] &&
+ path[path.length - 2] === 'prototype'));
+ }
+}
+
+// Verified on IE 6/7 that these keywords can't be used for object properties without escaping:
+// break case catch class const continue debugger default delete do
+// else enum export extends false finally for function if import
+// in instanceof new null return super switch this throw true
+// try typeof var void while with
+const RESERVED_NAMES = Object.assign(Object.create(null), {
+ await: true,
+ break: true,
+ case: true,
+ catch: true,
+ class: true,
+ const: true,
+ continue: true,
+ debugger: true,
+ default: true,
+ delete: true,
+ do: true,
+ else: true,
+ enum: true,
+ eval: true,
+ export: true,
+ extends: true,
+ false: true,
+ finally: true,
+ for: true,
+ function: true,
+ if: true,
+ implements: true,
+ import: true,
+ in: true,
+ instanceof: true,
+ interface: true,
+ let: true,
+ new: true,
+ null: true,
+ package: true,
+ private: true,
+ protected: true,
+ public: true,
+ return: true,
+ static: true,
+ super: true,
+ switch: true,
+ this: true,
+ throw: true,
+ true: true,
+ try: true,
+ typeof: true,
+ undefined: true,
+ var: true,
+ void: true,
+ while: true,
+ with: true,
+ yield: true
+});
+const NONE = {};
+const EXPORTS = { exports: true };
+const RESERVED_NAMES_BY_FORMAT = {
+ amd: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES },
+ cjs: {
+ forbiddenNames: RESERVED_NAMES,
+ formatGlobals: { exports: true, module: true, [INTEROP_DEFAULT_VARIABLE]: true }
+ },
+ es: { formatGlobals: NONE, forbiddenNames: RESERVED_NAMES },
+ iife: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES },
+ system: {
+ forbiddenNames: Object.assign(Object.create(null), RESERVED_NAMES, EXPORTS),
+ formatGlobals: NONE
+ },
+ umd: { formatGlobals: EXPORTS, forbiddenNames: RESERVED_NAMES }
+};
+
+class NamespaceVariable extends Variable {
+ constructor(context) {
+ super(context.getModuleName());
+ this.memberVariables = Object.create(null);
+ this.containsExternalNamespace = false;
+ this.referencedEarly = false;
+ this.references = [];
+ this.context = context;
+ this.module = context.module;
+ for (const name of this.context.getExports().concat(this.context.getReexports())) {
+ if (name[0] === '*' && name.length > 1)
+ this.containsExternalNamespace = true;
+ this.memberVariables[name] = this.context.traceExport(name);
+ }
+ }
+ addReference(identifier) {
+ this.references.push(identifier);
+ this.name = identifier.name;
+ }
+ // This is only called if "UNKNOWN_PATH" is reassigned as in all other situations, either the
+ // build fails due to an illegal namespace reassignment or MemberExpression already forwards
+ // the reassignment to the right variable. This means we lost track of this variable and thus
+ // need to reassign all exports.
+ deoptimizePath() {
+ for (const key in this.memberVariables) {
+ this.memberVariables[key].deoptimizePath(UNKNOWN_PATH);
+ }
+ }
+ include() {
+ if (!this.included) {
+ if (this.containsExternalNamespace) {
+ this.context.error({
+ code: 'NAMESPACE_CANNOT_CONTAIN_EXTERNAL',
+ id: this.module.id,
+ message: `Cannot create an explicit namespace object for module "${this.context.getModuleName()}" because it contains a reexported external namespace`
+ }, undefined);
+ }
+ this.included = true;
+ for (const identifier of this.references) {
+ if (identifier.context.getModuleExecIndex() <= this.context.getModuleExecIndex()) {
+ this.referencedEarly = true;
+ break;
+ }
+ }
+ if (this.context.preserveModules) {
+ for (const memberName of Object.keys(this.memberVariables))
+ this.memberVariables[memberName].include();
+ }
+ else {
+ for (const memberName of Object.keys(this.memberVariables))
+ this.context.includeVariable(this.memberVariables[memberName]);
+ }
+ }
+ }
+ renderBlock(options) {
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const t = options.indent;
+ const members = Object.keys(this.memberVariables).map(name => {
+ const original = this.memberVariables[name];
+ if (this.referencedEarly || original.isReassigned) {
+ return `${t}get ${name}${_}()${_}{${_}return ${original.getName()}${options.compact ? '' : ';'}${_}}`;
+ }
+ const safeName = RESERVED_NAMES[name] ? `'${name}'` : name;
+ return `${t}${safeName}: ${original.getName()}`;
+ });
+ const name = this.getName();
+ const callee = options.freeze ? `/*#__PURE__*/Object.freeze` : '';
+ let output = `${options.varOrConst} ${name} = ${options.namespaceToStringTag
+ ? `{${n}${members.join(`,${n}`)}${n}};`
+ : `${callee}({${n}${members.join(`,${n}`)}${n}});`}`;
+ if (options.namespaceToStringTag) {
+ output += `${n}if${_}(typeof Symbol${_}!==${_}'undefined'${_}&&${_}Symbol.toStringTag)${n}`;
+ output += `${t}Object.defineProperty(${name},${_}Symbol.toStringTag,${_}{${_}value:${_}'Module'${_}});${n}`;
+ output += `else${n || ' '}`;
+ output += `${t}Object.defineProperty(${name},${_}'toString',${_}{${_}value:${_}function${_}()${_}{${_}return${_}'[object Module]'${options.compact ? ';' : ''}${_}}${_}});${n}`;
+ output += `${callee}(${name});`;
+ }
+ if (options.format === 'system' && this.exportName) {
+ output += `${n}exports('${this.exportName}',${_}${name});`;
+ }
+ return output;
+ }
+ renderFirst() {
+ return this.referencedEarly;
+ }
+}
+NamespaceVariable.prototype.isNamespace = true;
+
+const esModuleExport = `Object.defineProperty(exports, '__esModule', { value: true });`;
+const compactEsModuleExport = `Object.defineProperty(exports,'__esModule',{value:true});`;
+
+function getExportBlock(exports, dependencies, namedExportsMode, interop, compact, t, mechanism = 'return ') {
+ const _ = compact ? '' : ' ';
+ const n = compact ? '' : '\n';
+ if (!namedExportsMode) {
+ let local;
+ exports.some(expt => {
+ if (expt.exported === 'default') {
+ local = expt.local;
+ return true;
+ }
+ return false;
+ });
+ // search for reexported default otherwise
+ if (!local) {
+ dependencies.some(dep => {
+ if (!dep.reexports)
+ return false;
+ return dep.reexports.some(expt => {
+ if (expt.reexported === 'default') {
+ local = dep.namedExportsMode ? `${dep.name}.${expt.imported}` : dep.name;
+ return true;
+ }
+ return false;
+ });
+ });
+ }
+ return `${mechanism}${local};`;
+ }
+ let exportBlock = '';
+ // star exports must always output first for precedence
+ dependencies.forEach(({ name, reexports }) => {
+ if (reexports && namedExportsMode) {
+ reexports.forEach(specifier => {
+ if (specifier.reexported === '*') {
+ if (!compact && exportBlock)
+ exportBlock += '\n';
+ exportBlock +=
+ `Object.keys(${name}).forEach(function${_}(key)${_}{${n}` +
+ `${t}Object.defineProperty(exports,${_}key,${_}{${n}` +
+ `${t}${t}enumerable:${_}true,${n}` +
+ `${t}${t}get:${_}function${_}()${_}{${n}` +
+ `${t}${t}${t}return ${name}[key];${n}` +
+ `${t}${t}}${n}${t}});${n}});`;
+ }
+ });
+ }
+ });
+ dependencies.forEach(({ name, imports, reexports, isChunk, namedExportsMode: depNamedExportsMode }) => {
+ if (reexports && namedExportsMode) {
+ reexports.forEach(specifier => {
+ if (specifier.imported === 'default' && !isChunk) {
+ const exportsNamesOrNamespace = (imports && imports.some(specifier => specifier.imported !== 'default')) ||
+ (reexports &&
+ reexports.some(specifier => specifier.imported !== 'default' && specifier.imported !== '*'));
+ const reexportsDefaultAsDefault = reexports &&
+ reexports.some(specifier => specifier.imported === 'default' && specifier.reexported === 'default');
+ if (exportBlock && !compact)
+ exportBlock += '\n';
+ if (exportsNamesOrNamespace || reexportsDefaultAsDefault)
+ exportBlock += `exports.${specifier.reexported}${_}=${_}${name}${interop !== false ? '__default' : '.default'};`;
+ else
+ exportBlock += `exports.${specifier.reexported}${_}=${_}${name};`;
+ }
+ else if (specifier.imported !== '*') {
+ if (exportBlock && !compact)
+ exportBlock += '\n';
+ const importName = specifier.imported === 'default' && !depNamedExportsMode
+ ? name
+ : `${name}.${specifier.imported}`;
+ exportBlock += specifier.needsLiveBinding
+ ? `Object.defineProperty(exports,${_}'${specifier.reexported}',${_}{${n}` +
+ `${t}enumerable:${_}true,${n}` +
+ `${t}get:${_}function${_}()${_}{${n}` +
+ `${t}${t}return ${importName};${n}${t}}${n}});`
+ : `exports.${specifier.reexported}${_}=${_}${importName};`;
+ }
+ else if (specifier.reexported !== '*') {
+ if (exportBlock && !compact)
+ exportBlock += '\n';
+ exportBlock += `exports.${specifier.reexported}${_}=${_}${name};`;
+ }
+ });
+ }
+ });
+ exports.forEach(expt => {
+ const lhs = `exports.${expt.exported}`;
+ const rhs = expt.local;
+ if (lhs === rhs) {
+ return;
+ }
+ if (exportBlock && !compact)
+ exportBlock += '\n';
+ exportBlock += `${lhs}${_}=${_}${rhs};`;
+ });
+ return exportBlock;
+}
+
+function getInteropBlock(dependencies, options, varOrConst) {
+ return dependencies
+ .map(({ name, exportsNames, exportsDefault, namedExportsMode }) => {
+ if (!namedExportsMode)
+ return;
+ if (!exportsDefault || options.interop === false)
+ return null;
+ if (exportsNames) {
+ if (options.compact)
+ return `${varOrConst} ${name}__default='default'in ${name}?${name}['default']:${name};`;
+ return `${varOrConst} ${name}__default = 'default' in ${name} ? ${name}['default'] : ${name};`;
+ }
+ if (options.compact)
+ return `${name}=${name}&&${name}.hasOwnProperty('default')?${name}['default']:${name};`;
+ return `${name} = ${name} && ${name}.hasOwnProperty('default') ? ${name}['default'] : ${name};`;
+ })
+ .filter(Boolean)
+ .join(options.compact ? '' : '\n');
+}
+
+const builtins$1 = {
+ assert: true,
+ buffer: true,
+ console: true,
+ constants: true,
+ domain: true,
+ events: true,
+ http: true,
+ https: true,
+ os: true,
+ path: true,
+ process: true,
+ punycode: true,
+ querystring: true,
+ stream: true,
+ string_decoder: true,
+ timers: true,
+ tty: true,
+ url: true,
+ util: true,
+ vm: true,
+ zlib: true
+};
+// Creating a browser chunk that depends on Node.js built-in modules ('util'). You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins
+function warnOnBuiltins(warn, dependencies) {
+ const externalBuiltins = dependencies.map(({ id }) => id).filter(id => id in builtins$1);
+ if (!externalBuiltins.length)
+ return;
+ const detail = externalBuiltins.length === 1
+ ? `module ('${externalBuiltins[0]}')`
+ : `modules (${externalBuiltins
+ .slice(0, -1)
+ .map(name => `'${name}'`)
+ .join(', ')} and '${externalBuiltins.slice(-1)}')`;
+ warn({
+ code: 'MISSING_NODE_BUILTINS',
+ message: `Creating a browser bundle that depends on Node.js built-in ${detail}. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins`,
+ modules: externalBuiltins
+ });
+}
+
+// TODO consider using improved AMD relative imports:
+// https://requirejs.org/docs/api.html#modulenotes-urls
+// AMD resolution will only respect the AMD baseUrl if the .js extension is omitted.
+// The assumption is that this makes sense for all relative ids:
+// https://requirejs.org/docs/api.html#jsfiles
+function removeExtensionFromRelativeAmdId(id) {
+ if (id[0] === '.' && id.endsWith('.js')) {
+ return id.slice(0, -3);
+ }
+ return id;
+}
+function amd(magicString, { dependencies, dynamicImport, exports, hasExports, indentString: t, intro, isEntryModuleFacade, namedExportsMode, needsAmdModule, outro, varOrConst, warn }, options) {
+ warnOnBuiltins(warn, dependencies);
+ const deps = dependencies.map(m => `'${removeExtensionFromRelativeAmdId(m.id)}'`);
+ const args = dependencies.map(m => m.name);
+ const n = options.compact ? '' : '\n';
+ const _ = options.compact ? '' : ' ';
+ if (namedExportsMode && hasExports) {
+ args.unshift(`exports`);
+ deps.unshift(`'exports'`);
+ }
+ if (dynamicImport) {
+ args.unshift('require');
+ deps.unshift(`'require'`);
+ }
+ if (needsAmdModule) {
+ args.unshift('module');
+ deps.unshift(`'module'`);
+ }
+ const amdOptions = options.amd || {};
+ const params = (amdOptions.id ? `'${amdOptions.id}',${_}` : ``) +
+ (deps.length ? `[${deps.join(`,${_}`)}],${_}` : ``);
+ const useStrict = options.strict !== false ? `${_}'use strict';` : ``;
+ const define = amdOptions.define || 'define';
+ const wrapperStart = `${define}(${params}function${_}(${args.join(`,${_}`)})${_}{${useStrict}${n}${n}`;
+ // var foo__default = 'default' in foo ? foo['default'] : foo;
+ const interopBlock = getInteropBlock(dependencies, options, varOrConst);
+ if (interopBlock)
+ magicString.prepend(interopBlock + n + n);
+ if (intro)
+ magicString.prepend(intro);
+ const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
+ if (exportBlock)
+ magicString.append(n + n + exportBlock);
+ if (namedExportsMode && hasExports && isEntryModuleFacade && options.esModule)
+ magicString.append(`${n}${n}${options.compact ? compactEsModuleExport : esModuleExport}`);
+ if (outro)
+ magicString.append(outro);
+ return magicString
+ .indent(t)
+ .append(n + n + '});')
+ .prepend(wrapperStart);
+}
+
+function cjs(magicString, { dependencies, exports, hasExports, indentString: t, intro, isEntryModuleFacade, namedExportsMode, outro, varOrConst }, options) {
+ const n = options.compact ? '' : '\n';
+ const _ = options.compact ? '' : ' ';
+ intro =
+ (options.strict === false ? intro : `'use strict';${n}${n}${intro}`) +
+ (namedExportsMode && hasExports && isEntryModuleFacade && options.esModule
+ ? `${options.compact ? compactEsModuleExport : esModuleExport}${n}${n}`
+ : '');
+ let needsInterop = false;
+ const interop = options.interop !== false;
+ let importBlock;
+ let definingVariable = false;
+ importBlock = '';
+ for (const { id, namedExportsMode, isChunk, name, reexports, imports, exportsNames, exportsDefault } of dependencies) {
+ if (!reexports && !imports) {
+ if (importBlock) {
+ importBlock += !options.compact || definingVariable ? `;${n}` : ',';
+ }
+ definingVariable = false;
+ importBlock += `require('${id}')`;
+ }
+ else {
+ importBlock +=
+ options.compact && definingVariable ? ',' : `${importBlock ? `;${n}` : ''}${varOrConst} `;
+ definingVariable = true;
+ if (!interop || isChunk || !exportsDefault || !namedExportsMode) {
+ importBlock += `${name}${_}=${_}require('${id}')`;
+ }
+ else {
+ needsInterop = true;
+ if (exportsNames)
+ importBlock += `${name}${_}=${_}require('${id}')${options.compact ? ',' : `;\n${varOrConst} `}${name}__default${_}=${_}${INTEROP_DEFAULT_VARIABLE}(${name})`;
+ else
+ importBlock += `${name}${_}=${_}${INTEROP_DEFAULT_VARIABLE}(require('${id}'))`;
+ }
+ }
+ }
+ if (importBlock)
+ importBlock += ';';
+ if (needsInterop) {
+ const ex = options.compact ? 'e' : 'ex';
+ intro +=
+ `function ${INTEROP_DEFAULT_VARIABLE}${_}(${ex})${_}{${_}return${_}` +
+ `(${ex}${_}&&${_}(typeof ${ex}${_}===${_}'object')${_}&&${_}'default'${_}in ${ex})${_}` +
+ `?${_}${ex}['default']${_}:${_}${ex}${options.compact ? '' : '; '}}${n}${n}`;
+ }
+ if (importBlock)
+ intro += importBlock + n + n;
+ const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t, `module.exports${_}=${_}`);
+ magicString.prepend(intro);
+ if (exportBlock)
+ magicString.append(n + n + exportBlock);
+ if (outro)
+ magicString.append(outro);
+ return magicString;
+}
+
+function esm(magicString, { intro, outro, dependencies, exports }, options) {
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const importBlock = dependencies
+ .map(({ id, reexports, imports, name }) => {
+ if (!reexports && !imports) {
+ return `import${_}'${id}';`;
+ }
+ let output = '';
+ if (imports) {
+ const defaultImport = imports.find(specifier => specifier.imported === 'default');
+ const starImport = imports.find(specifier => specifier.imported === '*');
+ if (starImport) {
+ output += `import${_}*${_}as ${starImport.local} from${_}'${id}';`;
+ if (imports.length > 1)
+ output += n;
+ }
+ if (defaultImport && imports.length === 1) {
+ output += `import ${defaultImport.local} from${_}'${id}';`;
+ }
+ else if (!starImport || imports.length > 1) {
+ output += `import ${defaultImport ? `${defaultImport.local},${_}` : ''}{${_}${imports
+ .filter(specifier => specifier !== defaultImport && specifier !== starImport)
+ .map(specifier => {
+ if (specifier.imported === specifier.local) {
+ return specifier.imported;
+ }
+ else {
+ return `${specifier.imported} as ${specifier.local}`;
+ }
+ })
+ .join(`,${_}`)}${_}}${_}from${_}'${id}';`;
+ }
+ }
+ if (reexports) {
+ if (imports)
+ output += n;
+ const starExport = reexports.find(specifier => specifier.reexported === '*');
+ const namespaceReexport = reexports.find(specifier => specifier.imported === '*' && specifier.reexported !== '*');
+ if (starExport) {
+ output += `export${_}*${_}from${_}'${id}';`;
+ if (reexports.length === 1) {
+ return output;
+ }
+ output += n;
+ }
+ if (namespaceReexport) {
+ if (!imports ||
+ !imports.some(specifier => specifier.imported === '*' && specifier.local === name))
+ output += `import${_}*${_}as ${name} from${_}'${id}';${n}`;
+ output += `export${_}{${_}${name === namespaceReexport.reexported
+ ? name
+ : `${name} as ${namespaceReexport.reexported}`} };`;
+ if (reexports.length === (starExport ? 2 : 1)) {
+ return output;
+ }
+ output += n;
+ }
+ output += `export${_}{${_}${reexports
+ .filter(specifier => specifier !== starExport && specifier !== namespaceReexport)
+ .map(specifier => {
+ if (specifier.imported === specifier.reexported) {
+ return specifier.imported;
+ }
+ else {
+ return `${specifier.imported} as ${specifier.reexported}`;
+ }
+ })
+ .join(`,${_}`)}${_}}${_}from${_}'${id}';`;
+ }
+ return output;
+ })
+ .join(n);
+ if (importBlock)
+ intro += importBlock + n + n;
+ if (intro)
+ magicString.prepend(intro);
+ const exportBlock = [];
+ const exportDeclaration = [];
+ exports.forEach(specifier => {
+ if (specifier.exported === 'default') {
+ exportBlock.push(`export default ${specifier.local};`);
+ }
+ else {
+ exportDeclaration.push(specifier.exported === specifier.local
+ ? specifier.local
+ : `${specifier.local} as ${specifier.exported}`);
+ }
+ });
+ if (exportDeclaration.length) {
+ exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
+ }
+ if (exportBlock.length)
+ magicString.append(n + n + exportBlock.join(n).trim());
+ if (outro)
+ magicString.append(outro);
+ return magicString.trim();
+}
+
+function spaces(i) {
+ let result = '';
+ while (i--)
+ result += ' ';
+ return result;
+}
+function tabsToSpaces(str) {
+ return str.replace(/^\t+/, match => match.split('\t').join(' '));
+}
+function getCodeFrame(source, line, column) {
+ let lines = source.split('\n');
+ const frameStart = Math.max(0, line - 3);
+ let frameEnd = Math.min(line + 2, lines.length);
+ lines = lines.slice(frameStart, frameEnd);
+ while (!/\S/.test(lines[lines.length - 1])) {
+ lines.pop();
+ frameEnd -= 1;
+ }
+ const digits = String(frameEnd).length;
+ return lines
+ .map((str, i) => {
+ const isErrorLine = frameStart + i + 1 === line;
+ let lineNum = String(i + frameStart + 1);
+ while (lineNum.length < digits)
+ lineNum = ` ${lineNum}`;
+ if (isErrorLine) {
+ const indicator = spaces(digits + 2 + tabsToSpaces(str.slice(0, column)).length) + '^';
+ return `${lineNum}: ${tabsToSpaces(str)}\n${indicator}`;
+ }
+ return `${lineNum}: ${tabsToSpaces(str)}`;
+ })
+ .join('\n');
+}
+
+function getAliasName(id) {
+ const base = path.basename(id);
+ return base.substr(0, base.length - path.extname(id).length);
+}
+function relativeId(id) {
+ if (typeof process === 'undefined' || !isAbsolute(id))
+ return id;
+ return path.relative(process.cwd(), id);
+}
+function isPlainName(name) {
+ // not starting with "./", "/". "../"
+ return !(name[0] === '/' ||
+ (name[1] === '.' && (name[2] === '/' || (name[2] === '.' && name[3] === '/'))));
+}
+
+function error(base, props) {
+ if (base instanceof Error === false)
+ base = Object.assign(new Error(base.message), base);
+ if (props)
+ Object.assign(base, props);
+ throw base;
+}
+function augmentCodeLocation(object, pos, source, id) {
+ if (pos.line !== undefined && pos.column !== undefined) {
+ const { line, column } = pos;
+ object.loc = { file: id, line, column };
+ }
+ else {
+ object.pos = pos;
+ const { line, column } = locate(source, pos, { offsetLine: 1 });
+ object.loc = { file: id, line, column };
+ }
+ if (object.frame === undefined) {
+ const { line, column } = object.loc;
+ object.frame = getCodeFrame(source, line, column);
+ }
+}
+var Errors;
+(function (Errors) {
+ Errors["ASSET_NOT_FINALISED"] = "ASSET_NOT_FINALISED";
+ Errors["ASSET_NOT_FOUND"] = "ASSET_NOT_FOUND";
+ Errors["ASSET_SOURCE_ALREADY_SET"] = "ASSET_SOURCE_ALREADY_SET";
+ Errors["ASSET_SOURCE_MISSING"] = "ASSET_SOURCE_MISSING";
+ Errors["BAD_LOADER"] = "BAD_LOADER";
+ Errors["CHUNK_NOT_FOUND"] = "CHUNK_NOT_FOUND";
+ Errors["CHUNK_NOT_GENERATED"] = "CHUNK_NOT_GENERATED";
+ Errors["INVALID_ASSET_NAME"] = "INVALID_ASSET_NAME";
+ Errors["INVALID_CHUNK"] = "INVALID_CHUNK";
+ Errors["INVALID_EXTERNAL_ID"] = "INVALID_EXTERNAL_ID";
+ Errors["INVALID_OPTION"] = "INVALID_OPTION";
+ Errors["INVALID_PLUGIN_HOOK"] = "INVALID_PLUGIN_HOOK";
+ Errors["INVALID_ROLLUP_PHASE"] = "INVALID_ROLLUP_PHASE";
+ Errors["NAMESPACE_CONFLICT"] = "NAMESPACE_CONFLICT";
+ Errors["UNRESOLVED_ENTRY"] = "UNRESOLVED_ENTRY";
+ Errors["UNRESOLVED_IMPORT"] = "UNRESOLVED_IMPORT";
+})(Errors || (Errors = {}));
+function errAssetNotFinalisedForFileName(asset) {
+ return {
+ code: Errors.ASSET_NOT_FINALISED,
+ message: `Plugin error - Unable to get file name for asset "${asset.name}". Ensure that the source is set and that generate is called first.`
+ };
+}
+function errChunkNotGeneratedForFileName(entry) {
+ return {
+ code: Errors.CHUNK_NOT_GENERATED,
+ message: `Plugin error - Unable to get file name for chunk "${entry.name}". Ensure that generate is called first.`
+ };
+}
+function errAssetReferenceIdNotFoundForFilename(assetReferenceId) {
+ return {
+ code: Errors.ASSET_NOT_FOUND,
+ message: `Plugin error - Unable to get file name for unknown asset "${assetReferenceId}".`
+ };
+}
+function errAssetReferenceIdNotFoundForSetSource(assetReferenceId) {
+ return {
+ code: Errors.ASSET_NOT_FOUND,
+ message: `Plugin error - Unable to set the source for unknown asset "${assetReferenceId}".`
+ };
+}
+function errAssetSourceAlreadySet(asset) {
+ return {
+ code: Errors.ASSET_SOURCE_ALREADY_SET,
+ message: `Plugin error - Unable to set the source for asset "${asset.name}", source already set.`
+ };
+}
+function errAssetSourceMissingForSetSource(asset) {
+ return {
+ code: Errors.ASSET_SOURCE_MISSING,
+ message: `Plugin error creating asset "${asset.name}", setAssetSource call without a source.`
+ };
+}
+function errNoAssetSourceSet(asset) {
+ return {
+ code: Errors.ASSET_SOURCE_MISSING,
+ message: `Plugin error creating asset "${asset.name}" - no asset source set.`
+ };
+}
+function errBadLoader(id) {
+ return {
+ code: Errors.BAD_LOADER,
+ message: `Error loading ${relativeId(id)}: plugin load hook should return a string, a { code, map } object, or nothing/null`
+ };
+}
+function errChunkReferenceIdNotFoundForFilename(chunkReferenceId) {
+ return {
+ code: Errors.CHUNK_NOT_FOUND,
+ message: `Plugin error - Unable to get file name for unknown chunk "${chunkReferenceId}".`
+ };
+}
+function errInvalidAssetName(name) {
+ return {
+ code: Errors.INVALID_ASSET_NAME,
+ message: `Plugin error creating asset, name "${name}" is not a plain (non relative or absolute URL) string name.`
+ };
+}
+function errCannotAssignModuleToChunk(moduleId, assignToAlias, currentAlias) {
+ return {
+ code: Errors.INVALID_CHUNK,
+ message: `Cannot assign ${relativeId(moduleId)} to the "${assignToAlias}" chunk as it is already in the "${currentAlias}" chunk.`
+ };
+}
+function errInternalIdCannotBeExternal(source, importer) {
+ return {
+ code: Errors.INVALID_EXTERNAL_ID,
+ message: `'${source}' is imported as an external by ${relativeId(importer)}, but is already an existing non-external module id.`
+ };
+}
+function errInvalidOption(option, explanation) {
+ return {
+ code: Errors.INVALID_OPTION,
+ message: `Invalid value for option "${option}" - ${explanation}.`
+ };
+}
+function errInvalidRollupPhaseForAddWatchFile() {
+ return {
+ code: Errors.INVALID_ROLLUP_PHASE,
+ message: `Cannot call addWatchFile after the build has finished.`
+ };
+}
+function errInvalidRollupPhaseForEmitChunk() {
+ return {
+ code: Errors.INVALID_ROLLUP_PHASE,
+ message: `Cannot call emitChunk after module loading has finished.`
+ };
+}
+function errNamespaceConflict(name, reexportingModule, additionalExportAllModule) {
+ return {
+ code: Errors.NAMESPACE_CONFLICT,
+ message: `Conflicting namespaces: ${relativeId(reexportingModule.id)} re-exports '${name}' from both ${relativeId(reexportingModule.exportsAll[name])} and ${relativeId(additionalExportAllModule.exportsAll[name])} (will be ignored)`,
+ name,
+ reexporter: reexportingModule.id,
+ sources: [reexportingModule.exportsAll[name], additionalExportAllModule.exportsAll[name]]
+ };
+}
+function errEntryCannotBeExternal(unresolvedId) {
+ return {
+ code: Errors.UNRESOLVED_ENTRY,
+ message: `Entry module cannot be external (${relativeId(unresolvedId)}).`
+ };
+}
+function errUnresolvedEntry(unresolvedId) {
+ return {
+ code: Errors.UNRESOLVED_ENTRY,
+ message: `Could not resolve entry module (${relativeId(unresolvedId)}).`
+ };
+}
+function errUnresolvedImport(source, importer) {
+ return {
+ code: Errors.UNRESOLVED_IMPORT,
+ message: `Could not resolve '${source}' from ${relativeId(importer)}`
+ };
+}
+function errUnresolvedImportTreatedAsExternal(source, importer) {
+ return {
+ code: Errors.UNRESOLVED_IMPORT,
+ importer: relativeId(importer),
+ message: `'${source}' is imported by ${relativeId(importer)}, but could not be resolved – treating it as an external dependency`,
+ source,
+ url: 'https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency'
+ };
+}
+
+// Generate strings which dereference dotted properties, but use array notation `['prop-deref']`
+// if the property name isn't trivial
+const shouldUseDot = /^[a-zA-Z$_][a-zA-Z0-9$_]*$/;
+function property(prop) {
+ return shouldUseDot.test(prop) ? `.${prop}` : `['${prop}']`;
+}
+function keypath(keypath) {
+ return keypath
+ .split('.')
+ .map(property)
+ .join('');
+}
+
+function setupNamespace(name, root, globals, compact) {
+ const parts = name.split('.');
+ if (globals) {
+ parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
+ }
+ const _ = compact ? '' : ' ';
+ parts.pop();
+ let acc = root;
+ return (parts
+ .map(part => ((acc += property(part)), `${acc}${_}=${_}${acc}${_}||${_}{}${compact ? '' : ';'}`))
+ .join(compact ? ',' : '\n') + (compact && parts.length ? ';' : '\n'));
+}
+function assignToDeepVariable(deepName, root, globals, compact, assignment) {
+ const _ = compact ? '' : ' ';
+ const parts = deepName.split('.');
+ if (globals) {
+ parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
+ }
+ const last = parts.pop();
+ let acc = root;
+ let deepAssignment = parts
+ .map(part => ((acc += property(part)), `${acc}${_}=${_}${acc}${_}||${_}{}`))
+ .concat(`${acc}${property(last)}`)
+ .join(`,${_}`)
+ .concat(`${_}=${_}${assignment}`);
+ if (parts.length > 0) {
+ deepAssignment = `(${deepAssignment})`;
+ }
+ return deepAssignment;
+}
+
+function trimEmptyImports(dependencies) {
+ let i = dependencies.length;
+ while (i--) {
+ const dependency = dependencies[i];
+ if (dependency.exportsDefault || dependency.exportsNames) {
+ return dependencies.slice(0, i + 1);
+ }
+ }
+ return [];
+}
+
+const thisProp = (name) => `this${keypath(name)}`;
+function iife(magicString, { dependencies, exports, hasExports, indentString: t, intro, namedExportsMode, outro, varOrConst, warn }, options) {
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const { extend, name } = options;
+ const isNamespaced = name && name.indexOf('.') !== -1;
+ const useVariableAssignment = !extend && !isNamespaced;
+ if (name && useVariableAssignment && !isLegal(name)) {
+ error({
+ code: 'ILLEGAL_IDENTIFIER_AS_NAME',
+ message: `Given name (${name}) is not legal JS identifier. If you need this you can try --extend option`
+ });
+ }
+ warnOnBuiltins(warn, dependencies);
+ const external = trimEmptyImports(dependencies);
+ const deps = external.map(dep => dep.globalName || 'null');
+ const args = external.map(m => m.name);
+ if (hasExports && !name) {
+ error({
+ code: 'INVALID_OPTION',
+ message: `You must supply "output.name" for IIFE bundles.`
+ });
+ }
+ if (namedExportsMode && hasExports) {
+ if (extend) {
+ deps.unshift(`${thisProp(name)}${_}=${_}${thisProp(name)}${_}||${_}{}`);
+ args.unshift('exports');
+ }
+ else {
+ deps.unshift('{}');
+ args.unshift('exports');
+ }
+ }
+ const useStrict = options.strict !== false ? `${t}'use strict';${n}${n}` : ``;
+ let wrapperIntro = `(function${_}(${args.join(`,${_}`)})${_}{${n}${useStrict}`;
+ if (hasExports && (!extend || !namedExportsMode)) {
+ wrapperIntro =
+ (useVariableAssignment ? `${varOrConst} ${name}` : thisProp(name)) +
+ `${_}=${_}${wrapperIntro}`;
+ }
+ if (isNamespaced && hasExports) {
+ wrapperIntro =
+ setupNamespace(name, 'this', options.globals, options.compact) + wrapperIntro;
+ }
+ let wrapperOutro = `${n}${n}}(${deps.join(`,${_}`)}));`;
+ if (!extend && namedExportsMode && hasExports) {
+ wrapperOutro = `${n}${n}${t}return exports;${wrapperOutro}`;
+ }
+ // var foo__default = 'default' in foo ? foo['default'] : foo;
+ const interopBlock = getInteropBlock(dependencies, options, varOrConst);
+ if (interopBlock)
+ magicString.prepend(interopBlock + n + n);
+ if (intro)
+ magicString.prepend(intro);
+ const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
+ if (exportBlock)
+ magicString.append(n + n + exportBlock);
+ if (outro)
+ magicString.append(outro);
+ return magicString
+ .indent(t)
+ .prepend(wrapperIntro)
+ .append(wrapperOutro);
+}
+
+function getStarExcludes({ dependencies, exports }) {
+ const starExcludes = new Set(exports.map(expt => expt.exported));
+ if (!starExcludes.has('default'))
+ starExcludes.add('default');
+ // also include reexport names
+ dependencies.forEach(({ reexports }) => {
+ if (reexports)
+ reexports.forEach(reexport => {
+ if (reexport.imported !== '*' && !starExcludes.has(reexport.reexported))
+ starExcludes.add(reexport.reexported);
+ });
+ });
+ return starExcludes;
+}
+const getStarExcludesBlock = (starExcludes, varOrConst, _, t, n) => starExcludes
+ ? `${n}${t}${varOrConst} _starExcludes${_}=${_}{${_}${Array.from(starExcludes).join(`:${_}1,${_}`)}${starExcludes.size ? `:${_}1` : ''}${_}};`
+ : '';
+const getImportBindingsBlock = (importBindings, _, t, n) => (importBindings.length ? `${n}${t}var ${importBindings.join(`,${_}`)};` : '');
+function getExportsBlock(exports, _, t, n) {
+ if (exports.length === 0) {
+ return '';
+ }
+ if (exports.length === 1) {
+ return `${t}${t}${t}exports('${exports[0].name}',${_}${exports[0].value});${n}${n}`;
+ }
+ return (`${t}${t}${t}exports({${n}` +
+ exports.map(({ name, value }) => `${t}${t}${t}${t}${name}:${_}${value}`).join(`,${n}`) +
+ `${n}${t}${t}${t}});${n}${n}`);
+}
+const getHoistedExportsBlock = (exports, _, t, n) => getExportsBlock(exports
+ .filter(expt => expt.hoisted || expt.uninitialized)
+ .map(expt => ({ name: expt.exported, value: expt.uninitialized ? 'void 0' : expt.local })), _, t, n);
+const getMissingExportsBlock = (exports, _, t, n) => getExportsBlock(exports
+ .filter(expt => expt.local === MISSING_EXPORT_SHIM_VARIABLE)
+ .map(expt => ({ name: expt.exported, value: MISSING_EXPORT_SHIM_VARIABLE })), _, t, n);
+function system(magicString, { dependencies, exports, indentString: t, intro, outro, usesTopLevelAwait, varOrConst }, options) {
+ const n = options.compact ? '' : '\n';
+ const _ = options.compact ? '' : ' ';
+ const dependencyIds = dependencies.map(m => `'${m.id}'`);
+ const importBindings = [];
+ let starExcludes;
+ const setters = [];
+ dependencies.forEach(({ imports, reexports }) => {
+ const setter = [];
+ if (imports) {
+ imports.forEach(specifier => {
+ importBindings.push(specifier.local);
+ if (specifier.imported === '*') {
+ setter.push(`${specifier.local}${_}=${_}module;`);
+ }
+ else {
+ setter.push(`${specifier.local}${_}=${_}module.${specifier.imported};`);
+ }
+ });
+ }
+ if (reexports) {
+ let createdSetter = false;
+ // bulk-reexport form
+ if (reexports.length > 1 ||
+ (reexports.length === 1 &&
+ (reexports[0].reexported === '*' || reexports[0].imported === '*'))) {
+ // star reexports
+ reexports.forEach(specifier => {
+ if (specifier.reexported !== '*')
+ return;
+ // need own exports list for deduping in star export case
+ if (!starExcludes) {
+ starExcludes = getStarExcludes({ dependencies, exports });
+ }
+ if (!createdSetter) {
+ setter.push(`${varOrConst} _setter${_}=${_}{};`);
+ createdSetter = true;
+ }
+ setter.push(`for${_}(var _$p${_}in${_}module)${_}{`);
+ setter.push(`${t}if${_}(!_starExcludes[_$p])${_}_setter[_$p]${_}=${_}module[_$p];`);
+ setter.push('}');
+ });
+ // star import reexport
+ reexports.forEach(specifier => {
+ if (specifier.imported !== '*' || specifier.reexported === '*')
+ return;
+ setter.push(`exports('${specifier.reexported}',${_}module);`);
+ });
+ // reexports
+ reexports.forEach(specifier => {
+ if (specifier.reexported === '*' || specifier.imported === '*')
+ return;
+ if (!createdSetter) {
+ setter.push(`${varOrConst} _setter${_}=${_}{};`);
+ createdSetter = true;
+ }
+ setter.push(`_setter.${specifier.reexported}${_}=${_}module.${specifier.imported};`);
+ });
+ if (createdSetter) {
+ setter.push('exports(_setter);');
+ }
+ }
+ else {
+ // single reexport
+ reexports.forEach(specifier => {
+ setter.push(`exports('${specifier.reexported}',${_}module.${specifier.imported});`);
+ });
+ }
+ }
+ setters.push(setter.join(`${n}${t}${t}${t}`));
+ });
+ const registeredName = options.name ? `'${options.name}',${_}` : '';
+ let wrapperStart = `System.register(${registeredName}[` +
+ dependencyIds.join(`,${_}`) +
+ `],${_}function${_}(exports,${_}module)${_}{${n}${t}'use strict';` +
+ getStarExcludesBlock(starExcludes, varOrConst, _, t, n) +
+ getImportBindingsBlock(importBindings, _, t, n) +
+ `${n}${t}return${_}{${setters.length
+ ? `${n}${t}${t}setters:${_}[${setters
+ .map(s => s
+ ? `function${_}(module)${_}{${n}${t}${t}${t}${s}${n}${t}${t}}`
+ : `function${_}()${_}{}`)
+ .join(`,${_}`)}],`
+ : ''}${n}`;
+ wrapperStart +=
+ `${t}${t}execute:${_}${usesTopLevelAwait ? `async${_}` : ''}function${_}()${_}{${n}${n}` +
+ getHoistedExportsBlock(exports, _, t, n);
+ const wrapperEnd = `${n}${n}` +
+ getMissingExportsBlock(exports, _, t, n) +
+ `${t}${t}}${n}${t}}${options.compact ? '' : ';'}${n}});`;
+ if (intro)
+ magicString.prepend(intro);
+ if (outro)
+ magicString.append(outro);
+ return magicString
+ .indent(`${t}${t}${t}`)
+ .append(wrapperEnd)
+ .prepend(wrapperStart);
+}
+
+function globalProp(name, globalVar) {
+ if (!name)
+ return 'null';
+ return `${globalVar}${keypath(name)}`;
+}
+function safeAccess(name, globalVar, _) {
+ const parts = name.split('.');
+ let acc = globalVar;
+ return parts.map(part => ((acc += property(part)), acc)).join(`${_}&&${_}`);
+}
+function umd(magicString, { dependencies, exports, hasExports, indentString: t, intro, namedExportsMode, outro, varOrConst, warn }, options) {
+ const _ = options.compact ? '' : ' ';
+ const n = options.compact ? '' : '\n';
+ const factoryVar = options.compact ? 'f' : 'factory';
+ const globalVar = options.compact ? 'g' : 'global';
+ if (hasExports && !options.name) {
+ error({
+ code: 'INVALID_OPTION',
+ message: 'You must supply "output.name" for UMD bundles.'
+ });
+ }
+ warnOnBuiltins(warn, dependencies);
+ const amdDeps = dependencies.map(m => `'${m.id}'`);
+ const cjsDeps = dependencies.map(m => `require('${m.id}')`);
+ const trimmedImports = trimEmptyImports(dependencies);
+ const globalDeps = trimmedImports.map(module => globalProp(module.globalName, globalVar));
+ const factoryArgs = trimmedImports.map(m => m.name);
+ if (namedExportsMode && (hasExports || options.noConflict === true)) {
+ amdDeps.unshift(`'exports'`);
+ cjsDeps.unshift(`exports`);
+ globalDeps.unshift(assignToDeepVariable(options.name, globalVar, options.globals, options.compact, `${options.extend ? `${globalProp(options.name, globalVar)}${_}||${_}` : ''}{}`));
+ factoryArgs.unshift('exports');
+ }
+ const amdOptions = options.amd || {};
+ const amdParams = (amdOptions.id ? `'${amdOptions.id}',${_}` : ``) +
+ (amdDeps.length ? `[${amdDeps.join(`,${_}`)}],${_}` : ``);
+ const define = amdOptions.define || 'define';
+ const cjsExport = !namedExportsMode && hasExports ? `module.exports${_}=${_}` : ``;
+ const useStrict = options.strict !== false ? `${_}'use strict';${n}` : ``;
+ let iifeExport;
+ if (options.noConflict === true) {
+ const noConflictExportsVar = options.compact ? 'e' : 'exports';
+ let factory;
+ if (!namedExportsMode && hasExports) {
+ factory = `var ${noConflictExportsVar}${_}=${_}${assignToDeepVariable(options.name, globalVar, options.globals, options.compact, `${factoryVar}(${globalDeps.join(`,${_}`)})`)};`;
+ }
+ else if (namedExportsMode) {
+ const module = globalDeps.shift();
+ factory =
+ `var ${noConflictExportsVar}${_}=${_}${module};${n}` +
+ `${t}${t}${factoryVar}(${[noConflictExportsVar].concat(globalDeps).join(`,${_}`)});`;
+ }
+ iifeExport =
+ `(function${_}()${_}{${n}` +
+ `${t}${t}var current${_}=${_}${safeAccess(options.name, globalVar, _)};${n}` +
+ `${t}${t}${factory}${n}` +
+ `${t}${t}${noConflictExportsVar}.noConflict${_}=${_}function${_}()${_}{${_}` +
+ `${globalProp(options.name, globalVar)}${_}=${_}current;${_}return ${noConflictExportsVar}${options.compact ? '' : '; '}};${n}` +
+ `${t}}())`;
+ }
+ else {
+ iifeExport = `${factoryVar}(${globalDeps.join(`,${_}`)})`;
+ if (!namedExportsMode && hasExports) {
+ iifeExport = assignToDeepVariable(options.name, globalVar, options.globals, options.compact, iifeExport);
+ }
+ }
+ const iifeNeedsGlobal = hasExports || (options.noConflict === true && namedExportsMode) || globalDeps.length > 0;
+ const globalParam = iifeNeedsGlobal ? `${globalVar},${_}` : '';
+ const globalArg = iifeNeedsGlobal ? `this,${_}` : '';
+ const iifeStart = iifeNeedsGlobal ? `(${globalVar}${_}=${_}${globalVar}${_}||${_}self,${_}` : '';
+ const iifeEnd = iifeNeedsGlobal ? ')' : '';
+ const cjsIntro = iifeNeedsGlobal
+ ? `${t}typeof exports${_}===${_}'object'${_}&&${_}typeof module${_}!==${_}'undefined'${_}?` +
+ `${_}${cjsExport}${factoryVar}(${cjsDeps.join(`,${_}`)})${_}:${n}`
+ : '';
+ const wrapperIntro = `(function${_}(${globalParam}${factoryVar})${_}{${n}` +
+ cjsIntro +
+ `${t}typeof ${define}${_}===${_}'function'${_}&&${_}${define}.amd${_}?${_}${define}(${amdParams}${factoryVar})${_}:${n}` +
+ `${t}${iifeStart}${iifeExport}${iifeEnd};${n}` +
+ `}(${globalArg}function${_}(${factoryArgs.join(', ')})${_}{${useStrict}${n}`;
+ const wrapperOutro = n + n + '}));';
+ // var foo__default = 'default' in foo ? foo['default'] : foo;
+ const interopBlock = getInteropBlock(dependencies, options, varOrConst);
+ if (interopBlock)
+ magicString.prepend(interopBlock + n + n);
+ if (intro)
+ magicString.prepend(intro);
+ const exportBlock = getExportBlock(exports, dependencies, namedExportsMode, options.interop, options.compact, t);
+ if (exportBlock)
+ magicString.append(n + n + exportBlock);
+ if (namedExportsMode && hasExports && options.esModule)
+ magicString.append(n + n + (options.compact ? compactEsModuleExport : esModuleExport));
+ if (outro)
+ magicString.append(outro);
+ return magicString
+ .trim()
+ .indent(t)
+ .append(wrapperOutro)
+ .prepend(wrapperIntro);
+}
+
+var finalisers = { system, amd, cjs, es: esm, iife, umd };
+
+const extractors = {
+ ArrayPattern(names, param) {
+ for (const element of param.elements) {
+ if (element)
+ extractors[element.type](names, element);
+ }
+ },
+ AssignmentPattern(names, param) {
+ extractors[param.left.type](names, param.left);
+ },
+ Identifier(names, param) {
+ names.push(param.name);
+ },
+ MemberExpression() { },
+ ObjectPattern(names, param) {
+ for (const prop of param.properties) {
+ if (prop.type === 'RestElement') {
+ extractors.RestElement(names, prop);
+ }
+ else {
+ extractors[prop.value.type](names, prop.value);
+ }
+ }
+ },
+ RestElement(names, param) {
+ extractors[param.argument.type](names, param.argument);
+ }
+};
+const extractAssignedNames = function extractAssignedNames(param) {
+ const names = [];
+ extractors[param.type](names, param);
+ return names;
+};
class ArrayExpression extends NodeBase {
bind() {
@@ -9733,6 +9878,7 @@
if (node.hasEffects(options))
return true;
}
+ return false;
}
include(includeAllChildrenRecursively) {
this.included = true;
@@ -9945,7 +10091,7 @@
hasEffects(options) {
return (super.hasEffects(options) ||
!options.ignoreBreakStatements() ||
- (this.label && !options.ignoreLabel(this.label.name)));
+ (this.label !== null && !options.ignoreLabel(this.label.name)));
}
}
@@ -9963,152 +10109,6 @@
}
const EMPTY_IMMUTABLE_TRACKER = new ImmutableEntityPathTracker();
-function isReference(node, parent) {
- if (node.type === 'MemberExpression') {
- return !node.computed && isReference(node.object, node);
- }
- if (node.type === 'Identifier') {
- switch (parent.type) {
- // disregard `bar` in `foo.bar`
- case 'MemberExpression': return parent.computed || node === parent.object;
- // disregard the `foo` in `class {foo(){}}` but keep it in `class {[foo](){}}`
- case 'MethodDefinition': return parent.computed;
- // disregard the `bar` in `{ bar: foo }`, but keep it in `{ [bar]: foo }`
- case 'Property': return parent.computed || node === parent.value;
- // disregard the `bar` in `export { foo as bar }`
- case 'ExportSpecifier': return node === parent.local;
- // disregard the `foo` in `foo: while (...) { ... break foo; ... continue foo;}`
- case 'LabeledStatement':
- case 'BreakStatement':
- case 'ContinueStatement': return false;
- default: return true;
- }
- }
- return false;
-}
-
-function isIdentifier(node) {
- return node.type === Identifier;
-}
-class Identifier$1 extends NodeBase {
- addExportedVariables(variables) {
- if (this.variable.exportName) {
- variables.push(this.variable);
- }
- }
- bind() {
- if (this.bound)
- return;
- this.bound = true;
- if (this.variable === null && isReference(this, this.parent)) {
- this.variable = this.scope.findVariable(this.name);
- this.variable.addReference(this);
- }
- if (this.variable !== null &&
- this.variable.isLocal &&
- this.variable.additionalInitializers !== null) {
- this.variable.consolidateInitializers();
- }
- }
- declare(kind, init) {
- switch (kind) {
- case 'var':
- case 'function':
- this.variable = this.scope.addDeclaration(this, this.context, init, true);
- break;
- case 'let':
- case 'const':
- case 'class':
- this.variable = this.scope.addDeclaration(this, this.context, init, false);
- break;
- case 'parameter':
- this.variable = this.scope.addParameterDeclaration(this);
- break;
- default:
- throw new Error(`Unexpected identifier kind ${kind}.`);
- }
- }
- deoptimizePath(path) {
- if (!this.bound)
- this.bind();
- if (this.variable !== null) {
- if (path.length === 0 &&
- this.name in this.context.importDescriptions &&
- !this.scope.contains(this.name)) {
- this.disallowImportReassignment();
- }
- this.variable.deoptimizePath(path);
- }
- }
- getLiteralValueAtPath(path, recursionTracker, origin) {
- if (!this.bound)
- this.bind();
- if (this.variable !== null) {
- return this.variable.getLiteralValueAtPath(path, recursionTracker, origin);
- }
- return UNKNOWN_VALUE;
- }
- getReturnExpressionWhenCalledAtPath(path, recursionTracker, origin) {
- if (!this.bound)
- this.bind();
- if (this.variable !== null) {
- return this.variable.getReturnExpressionWhenCalledAtPath(path, recursionTracker, origin);
- }
- return UNKNOWN_EXPRESSION;
- }
- hasEffectsWhenAccessedAtPath(path, options) {
- return this.variable && this.variable.hasEffectsWhenAccessedAtPath(path, options);
- }
- hasEffectsWhenAssignedAtPath(path, options) {
- return !this.variable || this.variable.hasEffectsWhenAssignedAtPath(path, options);
- }
- hasEffectsWhenCalledAtPath(path, callOptions, options) {
- return !this.variable || this.variable.hasEffectsWhenCalledAtPath(path, callOptions, options);
- }
- include(_includeAllChildrenRecursively) {
- if (!this.included) {
- this.included = true;
- if (this.variable !== null) {
- this.context.includeVariable(this.variable);
- }
- }
- }
- initialise() {
- this.included = false;
- this.bound = false;
- // To avoid later shape mutations
- if (!this.variable) {
- this.variable = null;
- }
- }
- render(code, _options, { renderedParentType, isCalleeOfRenderedParent, isShorthandProperty } = BLANK) {
- if (this.variable) {
- const name = this.variable.getName();
- if (name !== this.name) {
- code.overwrite(this.start, this.end, name, {
- contentOnly: true,
- storeName: true
- });
- if (isShorthandProperty) {
- code.prependRight(this.start, `${this.name}: `);
- }
- }
- // In strict mode, any variable named "eval" must be the actual "eval" function
- if (name === 'eval' &&
- renderedParentType === CallExpression &&
- isCalleeOfRenderedParent) {
- code.appendRight(this.start, '0, ');
- }
- }
- }
- disallowImportReassignment() {
- this.context.error({
- code: 'ILLEGAL_REASSIGNMENT',
- message: `Illegal reassignment to import '${this.name}'`
- }, this.start);
- }
-}
-
class CallExpression$1 extends NodeBase {
bind() {
super.bind();
@@ -10247,7 +10247,7 @@
}
}
parseNode(esTreeNode) {
- this.body = (new this.context.nodeConstructors.BlockStatement(esTreeNode.body, this, this.scope));
+ this.body = new this.context.nodeConstructors.BlockStatement(esTreeNode.body, this, this.scope);
super.parseNode(esTreeNode);
}
}
@@ -10480,7 +10480,7 @@
this.declaration.bind();
}
hasEffects(options) {
- return this.declaration && this.declaration.hasEffects(options);
+ return this.declaration !== null && this.declaration.hasEffects(options);
}
initialise() {
this.included = false;
@@ -10665,7 +10665,9 @@
(this.testValue
? this.alternate === null || !this.alternate.included
: !this.consequent.included)) {
- const singleRetainedBranch = this.testValue ? this.consequent : this.alternate;
+ const singleRetainedBranch = (this.testValue
+ ? this.consequent
+ : this.alternate);
code.remove(this.start, singleRetainedBranch.start);
code.remove(singleRetainedBranch.end, this.end);
removeAnnotations(this, code);
@@ -10729,6 +10731,7 @@
right: ')'
};
}
+ return undefined;
};
class Import extends NodeBase {
include() {
@@ -10765,7 +10768,7 @@
code.overwrite(this.parent.arguments[0].start, this.parent.arguments[0].end, resolution);
}
}
- setResolution(interop, namespace = undefined) {
+ setResolution(interop, namespace) {
this.resolutionInterop = interop;
this.resolutionNamespace = namespace;
}
@@ -10792,10 +10795,7 @@
}
}
-function isLiteral(node) {
- return node.type === Literal;
-}
-class Literal$1 extends NodeBase {
+class Literal extends NodeBase {
getLiteralValueAtPath(path) {
if (path.length > 0 ||
// unknown literals such as bigints can also be null but do not start with an "n"
@@ -10973,7 +10973,7 @@
: memberExpression.property.name;
}
function getResolvableComputedPropertyKey(propertyKey) {
- if (propertyKey instanceof Literal$1) {
+ if (propertyKey instanceof Literal) {
return String(propertyKey.value);
}
return null;
@@ -10988,7 +10988,7 @@
{ key: nextPathKey, pos: memberExpression.property.start }
];
}
- if (isMemberExpression(object)) {
+ if (object instanceof MemberExpression) {
const parentPath = getPathIfNotComputed(object);
return (parentPath && [...parentPath, { key: nextPathKey, pos: memberExpression.property.start }]);
}
@@ -11002,10 +11002,7 @@
}
return pathString;
}
-function isMemberExpression(node) {
- return node.type === MemberExpression;
-}
-class MemberExpression$1 extends NodeBase {
+class MemberExpression extends NodeBase {
constructor() {
super(...arguments);
this.variable = null;
@@ -11196,7 +11193,7 @@
if (!this.included)
return false;
const parent = this.parent;
- const importMetaProperty = parent instanceof MemberExpression$1 && typeof parent.propertyKey === 'string'
+ const importMetaProperty = parent instanceof MemberExpression && typeof parent.propertyKey === 'string'
? parent.propertyKey
: null;
if (importMetaProperty &&
@@ -11251,7 +11248,7 @@
}
]);
if (typeof replacement === 'string') {
- if (parent instanceof MemberExpression$1) {
+ if (parent instanceof MemberExpression) {
code.overwrite(parent.start, parent.end, replacement);
}
else {
@@ -11388,7 +11385,8 @@
else {
this.expressionsToBeDeoptimized[key].push(origin);
}
- return this.propertyMap[key].exactMatchRead.getLiteralValueAtPath(path.slice(1), recursionTracker, origin);
+ return this.propertyMap[key]
+ .exactMatchRead.getLiteralValueAtPath(path.slice(1), recursionTracker, origin);
}
getReturnExpressionWhenCalledAtPath(path, recursionTracker, origin) {
if (this.propertyMap === null)
@@ -11402,7 +11400,8 @@
if (path.length === 1 &&
objectMembers[key] &&
this.unmatchablePropertiesRead.length === 0 &&
- (!this.propertyMap[key] || this.propertyMap[key].exactMatchRead === null))
+ (!this.propertyMap[key] ||
+ this.propertyMap[key].exactMatchRead === null))
return getMemberReturnExpressionWhenCalled(objectMembers, key);
if (!this.propertyMap[key] ||
this.propertyMap[key].exactMatchRead === null ||
@@ -11414,7 +11413,8 @@
else {
this.expressionsToBeDeoptimized[key].push(origin);
}
- return this.propertyMap[key].exactMatchRead.getReturnExpressionWhenCalledAtPath(path.slice(1), recursionTracker, origin);
+ return this.propertyMap[key]
+ .exactMatchRead.getReturnExpressionWhenCalledAtPath(path.slice(1), recursionTracker, origin);
}
hasEffectsWhenAccessedAtPath(path, options) {
if (path.length === 0)
@@ -11473,7 +11473,9 @@
: path.length > 1 || !objectMembers[key]))
return true;
const subPath = path.slice(1);
- for (const property of this.propertyMap[key] ? this.propertyMap[key].propertiesRead : []) {
+ for (const property of this.propertyMap[key]
+ ? this.propertyMap[key].propertiesRead
+ : []) {
if (property.hasEffectsWhenCalledAtPath(subPath, callOptions, options))
return true;
}
@@ -11600,6 +11602,7 @@
if (node.hasEffects(options))
return true;
}
+ return false;
}
include(includeAllChildrenRecursively) {
this.included = true;
@@ -11681,13 +11684,15 @@
hasEffectsWhenAccessedAtPath(path, options) {
if (this.kind === 'get') {
return (this.value.hasEffectsWhenCalledAtPath(EMPTY_PATH, this.accessorCallOptions, options.getHasEffectsWhenCalledOptions()) ||
- (path.length > 0 && this.returnExpression.hasEffectsWhenAccessedAtPath(path, options)));
+ (path.length > 0 &&
+ this.returnExpression.hasEffectsWhenAccessedAtPath(path, options)));
}
return this.value.hasEffectsWhenAccessedAtPath(path, options);
}
hasEffectsWhenAssignedAtPath(path, options) {
if (this.kind === 'get') {
- return path.length === 0 || this.returnExpression.hasEffectsWhenAssignedAtPath(path, options);
+ return (path.length === 0 ||
+ this.returnExpression.hasEffectsWhenAssignedAtPath(path, options));
}
if (this.kind === 'set') {
return (path.length > 0 ||
@@ -11749,7 +11754,8 @@
class ReturnStatement$1 extends NodeBase {
hasEffects(options) {
- return (!options.ignoreReturnAwaitYield() || (this.argument && this.argument.hasEffects(options)));
+ return (!options.ignoreReturnAwaitYield() ||
+ (this.argument !== null && this.argument.hasEffects(options)));
}
initialise() {
this.included = false;
@@ -11904,10 +11910,7 @@
}
}
-function isTemplateLiteral(node) {
- return node.type === TemplateLiteral;
-}
-class TemplateLiteral$1 extends NodeBase {
+class TemplateLiteral extends NodeBase {
getLiteralValueAtPath(path) {
if (path.length > 0 || this.quasis.length !== 1) {
return UNKNOWN_VALUE;
@@ -12045,7 +12048,7 @@
bind() {
super.bind();
this.argument.deoptimizePath(EMPTY_PATH);
- if (isIdentifier(this.argument)) {
+ if (this.argument instanceof Identifier$1) {
const variable = this.scope.findVariable(this.argument.name);
variable.isReassigned = true;
}
@@ -12082,7 +12085,7 @@
}
function isReassignedExportsMember(variable) {
- return variable.renderBaseName && variable.exportName && variable.isReassigned;
+ return variable.renderBaseName !== null && variable.exportName !== null && variable.isReassigned;
}
function areAllDeclarationsIncludedAndNotExported(declarations) {
for (const declarator of declarations) {
@@ -12192,13 +12195,16 @@
const systemPatternExports = [];
for (const { node, start, separator, contentEnd, end } of separatedNodes) {
if (!node.included ||
- (isIdentifier(node.id) && isReassignedExportsMember(node.id.variable) && node.init === null)) {
+ (node.id instanceof Identifier$1 &&
+ isReassignedExportsMember(node.id.variable) &&
+ node.init === null)) {
code.remove(start, end);
continue;
}
leadingString = '';
nextSeparatorString = '';
- if (isIdentifier(node.id) && isReassignedExportsMember(node.id.variable)) {
+ if (node.id instanceof Identifier$1 &&
+ isReassignedExportsMember(node.id.variable)) {
if (hasRenderedContent) {
separatorString += ';';
}
@@ -12210,7 +12216,8 @@
node.id.addExportedVariables(systemPatternExports);
}
else if (node.id.variable.exportName) {
- code.prependLeft(code.original.indexOf('=', node.id.end) + 1, ` exports('${node.id.variable.safeExportName || node.id.variable.exportName}',`);
+ code.prependLeft(code.original.indexOf('=', node.id.end) + 1, ` exports('${node.id.variable.safeExportName ||
+ node.id.variable.exportName}',`);
nextSeparatorString += ')';
}
}
@@ -12281,7 +12288,8 @@
}
}
hasEffects(options) {
- return (!options.ignoreReturnAwaitYield() || (this.argument && this.argument.hasEffects(options)));
+ return (!options.ignoreReturnAwaitYield() ||
+ (this.argument !== null && this.argument.hasEffects(options)));
}
render(code, options) {
if (this.argument) {
@@ -12306,28 +12314,28 @@
CallExpression: CallExpression$1,
CatchClause,
ClassBody,
- ClassDeclaration: ClassDeclaration$1,
+ ClassDeclaration,
ClassExpression,
ConditionalExpression,
DoWhileStatement,
EmptyStatement,
ExportAllDeclaration: ExportAllDeclaration$1,
- ExportDefaultDeclaration: ExportDefaultDeclaration$1,
+ ExportDefaultDeclaration,
ExportNamedDeclaration,
ExpressionStatement: ExpressionStatement$1,
ForInStatement,
ForOfStatement,
ForStatement,
- FunctionDeclaration: FunctionDeclaration$1,
+ FunctionDeclaration,
FunctionExpression: FunctionExpression$1,
Identifier: Identifier$1,
IfStatement,
Import,
ImportDeclaration,
LabeledStatement,
- Literal: Literal$1,
+ Literal,
LogicalExpression,
- MemberExpression: MemberExpression$1,
+ MemberExpression,
MetaProperty,
MethodDefinition,
NewExpression,
@@ -12343,7 +12351,7 @@
SwitchStatement,
TaggedTemplateExpression,
TemplateElement,
- TemplateLiteral: TemplateLiteral$1,
+ TemplateLiteral,
ThisExpression,
ThrowStatement,
TryStatement: NodeBase,
@@ -12828,6 +12836,7 @@
}, importerStart);
}
const MISSING_EXPORT_SHIM_DESCRIPTION = {
+ identifier: null,
localName: MISSING_EXPORT_SHIM_VARIABLE
};
class Module {
@@ -12916,12 +12925,12 @@
getDynamicImportExpressions() {
return this.dynamicImports.map(({ node }) => {
const importArgument = node.parent.arguments[0];
- if (isTemplateLiteral(importArgument)) {
+ if (importArgument instanceof TemplateLiteral) {
if (importArgument.expressions.length === 0 && importArgument.quasis.length === 1) {
return importArgument.quasis[0].value.cooked;
}
}
- else if (isLiteral(importArgument)) {
+ else if (importArgument instanceof Literal) {
if (typeof importArgument.value === 'string') {
return importArgument.value;
}
@@ -12929,6 +12938,7 @@
else {
return importArgument;
}
+ return undefined;
});
}
getExports() {
@@ -13015,6 +13025,7 @@
this.shimMissingExport(name);
return this.exportShimVariable;
}
+ return undefined;
}
include() {
if (this.ast.shouldBeIncluded())
@@ -13088,7 +13099,7 @@
this.moduleSideEffects = moduleSideEffects;
}
timeStart('generate ast', 3);
- this.esTreeAst = ((ast || tryParse(this, this.graph.acornParser, this.graph.acornOptions)));
+ this.esTreeAst = ast || tryParse(this, this.graph.acornParser, this.graph.acornOptions);
markPureCallExpressions(this.comments, this.esTreeAst);
timeEnd('generate ast', 3);
this.resolvedIds = resolvedIds || Object.create(null);
@@ -13096,7 +13107,7 @@
// can change that, but it makes sense to use it for the source file name
const fileName = this.id;
this.magicString = new MagicString(code, {
- filename: this.excludeFromSourcemap ? null : fileName,
+ filename: (this.excludeFromSourcemap ? null : fileName),
indentExclusionRanges: []
});
this.removeExistingSourceMap();
@@ -13106,7 +13117,7 @@
addExport: this.addExport.bind(this),
addImport: this.addImport.bind(this),
addImportMeta: this.addImportMeta.bind(this),
- annotations: this.graph.treeshake && this.graph.treeshakingOptions.annotations,
+ annotations: (this.graph.treeshake && this.graph.treeshakingOptions.annotations),
code,
deoptimizationTracker: this.graph.deoptimizationTracker,
error: this.error.bind(this),
@@ -13126,7 +13137,8 @@
moduleContext: this.context,
nodeConstructors,
preserveModules: this.graph.preserveModules,
- propertyReadSideEffects: !this.graph.treeshake || this.graph.treeshakingOptions.propertyReadSideEffects,
+ propertyReadSideEffects: (!this.graph.treeshake ||
+ this.graph.treeshakingOptions.propertyReadSideEffects),
traceExport: this.getVariableForExportName.bind(this),
traceVariable: this.traceVariable.bind(this),
treeshake: this.graph.treeshake,
@@ -13213,7 +13225,7 @@
}
}
}
- else if (isExportDefaultDeclaration(node)) {
+ else if (node instanceof ExportDefaultDeclaration) {
// export default function foo () {}
// export default foo;
// export default 42;
@@ -13224,7 +13236,7 @@
}, node.start);
}
this.exports.default = {
- identifier: node.variable.getOriginalVariableName(),
+ identifier: node.variable.getAssignedVariableName(),
localName: 'default'
};
}
@@ -13237,14 +13249,14 @@
if (declaration.type === VariableDeclaration) {
for (const decl of declaration.declarations) {
for (const localName of extractAssignedNames(decl.id)) {
- this.exports[localName] = { localName };
+ this.exports[localName] = { identifier: null, localName };
}
}
}
else {
// export function foo () {}
const localName = declaration.id.name;
- this.exports[localName] = { localName };
+ this.exports[localName] = { identifier: null, localName };
}
}
else {
@@ -13258,7 +13270,7 @@
message: `A module cannot have multiple exports with the same name ('${exportedName}')`
}, specifier.start);
}
- this.exports[exportedName] = { localName };
+ this.exports[exportedName] = { identifier: null, localName };
}
}
}
@@ -13295,8 +13307,7 @@
}
}
includeDynamicImport(node) {
- const resolution = this.dynamicImports.find(dynamicImport => dynamicImport.node === node)
- .resolution;
+ const resolution = this.dynamicImports.find(dynamicImport => dynamicImport.node === node).resolution;
if (resolution instanceof Module) {
resolution.dynamicallyImportedBy.push(this);
resolution.includeAllExports();
@@ -13476,7 +13487,7 @@
sources = sources.map((source) => path.relative(directory, source));
file = path.basename(file);
}
- sourcesContent = excludeContent ? null : sourcesContent;
+ sourcesContent = (excludeContent ? null : sourcesContent);
return new SourceMap({ file, sources, sourcesContent, names, mappings });
}
@@ -13551,7 +13562,7 @@
variable.setRenderNames(null, chunk.variableName);
}
else {
- variable.setRenderNames(chunk.variableName, module.chunk.getVariableExportName(variable));
+ variable.setRenderNames(chunk.variableName, chunk.getVariableExportName(variable));
}
}
}
@@ -13564,7 +13575,7 @@
if (variable.included &&
// this will only happen for exports in some formats
!(variable.renderBaseName ||
- (variable instanceof ExportDefaultVariable && variable.referencesOriginal()))) {
+ (variable instanceof ExportDefaultVariable && variable.getOriginalVariable() !== variable))) {
variable.setRenderNames(null, getSafeName(variable.name, usedNames));
}
}
@@ -13862,6 +13873,7 @@
case 'name':
return this.getChunkName();
}
+ return undefined;
}), existingNames);
}
generateIdPreserveModules(preserveModulesRelativeDir, existingNames) {
@@ -14020,7 +14032,7 @@
// go through the other chunks and update their dependencies
// also update their import and reexport names in the process
for (const c of chunkList) {
- let includedDeclaration;
+ let includedDeclaration = undefined;
for (let i = 0; i < c.dependencies.length; i++) {
const dep = c.dependencies[i];
if ((dep === chunk || dep === this) && includedDeclaration) {
@@ -14063,7 +14075,7 @@
};
// Make sure the direct dependencies of a chunk are present to maintain execution order
for (const { module } of this.imports) {
- const chunkOrExternal = module instanceof Module ? module.chunk : module;
+ const chunkOrExternal = (module instanceof Module ? module.chunk : module);
if (this.dependencies.indexOf(chunkOrExternal) === -1) {
this.dependencies.push(chunkOrExternal);
}
@@ -14177,7 +14189,7 @@
this.finaliseDynamicImports(options.format);
const needsAmdModule = this.finaliseImportMetas(options);
const hasExports = this.renderedDeclarations.exports.length !== 0 ||
- this.renderedDeclarations.dependencies.some(dep => dep.reexports && dep.reexports.length !== 0);
+ this.renderedDeclarations.dependencies.some(dep => (dep.reexports && dep.reexports.length !== 0));
const usesTopLevelAwait = this.orderedModules.some(module => module.usesTopLevelAwait);
if (usesTopLevelAwait && options.format !== 'es' && options.format !== 'system') {
error({
@@ -14270,7 +14282,7 @@
const seen = new Set();
function visitDep(dep) {
if (seen.has(dep))
- return;
+ return undefined;
seen.add(dep);
if (dep instanceof Chunk$1) {
for (const subDep of dep.dependencies) {
@@ -14406,9 +14418,7 @@
for (const dep of this.dependencies) {
const imports = [];
for (const variable of this.imports) {
- const renderedVariable = variable instanceof ExportDefaultVariable && variable.referencesOriginal()
- ? variable.getOriginalVariable()
- : variable;
+ const renderedVariable = variable instanceof ExportDefaultVariable ? variable.getOriginalVariable() : variable;
if ((variable.module instanceof Module
? variable.module.chunk === dep
: variable.module === dep) &&
@@ -14418,7 +14428,7 @@
const imported = variable.module instanceof ExternalModule
? variable.name
: variable.module.chunk.getVariableExportName(variable);
- imports.push({ local, imported });
+ imports.push({ local, imported: imported });
}
}
const reexports = reexportDeclarations.get(dep);
@@ -14434,8 +14444,8 @@
exportsDefault = false;
namedExportsMode = dep.exportMode !== 'default';
}
- let id;
- let globalName;
+ let id = undefined;
+ let globalName = undefined;
if (dep instanceof ExternalModule) {
id = dep.renderPath;
if (options.format === 'umd' || options.format === 'iife') {
@@ -14471,15 +14481,14 @@
if (variable.init === UNDEFINED_EXPRESSION) {
uninitialized = true;
}
- variable.declarations.forEach(decl => {
- if (decl.type === ExportDefaultDeclaration) {
- if (decl.declaration.type === FunctionDeclaration)
+ for (const declaration of variable.declarations) {
+ if (declaration.parent instanceof FunctionDeclaration ||
+ (declaration instanceof ExportDefaultDeclaration &&
+ declaration.declaration instanceof FunctionDeclaration)) {
hoisted = true;
+ break;
}
- else if (decl.parent.type === FunctionDeclaration) {
- hoisted = true;
}
- });
}
else if (variable instanceof GlobalVariable) {
hoisted = true;
@@ -14573,7 +14582,7 @@
options.format !== 'system' &&
exportVariable.isReassigned &&
!exportVariable.isId &&
- (!isExportDefaultVariable(exportVariable) || !exportVariable.hasId)) {
+ !(exportVariable instanceof ExportDefaultVariable && exportVariable.hasId)) {
exportVariable.setRenderNames('exports', exportName);
}
else {
@@ -14640,7 +14649,7 @@
}
let execGroupIndex = 1;
let seekingFirstMergeCandidate = true;
- let lastChunk, chunk = execGroup[0], nextChunk = execGroup[1];
+ let lastChunk = undefined, chunk = execGroup[0], nextChunk = execGroup[1];
const isMergeCandidate = (chunk) => {
if (chunk.facadeModule !== null || chunk.manualChunkAlias !== null) {
return false;
@@ -14951,6 +14960,7 @@
case 'ext':
return path.extname(asset.name).substr(1);
}
+ return undefined;
}), existingNames);
}
function createAssetPluginHooks(assetsByReferenceId, outputBundle, assetFileNames) {
@@ -14958,7 +14968,7 @@
emitAsset(name, source) {
if (typeof name !== 'string' || !isPlainName(name))
error(errInvalidAssetName(name));
- const asset = { name, source, fileName: undefined };
+ const asset = { name, source: source, fileName: undefined };
if (outputBundle && source !== undefined)
finaliseAsset(asset, outputBundle, assetFileNames);
return addWithNewReferenceId(asset, assetsByReferenceId, name);
@@ -14966,11 +14976,11 @@
setAssetSource(assetReferenceId, source) {
const asset = assetsByReferenceId.get(assetReferenceId);
if (!asset)
- error(errAssetReferenceIdNotFoundForSetSource(assetReferenceId));
+ return error(errAssetReferenceIdNotFoundForSetSource(assetReferenceId));
if (asset.source !== undefined)
- error(errAssetSourceAlreadySet(asset));
+ return error(errAssetSourceAlreadySet(asset));
if (typeof source !== 'string' && !source)
- error(errAssetSourceMissingForSetSource(asset));
+ return error(errAssetSourceMissingForSetSource(asset));
asset.source = source;
if (outputBundle)
finaliseAsset(asset, outputBundle, assetFileNames);
@@ -14978,10 +14988,10 @@
getAssetFileName(assetReferenceId) {
const asset = assetsByReferenceId.get(assetReferenceId);
if (!asset)
- error(errAssetReferenceIdNotFoundForFilename(assetReferenceId));
- if (asset.fileName === undefined)
- error(errAssetNotFinalisedForFileName(asset));
- return asset.fileName;
+ return error(errAssetReferenceIdNotFoundForFilename(assetReferenceId));
+ if ((asset).fileName === undefined)
+ return error(errAssetNotFinalisedForFileName(asset));
+ return (asset).fileName;
}
};
}
@@ -15144,7 +15154,10 @@
transformChunk: 'renderChunk'
};
function createPluginDriver(graph, options, pluginCache, watcher) {
- const plugins = [...(options.plugins || []), getRollupDefaultPlugin(options.preserveSymlinks)];
+ const plugins = [
+ ...(options.plugins || []),
+ getRollupDefaultPlugin(options.preserveSymlinks)
+ ];
const { emitAsset, getAssetFileName, setAssetSource } = createAssetPluginHooks(graph.assetsById);
const existingPluginKeys = {};
let hasLoadersOrTransforms = false;
@@ -15206,12 +15219,12 @@
err.pluginCode = err.code;
err.code = 'PLUGIN_ERROR';
err.plugin = plugin.name || `Plugin at position ${pidx + 1}`;
- error(err);
+ return error(err);
},
isExternal(id, parentId, isResolved = false) {
return graph.moduleLoader.isExternal(id, parentId, isResolved);
},
- getAssetFileName,
+ getAssetFileName: getAssetFileName,
getChunkFileName(chunkReferenceId) {
return graph.moduleLoader.getChunkFileName(chunkReferenceId);
},
@@ -15266,7 +15279,7 @@
let context = pluginContexts[pluginIndex];
const hook = plugin[hookName];
if (!hook)
- return;
+ return undefined;
const deprecatedHookNewName = deprecatedHookNames[hookName];
if (deprecatedHookNewName)
context.warn(hookDeprecationWarning(hookName, deprecatedHookNewName, plugin, pluginIndex));
@@ -15300,13 +15313,14 @@
err.hook = hookName;
error(err);
}
+ return undefined;
}
function runHook(hookName, args, pluginIndex, permitValues = false, hookContext) {
const plugin = plugins[pluginIndex];
let context = pluginContexts[pluginIndex];
const hook = plugin[hookName];
if (!hook)
- return;
+ return undefined;
const deprecatedHookNewName = deprecatedHookNames[hookName];
if (deprecatedHookNewName)
context.warn(hookDeprecationWarning(hookName, deprecatedHookNewName, plugin, pluginIndex));
@@ -15344,7 +15358,7 @@
}
const pluginDriver = {
emitAsset,
- getAssetFileName,
+ getAssetFileName: getAssetFileName,
hasLoadersOrTransforms,
// chains, ignores returns
hookSeq(name, args, hookContext) {
@@ -15603,7 +15617,7 @@
return graph.pluginDriver
.hookReduceArg0('transform', [curSource, id], transformReducer, (pluginContext, plugin) => {
curPlugin = plugin;
- if (plugin.cacheKey)
+ if (curPlugin.cacheKey)
customTransformCache = true;
else
trackedPluginCache = trackPluginCache(pluginContext.cache);
@@ -15625,7 +15639,7 @@
augmentCodeLocation(err, pos, curSource, id);
err.id = id;
err.hook = 'transform';
- pluginContext.error(err);
+ return pluginContext.error(err);
},
emitAsset,
addWatchFile(id) {
@@ -15664,7 +15678,7 @@
if (!customTransformCache && setAssetSourceErr)
throw setAssetSourceErr;
return {
- ast,
+ ast: ast,
code,
customTransformCache,
moduleSideEffects,
@@ -15725,7 +15739,7 @@
.then((resolveIdResult) => {
if (resolveIdResult === false ||
(resolveIdResult && typeof resolveIdResult === 'object' && resolveIdResult.external)) {
- error(errEntryCannotBeExternal(unresolvedId));
+ return error(errEntryCannotBeExternal(unresolvedId));
}
const id = resolveIdResult && typeof resolveIdResult === 'object'
? resolveIdResult.id
@@ -15734,21 +15748,22 @@
return this.fetchModule(id, undefined, true, isEntry).then(module => {
if (alias !== null) {
if (module.chunkAlias !== null && module.chunkAlias !== alias) {
- error(errCannotAssignModuleToChunk(module.id, alias, module.chunkAlias));
+ return error(errCannotAssignModuleToChunk(module.id, alias, module.chunkAlias));
}
module.chunkAlias = alias;
}
return module;
});
}
- error(errUnresolvedEntry(unresolvedId));
+ return error(errUnresolvedEntry(unresolvedId));
});
this.graph = graph;
this.modulesById = modulesById;
this.pluginDriver = pluginDriver;
this.isExternal = getIdMatcher(external);
this.hasModuleSideEffects = getHasModuleSideEffects(moduleSideEffects, pureExternalModules, graph);
- this.getManualChunk = typeof getManualChunk === 'function' ? getManualChunk : () => null;
+ this.getManualChunk =
+ typeof getManualChunk === 'function' ? getManualChunk : () => null;
}
addEntryModuleAndGetReferenceId(unresolvedEntryModule) {
const entryRecord = {
@@ -15801,13 +15816,13 @@
getChunkFileName(referenceId) {
const entryRecord = this.entriesByReferenceId.get(referenceId);
if (!entryRecord)
- error(errChunkReferenceIdNotFoundForFilename(referenceId));
+ return error(errChunkReferenceIdNotFoundForFilename(referenceId));
const fileName = entryRecord.module &&
(entryRecord.module.facadeChunk
? entryRecord.module.facadeChunk.id
: entryRecord.module.chunk.id);
if (!fileName)
- error(errChunkNotGeneratedForFileName(entryRecord));
+ return error(errChunkNotGeneratedForFileName(entryRecord));
return fileName;
}
resolveId(source, importer, skip) {
@@ -15886,7 +15901,7 @@
return { code: source };
if (source && typeof source === 'object' && typeof source.code === 'string')
return source;
- error(errBadLoader(id));
+ return error(errBadLoader(id));
})
.then(sourceDescription => {
const cachedModule = this.graph.cachedModules.get(id);
@@ -15938,8 +15953,8 @@
this.modulesById.set(resolvedId.id, new ExternalModule(this.graph, resolvedId.id, resolvedId.moduleSideEffects));
}
const externalModule = this.modulesById.get(resolvedId.id);
- if (externalModule instanceof ExternalModule === false) {
- error(errInternalIdCannotBeExternal(source, importer));
+ if (!(externalModule instanceof ExternalModule)) {
+ return error(errInternalIdCannotBeExternal(source, importer));
}
return Promise.resolve(externalModule);
}
@@ -16224,7 +16239,9 @@
? [acornInjectPlugins]
: []));
this.acornParser = acorn.Parser.extend(...acornPluginsToInject);
- this.moduleLoader = new ModuleLoader(this, this.moduleById, this.pluginDriver, options.external, typeof options.manualChunks === 'function' && options.manualChunks, this.treeshake ? this.treeshakingOptions.moduleSideEffects : null, this.treeshake ? this.treeshakingOptions.pureExternalModules : false);
+ this.moduleLoader = new ModuleLoader(this, this.moduleById, this.pluginDriver, options.external, (typeof options.manualChunks === 'function' && options.manualChunks), (this.treeshake
+ ? this.treeshakingOptions.moduleSideEffects
+ : null), (this.treeshake ? this.treeshakingOptions.pureExternalModules : false));
}
build(entryModules, manualChunks, inlineDynamicImports) {
// Phase 1 – discovery. We load the entry module and find which
@@ -16233,9 +16250,9 @@
timeStart('parse modules', 2);
return Promise.all([
this.moduleLoader.addEntryModules(normalizeEntryModules(entryModules), true),
- manualChunks &&
+ (manualChunks &&
typeof manualChunks === 'object' &&
- this.moduleLoader.addManualChunks(manualChunks)
+ this.moduleLoader.addManualChunks(manualChunks))
]).then(([{ entryModules, manualChunkModulesByAlias }]) => {
if (entryModules.length === 0) {
throw new Error('You must supply options.input to rollup');
@@ -16614,7 +16631,11 @@
const configExternal = config.external;
return typeof configExternal === 'function'
? (id, ...rest) => configExternal(id, ...rest) || command.external.indexOf(id) !== -1
- : (configExternal || []).concat(command.external);
+ : (typeof config.external === 'string'
+ ? [configExternal]
+ : Array.isArray(configExternal)
+ ? configExternal
+ : []).concat(command.external);
};
const commandAliases = {
c: 'config',
@@ -16660,22 +16681,21 @@
errors.push(`Unknown ${optionType}: ${unknownOptions.join(', ')}. Allowed options: ${validOptions.sort().join(', ')}`);
}
function getCommandOptions(rawCommandOptions) {
- const command = Object.assign({}, rawCommandOptions);
- command.external = rawCommandOptions.external ? rawCommandOptions.external.split(',') : [];
- if (rawCommandOptions.globals) {
- command.globals = Object.create(null);
- rawCommandOptions.globals.split(',').forEach((str) => {
- const names = str.split(':');
- command.globals[names[0]] = names[1];
- // Add missing Module IDs to external.
- if (command.external.indexOf(names[0]) === -1) {
- command.external.push(names[0]);
- }
- });
- }
- return command;
+ const external = rawCommandOptions.external && typeof rawCommandOptions.external === 'string'
+ ? rawCommandOptions.external.split(',')
+ : [];
+ return Object.assign({}, rawCommandOptions, { external, globals: typeof rawCommandOptions.globals === 'string'
+ ? rawCommandOptions.globals.split(',').reduce((globals, globalDefinition) => {
+ const [id, variableName] = globalDefinition.split(':');
+ globals[id] = variableName;
+ if (external.indexOf(id) === -1) {
+ external.push(id);
+ }
+ return globals;
+ }, Object.create(null))
+ : undefined });
}
-function getInputOptions(config, command = {}, defaultOnWarnHandler) {
+function getInputOptions(config, command = { external: [], globals: undefined }, defaultOnWarnHandler) {
const getOption = createGetOption(config, command);
const inputOptions = {
acorn: config.acorn,
@@ -16948,7 +16968,7 @@
}
const cache = useCache ? graph.getCache() : undefined;
const result = {
- cache,
+ cache: cache,
generate: ((rawOutputOptions) => {
const promise = generate(getOutputOptions(rawOutputOptions), false).then(result => createOutput(result));
Object.defineProperty(promise, 'code', throwAsyncGenerateError);
@@ -33988,6 +34008,7 @@
this.outputFiles = this.outputs.map(output => {
if (output.file || output.dir)
return path__default.resolve(output.file || output.dir);
+ return undefined;
});
const watchOptions = inputOptions.watch || {};
if ('useChokidar' in watchOptions)
@@ -34036,7 +34057,7 @@
return rollup(options)
.then(result => {
if (this.closed)
- return;
+ return undefined;
const watched = (this.watched = new Set());
this.cache = result.cache;
this.watchFiles = result.watchFiles;

package.json

@@ -1,6 +1,6 @@
{
"name": "rollup",
- "version": "1.12.2",
+ "version": "1.12.3",
"description": "Next-generation ES module bundler",
"main": "dist/rollup.js",
"module": "dist/rollup.es.js",