@rollup/browser 4.9.4 → 4.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rollup.browser.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.9.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.9.6
|
|
4
|
+
Sun, 21 Jan 2024 05:51:51 GMT - commit ecb6b0a430098052781aa6ee04ec92ee70960321
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
8
8
|
Released under the MIT License.
|
|
9
9
|
*/
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rollup={})}(this,(function(e){var t="undefined"!=typeof document?document.currentScript:null,n="4.9.4";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i={exports:{}};!function(e,t){!function(e){const t=",".charCodeAt(0),n=";".charCodeAt(0),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;e<s.length;e++){const t=s.charCodeAt(e);i[e]=t,r[t]=e}const o="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}};function a(e){const t=new Int32Array(5),n=[];let s=0;do{const i=l(e,s),r=[];let o=!0,a=0;t[0]=0;for(let n=s;n<i;n++){let s;n=c(e,n,t,0);const l=t[0];l<a&&(o=!1),a=l,d(e,n,i)?(n=c(e,n,t,1),n=c(e,n,t,2),n=c(e,n,t,3),d(e,n,i)?(n=c(e,n,t,4),s=[l,t[1],t[2],t[3],t[4]]):s=[l,t[1],t[2],t[3]]):s=[l],r.push(s)}o||u(r),n.push(r),s=i+1}while(s<=e.length);return n}function l(e,t){const n=e.indexOf(";",t);return-1===n?e.length:n}function c(e,t,n,s){let i=0,o=0,a=0;do{const n=e.charCodeAt(t++);a=r[n],i|=(31&a)<<o,o+=5}while(32&a);const l=1&i;return i>>>=1,l&&(i=-2147483648|-i),n[s]+=i,t}function d(e,n,s){return!(n>=s)&&e.charCodeAt(n)!==t}function u(e){e.sort(h)}function h(e,t){return e[0]-t[0]}function p(e){const s=new Int32Array(5),i=16384,r=i-36,a=new Uint8Array(i),l=a.subarray(0,r);let c=0,d="";for(let u=0;u<e.length;u++){const h=e[u];if(u>0&&(c===i&&(d+=o.decode(a),c=0),a[c++]=n),0!==h.length){s[0]=0;for(let e=0;e<h.length;e++){const n=h[e];c>r&&(d+=o.decode(l),a.copyWithin(0,r,c),c-=r),e>0&&(a[c++]=t),c=f(a,c,s,n,0),1!==n.length&&(c=f(a,c,s,n,1),c=f(a,c,s,n,2),c=f(a,c,s,n,3),4!==n.length&&(c=f(a,c,s,n,4)))}}}return d+o.decode(a.subarray(0,c))}function f(e,t,n,s,r){const o=s[r];let a=o-n[r];n[r]=o,a=a<0?-a<<1|1:a<<1;do{let n=31&a;a>>>=5,a>0&&(n|=32),e[t++]=i[n]}while(a>0);return t}e.decode=a,e.encode=p,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,i.exports);var r=i.exports;class o{constructor(e){this.bits=e instanceof o?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let a=class e{constructor(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,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(e){return this.start<e&&e<this.end}eachNext(e){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;for(;t;)e(t),t=t.previous}edit(e,t,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}split(t){const n=t-this.start,s=this.original.slice(0,n),i=this.original.slice(n);this.original=s;const r=new e(t,this.end,i);return r.outro=this.outro,this.outro="",this.end=t,this.edited?(r.edit("",!1),this.content=""):this.content=s,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){const e=this.split(this.end-t.length);this.edited&&e.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}return this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0}};function l(){return"undefined"!=typeof window&&"function"==typeof window.btoa?e=>window.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const c=l();class d{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=r.encode(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+c(this.toString())}}function u(e,t){const n=e.split(/[/\\]/),s=t.split(/[/\\]/);for(n.pop();n[0]===s[0];)n.shift(),s.shift();if(n.length){let e=n.length;for(;e--;)n[e]=".."}return n.concat(s).join("/")}const h=Object.prototype.toString;function p(e){return"[object Object]"===h.call(e)}function f(e){const t=e.split("\n"),n=[];for(let e=0,s=0;e<t.length;e++)n.push(s),s+=t[e].length+1;return function(e){let t=0,s=n.length;for(;t<s;){const i=t+s>>1;e<n[i]?s=i:t=i+1}const i=t-1;return{line:i,column:e-n[i]}}}const m=/\w/;class g{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,n,s){if(t.length){let i=t.indexOf("\n",0),r=-1;for(;i>=0;){const o=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&o.push(s),this.rawSegments.push(o),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,r=i,i=t.indexOf("\n",i+1)}const o=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&o.push(s),this.rawSegments.push(o),this.advance(t.slice(r+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,n,s,i){let r=t.start,o=!0,a=!1;for(;r<t.end;){if(this.hires||o||i.has(r)){const t=[this.generatedCodeColumn,e,s.line,s.column];"boundary"===this.hires?m.test(n[r])?a||(this.rawSegments.push(t),a=!0):(this.rawSegments.push(t),a=!1):this.rawSegments.push(t)}"\n"===n[r]?(s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0):(s.column+=1,this.generatedCodeColumn+=1,o=!1),r+=1}this.pending=null}advance(e){if(!e)return;const t=e.split("\n");if(t.length>1){for(let e=0;e<t.length-1;e++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}}const y="\n",b={insertLeft:!1,insertRight:!1,storeName:!1};class E{constructor(e,t={}){const n=new a(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:new o},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList}}),this.byStart[0]=n,this.byEnd[e.length]=n}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this}appendRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this}clone(){const e=new E(this.original,{filename:this.filename});let t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;const s=t.next,i=s&&s.clone();i&&(n.next=i,i.previous=n,n=i),t=s}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new o(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),n=new g(e.hires),s=f(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext((e=>{const i=s(e.start);e.intro.length&&n.advance(e.intro),e.edited?n.addEdit(0,e.content,i,e.storeName?t.indexOf(e.original):-1):n.addUneditedChunk(0,e,this.original,i,this.sourcemapLocations),e.outro.length&&n.advance(e.outro)})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?u(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:n.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new d(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),n=t.filter((e=>/^\t+/.test(e))),s=t.filter((e=>/^ {2,}/.test(e)));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce(((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)}),1/0);return new Array(i+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const n=/^[^\r\n]/gm;if(p(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const s={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach((e=>{for(let t=e[0];t<e[1];t+=1)s[t]=!0}))}let i=!1!==t.indentStart;const r=t=>i?`${e}${t}`:(i=!0,t);this.intro=this.intro.replace(n,r);let o=0,a=this.firstChunk;for(;a;){const t=a.end;if(a.edited)s[o]||(a.content=a.content.replace(n,r),a.content.length&&(i="\n"===a.content[a.content.length-1]));else for(o=a.start;o<t;){if(!s[o]){const t=this.original[o];"\n"===t?i=!0:"\r"!==t&&i&&(i=!1,o===a.start||(this._splitChunk(a,o),a=a.next),a.prependRight(e))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(n,r),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return b.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),b.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return b.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),b.insertRight=!0),this.prependRight(e,t)}move(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);const s=this.byStart[e],i=this.byEnd[t],r=s.previous,o=i.next,a=this.byStart[n];if(!a&&i===this.lastChunk)return this;const l=a?a.previous:this.lastChunk;return r&&(r.next=o),o&&(o.previous=r),l&&(l.next=s),a&&(a.previous=i),s.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=l,i.next=a||null,l||(this.firstChunk=s),a||(this.lastChunk=i),this}overwrite(e,t,n,s){return s=s||{},this.update(e,t,n,{...s,overwrite:!s.contentOnly})}update(e,t,n,s){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===s&&(b.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),b.storeName=!0),s={storeName:!0});const i=void 0!==s&&s.storeName,r=void 0!==s&&s.overwrite;if(i){const n=this.original.slice(e,t);Object.defineProperty(this.storedNames,n,{writable:!0,value:!0,enumerable:!0})}const o=this.byStart[e],l=this.byEnd[t];if(o){let e=o;for(;e!==l;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}o.edit(n,i,!r)}else{const s=new a(e,t,"").edit(n,i);l.next=s,s.previous=l}return this}prepend(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this}remove(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);let n=this.byStart[e];for(;n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let 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]:""}lastLine(){let e=this.outro.lastIndexOf(y);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(e=n.outro.lastIndexOf(y),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(y),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(y),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return e=this.intro.lastIndexOf(y),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;let n="",s=this.firstChunk;for(;s&&(s.start>e||s.end<=e);){if(s.start<t&&s.end>=t)return n;s=s.next}if(s&&s.edited&&s.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const i=s;for(;s;){!s.intro||i===s&&s.start!==e||(n+=s.intro);const r=s.start<t&&s.end>=t;if(r&&s.edited&&s.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const o=i===s?e-s.start:0,a=r?s.content.length+t-s.end:s.content.length;if(n+=s.content.slice(o,a),!s.outro||r&&s.end!==t||(n+=s.outro),r)break;s=s.next}return n}snip(e,t){const n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const n=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=f(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`)}const n=e.split(t);return this.byEnd[t]=e,this.byStart[t]=n,this.byEnd[n.end]=n,e===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let 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}length(){let e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let n=this.lastChunk;do{const e=n.end,s=n.trimEnd(t);if(n.end!==e&&(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),s)return!0;n=n.previous}while(n);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let n=this.firstChunk;do{const e=n.end,s=n.trimStart(t);if(n.end!==e&&(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),s)return!0;n=n.next}while(n);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function n(e,n){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,((t,n)=>{if("$"===n)return"$";if("&"===n)return e[0];return+n<e.length?e[+n]:`$${n}`})):t(...e,e.index,n,e.groups)}if(e.global){(function(e,t){let n;const s=[];for(;n=e.exec(t);)s.push(n);return s})(e,this.original).forEach((e=>{null!=e.index&&this.overwrite(e.index,e.index+e[0].length,n(e,this.original))}))}else{const t=this.original.match(e);t&&null!=t.index&&this.overwrite(t.index,t.index+t[0].length,n(t,this.original))}return this}_replaceString(e,t){const{original:n}=this,s=n.indexOf(e);return-1!==s&&this.overwrite(s,s+e.length,t),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:n}=this,s=e.length;for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s))this.overwrite(i,i+s,t);return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}const x=Object.prototype.hasOwnProperty;let $=class e{constructor(e={}){this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof E)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!p(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","ignoreList","indentExclusionRanges","separator"].forEach((t=>{x.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(x.call(this.uniqueSourceIndexByFilename,e.filename)){const 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}append(e,t){return this.addSource({content:new E(e),separator:t&&t.separator||""}),this}clone(){const t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach((e=>{t.addSource({filename:e.filename,content:e.content.clone(),separator:e.separator})})),t}generateDecodedMap(e={}){const t=[];let n;this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{~t.indexOf(e)||t.push(e)}))}));const s=new g(e.hires);return this.intro&&s.advance(this.intro),this.sources.forEach(((e,i)=>{i>0&&s.advance(this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=f(o.original);o.intro&&s.advance(o.intro),o.firstChunk.eachNext((n=>{const i=a(n.start);n.intro.length&&s.advance(n.intro),e.filename?n.edited?s.addEdit(r,n.content,i,n.storeName?t.indexOf(n.original):-1):s.addUneditedChunk(r,n,o.original,i,o.sourcemapLocations):s.advance(n.content),n.outro.length&&s.advance(n.outro)})),o.outro&&s.advance(o.outro),e.ignoreList&&-1!==r&&(void 0===n&&(n=[]),n.push(r))})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map((t=>e.file?u(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:s.raw,x_google_ignoreList:n}}generateMap(e){return new d(this.generateDecodedMap(e))}getIndentString(){const e={};return this.sources.forEach((t=>{const n=t.content._getRawIndentString();null!==n&&(e[n]||(e[n]=0),e[n]+=1)})),Object.keys(e).sort(((t,n)=>e[t]-e[n]))[0]||"\t"}indent(e){if(arguments.length||(e=this.getIndentString()),""===e)return this;let t=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach(((n,s)=>{const i=void 0!==n.separator?n.separator:this.separator,r=t||s>0&&/\r?\n$/.test(i);n.content.indent(e,{exclude:n.indentExclusionRanges,indentStart:r}),t="\n"===n.content.lastChar()})),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,((t,n)=>n>0?e+t:t))),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map(((e,t)=>{const n=void 0!==e.separator?e.separator:this.separator;return(t>0?n:"")+e.content.toString()})).join("");return this.intro+e}isEmpty(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some((e=>!e.content.isEmpty()))}length(){return this.sources.reduce(((e,t)=>e+t.content.length()),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){let t,n=0;do{if(t=this.sources[n++],!t)break}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let n,s=this.sources.length-1;do{if(n=this.sources[s--],!n){this.intro=this.intro.replace(t,"");break}}while(!n.content.trimEndAborted(e));return this}};const A=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,S=/^\.?\.\//,w=/\\/g,v=/[/\\]/,I=/\.[^.]+$/;function P(e){return A.test(e)}function k(e){return S.test(e)}function N(e){return e.replace(w,"/")}function C(e){return e.split(v).pop()||""}function O(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function M(e){const t=I.exec(C(e));return t?t[0]:""}function D(e,t){const n=e.split(v).filter(Boolean),s=t.split(v).filter(Boolean);for("."===n[0]&&n.shift(),"."===s[0]&&s.shift();n[0]&&s[0]&&n[0]===s[0];)n.shift(),s.shift();for(;".."===s[0]&&n.length>0;)s.shift(),n.pop();for(;n.pop();)s.unshift("..");return s.join("/")}function R(...e){const t=e.shift();if(!t)return"/";let n=t.split(v);for(const t of e)if(P(t))n=t.split(v);else{const e=t.split(v);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&n.pop()}n.push(...e)}return n.join("/")}const _=/[\n\r'\\\u2028\u2029]/,L=/([\n\r'\u2028\u2029])/g,B=/\\/g;function T(e){return _.test(e)?e.replace(B,"\\\\").replace(L,"\\$1"):e}function z(e){const t=C(e);return t.slice(0,Math.max(0,t.length-M(e).length))}function V(e){return P(e)?D(R(),e):e}function F(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||P(e)}const j=/^(\.\.\/)*\.\.$/;function U(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=N(D(O(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+C(t);if(j.test(i))return[...i.split("/"),"..",C(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}class G{constructor(e,t,n){this.options=t,this.inputBase=n,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAttributes=null,this.id=e.id,this.moduleInfo=e.info,this.renormalizeRenderPath=e.renormalizeRenderPath,this.suggestedVariableName=e.suggestedVariableName}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options;return this.fileName=("function"==typeof e?e(this.id):e[this.id])||(this.renormalizeRenderPath?N(D(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=function(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(n.length>0)return t(n,{lineBreakIndent:null});return null}("es"===this.options.format&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return T(this.renormalizeRenderPath?U(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function W(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function H(){return new Set}function q(){return[]}const K=Symbol("Unknown Key"),Y=Symbol("Unknown Non-Accessor Key"),J=Symbol("Unknown Integer"),X=Symbol("Symbol.toStringTag"),Z=[],Q=[K],ee=[Y],te=[J],ne=Symbol("Entities");class se{constructor(){this.entityPaths=Object.create(null,{[ne]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const n=this.getEntities(e);return!!n.has(t)||(n.add(t),!1)}withTrackedEntityAtPath(e,t,n,s){const i=this.getEntities(e);if(i.has(t))return s;i.add(t);const r=n();return i.delete(t),r}getEntities(e){let t=this.entityPaths;for(const n of e)t=t[n]=t[n]||Object.create(null,{[ne]:{value:new Set}});return t[ne]}}const ie=new se;class re{constructor(){this.entityPaths=Object.create(null,{[ne]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]=s[t]||Object.create(null,{[ne]:{value:new Map}});const i=W(s[ne],t,H);return!!i.has(n)||(i.add(n),!1)}}function oe(e,t){return 0!=(e&t)}function ae(e,t,n){return e&~t|-n&t}const le=Symbol("Unknown Value"),ce=Symbol("Unknown Truthy Value");class de{constructor(){this.flags=0}get included(){return oe(this.flags,1)}set included(e){this.flags=ae(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){pe(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return le}getReturnExpressionWhenCalledAtPath(e,t,n,s){return he}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included=!0}includeCallArguments(e,t){for(const n of t)n.include(e,!1)}shouldBeIncluded(e){return!0}}const ue=new class extends de{},he=[ue,!1],pe=e=>{for(const t of e.args)t?.deoptimizePath(Q)},fe={args:[null],type:0},me={args:[null,ue],type:1},ge={args:[null],type:2,withNew:!1};class ye extends de{constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.initReached=!1,this.isId=!1,this.isReassigned=!1,this.kind=null,this.renderBaseName=null,this.renderName=null}addReference(e){}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,t){if(t?.(this))return this.name;if(this.renderedLikeHoisted)return this.renderedLikeHoisted.getName(e,t);const n=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(n)}`:n}hasEffectsOnInteractionAtPath(e,{type:t},n){return 0!==t||e.length>0}include(){this.included=!0,this.renderedLikeHoisted?.include()}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class be extends ye{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>(this.isNamespace?1:0)}include(){super.include(),this.module.used=!0}}const Ee=Object.freeze(Object.create(null)),xe=Object.freeze({}),$e=Object.freeze([]),Ae=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}}),Se=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]),we=/[^\w$]/g,ve=e=>(e=>/\d/.test(e[0]))(e)||Se.has(e)||"arguments"===e;function Ie(e){return e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(we,"_"),ve(e)&&(e=`_${e}`),e||"_"}const Pe=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,ke=/^(?:0|[1-9]\d*)$/;function Ne(e){return Pe.test(e)?"__proto__"===e?'["__proto__"]':e:ke.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function Ce(e){return Pe.test(e)?e:JSON.stringify(e)}const Oe="warn",Me="info",De="debug",Re={[De]:0,[Me]:1,silent:3,[Oe]:2};function _e(e,t){return e.start<=t&&t<e.end}function Le(e,t,n){return function(e,t={}){const{offsetLine:n=0,offsetColumn:s=0}=t;let i=0;const r=e.split("\n").map(((e,t)=>{const n=i+e.length+1,s={start:i,end:n,line:t};return i=n,s}));let o=0;return function(t,i){if("string"==typeof t&&(t=e.indexOf(t,i??0)),-1===t)return;let a=r[o];const l=t>=a.end?1:-1;for(;a;){if(_e(a,t))return{line:n+a.line,column:s+t-a.start,character:t};o+=l,a=r[o]}}}(e,n)(t,n&&n.startIndex)}function Be(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const Te=120,ze=10,Ve="...";function Fe(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(Be(s[t-1].slice(0,n)).length+ze+Ve.length,Te),r=Math.max(0,t-3);let o=Math.min(t+2,s.length);for(s=s.slice(r,o);!/\S/.test(s[s.length-1]);)s.pop(),o-=1;const a=String(o).length;return s.map(((e,s)=>{const o=r+s+1===t;let l=String(s+r+1);for(;l.length<a;)l=` ${l}`;let c=Be(e);if(c.length>i&&(c=`${c.slice(0,i-Ve.length)}${Ve}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+Be(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`})).join("\n")}function je(e,t){const n=e.length<=1,s=e.map((e=>`"${e}"`));let i=n?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;return t&&(i+=` ${n?t[0]:t[1]}`),i}function Ue(e){return`https://rollupjs.org/${e}`}const Ge="troubleshooting/#error-name-is-not-exported-by-module",We="troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect",He="configuration-options/#output-amd-id",qe="configuration-options/#output-dir",Ke="configuration-options/#output-exports",Ye="configuration-options/#output-extend",Je="configuration-options/#output-format",Xe="configuration-options/#output-globals",Ze="configuration-options/#output-inlinedynamicimports",Qe="configuration-options/#output-interop",et="configuration-options/#output-manualchunks",tt="configuration-options/#output-name",nt="configuration-options/#output-sourcemapfile";function st(e){throw e instanceof Error||(e=Object.assign(new Error(e.message),e),Object.defineProperty(e,"name",{value:"RollupError",writable:!0})),e}function it(e,t,n,s){if("object"==typeof t){const{line:n,column:i}=t;e.loc={column:i,file:s,line:n}}else{e.pos=t;const i=Le(n,t,{offsetLine:1});if(!i)return;const{line:r,column:o}=i;e.loc={column:o,file:s,line:r}}if(void 0===e.frame){const{line:t,column:s}=e.loc;e.frame=Fe(n,t,s)}}const rt="ADDON_ERROR",ot="ALREADY_CLOSED",at="ANONYMOUS_PLUGIN_CACHE",lt="ASSET_NOT_FINALISED",ct="CANNOT_EMIT_FROM_OPTIONS_HOOK",dt="CHUNK_NOT_GENERATED",ut="CIRCULAR_REEXPORT",ht="DEPRECATED_FEATURE",pt="DUPLICATE_PLUGIN_NAME",ft="FILE_NAME_CONFLICT",mt="ILLEGAL_IDENTIFIER_AS_NAME",gt="INVALID_CHUNK",yt="INVALID_EXPORT_OPTION",bt="INVALID_IMPORT_ATTRIBUTE",Et="INVALID_LOG_POSITION",xt="INVALID_OPTION",$t="INVALID_PLUGIN_HOOK",At="INVALID_SETASSETSOURCE",St="MISSING_EXPORT",wt="MISSING_GLOBAL_NAME",vt="MISSING_IMPLICIT_DEPENDANT",It="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",Pt="MISSING_NODE_BUILTINS",kt="MISSING_OPTION",Nt="MIXED_EXPORTS",Ct="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",Ot="OPTIMIZE_CHUNK_STATUS",Mt="PARSE_ERROR",Dt="PLUGIN_ERROR",Rt="SOURCEMAP_BROKEN",_t="UNEXPECTED_NAMED_IMPORT",Lt="UNKNOWN_OPTION",Bt="UNRESOLVED_ENTRY",Tt="UNRESOLVED_IMPORT",zt="VALIDATION_ERROR";function Vt(){return{code:ot,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function Ft(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function jt({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return it(i,n,t,e),i}function Ut(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(V).join(" -> ")}`}}function Gt(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${V(t)} is at (${n}:${s})\n${Fe(e,n,s)}`}}function Wt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${V(t)}".`}}function Ht(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${V(s)}" tried to import "${V(n)}" with ${qt(t)} attributes, but it was already imported elsewhere with ${qt(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const qt=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function Kt(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${V(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:Ue("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function Yt(e,t,n){return{code:yt,message:`"${e}" was specified for "output.exports", but entry module "${V(n)}" has the following exports: ${je(t)}`,url:Ue(Ke)}}function Jt(e){return{code:bt,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${V(e)}". Import attributes need to have string keys and values. The attribute will be removed.`}}function Xt(e,t,n,s){return{code:xt,message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:Ue(t)}}function Zt(e,t,n){const s=".json"===M(n);return{binding:e,code:St,exporter:n,id:t,message:`"${e}" is not exported by "${V(n)}", imported by "${V(t)}".${s?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:Ue(Ge)}}function Qt(e){const t=[...e.implicitlyLoadedBefore].map((e=>V(e.id))).sort();return{code:vt,message:`Module "${V(e.id)}" that should be implicitly loaded before ${je(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function en(e,t,n){return{code:Ot,message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function tn(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function nn(e,t){let n=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?n+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),{cause:e,code:Mt,id:t,message:n,stack:e.stack}}function sn(e,t,{hook:n,id:s}={}){const i=e.code;return e.pluginCode||null==i||"string"==typeof i&&i.startsWith("PLUGIN_")||(e.pluginCode=i),e.code=Dt,e.plugin=t,n&&(e.hook=n),s&&(e.id=s),e}function rn(e){return{code:Rt,message:`Multiple conflicting contents for sourcemap source ${e}`}}function on(e,t,n){const s=n?"reexport":"import";return{code:_t,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${V(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:Ue(Qe)}}function an(e){return{code:_t,exporter:e,message:`There was a namespace "*" reexport from the external module "${V(e)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:Ue(Qe)}}function ln(e){return{code:zt,message:e}}function cn(e,t,n,s,i){!function(e,t,n,s,i,r){if(n||i){const n=function(e,t,n){return{code:ht,message:e,url:Ue(t),...n?{plugin:n}:{}}}(e,t,r);if(i)return st(n);s(Oe,n)}}(e,t,n,s.onLog,s.strictDeprecations,i)}class dn{constructor(e,t,n,s,i,r){this.options=e,this.id=t,this.renormalizeRenderPath=i,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=Ie(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:$e,dynamicallyImportedIds:$e,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:$e,implicitlyLoadedBefore:$e,importedIdResolutions:$e,importedIds:$e,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,syntheticNamedExports:!1}}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const n=new be(this,e);return this.declarations.set(e,n),this.exportedVariables.set(n,e),[n]}suggestName(e){const t=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,t),t>this.mostCommonSuggestion&&(this.mostCommonSuggestion=t,this.suggestedVariableName=e)}warnUnusedImports(){const e=[...this.declarations].filter((([e,t])=>"*"!==e&&!t.included&&!this.reexported&&!t.referenced)).map((([e])=>e));if(0===e.length)return;const t=new Set;for(const n of e)for(const e of this.declarations.get(n).module.importers)t.add(e);const n=[...t];var s,i,r;this.options.onLog(Oe,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${je(i=e,["is","are"])} imported from external module "${s}" but never used in ${je(r.map((e=>V(e))))}.`,names:i})}}const un={ArrayPattern(e,t){for(const n of t.elements)n&&un[n.type](e,n)},AssignmentPattern(e,t){un[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?un.RestElement(e,n):un[n.value.type](e,n.value)},RestElement(e,t){un[t.argument.type](e,t.argument)}},hn=function(e){const t=[];return un[e.type](t,e),t};function pn(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function fn(){return{accessed:new se,assigned:new se,brokenFlow:!1,called:new re,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new re,replacedVariableInits:new Map}}function mn(e,t=null){return Object.create(t,e)}new Set("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 arguments 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(" ")).add("");const gn=new class extends de{getLiteralValueAtPath(){}},yn={value:{hasEffectsWhenCalled:null,returns:ue}},bn=new class extends de{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?On(In,e[0]):he}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Cn(In,e[0],t,n)}},En={value:{hasEffectsWhenCalled:null,returns:bn}},xn=new class extends de{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?On(Pn,e[0]):he}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Cn(Pn,e[0],t,n)}},$n={value:{hasEffectsWhenCalled:null,returns:xn}},An=new class extends de{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?On(Nn,e[0]):he}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Cn(Nn,e[0],t,n)}},Sn={value:{hasEffectsWhenCalled:null,returns:An}},wn={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(Z,ie,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(Z,ge,t)},returns:An}},vn=mn({hasOwnProperty:En,isPrototypeOf:En,propertyIsEnumerable:En,toLocaleString:Sn,toString:Sn,valueOf:yn}),In=mn({valueOf:En},vn),Pn=mn({toExponential:Sn,toFixed:Sn,toLocaleString:Sn,toPrecision:Sn,valueOf:$n},vn),kn=mn({exec:yn,test:En},vn),Nn=mn({anchor:Sn,at:yn,big:Sn,blink:Sn,bold:Sn,charAt:Sn,charCodeAt:$n,codePointAt:yn,concat:Sn,endsWith:En,fixed:Sn,fontcolor:Sn,fontsize:Sn,includes:En,indexOf:$n,italics:Sn,lastIndexOf:$n,link:Sn,localeCompare:$n,match:yn,matchAll:yn,normalize:Sn,padEnd:Sn,padStart:Sn,repeat:Sn,replace:wn,replaceAll:wn,search:$n,slice:Sn,small:Sn,split:yn,startsWith:En,strike:Sn,sub:Sn,substr:Sn,substring:Sn,sup:Sn,toLocaleLowerCase:Sn,toLocaleUpperCase:Sn,toLowerCase:Sn,toString:Sn,toUpperCase:Sn,trim:Sn,trimEnd:Sn,trimLeft:Sn,trimRight:Sn,trimStart:Sn,valueOf:Sn},vn);function Cn(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function On(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:he}const Mn=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects"],Dn=(e,t)=>Rn(0,new Uint32Array(e),t),Rn=(e,t,n)=>{const s=t[e],i=_n[s];if(!i)throw console.trace(),new Error(`Unknown node type: ${s}`);return i(e+1,t,n)},_n=[(e,t,n)=>({type:"ArrayExpression",start:t[e++],end:t[e++],elements:Ln(e,t,n)}),(e,t,n)=>({type:"ArrayPattern",start:t[e++],end:t[e++],elements:Ln(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=!!t[e++],o=!!t[e++],a=!!t[e++],l=Ln(t[e++],t,n),c=Rn(t[e++],t,n),d=Bn(e,t);return zn({type:"ArrowFunctionExpression",start:s,end:i,async:r,body:c,expression:a,generator:o,id:null,params:l},d,Fn)},(e,t,n)=>{const s=t[e++],i=t[e++],r=Mn[t[e++]],o=Rn(t[e++],t,n);return{type:"AssignmentExpression",start:s,end:i,left:Rn(e,t,n),operator:r,right:o}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Rn(t[e++],t,n);return{type:"AssignmentPattern",start:s,end:i,left:Rn(e,t,n),right:r}},(e,t,n)=>{const s=t[e++],i=t[e++];return{type:"AwaitExpression",start:s,argument:Rn(e,t,n),end:i}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Mn[t[e++]],o=Rn(t[e++],t,n);return{type:"BinaryExpression",start:s,end:i,left:Rn(e,t,n),operator:r,right:o}},(e,t,n)=>{const s=t[e++],i=t[e++];return{type:"BlockStatement",start:s,body:Ln(e,t,n),end:i}},(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++];return{type:"BreakStatement",start:s,end:i,label:r?Rn(r,t,n):null}},(e,t,n)=>{const s=t[e++],i=t[e++],r=!!t[e++],o=Rn(t[e++],t,n),a=Ln(t[e++],t,n),l=Bn(e,t);return zn({type:"CallExpression",start:s,end:i,arguments:a,callee:o,optional:r},l,Fn)},(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++];return{type:"CatchClause",start:s,end:i,body:Rn(t[e],t,n),param:r?Rn(r,t,n):null}},(e,t,n)=>({type:"ChainExpression",start:t[e++],end:t[e++],expression:Rn(e,t,n)}),(e,t,n)=>({type:"ClassBody",start:t[e++],end:t[e++],body:Ln(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++],o=t[e++];return{type:"ClassDeclaration",start:s,end:i,body:Rn(t[e],t,n),id:r?Rn(r,t,n):null,superClass:o?Rn(o,t,n):null}},(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++],o=t[e++];return{type:"ClassExpression",start:s,end:i,body:Rn(t[e],t,n),id:r?Rn(r,t,n):null,superClass:o?Rn(o,t,n):null}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Rn(t[e++],t,n);return{type:"ConditionalExpression",start:s,end:i,alternate:Rn(t[e++],t,n),consequent:r,test:Rn(e,t,n)}},(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e];return{type:"ContinueStatement",start:s,end:i,label:r?Rn(r,t,n):null}},(e,t)=>({type:"DebuggerStatement",start:t[e++],end:t[e++]}),(e,t,n)=>{const s=t[e++],i=t[e++],r=Rn(t[e++],t,n);return{type:"DoWhileStatement",start:s,end:i,body:Rn(e,t,n),test:r}},(e,t)=>({type:"EmptyStatement",start:t[e++],end:t[e++]}),(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++],o=Rn(t[e++],t,n),a=Ln(t[e],t,n);return{type:"ExportAllDeclaration",start:s,end:i,exported:r?Rn(r,t,n):null,source:o,attributes:a}},(e,t,n)=>({type:"ExportDefaultDeclaration",start:t[e++],end:t[e++],declaration:Rn(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++],o=t[e++],a=Ln(t[e++],t,n),l=Ln(e,t,n);return{type:"ExportNamedDeclaration",start:s,end:i,declaration:r?Rn(r,t,n):null,source:o?Rn(o,t,n):null,specifiers:l,attributes:a}},(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++],o=Rn(e,t,n);return{type:"ExportSpecifier",start:s,end:i,exported:r?Rn(r,t,n):o,local:o}},(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++];return{type:"ExpressionStatement",start:s,end:i,expression:Rn(e,t,n),...r?{directive:Vn(r,t,n)}:{}}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Rn(t[e++],t,n);return{type:"ForInStatement",start:s,end:i,body:Rn(t[e++],t,n),left:Rn(e,t,n),right:r}},(e,t,n)=>{const s=t[e++],i=t[e++],r=!!t[e++],o=Rn(t[e++],t,n);return{type:"ForOfStatement",start:s,end:i,await:r,body:Rn(t[e++],t,n),left:Rn(e,t,n),right:o}},(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++],o=t[e++],a=t[e++];return{type:"ForStatement",start:s,end:i,body:Rn(t[e],t,n),init:r?Rn(r,t,n):null,test:o?Rn(o,t,n):null,update:a?Rn(a,t,n):null}},(e,t,n)=>{const s=t[e++],i=t[e++],r=!!t[e++],o=!!t[e++],a=t[e++],l=Ln(t[e++],t,n),c=Rn(t[e++],t,n),d=Bn(e,t);return zn({type:"FunctionDeclaration",start:s,end:i,async:r,body:c,expression:!1,generator:o,id:a?Rn(a,t,n):null,params:l},d,Fn)},(e,t,n)=>{const s=t[e++],i=t[e++],r=!!t[e++],o=!!t[e++],a=t[e++],l=Ln(t[e++],t,n),c=Rn(t[e++],t,n),d=Bn(e,t);return zn({type:"FunctionExpression",start:s,end:i,async:r,body:c,expression:!1,generator:o,id:a?Rn(a,t,n):null,params:l},d,Fn)},(e,t,n)=>({type:"Identifier",start:t[e++],end:t[e++],name:Vn(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=Rn(t[e++],t,n),o=t[e++],a=Rn(e,t,n);return{type:"IfStatement",start:s,end:i,alternate:o?Rn(o,t,n):null,consequent:r,test:a}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Rn(t[e++],t,n);return{type:"ImportAttribute",start:s,end:i,key:Rn(e,t,n),value:r}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Rn(t[e++],t,n),o=Ln(t[e++],t,n);return{type:"ImportDeclaration",start:s,end:i,source:r,specifiers:Ln(e,t,n),attributes:o}},(e,t,n)=>({type:"ImportDefaultSpecifier",start:t[e++],end:t[e++],local:Rn(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++];return{type:"ImportExpression",start:s,end:i,source:Rn(e,t,n),options:r?Rn(r,t,n):null}},(e,t,n)=>({type:"ImportNamespaceSpecifier",start:t[e++],end:t[e++],local:Rn(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++],o=Rn(t[e],t,n);return{type:"ImportSpecifier",start:s,end:i,imported:r?Rn(r,t,n):o,local:o}},(e,t,n)=>({type:"LabeledStatement",start:t[e++],end:t[e++],body:Rn(t[e++],t,n),label:Rn(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++];return{type:"Literal",start:s,end:i,raw:r?Vn(r,t,n):void 0,value:Vn(e,t,n)}},(e,t)=>{const n=t[e++],s=t[e++],i=!!t[e++];return{type:"Literal",start:n,end:s,raw:i?"true":"false",value:i}},(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++];return{type:"Literal",start:s,end:i,raw:r?Vn(r,t,n):void 0,value:new DataView(t.buffer).getFloat64(e<<2,!0)}},(e,t)=>({type:"Literal",start:t[e++],end:t[e++],raw:"null",value:null}),(e,t,n)=>{const s=t[e++],i=t[e++],r=Vn(t[e++],t,n),o=Vn(e,t,n);return{type:"Literal",start:s,end:i,raw:`/${r}/${o}`,regex:{flags:o,pattern:r},value:new RegExp(r,o)}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Vn(t[e++],t,n);return{type:"Literal",start:s,end:i,bigint:r,raw:Vn(e,t,n),value:BigInt(r)}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Mn[t[e++]],o=Rn(t[e++],t,n);return{type:"LogicalExpression",start:s,end:i,left:Rn(e,t,n),operator:r,right:o}},(e,t,n)=>{const s=t[e++],i=t[e++],r=!!t[e++],o=!!t[e++],a=Rn(t[e++],t,n);return{type:"MemberExpression",start:s,end:i,computed:o,object:Rn(e,t,n),optional:r,property:a}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Rn(t[e++],t,n);return{type:"MetaProperty",start:s,end:i,meta:Rn(e,t,n),property:r}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Mn[t[e++]],o=!!t[e++],a=!!t[e++],l=Rn(t[e++],t,n);return{type:"MethodDefinition",start:s,end:i,computed:o,key:Rn(e,t,n),kind:r,static:a,value:l}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Rn(t[e++],t,n),o=t[e++],a=Bn(e,t);return zn({type:"NewExpression",start:s,end:i,arguments:o?Ln(o,t,n):[],callee:r},a,Fn)},(e,t,n)=>({type:"ObjectExpression",start:t[e++],end:t[e++],properties:Ln(e,t,n)}),(e,t,n)=>({type:"ObjectPattern",start:t[e++],end:t[e++],properties:Ln(e,t,n)}),(e,t,n)=>({type:"PrivateIdentifier",start:t[e++],end:t[e++],name:Vn(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=Bn(t[e++],t),o=Ln(e,t,n);return zn({type:"Program",start:s,end:i,body:o,sourceType:"module"},r,jn)},(e,t,n)=>{const s=t[e++],i=t[e++],r=Mn[t[e++]],o=!!t[e++],a=!!t[e++],l=!!t[e++],c=Rn(t[e++],t,n),d=t[e];return{type:"Property",start:s,end:i,computed:a,key:c,kind:r,method:o,shorthand:l,value:d?Rn(d,t,n):{...c}}},(e,t,n)=>{const s=t[e++],i=t[e++],r=!!t[e++],o=!!t[e++],a=t[e++];return{type:"PropertyDefinition",start:s,end:i,computed:r,key:Rn(e,t,n),static:o,value:a?Rn(a,t,n):null}},(e,t,n)=>({type:"RestElement",start:t[e++],end:t[e++],argument:Rn(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e];return{type:"ReturnStatement",start:s,end:i,argument:r?Rn(r,t,n):null}},(e,t,n)=>({type:"SequenceExpression",start:t[e++],end:t[e++],expressions:Ln(e,t,n)}),(e,t,n)=>({type:"SpreadElement",start:t[e++],end:t[e++],argument:Rn(e,t,n)}),(e,t,n)=>({type:"StaticBlock",start:t[e++],end:t[e++],body:Ln(e,t,n)}),(e,t)=>({type:"Super",start:t[e++],end:t[e++]}),(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++];return{type:"SwitchCase",start:s,end:i,consequent:Ln(t[e],t,n),test:r?Rn(r,t,n):null}},(e,t,n)=>({type:"SwitchStatement",start:t[e++],end:t[e++],cases:Ln(t[e++],t,n),discriminant:Rn(e,t,n)}),(e,t,n)=>({type:"TaggedTemplateExpression",start:t[e++],end:t[e++],quasi:Rn(t[e++],t,n),tag:Rn(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=!!t[e++],o=t[e++],a=Vn(e,t,n);return{type:"TemplateElement",start:s,end:i,tail:r,value:{cooked:o?Vn(o,t,n):null,raw:a}}},(e,t,n)=>({type:"TemplateLiteral",start:t[e++],end:t[e++],expressions:Ln(t[e++],t,n),quasis:Ln(e,t,n)}),(e,t)=>({type:"ThisExpression",start:t[e++],end:t[e++]}),(e,t,n)=>({type:"ThrowStatement",start:t[e++],end:t[e++],argument:Rn(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++],o=t[e++];return{type:"TryStatement",start:s,end:i,block:Rn(e,t,n),finalizer:o?Rn(o,t,n):null,handler:r?Rn(r,t,n):null}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Mn[t[e++]];return{type:"UnaryExpression",start:s,end:i,argument:Rn(e,t,n),operator:r,prefix:!0}},(e,t,n)=>{const s=t[e++],i=t[e++],r=!!t[e++],o=Mn[t[e++]];return{type:"UpdateExpression",start:s,end:i,argument:Rn(e,t,n),operator:o,prefix:r}},(e,t,n)=>{const s=t[e++],i=t[e++],r=Mn[t[e++]];return{type:"VariableDeclaration",start:s,end:i,declarations:Ln(e,t,n),kind:r}},(e,t,n)=>{const s=t[e++],i=t[e++],r=t[e++];return{type:"VariableDeclarator",start:s,end:i,id:Rn(e,t,n),init:r?Rn(r,t,n):null}},(e,t,n)=>({type:"WhileStatement",start:t[e++],end:t[e++],body:Rn(t[e++],t,n),test:Rn(e,t,n)}),(e,t,n)=>{const s=t[e++],i=t[e++],r=!!t[e++],o=t[e];return{type:"YieldExpression",start:s,end:i,argument:o?Rn(o,t,n):null,delegate:r}},(e,t,n)=>{const s=t[e++];st(function(e,t){return{code:Mt,message:e,pos:t}}(Vn(e,t,n),s))}],Ln=(e,t,n)=>{const s=t[e++],i=[];for(let r=0;r<s;r++){const s=t[e++];i.push(s?Rn(s,t,n):null)}return i},Bn=(e,t)=>{const n=t[e++],s=[];for(let i=0;i<n;i++)s.push(Tn(t[e++],t));return s},Tn=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:Mn[t[e]]}},zn=(e,t,n)=>t.length>0?{...e,[n]:t}:e,Vn=(e,t,n)=>{const s=t[e++];return n(e<<2,s)},Fn="_rollupAnnotations",jn="_rollupRemoved",Un={Literal:[],Program:["body"]};const Gn="variables";class Wn extends de{get deoptimized(){return oe(this.flags,2)}set deoptimized(e){this.flags=ae(this.flags,2,e)}constructor(e,t,n,s=!1){super(),s&&(this.esTreeNode=e);const{type:i}=e;Un[i]||=function(e){return Object.keys(e).filter((t=>"object"==typeof e[t]&&95!==t.charCodeAt(0)))}(e),this.parent=t,this.scope=n,this.createScope(n),this.parseNode(e),this.initialise(),this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(e,t){}bind(){for(const e of Un[this.type]){const t=this[e];if(Array.isArray(t))for(const e of t)e?.bind();else t&&t.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of Un[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n)){for(const t of n)if(t?.hasEffects(e))return!0}else if(n.hasEffects(e))return!0}return!1}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(Z,this.assignmentInteraction,e)}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const n of Un[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.include(e,t);else s.include(e,t)}}includeAsAssignmentTarget(e,t,n){this.include(e,t)}initialise(){}parseNode(e,t){for(const[n,s]of Object.entries(e))if(!this.hasOwnProperty(n))if(95===n.charCodeAt(0)){if(n===Fn){const e=s;this.annotations=e,this.scope.context.options.treeshake.annotations&&(this.annotationNoSideEffects=e.some((e=>"noSideEffects"===e.type)),this.annotationPure=e.some((e=>"pure"===e.type)))}else if(n===jn)for(const{start:e,end:t,type:n}of s)this.scope.context.magicString.remove(e,t),"pure"!==n&&"noSideEffects"!==n||this.scope.context.log(Oe,Kt(this.scope.context.code.slice(e,t),this.scope.context.module.id,n),e)}else if("object"!=typeof s||null===s)this[n]=s;else if(Array.isArray(s)){this[n]=[];for(const e of s)this[n].push(null===e?null:new(this.scope.context.getNodeConstructor(e.type))(e,this,this.scope,t?.includes(n)))}else this[n]=new(this.scope.context.getNodeConstructor(s.type))(s,this,this.scope,t?.includes(n))}removeAnnotations(e){if(this.annotations)for(const t of this.annotations)e.remove(t.start,t.end)}render(e,t){for(const n of Un[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.render(e,t);else s.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(fn())}applyDeoptimizations(){this.deoptimized=!0;for(const e of Un[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(Q);else t.deoptimizePath(Q)}this.scope.context.requestTreeshakingPass()}}class Hn extends Wn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[K,...t],n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return this.argument.hasEffects(e)||t&&("always"===t||this.argument.hasEffectsOnInteractionAtPath(Q,fe,e))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([K,K]),this.scope.context.requestTreeshakingPass()}}class qn extends de{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){2===t&&0===n.length&&this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(te)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?he:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||ue:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(e.length>(0===s?1:0))return!0;if(2===s){const{args:e}=t;if(!0===this.description.mutatesSelfAsArray&&e[0]?.hasEffectsOnInteractionAtPath(te,me,n))return!0;if(this.description.callsArgs)for(const t of this.description.callsArgs)if(e[t+1]?.hasEffectsOnInteractionAtPath(Z,ge,n))return!0}return!1}}const Kn=[new qn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:bn})],Yn=[new qn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:An})],Jn=[new qn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:xn})],Xn=[new qn({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ue})],Zn=/^\d+$/;class Qn extends de{get hasLostTrack(){return oe(this.flags,2048)}set hasLostTrack(e){this.flags=ae(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return oe(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=ae(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return oe(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=ae(this.flags,8192,e)}constructor(e,t,n=!1){if(super(),this.prototypeExpression=t,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of Object.values(e))this.allProperties.push(...t)}}deoptimizeAllProperties(e){const t=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!t){for(const e of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const t of e)t.deoptimizePath(Q);this.prototypeExpression?.deoptimizePath([K,K]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const[s,...i]=t,{args:r,type:o}=e;if(this.hasLostTrack||(2===o||t.length>1)&&(this.hasUnknownDeoptimizedProperty||"string"==typeof s&&this.deoptimizedPaths[s]))return void pe(e);const[a,l,c]=2===o||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:0===o?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof s){if(a[s]){const t=l[s];if(t)for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);return}for(const t of c)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if(Zn.test(s))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}else{for(const t of[...Object.values(l),c])for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey))if(Zn.test(e))for(const e of t)e.deoptimizePath(Q);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if("string"!=typeof t)return t===J?this.deoptimizeIntegerProperties():this.deoptimizeAllProperties(t===Y);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const e=this.expressionsToBeDeoptimizedByKey[t];if(e)for(const t of e)t.deoptimizeCache()}}const n=1===e.length?Q:e.slice(1);for(const e of"string"==typeof t?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(1===e.length?[...e,K]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return ce;const s=e[0],i=this.getMemberExpressionAndTrackDeopt(s,n);return i?i.getLiteralValueAtPath(e.slice(1),t,n):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,t,n):1!==e.length?le:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return he;const[i,...r]=e,o=this.getMemberExpressionAndTrackDeopt(i,s);return o?o.getReturnExpressionWhenCalledAtPath(r,t,n,s):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,n,s):he}hasEffectsOnInteractionAtPath(e,t,n){const[s,...i]=e;if(i.length>0||2===t.type){const r=this.getMemberExpression(s);return r?r.hasEffectsOnInteractionAtPath(i,t,n):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}if(s===Y)return!1;if(this.hasLostTrack)return!0;const[r,o,a]=0===t.type?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof s){if(r[s]){const e=o[s];if(e)for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!1}for(const e of a)if(e.hasEffectsOnInteractionAtPath(i,t,n))return!0}else for(const e of[...Object.values(o),a])for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:n,propertiesAndSettersByKey:s,settersByKey:i,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchableGetters:l,unmatchableSetters:c}=this,d=[];for(let u=e.length-1;u>=0;u--){const{key:h,kind:p,property:f}=e[u];if(t.push(f),"string"==typeof h)"set"===p?s[h]||(s[h]=[f,...d],i[h]=[f,...c]):"get"===p?n[h]||(n[h]=[f,...a],r[h]=[f,...l]):(s[h]||(s[h]=[f,...d]),n[h]||(n[h]=[f,...a]));else{if(h===J){o.push(f);continue}"set"===p&&c.push(f),"get"===p&&l.push(f),"get"!==p&&d.push(f),"set"!==p&&a.push(f)}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey))for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Q)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(Zn.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(te)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&Zn.test(e)||this.deoptimizedPaths[e])return ue;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&Zn.test(e)?ue:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return ue;const n=this.getMemberExpression(e);if(n!==ue&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return n}}const es=e=>"string"==typeof e&&/^\d+$/.test(e),ts=new class extends de{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||es(t[0])||pe(e)}getLiteralValueAtPath(e){return 1===e.length&&es(e[0])?void 0:le}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},ns=new Qn({__proto__:null,hasOwnProperty:Kn,isPrototypeOf:Kn,propertyIsEnumerable:Kn,toLocaleString:Yn,toString:Yn,valueOf:Xn},ts,!0),ss=[{key:J,kind:"init",property:ue},{key:"length",kind:"init",property:xn}],is=[new qn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:bn})],rs=[new qn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:xn})],os=[new qn({callsArgs:null,mutatesSelfAsArray:!0,returns:()=>new Qn(ss,ms),returnsPrimitive:null})],as=[new qn({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:()=>new Qn(ss,ms),returnsPrimitive:null})],ls=[new qn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:()=>new Qn(ss,ms),returnsPrimitive:null})],cs=[new qn({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:xn})],ds=[new qn({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ue})],us=[new qn({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ue})],hs=[new qn({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ue})],ps=[new qn({callsArgs:null,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],fs=[new qn({callsArgs:[0],mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ms=new Qn({__proto__:null,at:us,concat:as,copyWithin:ps,entries:as,every:is,fill:ps,filter:ls,find:hs,findIndex:rs,findLast:hs,findLastIndex:rs,flat:as,flatMap:ls,forEach:hs,includes:Kn,indexOf:Jn,join:Yn,keys:Xn,lastIndexOf:Jn,map:ls,pop:ds,push:cs,reduce:hs,reduceRight:hs,reverse:ps,shift:ds,slice:as,some:is,sort:fs,splice:os,toLocaleString:Yn,toString:Yn,unshift:cs,values:us},ns,!0);class gs extends Wn{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let t=0;t<this.elements.length;t++){const n=this.elements[t];n&&(e||n instanceof Hn)&&(e=!0,n.deoptimizePath(Q))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:xn}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof Hn?s&&(t=!0,e.unshift({key:J,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:gn})}return this.objectEntity=new Qn(e,ms)}}class ys extends Wn{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e){const t=[];for(const n of this.elements)null!==n&&t.push(...n.declare(e,ue));return t}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(Z)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(Z,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}const bs="ArrowFunctionExpression",Es="ExpressionStatement",xs="Identifier",$s="Program";class As extends ye{constructor(e,t,n,s,i){super(e),this.init=n,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=s.deoptimizationTracker,this.module=s.module,this.kind=i}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers){for(const e of this.additionalInitializers)e.deoptimizePath(Q);this.additionalInitializers=null}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned?pe(e):n.withTrackedEntityAtPath(t,this.init,(()=>this.init.deoptimizeArgumentsOnInteractionAtPath(e,t,n)),void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){this.isReassigned=!0;const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=$e;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath(Q)}else this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.isReassigned?le:t.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath(e,t,n))),le)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned?he:n.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath(e,t,n,s))),he)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n)}}include(){if(!this.included){super.include();for(const e of this.declarations){e.included||e.include(pn(),!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==$s);)t=t.parent}}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init))for(const n of t)n.include(e,!1);else e.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),e.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=ue,this.isReassigned=!0),this.additionalInitializers}}const Ss=$e,ws=new Set([K]),vs=new se,Is=new Set([ue]);class Ps extends As{constructor(e,t,n){super(e,t,ue,n,"parameter"),this.deoptimizationInteractions=[],this.deoptimizations=new se,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set}addEntityToBeDeoptimized(e){if(e===ue){if(!this.entitiesToBeDeoptimized.has(ue)){this.entitiesToBeDeoptimized.add(ue);for(const{interaction:e}of this.deoptimizationInteractions)pe(e);this.deoptimizationInteractions=Ss}}else if(this.deoptimizedFields.has(K))e.deoptimizePath(Q);else if(!this.entitiesToBeDeoptimized.has(e)){this.entitiesToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,n,ie)}}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(ue)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(K)||2===e.type&&this.deoptimizedFields.has(t[0])))pe(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.entitiesToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,t,ie);this.entitiesToBeDeoptimized.has(ue)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length||this.deoptimizedFields.has(K))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.entitiesToBeDeoptimized)e.deoptimizePath([t]);t===K&&(this.deoptimizationInteractions=Ss,this.deoptimizations=vs,this.deoptimizedFields=ws,this.entitiesToBeDeoptimized=Is)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(Q):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),he}}const ks="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",Ns=64;function Cs(e){let t="";do{const n=e%Ns;e=e/Ns|0,t=ks[n]+t}while(0!==e);return t}function Os(e,t,n){let s=e,i=1;for(;t.has(s)||Se.has(s)||n?.has(s);)s=`${e}$${Cs(i++)}`;return t.add(s),s}class Ms{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if("var"===s&&"var"===o)return r.addDeclaration(e,n),r;t.error(tn(i),e.start)}const o=new As(e.name,e,n,t,s);return this.variables.set(i,o),o}addHoistedVariable(e,t){(this.hoistedVariables||=new Map).set(e,t)}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class Ds extends Ms{constructor(e,t){super(),this.parent=e,this.context=t,this.accessedOutsideVariables=new Map,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof Ds&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,t){const n=t.get(this)||new Set;for(const t of e)n.add(t);t.set(this,n),this.parent instanceof Ds&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Ds&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,n,s){for(const s of this.accessedOutsideVariables.values())s.included&&(e.add(s.getBaseVariableName()),"system"===t&&n.has(s)&&e.add("exports"));const i=s.get(this);if(i)for(const t of i)e.add(t)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,n){const s=new Set;if(this.addUsedOutsideNames(s,e,t,n),this.accessedDynamicImports)for(const e of this.accessedDynamicImports)e.inlineNamespace&&s.add(e.inlineNamespace.getBaseVariableName());for(const[e,t]of this.variables)(t.included||t.alwaysRendered)&&t.setRenderNames(null,Os(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,n),n}}class Rs extends Ds{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s){if("var"===s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if("parameter"===o&&"CatchClause"===r.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,gn,s);return r.renderLikeHoisted(n),this.addHoistedVariable(i,n),n}return"var"===o?(r.addDeclaration(e,n),r):t.error(tn(i),e.start)}const o=this.parent.parent.addDeclaration(e,t,n,s);return o.markInitializersForDeoptimization(),this.addHoistedVariable(i,o),o}return super.addDeclaration(e,t,n,s)}}class _s extends Ds{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if(!("var"!==s&&"function"!==s||"var"!==o&&"function"!==o&&"parameter"!==o))return r.addDeclaration(e,n),r;t.error(tn(i),e.start)}const o=new As(e.name,e,n,t,s);return this.variables.set(i,o),o}}class Ls extends Ds{constructor(e,t){super(e,e.context),this.parameters=[],this.hasRest=!1,this.bodyScope=t?new Rs(this):new _s(this)}addParameterDeclaration(e){const{name:t,start:n}=e;if(this.variables.get(t))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(t),n);const s=new Ps(t,e,this.context);return this.variables.set(t,s),this.bodyScope.addHoistedVariable(t,s),s}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments(e,t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];for(const n of t)if(n instanceof Hn){for(const n of t)n.include(e,!1);break}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||i,a=t[r];if(o)if(n=!1,0===o.length)s=!0;else for(const e of o)e.included&&(s=!0),e.calledFromTryStatement&&(n=!0);!s&&a.shouldBeIncluded(e)&&(s=!0),s&&a.include(e,n)}}}class Bs extends Ls{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=ue;for(const e of this.returnExpressions)e.deoptimizePath(Q)}}}function Ts(e,t){if("MemberExpression"===e.type)return!e.computed&&Ts(e.object,e);if("Identifier"===e.type){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}const zs=Symbol("PureFunction"),Vs=()=>{},Fs=Symbol("Value Properties"),js=()=>ce,Us=()=>!1,Gs=()=>!0,Ws={deoptimizeArgumentsOnCall:Vs,getLiteralValue:js,hasEffectsWhenCalled:Us},Hs={deoptimizeArgumentsOnCall:Vs,getLiteralValue:js,hasEffectsWhenCalled:Gs},qs={__proto__:null,[Fs]:Hs},Ks={__proto__:null,[Fs]:Ws},Ys={__proto__:null,[Fs]:{deoptimizeArgumentsOnCall:Vs,getLiteralValue:js,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof de)||s.hasEffectsOnInteractionAtPath(Q,fe,t)}}},Js={__proto__:null,[Fs]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(Q)},getLiteralValue:js,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(ee,me,t)}},Xs={__proto__:null,[Fs]:Hs,prototype:qs},Zs={__proto__:null,[Fs]:Ws,prototype:qs},Qs={__proto__:null,[Fs]:{deoptimizeArgumentsOnCall:Vs,getLiteralValue:js,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof gs)},prototype:qs},ei={__proto__:null,[Fs]:Ws,from:qs,of:Ks,prototype:qs},ti={__proto__:null,[Fs]:Ws,supportedLocalesOf:Zs},ni={global:qs,globalThis:qs,self:qs,window:qs,__proto__:null,[Fs]:Hs,Array:{__proto__:null,[Fs]:Hs,from:qs,isArray:Ks,of:Ks,prototype:qs},ArrayBuffer:{__proto__:null,[Fs]:Ws,isView:Ks,prototype:qs},Atomics:qs,BigInt:Xs,BigInt64Array:Xs,BigUint64Array:Xs,Boolean:Zs,constructor:Xs,DataView:Zs,Date:{__proto__:null,[Fs]:Ws,now:Ks,parse:Ks,prototype:qs,UTC:Ks},decodeURI:Ks,decodeURIComponent:Ks,encodeURI:Ks,encodeURIComponent:Ks,Error:Zs,escape:Ks,eval:qs,EvalError:Zs,Float32Array:ei,Float64Array:ei,Function:Xs,hasOwnProperty:qs,Infinity:qs,Int16Array:ei,Int32Array:ei,Int8Array:ei,isFinite:Ks,isNaN:Ks,isPrototypeOf:qs,JSON:qs,Map:Qs,Math:{__proto__:null,[Fs]:Hs,abs:Ks,acos:Ks,acosh:Ks,asin:Ks,asinh:Ks,atan:Ks,atan2:Ks,atanh:Ks,cbrt:Ks,ceil:Ks,clz32:Ks,cos:Ks,cosh:Ks,exp:Ks,expm1:Ks,floor:Ks,fround:Ks,hypot:Ks,imul:Ks,log:Ks,log10:Ks,log1p:Ks,log2:Ks,max:Ks,min:Ks,pow:Ks,random:Ks,round:Ks,sign:Ks,sin:Ks,sinh:Ks,sqrt:Ks,tan:Ks,tanh:Ks,trunc:Ks},NaN:qs,Number:{__proto__:null,[Fs]:Ws,isFinite:Ks,isInteger:Ks,isNaN:Ks,isSafeInteger:Ks,parseFloat:Ks,parseInt:Ks,prototype:qs},Object:{__proto__:null,[Fs]:Ws,create:Ks,defineProperty:Js,defineProperties:Js,freeze:Js,getOwnPropertyDescriptor:Ks,getOwnPropertyDescriptors:Ks,getOwnPropertyNames:Ks,getOwnPropertySymbols:Ks,getPrototypeOf:Ks,hasOwn:Ks,is:Ks,isExtensible:Ks,isFrozen:Ks,isSealed:Ks,keys:Ks,fromEntries:qs,entries:Ys,values:Ys,prototype:qs},parseFloat:Ks,parseInt:Ks,Promise:{__proto__:null,[Fs]:Hs,all:qs,allSettled:qs,any:qs,prototype:qs,race:qs,reject:qs,resolve:qs},propertyIsEnumerable:qs,Proxy:qs,RangeError:Zs,ReferenceError:Zs,Reflect:qs,RegExp:Zs,Set:Qs,SharedArrayBuffer:Xs,String:{__proto__:null,[Fs]:Ws,fromCharCode:Ks,fromCodePoint:Ks,prototype:qs,raw:Ks},Symbol:{__proto__:null,[Fs]:Ws,for:Ks,keyFor:Ks,prototype:qs,toStringTag:{__proto__:null,[Fs]:{deoptimizeArgumentsOnCall:Vs,getLiteralValue:()=>X,hasEffectsWhenCalled:Gs}}},SyntaxError:Zs,toLocaleString:qs,toString:qs,TypeError:Zs,Uint16Array:ei,Uint32Array:ei,Uint8Array:ei,Uint8ClampedArray:ei,unescape:Ks,URIError:Zs,valueOf:qs,WeakMap:Qs,WeakSet:Qs,clearInterval:Xs,clearTimeout:Xs,console:{__proto__:null,[Fs]:Hs,assert:Xs,clear:Xs,count:Xs,countReset:Xs,debug:Xs,dir:Xs,dirxml:Xs,error:Xs,exception:Xs,group:Xs,groupCollapsed:Xs,groupEnd:Xs,info:Xs,log:Xs,table:Xs,time:Xs,timeEnd:Xs,timeLog:Xs,trace:Xs,warn:Xs},Intl:{__proto__:null,[Fs]:Hs,Collator:ti,DateTimeFormat:ti,DisplayNames:ti,ListFormat:ti,Locale:ti,NumberFormat:ti,PluralRules:ti,RelativeTimeFormat:ti,Segmenter:ti},setInterval:Xs,setTimeout:Xs,TextDecoder:Xs,TextEncoder:Xs,URL:{__proto__:null,[Fs]:Hs,prototype:qs,canParse:Ks},URLSearchParams:Xs,AbortController:Xs,AbortSignal:Xs,addEventListener:qs,alert:qs,AnalyserNode:Xs,Animation:Xs,AnimationEvent:Xs,applicationCache:qs,ApplicationCache:Xs,ApplicationCacheErrorEvent:Xs,atob:qs,Attr:Xs,Audio:Xs,AudioBuffer:Xs,AudioBufferSourceNode:Xs,AudioContext:Xs,AudioDestinationNode:Xs,AudioListener:Xs,AudioNode:Xs,AudioParam:Xs,AudioProcessingEvent:Xs,AudioScheduledSourceNode:Xs,AudioWorkletNode:Xs,BarProp:Xs,BaseAudioContext:Xs,BatteryManager:Xs,BeforeUnloadEvent:Xs,BiquadFilterNode:Xs,Blob:Xs,BlobEvent:Xs,blur:qs,BroadcastChannel:Xs,btoa:qs,ByteLengthQueuingStrategy:Xs,Cache:Xs,caches:qs,CacheStorage:Xs,cancelAnimationFrame:qs,cancelIdleCallback:qs,CanvasCaptureMediaStreamTrack:Xs,CanvasGradient:Xs,CanvasPattern:Xs,CanvasRenderingContext2D:Xs,ChannelMergerNode:Xs,ChannelSplitterNode:Xs,CharacterData:Xs,clientInformation:qs,ClipboardEvent:Xs,close:qs,closed:qs,CloseEvent:Xs,Comment:Xs,CompositionEvent:Xs,confirm:qs,ConstantSourceNode:Xs,ConvolverNode:Xs,CountQueuingStrategy:Xs,createImageBitmap:qs,Credential:Xs,CredentialsContainer:Xs,crypto:qs,Crypto:Xs,CryptoKey:Xs,CSS:Xs,CSSConditionRule:Xs,CSSFontFaceRule:Xs,CSSGroupingRule:Xs,CSSImportRule:Xs,CSSKeyframeRule:Xs,CSSKeyframesRule:Xs,CSSMediaRule:Xs,CSSNamespaceRule:Xs,CSSPageRule:Xs,CSSRule:Xs,CSSRuleList:Xs,CSSStyleDeclaration:Xs,CSSStyleRule:Xs,CSSStyleSheet:Xs,CSSSupportsRule:Xs,CustomElementRegistry:Xs,customElements:qs,CustomEvent:{__proto__:null,[Fs]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:js,hasEffectsWhenCalled:Us},prototype:qs},DataTransfer:Xs,DataTransferItem:Xs,DataTransferItemList:Xs,defaultstatus:qs,defaultStatus:qs,DelayNode:Xs,DeviceMotionEvent:Xs,DeviceOrientationEvent:Xs,devicePixelRatio:qs,dispatchEvent:qs,document:qs,Document:Xs,DocumentFragment:Xs,DocumentType:Xs,DOMError:Xs,DOMException:Xs,DOMImplementation:Xs,DOMMatrix:Xs,DOMMatrixReadOnly:Xs,DOMParser:Xs,DOMPoint:Xs,DOMPointReadOnly:Xs,DOMQuad:Xs,DOMRect:Xs,DOMRectReadOnly:Xs,DOMStringList:Xs,DOMStringMap:Xs,DOMTokenList:Xs,DragEvent:Xs,DynamicsCompressorNode:Xs,Element:Xs,ErrorEvent:Xs,Event:Xs,EventSource:Xs,EventTarget:Xs,external:qs,fetch:qs,File:Xs,FileList:Xs,FileReader:Xs,find:qs,focus:qs,FocusEvent:Xs,FontFace:Xs,FontFaceSetLoadEvent:Xs,FormData:Xs,frames:qs,GainNode:Xs,Gamepad:Xs,GamepadButton:Xs,GamepadEvent:Xs,getComputedStyle:qs,getSelection:qs,HashChangeEvent:Xs,Headers:Xs,history:qs,History:Xs,HTMLAllCollection:Xs,HTMLAnchorElement:Xs,HTMLAreaElement:Xs,HTMLAudioElement:Xs,HTMLBaseElement:Xs,HTMLBodyElement:Xs,HTMLBRElement:Xs,HTMLButtonElement:Xs,HTMLCanvasElement:Xs,HTMLCollection:Xs,HTMLContentElement:Xs,HTMLDataElement:Xs,HTMLDataListElement:Xs,HTMLDetailsElement:Xs,HTMLDialogElement:Xs,HTMLDirectoryElement:Xs,HTMLDivElement:Xs,HTMLDListElement:Xs,HTMLDocument:Xs,HTMLElement:Xs,HTMLEmbedElement:Xs,HTMLFieldSetElement:Xs,HTMLFontElement:Xs,HTMLFormControlsCollection:Xs,HTMLFormElement:Xs,HTMLFrameElement:Xs,HTMLFrameSetElement:Xs,HTMLHeadElement:Xs,HTMLHeadingElement:Xs,HTMLHRElement:Xs,HTMLHtmlElement:Xs,HTMLIFrameElement:Xs,HTMLImageElement:Xs,HTMLInputElement:Xs,HTMLLabelElement:Xs,HTMLLegendElement:Xs,HTMLLIElement:Xs,HTMLLinkElement:Xs,HTMLMapElement:Xs,HTMLMarqueeElement:Xs,HTMLMediaElement:Xs,HTMLMenuElement:Xs,HTMLMetaElement:Xs,HTMLMeterElement:Xs,HTMLModElement:Xs,HTMLObjectElement:Xs,HTMLOListElement:Xs,HTMLOptGroupElement:Xs,HTMLOptionElement:Xs,HTMLOptionsCollection:Xs,HTMLOutputElement:Xs,HTMLParagraphElement:Xs,HTMLParamElement:Xs,HTMLPictureElement:Xs,HTMLPreElement:Xs,HTMLProgressElement:Xs,HTMLQuoteElement:Xs,HTMLScriptElement:Xs,HTMLSelectElement:Xs,HTMLShadowElement:Xs,HTMLSlotElement:Xs,HTMLSourceElement:Xs,HTMLSpanElement:Xs,HTMLStyleElement:Xs,HTMLTableCaptionElement:Xs,HTMLTableCellElement:Xs,HTMLTableColElement:Xs,HTMLTableElement:Xs,HTMLTableRowElement:Xs,HTMLTableSectionElement:Xs,HTMLTemplateElement:Xs,HTMLTextAreaElement:Xs,HTMLTimeElement:Xs,HTMLTitleElement:Xs,HTMLTrackElement:Xs,HTMLUListElement:Xs,HTMLUnknownElement:Xs,HTMLVideoElement:Xs,IDBCursor:Xs,IDBCursorWithValue:Xs,IDBDatabase:Xs,IDBFactory:Xs,IDBIndex:Xs,IDBKeyRange:Xs,IDBObjectStore:Xs,IDBOpenDBRequest:Xs,IDBRequest:Xs,IDBTransaction:Xs,IDBVersionChangeEvent:Xs,IdleDeadline:Xs,IIRFilterNode:Xs,Image:Xs,ImageBitmap:Xs,ImageBitmapRenderingContext:Xs,ImageCapture:Xs,ImageData:Xs,indexedDB:qs,innerHeight:qs,innerWidth:qs,InputEvent:Xs,IntersectionObserver:Xs,IntersectionObserverEntry:Xs,isSecureContext:qs,KeyboardEvent:Xs,KeyframeEffect:Xs,length:qs,localStorage:qs,location:qs,Location:Xs,locationbar:qs,matchMedia:qs,MediaDeviceInfo:Xs,MediaDevices:Xs,MediaElementAudioSourceNode:Xs,MediaEncryptedEvent:Xs,MediaError:Xs,MediaKeyMessageEvent:Xs,MediaKeySession:Xs,MediaKeyStatusMap:Xs,MediaKeySystemAccess:Xs,MediaList:Xs,MediaQueryList:Xs,MediaQueryListEvent:Xs,MediaRecorder:Xs,MediaSettingsRange:Xs,MediaSource:Xs,MediaStream:Xs,MediaStreamAudioDestinationNode:Xs,MediaStreamAudioSourceNode:Xs,MediaStreamEvent:Xs,MediaStreamTrack:Xs,MediaStreamTrackEvent:Xs,menubar:qs,MessageChannel:Xs,MessageEvent:Xs,MessagePort:Xs,MIDIAccess:Xs,MIDIConnectionEvent:Xs,MIDIInput:Xs,MIDIInputMap:Xs,MIDIMessageEvent:Xs,MIDIOutput:Xs,MIDIOutputMap:Xs,MIDIPort:Xs,MimeType:Xs,MimeTypeArray:Xs,MouseEvent:Xs,moveBy:qs,moveTo:qs,MutationEvent:Xs,MutationObserver:Xs,MutationRecord:Xs,name:qs,NamedNodeMap:Xs,NavigationPreloadManager:Xs,navigator:qs,Navigator:Xs,NetworkInformation:Xs,Node:Xs,NodeFilter:qs,NodeIterator:Xs,NodeList:Xs,Notification:Xs,OfflineAudioCompletionEvent:Xs,OfflineAudioContext:Xs,offscreenBuffering:qs,OffscreenCanvas:Xs,open:qs,openDatabase:qs,Option:Xs,origin:qs,OscillatorNode:Xs,outerHeight:qs,outerWidth:qs,PageTransitionEvent:Xs,pageXOffset:qs,pageYOffset:qs,PannerNode:Xs,parent:qs,Path2D:Xs,PaymentAddress:Xs,PaymentRequest:Xs,PaymentRequestUpdateEvent:Xs,PaymentResponse:Xs,performance:qs,Performance:Xs,PerformanceEntry:Xs,PerformanceLongTaskTiming:Xs,PerformanceMark:Xs,PerformanceMeasure:Xs,PerformanceNavigation:Xs,PerformanceNavigationTiming:Xs,PerformanceObserver:Xs,PerformanceObserverEntryList:Xs,PerformancePaintTiming:Xs,PerformanceResourceTiming:Xs,PerformanceTiming:Xs,PeriodicWave:Xs,Permissions:Xs,PermissionStatus:Xs,personalbar:qs,PhotoCapabilities:Xs,Plugin:Xs,PluginArray:Xs,PointerEvent:Xs,PopStateEvent:Xs,postMessage:qs,Presentation:Xs,PresentationAvailability:Xs,PresentationConnection:Xs,PresentationConnectionAvailableEvent:Xs,PresentationConnectionCloseEvent:Xs,PresentationConnectionList:Xs,PresentationReceiver:Xs,PresentationRequest:Xs,print:qs,ProcessingInstruction:Xs,ProgressEvent:Xs,PromiseRejectionEvent:Xs,prompt:qs,PushManager:Xs,PushSubscription:Xs,PushSubscriptionOptions:Xs,queueMicrotask:qs,RadioNodeList:Xs,Range:Xs,ReadableStream:Xs,RemotePlayback:Xs,removeEventListener:qs,Request:Xs,requestAnimationFrame:qs,requestIdleCallback:qs,resizeBy:qs,ResizeObserver:Xs,ResizeObserverEntry:Xs,resizeTo:qs,Response:Xs,RTCCertificate:Xs,RTCDataChannel:Xs,RTCDataChannelEvent:Xs,RTCDtlsTransport:Xs,RTCIceCandidate:Xs,RTCIceTransport:Xs,RTCPeerConnection:Xs,RTCPeerConnectionIceEvent:Xs,RTCRtpReceiver:Xs,RTCRtpSender:Xs,RTCSctpTransport:Xs,RTCSessionDescription:Xs,RTCStatsReport:Xs,RTCTrackEvent:Xs,screen:qs,Screen:Xs,screenLeft:qs,ScreenOrientation:Xs,screenTop:qs,screenX:qs,screenY:qs,ScriptProcessorNode:Xs,scroll:qs,scrollbars:qs,scrollBy:qs,scrollTo:qs,scrollX:qs,scrollY:qs,SecurityPolicyViolationEvent:Xs,Selection:Xs,ServiceWorker:Xs,ServiceWorkerContainer:Xs,ServiceWorkerRegistration:Xs,sessionStorage:qs,ShadowRoot:Xs,SharedWorker:Xs,SourceBuffer:Xs,SourceBufferList:Xs,speechSynthesis:qs,SpeechSynthesisEvent:Xs,SpeechSynthesisUtterance:Xs,StaticRange:Xs,status:qs,statusbar:qs,StereoPannerNode:Xs,stop:qs,Storage:Xs,StorageEvent:Xs,StorageManager:Xs,styleMedia:qs,StyleSheet:Xs,StyleSheetList:Xs,SubtleCrypto:Xs,SVGAElement:Xs,SVGAngle:Xs,SVGAnimatedAngle:Xs,SVGAnimatedBoolean:Xs,SVGAnimatedEnumeration:Xs,SVGAnimatedInteger:Xs,SVGAnimatedLength:Xs,SVGAnimatedLengthList:Xs,SVGAnimatedNumber:Xs,SVGAnimatedNumberList:Xs,SVGAnimatedPreserveAspectRatio:Xs,SVGAnimatedRect:Xs,SVGAnimatedString:Xs,SVGAnimatedTransformList:Xs,SVGAnimateElement:Xs,SVGAnimateMotionElement:Xs,SVGAnimateTransformElement:Xs,SVGAnimationElement:Xs,SVGCircleElement:Xs,SVGClipPathElement:Xs,SVGComponentTransferFunctionElement:Xs,SVGDefsElement:Xs,SVGDescElement:Xs,SVGDiscardElement:Xs,SVGElement:Xs,SVGEllipseElement:Xs,SVGFEBlendElement:Xs,SVGFEColorMatrixElement:Xs,SVGFEComponentTransferElement:Xs,SVGFECompositeElement:Xs,SVGFEConvolveMatrixElement:Xs,SVGFEDiffuseLightingElement:Xs,SVGFEDisplacementMapElement:Xs,SVGFEDistantLightElement:Xs,SVGFEDropShadowElement:Xs,SVGFEFloodElement:Xs,SVGFEFuncAElement:Xs,SVGFEFuncBElement:Xs,SVGFEFuncGElement:Xs,SVGFEFuncRElement:Xs,SVGFEGaussianBlurElement:Xs,SVGFEImageElement:Xs,SVGFEMergeElement:Xs,SVGFEMergeNodeElement:Xs,SVGFEMorphologyElement:Xs,SVGFEOffsetElement:Xs,SVGFEPointLightElement:Xs,SVGFESpecularLightingElement:Xs,SVGFESpotLightElement:Xs,SVGFETileElement:Xs,SVGFETurbulenceElement:Xs,SVGFilterElement:Xs,SVGForeignObjectElement:Xs,SVGGElement:Xs,SVGGeometryElement:Xs,SVGGradientElement:Xs,SVGGraphicsElement:Xs,SVGImageElement:Xs,SVGLength:Xs,SVGLengthList:Xs,SVGLinearGradientElement:Xs,SVGLineElement:Xs,SVGMarkerElement:Xs,SVGMaskElement:Xs,SVGMatrix:Xs,SVGMetadataElement:Xs,SVGMPathElement:Xs,SVGNumber:Xs,SVGNumberList:Xs,SVGPathElement:Xs,SVGPatternElement:Xs,SVGPoint:Xs,SVGPointList:Xs,SVGPolygonElement:Xs,SVGPolylineElement:Xs,SVGPreserveAspectRatio:Xs,SVGRadialGradientElement:Xs,SVGRect:Xs,SVGRectElement:Xs,SVGScriptElement:Xs,SVGSetElement:Xs,SVGStopElement:Xs,SVGStringList:Xs,SVGStyleElement:Xs,SVGSVGElement:Xs,SVGSwitchElement:Xs,SVGSymbolElement:Xs,SVGTextContentElement:Xs,SVGTextElement:Xs,SVGTextPathElement:Xs,SVGTextPositioningElement:Xs,SVGTitleElement:Xs,SVGTransform:Xs,SVGTransformList:Xs,SVGTSpanElement:Xs,SVGUnitTypes:Xs,SVGUseElement:Xs,SVGViewElement:Xs,TaskAttributionTiming:Xs,Text:Xs,TextEvent:Xs,TextMetrics:Xs,TextTrack:Xs,TextTrackCue:Xs,TextTrackCueList:Xs,TextTrackList:Xs,TimeRanges:Xs,toolbar:qs,top:qs,Touch:Xs,TouchEvent:Xs,TouchList:Xs,TrackEvent:Xs,TransitionEvent:Xs,TreeWalker:Xs,UIEvent:Xs,ValidityState:Xs,visualViewport:qs,VisualViewport:Xs,VTTCue:Xs,WaveShaperNode:Xs,WebAssembly:qs,WebGL2RenderingContext:Xs,WebGLActiveInfo:Xs,WebGLBuffer:Xs,WebGLContextEvent:Xs,WebGLFramebuffer:Xs,WebGLProgram:Xs,WebGLQuery:Xs,WebGLRenderbuffer:Xs,WebGLRenderingContext:Xs,WebGLSampler:Xs,WebGLShader:Xs,WebGLShaderPrecisionFormat:Xs,WebGLSync:Xs,WebGLTexture:Xs,WebGLTransformFeedback:Xs,WebGLUniformLocation:Xs,WebGLVertexArrayObject:Xs,WebSocket:Xs,WheelEvent:Xs,Window:Xs,Worker:Xs,WritableStream:Xs,XMLDocument:Xs,XMLHttpRequest:Xs,XMLHttpRequestEventTarget:Xs,XMLHttpRequestUpload:Xs,XMLSerializer:Xs,XPathEvaluator:Xs,XPathExpression:Xs,XPathResult:Xs,XSLTProcessor:Xs};for(const e of["window","global","self","globalThis"])ni[e]=ni;function si(e){let t=ni;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return null}return t[Fs]}class ii extends ye{constructor(){super(...arguments),this.isReassigned=!0}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(si([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=si([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=si([this.name,...e]);return s?s.getLiteralValue():le}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!si([this.name]):!si([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=si([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}const ri={__proto__:null,class:!0,const:!0,let:!0,var:!0};class oi extends Wn{constructor(){super(...arguments),this.variable=null}get isTDZAccess(){return oe(this.flags,4)?oe(this.flags,8):null}set isTDZAccess(e){this.flags=ae(this.flags,4,!0),this.flags=ae(this.flags,8,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&Ts(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this))}declare(e,t){let n;const{treeshake:s}=this.scope.context.options;switch(e){case"var":n=this.scope.addDeclaration(this,this.scope.context,t,e),s&&s.correctVarValueBeforeDeclaration&&n.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"class":n=this.scope.addDeclaration(this,this.scope.context,t,e);break;case"parameter":n=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}return[this.variable=n]}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){0!==e.length||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const[i,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,n,s);return[i,r||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||"var"===this.variable.kind)||this.scope.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof ii&&!this.isPureFunction(Z)&&this.variable.hasEffectsOnInteractionAtPath(Z,fe,e)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return null!==this.variable&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,n);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n)}}include(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof As&&this.variable.kind&&this.variable.kind in ri&&this.variable.module===this.scope.context.module))return this.isTDZAccess=!1;let t;return this.variable.declarations&&1===this.variable.declarations.length&&(t=this.variable.declarations[0])&&this.start<t.start&&ai(this)===ai(t)||!this.variable.initReached&&this.scope.context.module.isExecuted?this.isTDZAccess=!0:this.isTDZAccess=!1}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=Ee){if(this.variable){const o=this.variable.getName(t,n);o!==this.name&&(e.overwrite(this.start,this.end,o,{contentOnly:!0,storeName:!0}),r&&e.prependRight(this.start,`${this.name}: `)),"eval"===o&&"CallExpression"===s&&i&&e.appendRight(this.start,"0, ")}}disallowImportReassignment(){return this.scope.context.error(Wt(this.name,this.scope.context.module.id),this.start)}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof As&&(this.variable.consolidateInitializers(),this.scope.context.requestTreeshakingPass())}getVariableRespectingTDZ(){return this.isPossibleTDZ()?ue:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[zs])return!0;t=t[n]}return t?.[zs]}}function ai(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}function li(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const ci={isNoStatement:!0};function di(e,t,n=0){let s,i;for(s=e.indexOf(t,n);;){if(-1===(n=e.indexOf("/",n))||n>=s)return s;i=e.charCodeAt(++n),++n,(n=47===i?e.indexOf("\n",n)+1:e.indexOf("*/",n)+2)>s&&(s=e.indexOf(t,n))}}const ui=/\S/g;function hi(e,t){ui.lastIndex=t;return ui.exec(e).index}function pi(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[t,t+1];if(n=e.charCodeAt(s+1),47===n)return[s,t+1];s=e.indexOf("*/",s+2)+2,s>t&&(t=e.indexOf("\n",s))}}function fi(e,t,n,s,i){let r,o,a,l,c=e[0],d=!c.included||c.needsBoundaries;d&&(l=n+pi(t.original.slice(n,c.start))[1]);for(let n=1;n<=e.length;n++)r=c,o=l,a=d,c=e[n],d=void 0!==c&&(!c.included||c.needsBoundaries),a||d?(l=r.end+pi(t.original.slice(r.end,void 0===c?s:c.start))[1],r.included?a?r.render(t,i,{end:l,start:o}):r.render(t,i):li(r,t,o,l)):r.render(t,i)}function mi(e,t,n,s){const i=[];let r,o,a,l,c=n-1;for(const s of e){for(void 0!==r&&(c=r.end+di(t.original.slice(r.end,s.start),",")),o=a=c+1+pi(t.original.slice(c+1,s.start))[1];l=t.original.charCodeAt(o),32===l||9===l||10===l||13===l;)o++;void 0!==r&&i.push({contentEnd:a,end:o,node:r,separator:c,start:n}),r=s,n=o}return i.push({contentEnd:s,end:s,node:r,separator:null,start:n}),i}function gi(e,t,n){for(;;){const[s,i]=pi(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}class yi extends Ds{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s){if("var"===s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r)return"var"===r.kind||"var"===s&&"parameter"===r.kind?(r.addDeclaration(e,n),r):t.error(tn(i),e.start);const o=this.parent.addDeclaration(e,t,n,s);return o.markInitializersForDeoptimization(),this.addHoistedVariable(i,o),o}return super.addDeclaration(e,t,n,s)}}class bi extends Wn{initialise(){var e,t;this.directive&&"use strict"!==this.directive&&this.parent.type===$s&&this.scope.context.log(Oe,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${V(t)}" was ignored.`}),this.start)}removeAnnotations(e){this.expression.removeAnnotations(e)}render(e,t){super.render(e,t),";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}shouldBeIncluded(e){return this.directive&&"use strict"!==this.directive?this.parent.type!==$s:super.shouldBeIncluded(e)}applyDeoptimizations(){}}class Ei extends Wn{get deoptimizeBody(){return oe(this.flags,32768)}set deoptimizeBody(e){this.flags=ae(this.flags,32768,e)}get directlyIncluded(){return oe(this.flags,16384)}set directlyIncluded(e){this.flags=ae(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(ue)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new yi(e)}hasEffects(e){if(this.deoptimizeBody)return!0;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(t=!0);for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}}initialise(){const e=this.body[0];this.deoptimizeBody=e instanceof bi&&"use asm"===e.directive}render(e,t){this.body.length>0?fi(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class xi extends Wn{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){return this.declarationInit=t,this.argument.declare(e,ue)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Z)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Z,t,n)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([K,K]),this.scope.context.requestTreeshakingPass())}}class $i extends Wn{constructor(){super(...arguments),this.objectEntity=null}get async(){return oe(this.flags,256)}set async(e){this.flags=ae(this.flags,256,e)}get deoptimizedReturn(){return oe(this.flags,512)}set deoptimizedReturn(e){this.flags=ae(this.flags,512,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){if(2===e.type){const{parameters:t}=this.scope,{args:n}=e;let s=!1;for(let e=0;e<n.length-1;e++){const i=this.params[e],r=n[e+1];s||i instanceof xi?(s=!0,r.deoptimizePath(Q)):i instanceof oi?(t[e][0].addEntityToBeDeoptimized(r),this.addArgumentToBeDeoptimized(r)):i?r.deoptimizePath(Q):this.addArgumentToBeDeoptimized(r)}}else this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){if(this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===K){this.scope.getReturnExpression().deoptimizePath(Q);for(const e of this.scope.parameters)for(const t of e)t.deoptimizePath(Q)}}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return e.length>0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(Q),this.scope.context.requestTreeshakingPass()),he):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],ge,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],fe,n)))return!0}for(const e of this.params)if(e.hasEffects(n))return!0;return!1}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){this.body instanceof Ei?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(e){const{body:t,params:n}=e,s=this.params=[],{scope:i}=this,{bodyScope:r,context:o}=i;for(const e of n)s.push(new(o.getNodeConstructor(e.type))(e,this,i,!1));i.addParameterVariables(s.map((e=>e.declare("parameter",ue))),s[s.length-1]instanceof xi),this.body=new(o.getNodeConstructor(t.type))(t,this,r),super.parseNode(e)}addArgumentToBeDeoptimized(e){}applyDeoptimizations(){}}$i.prototype.preventChildBlockScope=!0;class Ai extends $i{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Bs(e,!1)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const{ignore:e,brokenFlow:t}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(n))return!0;n.ignore=e,n.brokenFlow=t}return!1}include(e,t){super.include(e,t);for(const n of this.params)n instanceof oi||n.include(e,t)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Qn([],ns)}}function Si(e,{exportNamesByVariable:t,snippets:{_:n,getObject:s,getPropertyAccess:i}},r=""){if(1===e.length&&1===t.get(e[0]).length){const s=e[0];return`exports(${JSON.stringify(t.get(s)[0])},${n}${s.getName(i)}${r})`}{const n=[];for(const s of e)for(const e of t.get(s))n.push([e,s.getName(i)+r]);return`exports(${s(n,{lineBreakIndent:null})})`}}function wi(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function vi(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${Si([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}class Ii extends Wn{addExportedVariables(e,t){for(const n of this.properties)"Property"===n.type?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t){const n=[];for(const s of this.properties)n.push(...s.declare(e,t));return n}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.properties)if(e.hasEffectsOnInteractionAtPath(Z,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}}class Pi extends As{constructor(e){super("arguments",null,ue,e,"other"),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){this.included?e.deoptimizePath(Q):this.deoptimizedArguments.push(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(){super.include();for(const e of this.deoptimizedArguments)e.deoptimizePath(Q);this.deoptimizedArguments.length=0}}class ki extends Ps{constructor(e){super("this",null,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||ue).hasEffectsOnInteractionAtPath(e,t,n)}}class Ni extends Bs{constructor(e){const{context:t}=e;super(e,!1),this.variables.set("arguments",this.argumentsVariable=new Pi(t)),this.variables.set("this",this.thisVariable=new ki(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included)for(const n of t)n.included||n.include(e,!1)}}class Ci extends $i{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Ni(e),this.constructedEntity=new Qn(Object.create(null),ns),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(e.args[0])}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:ue);const{brokenFlow:s,ignore:i,replacedVariableInits:r}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(n))return!0;n.brokenFlow=s,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),n.ignore=i}return!1}include(e,t){super.include(e,t),this.id?.include();const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof oi&&!n||s.include(e,t)}initialise(){super.initialise(),this.id?.declare("function",this)}addArgumentToBeDeoptimized(e){this.scope.argumentsVariable.addArgumentToBeDeoptimized(e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Qn([{key:"prototype",kind:"init",property:new Qn([],ns)}],ns)}}class Oi extends Wn{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;e:if(!this.scope.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof Ci||e instanceof Ai)break e}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}}this.argument.include(e,t)}}const Mi={"!=":(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)=>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};function Di(e,t,n){if(n.arguments.length>0)if(n.arguments[n.arguments.length-1].included)for(const s of n.arguments)s.render(e,t);else{let s=n.arguments.length-2;for(;s>=0&&!n.arguments[s].included;)s--;if(s>=0){for(let i=0;i<=s;i++)n.arguments[i].render(e,t);e.remove(di(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(di(e.original,"(",n.callee.end)+1,n.end-1)}}class Ri extends Wn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.scope.context.code.charCodeAt(this.start)||"bigint"==typeof this.value||47===this.scope.context.code.charCodeAt(this.start)?le:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?he:On(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return e.length>(null===this.value?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||(1!==e.length||Cn(this.members,e[0],t,n))}}initialise(){this.members=function(e){if(e instanceof RegExp)return kn;switch(typeof e){case"boolean":return In;case"number":return Pn;case"string":return Nn}return Object.create(null)}(this.value)}parseNode(e){this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(e){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function _i(e){return e.computed?function(e){if(e instanceof Ri)return String(e.value);return null}(e.property):e.property.name}function Li(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof oi)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof Bi){const s=Li(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}class Bi extends Wn{constructor(){super(...arguments),this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return oe(this.flags,1024)}set computed(e){this.flags=ae(this.flags,1024,e)}get optional(){return oe(this.flags,128)}set optional(e){this.flags=ae(this.flags,128,e)}get assignmentDeoptimized(){return oe(this.flags,16)}set assignmentDeoptimized(e){this.flags=ae(this.flags,16,e)}get bound(){return oe(this.flags,32)}set bound(e){this.flags=ae(this.flags,32,e)}get isUndefined(){return oe(this.flags,64)}set isUndefined(e){this.flags=ae(this.flags,64,e)}bind(){this.bound=!0;const e=Li(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=Ti(t,e.slice(1),this.scope.context);n?"undefined"===n?this.isUndefined=!0:(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()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.isUndefined||(t.length<7?this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.getPropertyKey(),...t],n):pe(e))}deoptimizeCache(){const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=$e,this.propertyKey=K,t.deoptimizePath(Q);for(const t of e)t.deoptimizeCache()}deoptimizePath(e){if(0===e.length&&this.disallowNamespaceReassignment(),this.variable)this.variable.deoptimizePath(e);else if(!this.isUndefined&&e.length<7){const t=this.getPropertyKey();this.object.deoptimizePath([t===K?Y:t,...e])}}getLiteralValueAtPath(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:this.propertyKey!==K&&e.length<7?(this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([this.getPropertyKey(),...e],t,n)):le}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s):this.isUndefined?[gn,!1]:this.propertyKey!==K&&e.length<7?(this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(),...e],t,n,s)):he}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsAssignmentTarget(e,t){return t&&!this.deoptimized&&this.applyDeoptimizations(),this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.property.hasEffects(e)||this.object.hasEffects(e)||t&&this.hasAccessEffect(e)||this.hasEffectsOnInteractionAtPath(Z,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||(!(e.length<7)||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(),...e],t,n))}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.includeProperties(e,t)}includeAsAssignmentTarget(e,t,n){this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),n?this.include(e,t):this.includeProperties(e,t)}includeCallArguments(e,t){this.variable?this.variable.includeCallArguments(e,t):super.includeCallArguments(e,t)}initialise(){this.propertyKey=_i(this),this.accessInteraction={args:[this.object],type:0}}isSkippedAsOptional(e){return!this.variable&&!this.isUndefined&&(this.object.isSkippedAsOptional?.(e)||this.optional&&null==this.object.getLiteralValueAtPath(Z,ie,e))}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=Ee){if(this.variable||this.isUndefined){const{snippets:{getPropertyAccess:i}}=t;let r=this.variable?this.variable.getName(i):"undefined";n&&s&&(r="0, "+r),e.overwrite(this.start,this.end,r,{contentOnly:!0,storeName:!0})}else n&&s&&e.appendRight(this.start,"0, "),this.object.render(e,t,{renderedSurroundingElement:i}),this.property.render(e,t)}setAssignedValue(e){this.assignmentInteraction={args:[this.object,e],type:1}}applyDeoptimizations(){this.deoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;if(this.bound&&e&&!this.variable&&!this.isUndefined){const e=this.getPropertyKey();this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[e],ie),this.scope.context.requestTreeshakingPass()}}applyAssignmentDeoptimization(){this.assignmentDeoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;this.bound&&e&&!this.variable&&!this.isUndefined&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.assignmentInteraction,[this.getPropertyKey()],ie),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){if(this.object instanceof oi){this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable),this.scope.context.log(Oe,Wt(this.object.name,this.scope.context.module.id),this.start))}}getPropertyKey(){if(null===this.propertyKey){this.propertyKey=K;const e=this.property.getLiteralValueAtPath(Z,ie,this);return this.propertyKey=e===X?e:"symbol"==typeof e?K:String(e)}return this.propertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()],this.accessInteraction,e))}includeProperties(e,t){this.included||(this.included=!0,this.variable&&this.scope.context.includeVariableInModule(this.variable)),this.object.include(e,t),this.property.include(e,t)}}function Ti(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof be)return null;const s=t[0].key,i=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(Oe,Zt(s,n.module.id,i),t[0].pos),"undefined"}return null}return Ti(i,t.slice(1),n)}class zi extends Wn{constructor(){super(...arguments),this.returnExpression=null,this.deoptimizableDependentExpressions=[],this.expressionsToBeDeoptimized=new Set}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const{args:s}=e,[i,r]=this.getReturnExpression(n);if(r)return;const o=s.filter((e=>!!e&&e!==ue));if(0!==o.length)if(i===ue)for(const e of o)e.deoptimizePath(Q);else n.withTrackedEntityAtPath(t,i,(()=>{for(const e of o)this.expressionsToBeDeoptimized.add(e);i.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}),null)}deoptimizeCache(){if(this.returnExpression?.[0]!==ue){this.returnExpression=he;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Ae,this.deoptimizableDependentExpressions=$e;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(Q)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==ue&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===ue?le:t.withTrackedEntityAtPath(e,s,(()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n))),le)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===ue?i:n.withTrackedEntityAtPath(e,i,(()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]}),he)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(2===s){const{args:s,withNew:i}=t;if((i?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,s,this))return!1}else if((1===s?n.assigned:n.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[i,r]=this.getReturnExpression();return(1===s||!r)&&i.hasEffectsOnInteractionAtPath(e,t,n)}}class Vi extends zi{get optional(){return oe(this.flags,128)}set optional(e){this.flags=ae(this.flags,128,e)}bind(){if(super.bind(),this.callee instanceof oi){this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(Oe,Ft(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(Oe,{code:"EVAL",id:e=this.scope.context.module.id,message:`Use of eval in "${V(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Ue("troubleshooting/#avoiding-eval")},this.start)}var e;this.interaction={args:[this.callee instanceof Bi&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Z,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?(super.include(e,t),t===Gn&&this.callee instanceof oi&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}isSkippedAsOptional(e){return this.callee.isSkippedAsOptional?.(e)||this.optional&&null==this.callee.getLiteralValueAtPath(Z,ie,e)}render(e,t,{renderedSurroundingElement:n}=Ee){this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),Di(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Z,ie),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=ie){return null===this.returnExpression?(this.returnExpression=he,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Z,this.interaction,e,this)):this.returnExpression}}class Fi extends Wn{createScope(e){this.scope=new Ls(e,!0)}parseNode(e){const{body:t,param:n,type:s}=e;this.type=s,n&&(this.param=new(this.scope.context.getNodeConstructor(n.type))(n,this,this.scope),this.param.declare("parameter",ue)),this.body=new Ei(t,this,this.scope.bodyScope),super.parseNode(e)}}Fi.prototype.preventChildBlockScope=!0;class ji extends Ds{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new As("this",null,t,n,"other")),this.instanceScope=new Ds(this,n),this.instanceScope.variables.set("this",new ki(n))}findLexicalBoundary(){return this}}class Ui extends Wn{constructor(){super(...arguments),this.accessedValue=null}get computed(){return oe(this.flags,1024)}set computed(e){this.flags=ae(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){return 0===e.type&&"get"===this.kind&&0===t.length||1===e.type&&"set"===this.kind&&0===t.length?this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:2,withNew:!1},Z,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){return"get"===this.kind&&0===t.type&&0===e.length||"set"===this.kind&&1===t.type?this.value.hasEffectsOnInteractionAtPath(Z,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=he,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Z,ge,ie,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class Gi extends Ui{applyDeoptimizations(){}}class Wi extends de{constructor(e,t){super(),this.object=e,this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],n)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([this.key,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,n)}}class Hi extends Wn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Ds(e,e.context)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),t||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){return 2===t.type&&0===e.length?!t.withNew||(null===this.classConstructor?this.superClass?.hasEffectsOnInteractionAtPath(e,t,n):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,n))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.superClass?.include(e,t),this.body.include(e,t),this.id&&(this.id.markDeclarationReached(),this.id.include())}initialise(){this.id?.declare("class",this);for(const e of this.body.body)if(e instanceof Gi&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)e.static||e instanceof Gi&&"constructor"===e.kind||e.deoptimizePath(Q);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){const s=n.static?e:t,i=n.kind;if(s===t&&!i)continue;const r="set"===i||"get"===i?i:"init";let o;if(n.computed){const e=n.key.getLiteralValueAtPath(Z,ie,this);if("symbol"==typeof e){s.push({key:K,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof oi?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new Qn(t,this.superClass?new Wi(this.superClass,"prototype"):ns)}),this.objectEntity=new Qn(e,this.superClass||ns)}}class qi extends Hi{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new oi(e.id,this,this.scope.parent)),super.parseNode(e)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:a}=this.id;"system"===s&&n.has(o)&&e.appendLeft(this.end,`${i}${Si([o],t)};`);const l=o.getName(r);if(l!==a)return this.superClass?.render(e,t),this.body.render(e,{...t,useOriginalName:e=>e===o}),e.prependRight(this.start,`let ${l}${i}=${i}`),void e.prependLeft(this.end,";")}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:n,variable:s}=e;for(const e of t.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}class Ki extends Hi{render(e,t,{renderedSurroundingElement:n}=Ee){super.render(e,t),n===Es&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Yi extends de{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new Yi(this.expressions.map((i=>i.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]))),!1]}hasEffectsOnInteractionAtPath(e,t,n){for(const s of this.expressions)if(s.hasEffectsOnInteractionAtPath(e,t,n))return!0;return!1}}function Ji(e,t){const{brokenFlow:n,hasBreak:s,hasContinue:i,ignore:r}=e,{breaks:o,continues:a}=r;return r.breaks=!0,r.continues=!0,e.hasBreak=!1,e.hasContinue=!1,!!t.hasEffects(e)||(r.breaks=o,r.continues=a,e.hasBreak=s,e.hasContinue=i,e.brokenFlow=n,!1)}function Xi(e,t,n){const{brokenFlow:s,hasBreak:i,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,n,{asSingleStatement:!0}),e.hasBreak=i,e.hasContinue=r,e.brokenFlow=s}class Zi extends Wn{hasEffects(){return!1}initialise(){this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}Zi.prototype.needsBoundaries=!0;class Qi extends Ci{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new oi(e.id,this,this.scope.parent)),super.parseNode(e)}}class er extends Wn{include(e,t){super.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable)}initialise(){const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.scope.context.getModuleName(),this,this.scope.context),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n,r=function(e,t){return hi(e,di(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof Qi)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=di(e,"function",t)+8;e=e.slice(n,di(e,"(",n));const s=di(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof qi)this.renderNamedDeclaration(e,r,null===this.declaration.id?di(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void li(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:Es}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}applyDeoptimizations(){}renderNamedDeclaration(e,t,n,s){const{exportNamesByVariable:i,format:r,snippets:{getPropertyAccess:o}}=s,a=this.variable.getName(o);e.remove(this.start,t),null!==n&&e.appendLeft(n,` ${a}`),"system"===r&&this.declaration instanceof qi&&i.has(this.variable)&&e.appendLeft(this.end,` ${Si([this.variable],s)};`)}renderVariableDeclaration(e,t,{format:n,exportNamesByVariable:s,snippets:{cnst:i,getPropertyAccess:r}}){const o=59===e.original.charCodeAt(this.end-1),a="system"===n&&s.get(this.variable);a?(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = exports(${JSON.stringify(a[0])}, `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),o||e.appendLeft(this.end,";"))}}er.prototype.needsBoundaries=!0;class tr extends Wn{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){this.scope.context.addExport(this)}removeAnnotations(e){this.declaration?.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n;null===this.declaration?e.remove(s,i):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{end:i,start:s}))}applyDeoptimizations(){}}tr.prototype.needsBoundaries=!0;class nr extends Ci{createScope(e){super.createScope(this.idScope=new Ds(e,e.context))}parseNode(e){null!==e.id&&(this.id=new oi(e.id,this,this.idScope)),super.parseNode(e)}render(e,t,{renderedSurroundingElement:n}=Ee){super.render(e,t),n===Es&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class sr extends yi{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s)}}const ir=Symbol("unset");class rr extends Wn{constructor(){super(...arguments),this.testValue=ir}deoptimizeCache(){this.testValue=le}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getTestValue();if("symbol"==typeof t){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return!0;const n=e.brokenFlow;return e.brokenFlow=t,null===this.alternate?!1:!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&n,!1)}return t?this.consequent.hasEffects(e):!!this.alternate?.hasEffects(e)}include(e,t){if(this.included=!0,t)this.includeRecursively(t,e);else{const t=this.getTestValue();"symbol"==typeof t?this.includeUnknownTest(e):this.includeKnownTest(e,t)}}parseNode(e){this.consequentScope=new sr(this.scope),this.consequent=new(this.scope.context.getNodeConstructor(e.consequent.type))(e.consequent,this,this.consequentScope),e.alternate&&(this.alternateScope=new sr(this.scope),this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(e.alternate,this,this.alternateScope)),super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:n}}=t,s=this.getTestValue(),i=[],r=this.test.included,o=!this.scope.context.options.treeshake;r?this.test.render(e,t):e.remove(this.start,this.consequent.start),this.consequent.included&&(o||"symbol"==typeof s||s)?this.consequent.render(e,t):(e.overwrite(this.consequent.start,this.consequent.end,r?";":""),i.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&"symbol"!=typeof s&&s?(r&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),i.push(...this.alternateScope.hoistedDeclarations)):(r?101===e.original.charCodeAt(this.alternate.start-1)&&e.prependLeft(this.alternate.start," "):e.remove(this.consequent.end,this.alternate.start),this.alternate.render(e,t))),this.renderHoistedDeclarations(i,e,n)}applyDeoptimizations(){}getTestValue(){return this.testValue===ir?this.testValue=this.test.getLiteralValueAtPath(Z,ie,this):this.testValue}includeKnownTest(e,t){this.test.shouldBeIncluded(e)&&this.test.include(e,!1),t&&this.consequent.shouldBeIncluded(e)&&this.consequent.include(e,!1,{asSingleStatement:!0}),!t&&this.alternate?.shouldBeIncluded(e)&&this.alternate.include(e,!1,{asSingleStatement:!0})}includeRecursively(e,t){this.test.include(t,e),this.consequent.include(t,e),this.alternate?.include(t,e)}includeUnknownTest(e){this.test.include(e,!1);const{brokenFlow:t}=e;let n=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),n=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&n)}renderHoistedDeclarations(e,t,n){const s=[...new Set(e.map((e=>{const t=e.variable;return t.included?t.getName(n):""})))].filter(Boolean).join(", ");if(s){const e=this.parent.type,n=e!==$s&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof rr&&e.alternate)return!0;if(e instanceof Ei)return!1;e=e.parent}while(e);return!1}}class or extends Wn{bind(){}hasEffects(){return!1}initialise(){this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}or.prototype.needsBoundaries=!0;class ar extends Wn{applyDeoptimizations(){}}const lr="_interopDefault",cr="_interopDefaultCompat",dr="_interopNamespace",ur="_interopNamespaceCompat",hr="_interopNamespaceDefault",pr="_interopNamespaceDefaultOnly",fr="_mergeNamespaces",mr="_documentCurrentScript",gr={auto:lr,compat:cr,default:null,defaultOnly:null,esModule:null},yr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),br={auto:dr,compat:ur,default:hr,defaultOnly:pr,esModule:null},Er=(e,t)=>"esModule"!==e&&yr(e,t),xr=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of Rr)t.has(e)&&a.add(e);return Rr.map((e=>a.has(e)?$r[e](n,s,i,r,o,a):"")).join("")},$r={[mr]:(e,{_:t,n:n})=>`var${t}${mr}${t}=${t}typeof${t}document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[cr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:cr});return`${o}${wr(t)}${s}?${s}${n?Ar(t):Sr(t)}${a}${r}${r}`},[lr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:lr});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?Ar(t):Sr(t)}${a}${r}${r}`},[ur](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(hr)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:ur});return`${e}${wr(t)}${o}?${o}e${o}:${o}${hr}(e)${n}${l}${l}`}return`function ${ur}(e)${o}{${l}${e}if${o}(${wr(t)})${o}return e;${l}`+vr(e,e,t,n,s,i)+`}${l}${l}`},[pr](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,d]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:pr});return`${c}${Mr(s,Dr(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${d}${a}${a}`},[hr](e,t,n,s,i){const{_:r,n:o}=t;return`function ${hr}(e)${r}{${o}`+vr(e,e,t,n,s,i)+`}${o}${o}`},[dr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(hr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:dr});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${hr}(e)${t}${l}${l}`}return`function ${dr}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+vr(e,e,t,n,s,i)+`}${l}${l}`},[fr](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${fr}(n, m)${r}{${a}${e}${Pr(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?Nr:Cr:Or)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Mr(s,Dr(i,"n",t))};${a}}${a}${a}`}},Ar=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Sr=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,wr=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,vr=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:d,s:u}=n,h=`{${d}`+(s?kr:Or)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${_r(l)}${o}}`:""});${d}${t}if${o}(e)${o}{${d}${t}${e}${Ir(h,!s,n)}${d}${t}}${d}${t}n${c("default")}${o}=${o}e;${d}${t}return ${Mr(i,"n")}${u}${d}`},Ir=(e,t,{_:n,cnst:s,getFunctionIntro:i,s:r})=>"var"!==s||t?`for${n}(${s} k in e)${n}${e}`:`Object.keys(e).forEach(${i(["k"],{isAsync:!1,name:null})}${e})${r}`,Pr=(e,t,n,{_:s,cnst:i,getDirectReturnFunction:r,getFunctionIntro:o,n:a})=>{if(t){const[t,i]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:n,t:n},name:null});return`m.forEach(${t}e${s}&&${s}typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e)${s}&&${s}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${i});`}return`for${s}(var i${s}=${s}0;${s}i${s}<${s}m.length;${s}i++)${s}{${a}${n}${n}${i} e${s}=${s}m[i];${a}${n}${n}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${i} k in e)${s}${e}${s}}${a}${n}}`},kr=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+Nr(e,t+e,n)+`${t}}${i}`},Nr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}enumerable:${n}true,${r}${t}${e}get:${n}${o}e[k]${a}${r}${t}});${r}`},Cr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}if${n}(d)${n}{${r}${t}${e}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}${e}enumerable:${n}true,${r}${t}${e}${e}get:${n}${o}e[k]${a}${r}${t}${e}});${r}${t}}${r}`},Or=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,Mr=(e,t)=>e?`Object.freeze(${t})`:t,Dr=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${_r(s)})`:t,Rr=Object.keys($r);function _r(e){return e([["value","'Module'"]],{lineBreakIndent:null})}function Lr(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}class Br extends Wn{declareDeclarator(e){this.id.declare(e,this.init||gn)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.id.hasEffects(e)}include(e,t){const{deoptimized:n,id:s,init:i}=this;n||this.applyDeoptimizations(),this.included=!0,i?.include(e,t),s.markDeclarationReached(),(t||s.shouldBeIncluded(e))&&s.include(e,t)}removeAnnotations(e){this.init?.removeAnnotations(e)}render(e,t){const{exportNamesByVariable:n,snippets:{_:s,getPropertyAccess:i}}=t,{end:r,id:o,init:a,start:l}=this,c=o.included;if(c)o.render(e,t);else{const t=di(e.original,"=",o.end);e.remove(l,hi(e.original,t+1))}if(a){if(o instanceof oi&&a instanceof Ki&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?Ee:{renderedSurroundingElement:Es})}else o instanceof oi&&Lr(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:e,init:t}=this;if(t&&e instanceof oi&&t instanceof Ki&&!t.id){const{name:n,variable:s}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}function Tr(e,t,n){return"external"===t?br[n(e instanceof dn?e.id:null)]:"default"===t?pr:null}const zr={amd:["require"],cjs:["require"],system:["module"]};function Vr(e){const t=[];for(const n of e.properties){if("RestElement"===n.type||n.computed||"Identifier"!==n.key.type)return;t.push(n.key.name)}return t}class Fr extends Wn{applyDeoptimizations(){}}const jr="ROLLUP_FILE_URL_",Ur="import";const Gr=["cjs","iife","umd"],Wr={amd:["document","module","URL"],cjs:["document","require","URL",mr],es:[],iife:["document","URL",mr],system:["module"],umd:["document","require","URL",mr]},Hr={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},qr=(e,t="URL")=>`new ${t}(${e}).href`,Kr=(e,t=!1)=>qr(`'${T(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.src || document.baseURI`),Yr=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},Jr=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,Xr=e=>Jr(`__dirname + '/${e}'`),Zr=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${mr} && ${mr}.src || new URL('${T(e)}', document.baseURI).href)`,Qr={amd:e=>("."!==e[0]&&(e="./"+e),qr(`require.toUrl('${e}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${Xr(e)} : ${Kr(e)})`,es:e=>qr(`'${e}', import.meta.url`),iife:e=>Kr(e),system:e=>qr(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Xr(e)} : ${Kr(e,!0)})`},eo={amd:Yr((()=>qr("module.uri, document.baseURI"))),cjs:Yr((e=>`(typeof document === 'undefined' ? ${Jr("__filename")} : ${Zr(e)})`)),iife:Yr((e=>Zr(e))),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:Yr((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Jr("__filename")} : ${Zr(e,!0)})`))};class to extends Wn{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}render(e,t,{renderedSurroundingElement:n}=Ee){super.render(e,t),n!==Es&&n!==bs||(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=ns;const t=[];for(const n of this.properties){if(n instanceof Hn){t.push({key:K,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(Z,ie,this);if("symbol"==typeof e){t.push({key:K,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof oi?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){e=n.value instanceof Ri&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new Qn(t,e)}}class no extends Wn{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(fn()):this.hasCachedEffect)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e)){if(this.scope.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:e,log:n,module:s}=this.scope.context;n(Me,Gt(e,s.id,Le(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(e,t){this.included=!0;for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t){let n=this.start;if(e.original.startsWith("#!")&&(n=Math.min(e.original.indexOf("\n")+1,this.end),e.remove(0,n)),this.body.length>0){for(;"/"===e.original[n]&&/[*/]/.test(e.original[n+1]);){const t=pi(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}fi(this.body,e,n,this.end,t)}else super.render(e,t)}applyDeoptimizations(){}}class so extends Wn{hasEffects(e){if(this.test?.hasEffects(e))return!0;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){this.included=!0,this.test?.include(e,t);for(const n of this.consequent)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t,n){if(this.consequent.length>0){this.test&&this.test.render(e,t);const s=this.test?this.test.end:di(e.original,"default",this.start)+7,i=di(e.original,":",s)+1;fi(this.consequent,e,i,n.end,t)}else super.render(e,t)}}so.prototype.needsBoundaries=!0;class io extends Wn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?le:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?he:On(Nn,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Cn(Nn,e[0],t,n)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class ro extends ye{constructor(){super("undefined")}getLiteralValueAtPath(){}}class oo extends As{constructor(e,t,n){super(e,t,t.declaration,n,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const s=t.declaration;(s instanceof Qi||s instanceof qi)&&s.id?(this.hasId=!0,this.originalId=s.id):s instanceof oi&&(this.originalId=s)}addReference(e){this.hasId||(this.name=e.name)}forbidName(e){const t=this.getOriginalVariable();t===this?super.forbidName(e):t.forbidName(e)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const e=this.getOriginalVariable();return e===this?super.getBaseVariableName():e.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof ro||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(e){const t=this.getOriginalVariable();return t===this?super.getName(e):t.getName(e)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e,t=this;const n=new Set;do{n.add(t),e=t,t=e.getDirectOriginalVariable()}while(t instanceof oo&&!n.has(t));return this.originalVariable=t||e}}class ao extends Ds{constructor(e,t){super(e,t),this.variables.set("this",new As("this",null,gn,t,"other"))}addDeclaration(e,t,n,s){return this.context.module.importDescriptions.has(e.name)&&t.error(tn(e.name),e.start),super.addDeclaration(e,t,n,s)}addExportDefaultDeclaration(e,t,n){const s=new oo(e,t,n);return this.variables.set("default",s),s}addNamespaceMemberAccess(){}deconflict(e,t,n){for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.context.traceVariable(e)||this.parent.findVariable(e);return n instanceof ii&&this.accessedOutsideVariables.set(e,n),n}}const lo={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>le,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class co extends Wn{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Z)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=Ee){this.included=!0;for(const s of this.declarations){(t||s.shouldBeIncluded(e))&&s.include(e,t);const{id:i,init:r}=s;n&&i.include(e,t),r&&i.included&&!r.included&&(i instanceof Ii||i instanceof ys)&&r.include(e,t)}}initialise(){for(const e of this.declarations)e.declareDeclarator(this.kind)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=Ee){if(function(e,t){for(const n of e){if(!n.id.included)return!1;if(n.id.type===xs){if(t.has(n.id.variable))return!1}else{const e=[];if(n.id.addExportedVariables(e,t),e.length>0)return!1}}return!0}(this.declarations,t.exportNamesByVariable)){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)}applyDeoptimizations(){}renderDeclarationEnd(e,t,n,s,i,r,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),t+=";",null===n?e.appendLeft(i,t):(10!==e.original.charCodeAt(s-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(s--,13===e.original.charCodeAt(s)&&s--),s===n+1?e.overwrite(n,i,t):(e.overwrite(n,n+1,t),e.remove(s,i))),r.length>0&&e.appendLeft(i,` ${Si(r,o)};`)}renderReplacedDeclarations(e,t){const n=mi(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=hi(e.original,this.start+this.kind.length);let r=i-1;e.remove(this.start,r);let o,a,l=!1,c=!1,d="";const u=[],h=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof oi&&i.init&&0===n.length&&1===t.exportNamesByVariable.get(i.id.variable)?.length?(s=i.id.variable,n.push(s)):i.id.addExportedVariables(n,t.exportNamesByVariable);n.length>1?s=null:s&&(n.length=0)}return s}(n,t,u);for(const{node:u,start:p,separator:f,contentEnd:m,end:g}of n)if(u.included){if(u.render(e,t),o="",a="",!u.id.included||u.id instanceof oi&&Lr(u.id.variable,t.exportNamesByVariable))c&&(d+=";"),l=!1;else{if(h&&h===u.id.variable){const n=di(e.original,"=",u.id.end);wi(h,hi(e.original,n+1),null===f?m:f,e,t)}l?d+=",":(c&&(d+=";"),o+=`${this.kind} `,l=!0)}i===r+1?e.overwrite(r,i,d+o):(e.overwrite(r,r+1,d),e.appendLeft(i,o)),s=m,i=g,c=!0,r=f,d=""}else e.remove(p,g),u.removeAnnotations(e);this.renderDeclarationEnd(e,d,r,s,i,u,t)}}const uo={ArrayExpression:gs,ArrayPattern:ys,ArrowFunctionExpression:Ai,AssignmentExpression:class extends Wn{hasEffects(e){const{deoptimized:t,left:n,operator:s,right:i}=this;return t||this.applyDeoptimizations(),i.hasEffects(e)||n.hasEffectsAsAssignmentTarget(e,"="!==s)}hasEffectsOnInteractionAtPath(e,t,n){return this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,left:s,right:i,operator:r}=this;n||this.applyDeoptimizations(),this.included=!0,(t||"="!==r||s.included||s.hasEffectsAsAssignmentTarget(fn(),!1))&&s.includeAsAssignmentTarget(e,t,"="!==r),i.include(e,t)}initialise(){this.left.setAssignedValue(this.right)}render(e,t,{preventASI:n,renderedParentType:s,renderedSurroundingElement:i}=Ee){const{left:r,right:o,start:a,end:l,parent:c}=this;if(r.included)r.render(e,t),o.render(e,t);else{const l=hi(e.original,di(e.original,"=",r.end)+1);e.remove(a,l),n&&gi(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof oi){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?wi(n,a,l,e,t):vi(n,a,l,c.type!==Es,e,t))}else{const n=[];if(r.addExportedVariables(n,t.exportNamesByVariable),n.length>0)return void function(e,t,n,s,i,r){const{_:o,getDirectReturnIifeLeft:a}=r.snippets;i.prependRight(t,a(["v"],`${Si(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===Es,e,t)}r.included&&r instanceof Ii&&(i===Es||i===bs)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Z),this.right.deoptimizePath(Q),this.scope.context.requestTreeshakingPass()}},AssignmentPattern:class extends Wn{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(Z,t,n)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=Ee){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Z),this.right.deoptimizePath(Q),this.scope.context.requestTreeshakingPass()}},AwaitExpression:Oi,BinaryExpression:class extends Wn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){if(e.length>0)return le;const s=this.left.getLiteralValueAtPath(Z,t,n);if("symbol"==typeof s)return le;const i=this.right.getLiteralValueAtPath(Z,t,n);if("symbol"==typeof i)return le;const r=Mi[this.operator];return r?r(s,i):le}hasEffects(e){return"+"===this.operator&&this.parent instanceof bi&&""===this.left.getLiteralValueAtPath(Z,ie,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=Ee){this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t)}},BlockStatement:Ei,BreakStatement:class extends Wn{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return!0;e.hasBreak=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}},CallExpression:Vi,CatchClause:Fi,ChainExpression:class extends Wn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){if(!this.expression.isSkippedAsOptional(n))return this.expression.getLiteralValueAtPath(e,t,n)}hasEffects(e){return!this.expression.isSkippedAsOptional(this)&&this.expression.hasEffects(e)}removeAnnotations(e){this.expression.removeAnnotations(e)}},ClassBody:class extends Wn{createScope(e){this.scope=new ji(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable);for(const n of this.body)n.include(e,t)}parseNode(e){const t=this.body=[];for(const n of e.body)t.push(new(this.scope.context.getNodeConstructor(n.type))(n,this,n.static?this.scope:this.scope.instanceScope));super.parseNode(e)}applyDeoptimizations(){}},ClassDeclaration:qi,ClassExpression:Ki,ConditionalExpression:class extends Wn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return oe(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=ae(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(null!==this.usedBranch){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(Q);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=$e;for(const e of t)e.deoptimizeCache()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){const s=this.getUsedBranch();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):le}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new Yi([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]]),!1]}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getUsedBranch();return t?t.hasEffects(e):this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.consequent.hasEffectsOnInteractionAtPath(e,t,n)||this.alternate.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();t||this.test.shouldBeIncluded(e)||null===n?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(e,t)}includeCallArguments(e,t){const n=this.getUsedBranch();n?n.includeCallArguments(e,t):(this.consequent.includeCallArguments(e,t),this.alternate.includeCallArguments(e,t))}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=Ee){const o=this.getUsedBranch();if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const a=di(e.original,":",this.consequent.end),l=hi(e.original,(this.consequent.included?di(e.original,"?",this.test.end):a)+1);s&&gi(e,l,o.start),e.remove(this.start,l),this.consequent.included&&e.remove(a,this.end),this.test.removeAnnotations(e),o.render(e,t,{isCalleeOfRenderedParent:n,preventASI:!0,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(Z,ie,this);return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}},ContinueStatement:class extends Wn{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return!0;e.hasContinue=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}},DoWhileStatement:class extends Wn{hasEffects(e){return!!this.test.hasEffects(e)||Ji(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Xi(e,this.body,t)}},EmptyStatement:class extends Wn{hasEffects(){return!1}},ExportAllDeclaration:Zi,ExportDefaultDeclaration:er,ExportNamedDeclaration:tr,ExportSpecifier:class extends Wn{applyDeoptimizations(){}},ExpressionStatement:bi,ForInStatement:class extends Wn{createScope(e){this.scope=new yi(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||Ji(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included=!0,i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Xi(e,n,t)}initialise(){this.left.setAssignedValue(ue)}render(e,t){this.left.render(e,t,ci),this.right.render(e,t,ci),110===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Z),this.scope.context.requestTreeshakingPass()}},ForOfStatement:class extends Wn{get await(){return oe(this.flags,131072)}set await(e){this.flags=ae(this.flags,131072,e)}createScope(e){this.scope=new yi(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included=!0,i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Xi(e,n,t)}initialise(){this.left.setAssignedValue(ue)}render(e,t){this.left.render(e,t,ci),this.right.render(e,t,ci),102===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Z),this.right.deoptimizePath(Q),this.scope.context.requestTreeshakingPass()}},ForStatement:class extends Wn{createScope(e){this.scope=new yi(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Ji(e,this.body)}include(e,t){this.included=!0,this.init?.include(e,t,{asSingleStatement:!0}),this.test?.include(e,t),this.update?.include(e,t),Xi(e,this.body,t)}render(e,t){this.init?.render(e,t,ci),this.test?.render(e,t,ci),this.update?.render(e,t,ci),this.body.render(e,t)}},FunctionDeclaration:Qi,FunctionExpression:nr,Identifier:oi,IfStatement:rr,ImportAttribute:class extends Wn{},ImportDeclaration:or,ImportDefaultSpecifier:ar,ImportExpression:class extends Wn{constructor(){super(...arguments),this.inlineNamespace=null,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof bi)return $e;if(e instanceof Oi){const t=e.parent;if(t instanceof bi)return $e;if(t instanceof Br){const e=t.id;return e instanceof Ii?Vr(e):void 0}if(t instanceof Bi){const e=t.property;if(!t.computed&&e instanceof oi)return[e.name]}}else if(e instanceof Bi){const t=e.parent,n=e.property;if(!(t instanceof Vi&&n instanceof oi))return;const s=n.name;if(t.parent instanceof bi&&["catch","finally"].includes(s))return $e;if("then"!==s)return;if(0===t.arguments.length)return $e;const i=t.arguments[0];if(1!==t.arguments.length||!(i instanceof Ai||i instanceof nr))return;if(0===i.params.length)return $e;const r=i.params[0];return 1===i.params.length&&r instanceof Ii?Vr(r):void 0}}hasEffects(){return!0}include(e,t){this.included||(this.included=!0,this.scope.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(e,t)}initialise(){this.scope.context.addDynamicImport(this)}parseNode(e){super.parseNode(e,["source"])}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}else{if(this.mechanism&&(e.overwrite(this.start,di(e.original,"(",this.start+6)+1,this.mechanism.left),e.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(e.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[t,n]=s(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${n})`)}}else this.source.render(e,t);!0!==this.attributes&&(this.options&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.attributes&&e.appendLeft(this.end-1,`,${n}${i([["assert",this.attributes]],{lineBreakIndent:null})}`))}}setExternalResolution(e,t,n,s,i,r,o,a,l){const{format:c}=n;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.attributes=l;const d=[...zr[c]||[]];let u;({helper:u,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,n,s,i)),u&&d.push(u),d.length>0&&this.scope.addAccessedGlobals(d,r)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:n,dynamicImportInCjs:s,format:i,generatedCode:{arrowFunctions:r},interop:o},{_:a,getDirectReturnFunction:l,getDirectReturnIifeLeft:c},d){const u=d.hookFirstSync("renderDynamicImport",[{customResolution:"string"==typeof this.resolution?this.resolution:null,format:i,moduleId:this.scope.context.module.id,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(u)return{helper:null,mechanism:u};const h=!this.resolution||"string"==typeof this.resolution;switch(i){case"cjs":{if(s&&(!e||"string"==typeof e||e instanceof dn))return{helper:null,mechanism:null};const n=Tr(e,t,o);let i="require(",a=")";n&&(i=`/*#__PURE__*/${n}(${i}`,a+=")");const[d,u]=l([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${d}${i}`,a+=`${u})`,!r&&h&&(i=c(["t"],`${i}t${a}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),a=")"),{helper:n,mechanism:{left:i,right:a}}}case"amd":{const s=n?"c":"resolve",i=n?"e":"reject",d=Tr(e,t,o),[u,p]=l(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),f=d?`${u}${s}(/*#__PURE__*/${d}(m))${p}`:s,[m,g]=l([s,i],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,b=`],${a}${f},${a}${i})${g})`;return!r&&h&&(y=c(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:d,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}},ImportNamespaceSpecifier:Fr,ImportSpecifier:class extends Wn{applyDeoptimizations(){}},LabeledStatement:class extends Wn{hasEffects(e){const{brokenFlow:t,includedLabels:n}=e;e.ignore.labels.add(this.label.name),e.includedLabels=new Set;let s=!1;return this.body.hasEffects(e)?s=!0:(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=t)),e.includedLabels=new Set([...n,...e.includedLabels]),s}include(e,t){this.included=!0;const{brokenFlow:n,includedLabels:s}=e;e.includedLabels=new Set,this.body.include(e,t),(t||e.includedLabels.has(this.label.name))&&(this.label.include(),e.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,hi(e.original,di(e.original,":",this.label.end)+1)),this.body.render(e,t)}},Literal:Ri,LogicalExpression:class extends Wn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return oe(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=ae(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(Q);const{scope:{context:t},expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=$e;for(const e of n)e.deoptimizeCache();t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){const s=this.getUsedBranch();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):le}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new Yi([this.left.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.left.hasEffectsOnInteractionAtPath(e,t,n)||this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();t||n===this.right&&this.left.shouldBeIncluded(e)||!n?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=Ee){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=di(e.original,this.operator,this.left.end);if(this.right.included){const t=hi(e.original,o+2);e.remove(this.start,t),s&&gi(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(o,this.end);this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(Z,ie,this);if("symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&e||"&&"===this.operator&&!e||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}},MemberExpression:Bi,MetaProperty:class extends Wn{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;return t===Ur&&n?.startsWith(jr)?e.getFileName(n.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){if(!this.included&&(this.included=!0,this.meta.name===Ur)){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Bi&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(jr)&&(this.referenceId=t.slice(16))}}render(e,t){const{format:n,pluginDriver:s,snippets:i}=t,{scope:{context:{module:r}},meta:{name:o},metaProperty:a,parent:l,preliminaryChunkId:c,referenceId:d,start:u,end:h}=this,{id:p}=r;if(o!==Ur)return;const f=c;if(d){const t=s.getFileName(d),i=N(D(O(f),t)),r=s.hookFirstSync("resolveFileUrl",[{chunkId:f,fileName:t,format:n,moduleId:p,referenceId:d,relativePath:i}])||Qr[n](i);return void e.overwrite(l.start,l.end,r,{contentOnly:!0})}let m=s.hookFirstSync("resolveImportMeta",[a,{chunkId:f,format:n,moduleId:p}]);m||(m=eo[n]?.(a,{chunkId:f,snippets:i}),t.accessedDocumentCurrentScript||=Gr.includes(n)&&"undefined"!==m),"string"==typeof m&&(l instanceof Bi?e.overwrite(l.start,l.end,m,{contentOnly:!0}):e.overwrite(u,h,m,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(jr)?Hr:Wr)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}},MethodDefinition:Gi,NewExpression:class extends Wn{hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Z,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}initialise(){this.interaction={args:[null,...this.arguments],type:2,withNew:!0}}render(e,t){this.callee.render(e,t),Di(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Z,ie),this.scope.context.requestTreeshakingPass()}},ObjectExpression:to,ObjectPattern:Ii,PrivateIdentifier:class extends Wn{},Program:no,Property:class extends Ui{constructor(){super(...arguments),this.declarationInit=null}get method(){return oe(this.flags,262144)}set method(e){this.flags=ae(this.flags,262144,e)}get shorthand(){return oe(this.flags,524288)}set shorthand(e){this.flags=ae(this.flags,524288,e)}declare(e,t){return this.declarationInit=t,this.value.declare(e,ue)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.treeshake.propertyReadSideEffects;return"ObjectPattern"===this.parent.type&&"always"===t||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([K,K]),this.scope.context.requestTreeshakingPass())}},PropertyDefinition:class extends Wn{get computed(){return oe(this.flags,1024)}set computed(e){this.flags=ae(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.value?this.value.getLiteralValueAtPath(e,t,n):le}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):he}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}},RestElement:xi,ReturnStatement:class extends Wn{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included=!0,this.argument?.include(e,t),e.brokenFlow=!0}initialise(){this.scope.addReturnExpression(this.argument||ue)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends Wn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){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}hasEffectsOnInteractionAtPath(e,t,n){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.expressions[this.expressions.length-1];for(const s of this.expressions)(t||s===n&&!(this.parent instanceof bi)||s.shouldBeIncluded(e))&&s.include(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=Ee){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:d,end:u}of mi(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&gi(e,d,l.start),1===r){const i=n||this.parent.type;l.render(e,t,{isCalleeOfRenderedParent:s&&l===a,renderedParentType:i,renderedSurroundingElement:i})}else l.render(e,t);else li(l,e,d,u);o&&e.remove(o,this.end)}},SpreadElement:Hn,StaticBlock:class extends Wn{createScope(e){this.scope=new yi(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e,t){this.included=!0;for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t){if(this.body.length>0){const n=di(e.original.slice(this.start,this.end),"{")+1;fi(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}},Super:class extends Wn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){this.included||(this.included=!0,this.scope.context.includeVariableInModule(this.variable))}},SwitchCase:so,SwitchStatement:class extends Wn{createScope(e){this.parentScope=e,this.scope=new yi(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:t,hasBreak:n,ignore:s}=e,{breaks:i}=s;s.breaks=!0,e.hasBreak=!1;let r=!0;for(const n of this.cases){if(n.hasEffects(e))return!0;r&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=t}return null!==this.defaultCase&&(e.brokenFlow=r),s.breaks=i,e.hasBreak=n,!1}include(e,t){this.included=!0,this.discriminant.include(e,t);const{brokenFlow:n,hasBreak:s}=e;e.hasBreak=!1;let i=!0,r=t||null!==this.defaultCase&&this.defaultCase<this.cases.length-1;for(let s=this.cases.length-1;s>=0;s--){const o=this.cases[s];if(o.included&&(r=!0),!r){const e=fn();e.ignore.breaks=!0,r=o.hasEffects(e)}r?(o.include(e,t),i&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=n):i=n}r&&null!==this.defaultCase&&(e.brokenFlow=i),e.hasBreak=s}initialise(){for(let e=0;e<this.cases.length;e++)if(null===this.cases[e].test)return void(this.defaultCase=e);this.defaultCase=null}parseNode(e){this.discriminant=new(this.scope.context.getNodeConstructor(e.discriminant.type))(e.discriminant,this,this.parentScope),super.parseNode(e)}render(e,t){this.discriminant.render(e,t),this.cases.length>0&&fi(this.cases,e,this.cases[0].start,this.end-1,t)}},TaggedTemplateExpression:class extends zi{bind(){if(super.bind(),this.tag.type===xs){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(Oe,Ft(e),this.start)}}hasEffects(e){try{for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(Z,this.interaction,e)}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.tag.include(e,t),this.quasi.include(e,t)),this.tag.includeCallArguments(e,this.args);const[n]=this.getReturnExpression();n.included||n.include(e,!1)}initialise(){this.args=[ue,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Bi&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Z,ie),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=ie){return null===this.returnExpression?(this.returnExpression=he,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Z,this.interaction,e,this)):this.returnExpression}},TemplateElement:class extends Wn{get tail(){return oe(this.flags,1048576)}set tail(e){this.flags=ae(this.flags,1048576,e)}bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(e){this.value=e.value,super.parseNode(e)}render(){}},TemplateLiteral:io,ThisExpression:class extends Wn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return 0===e.length?0!==t.type:this.variable.hasEffectsOnInteractionAtPath(e,t,n)}include(){this.included||(this.included=!0,this.scope.context.includeVariableInModule(this.variable))}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof ao?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(Oe,{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:Ue("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends Wn{hasEffects(){return!0}include(e,t){this.included=!0,this.argument.include(e,t),e.brokenFlow=!0}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}},TryStatement:class extends Wn{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){return(this.scope.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const n=this.scope.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:s,includedLabels:i}=e;if(this.directlyIncluded&&n){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)i.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,n?Gn:t),i.size>0&&(this.includedLabelsAfterBlock=[...i]),e.brokenFlow=s;null!==this.handler&&(this.handler.include(e,t),e.brokenFlow=s),this.finalizer?.include(e,t)}},UnaryExpression:class extends Wn{get prefix(){return oe(this.flags,2097152)}set prefix(e){this.flags=ae(this.flags,2097152,e)}getLiteralValueAtPath(e,t,n){if(e.length>0)return le;const s=this.argument.getLiteralValueAtPath(Z,t,n);return"symbol"==typeof s?le:lo[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof oi)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Z,me,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>("void"===this.operator?0:1)}applyDeoptimizations(){this.deoptimized=!0,"delete"===this.operator&&(this.argument.deoptimizePath(Z),this.scope.context.requestTreeshakingPass())}},UnknownNode:class extends Wn{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:class extends Wn{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){this.argument.setAssignedValue(ue)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i}}=t;if(this.argument.render(e,t),"system"===s){const s=this.argument.variable,r=n.get(s);if(r)if(this.prefix)1===r.length?wi(s,this.start,this.end,e,t):vi(s,this.start,this.end,this.parent.type!==Es,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${Si([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==Es,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(Z),this.argument instanceof oi){this.scope.findVariable(this.argument.name).isReassigned=!0}this.scope.context.requestTreeshakingPass()}},VariableDeclaration:co,VariableDeclarator:Br,WhileStatement:class extends Wn{hasEffects(e){return!!this.test.hasEffects(e)||Ji(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Xi(e,this.body,t)}},YieldExpression:class extends Wn{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}},ho="_missingExportShim";class po extends ye{constructor(e){super(ho),this.module=e}include(){super.include(),this.module.needsExportShim=!0}}class fo extends ye{constructor(e){super(e.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module}addReference(e){this.references.push(e),this.name=e.name}deoptimizeArgumentsOnInteractionAtPath(e,t,n){if(t.length>1||1===t.length&&2===e.type){const s=t[0];"string"==typeof s?this.getMemberVariables()[s]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):pe(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];"string"==typeof t&&this.getMemberVariables()[t]?.deoptimizePath(e.slice(1))}}getLiteralValueAtPath(e){return e[0]===X?"Module":le}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const n of t)if("*"!==n[0]&&n!==this.module.info.syntheticNamedExports){const t=this.context.traceExport(n);t&&(e[n]=t)}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(0===e.length)return!0;if(1===e.length&&2!==s)return 1===s;const i=e[0];if("string"!=typeof i)return!0;const r=this.getMemberVariables()[i];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,n)}include(){super.include(),this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([fr],e)}renderBlock(e){const{exportNamesByVariable:t,format:n,freeze:s,indent:i,symbols:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:d,s:u}}=e,h=this.getMemberVariables(),p=Object.entries(h).filter((([e,t])=>t.included)).map((([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${Ne(e)}${o}()${o}{${o}return ${t.getName(c)}${u}${o}}`]:[e,t.getName(c)]));p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(c)));f=`/*#__PURE__*/${fr}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${_r(l)})`),s&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===n&&t.has(this)&&(f+=`${d}${Si([this],e)};`),f}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references){const{context:n}=e.scope;if(n.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}}fo.prototype.isNamespace=!0;class mo extends ye{constructor(e,t,n){super(t),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=n}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof oo||e instanceof mo;){if(e instanceof oo){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof mo&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){super.include(),this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}var go;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(go||(go={}));const yo=new WeakMap;function bo(e,t){if(e){const t=yo.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=r.encode(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||bo(e)}function Eo(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),!e.mappings)return{mappings:[],names:[],sources:[],version:3};const t=e.mappings,n=Array.isArray(t),s={decodedMappings:n?t:void 0,encodedMappings:n?void 0:t},i={...e,get mappings(){return s.decodedMappings||(s.decodedMappings=s.encodedMappings?r.decode(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return yo.set(i,s),i}function xo(e){return e.id}let $o;const Ao=new Array(128).fill(void 0);function So(e){return Ao[e]}Ao.push(void 0,null,!0,!1);let wo=Ao.length;function vo(e){const t=So(e);return function(e){e<132||(Ao[e]=wo,wo=e)}(e),t}const Io="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&Io.decode();let Po=null;function ko(){return null!==Po&&0!==Po.byteLength||(Po=new Uint8Array($o.memory.buffer)),Po}function No(e,t){return e>>>=0,Io.decode(ko().subarray(e,e+t))}function Co(e){wo===Ao.length&&Ao.push(Ao.length+1);const t=wo;return wo=Ao[t],Ao[t]=e,t}let Oo=0;const Mo="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Do="function"==typeof Mo.encodeInto?function(e,t){return Mo.encodeInto(e,t)}:function(e,t){const n=Mo.encode(e);return t.set(n),{read:e.length,written:n.length}};let Ro=null;function _o(){return null!==Ro&&0!==Ro.byteLength||(Ro=new Int32Array($o.memory.buffer)),Ro}function Lo(e,t){try{const a=$o.__wbindgen_add_to_stack_pointer(-16),l=function(e,t,n){if(void 0===n){const n=Mo.encode(e),s=t(n.length,1)>>>0;return ko().subarray(s,s+n.length).set(n),Oo=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=ko();let o=0;for(;o<s;o++){const t=e.charCodeAt(o);if(t>127)break;r[i+o]=t}if(o!==s){0!==o&&(e=e.slice(o)),i=n(i,s,s=o+3*e.length,1)>>>0;const t=ko().subarray(i+o,i+s);o+=Do(e,t).written}return Oo=o,i}(e,$o.__wbindgen_malloc,$o.__wbindgen_realloc),c=Oo;$o.parse(a,l,c,t);var n=_o()[a/4+0],s=_o()[a/4+1],i=(r=n,o=s,r>>>=0,ko().subarray(r/1,r/1+o)).slice();return $o.__wbindgen_free(n,1*s,1),i}finally{$o.__wbindgen_add_to_stack_pointer(16)}var r,o}function Bo(e,t){try{return e.apply(this,t)}catch(e){$o.__wbindgen_exn_store(Co(e))}}function To(){const e={wbg:{}};return e.wbg.__wbindgen_object_drop_ref=function(e){vo(e)},e.wbg.__wbg_crypto_58f13aa23ffcb166=function(e){return Co(So(e).crypto)},e.wbg.__wbindgen_is_object=function(e){const t=So(e);return"object"==typeof t&&null!==t},e.wbg.__wbg_process_5b786e71d465a513=function(e){return Co(So(e).process)},e.wbg.__wbg_versions_c2ab80650590b6a2=function(e){return Co(So(e).versions)},e.wbg.__wbg_node_523d7bd03ef69fba=function(e){return Co(So(e).node)},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof So(e)},e.wbg.__wbg_msCrypto_abcb1295e768d1f2=function(e){return Co(So(e).msCrypto)},e.wbg.__wbg_require_2784e593a4674877=function(){return Bo((function(){return Co(module.require)}),arguments)},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof So(e)},e.wbg.__wbindgen_string_new=function(e,t){return Co(No(e,t))},e.wbg.__wbg_randomFillSync_a0d98aa11c81fe89=function(){return Bo((function(e,t){So(e).randomFillSync(vo(t))}),arguments)},e.wbg.__wbg_getRandomValues_504510b5564925af=function(){return Bo((function(e,t){So(e).getRandomValues(So(t))}),arguments)},e.wbg.__wbg_newnoargs_c62ea9419c21fbac=function(e,t){return Co(new Function(No(e,t)))},e.wbg.__wbg_call_90c26b09837aba1c=function(){return Bo((function(e,t){return Co(So(e).call(So(t)))}),arguments)},e.wbg.__wbindgen_object_clone_ref=function(e){return Co(So(e))},e.wbg.__wbg_self_f0e34d89f33b99fd=function(){return Bo((function(){return Co(self.self)}),arguments)},e.wbg.__wbg_window_d3b084224f4774d7=function(){return Bo((function(){return Co(window.window)}),arguments)},e.wbg.__wbg_globalThis_9caa27ff917c6860=function(){return Bo((function(){return Co(globalThis.globalThis)}),arguments)},e.wbg.__wbg_global_35dfdd59a4da3e74=function(){return Bo((function(){return Co(global.global)}),arguments)},e.wbg.__wbindgen_is_undefined=function(e){return void 0===So(e)},e.wbg.__wbg_call_5da1969d7cd31ccd=function(){return Bo((function(e,t,n){return Co(So(e).call(So(t),So(n)))}),arguments)},e.wbg.__wbg_buffer_a448f833075b71ba=function(e){return Co(So(e).buffer)},e.wbg.__wbg_newwithbyteoffsetandlength_d0482f893617af71=function(e,t,n){return Co(new Uint8Array(So(e),t>>>0,n>>>0))},e.wbg.__wbg_new_8f67e318f15d7254=function(e){return Co(new Uint8Array(So(e)))},e.wbg.__wbg_set_2357bf09366ee480=function(e,t,n){So(e).set(So(t),n>>>0)},e.wbg.__wbg_length_1d25fa9e4ac21ce7=function(e){return So(e).length},e.wbg.__wbg_newwithlength_6c2df9e2f3028c43=function(e){return Co(new Uint8Array(e>>>0))},e.wbg.__wbg_subarray_2e940e41c0f5a1d9=function(e,t,n){return Co(So(e).subarray(t>>>0,n>>>0))},e.wbg.__wbindgen_throw=function(e,t){throw new Error(No(e,t))},e.wbg.__wbindgen_memory=function(){return Co($o.memory)},e}async function zo(e){if(void 0!==$o)return $o;void 0===e&&(e=new URL("bindings_wasm_bg.wasm","undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:t&&t.src||new URL("rollup.browser.js",document.baseURI).href));const n=To();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:s,module:i}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await e,n);return function(e,t){return $o=e.exports,zo.__wbindgen_wasm_module=t,Ro=null,Po=null,$o}(s,i)}function Vo(e){if("undefined"!=typeof Buffer&&e instanceof Buffer)return function(t,n){return e.toString("utf8",t,t+n)};{const t=new TextDecoder;return function(n,s){return t.decode(e.subarray(n,n+s))}}}const Fo=(e,{allowReturnOutsideFunction:t=!1}={})=>{const n=Lo(e,t),s=Vo(n);return Dn(n.buffer,s)},jo=async(e,{allowReturnOutsideFunction:t=!1,signal:n}={})=>{const s=await async function(e,t,n){return Lo(e,t)}(e,t),i=Vo(s);return Dn(s.buffer,i)},Uo=new Set(["assert","with"]);function Go(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof to))return n&&t.module.log(Oe,Jt(t.module.id),s),xe;const i=n.properties.find((e=>Uo.has(Wo(e))))?.value;if(!i)return xe;if(!(i instanceof to))return t.module.log(Oe,(r=t.module.id,{code:bt,message:`Rollup could not statically analyze the options argument of a dynamic import in "${V(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),xe;var r;const o=i.properties.map((e=>{const n=Wo(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(Oe,Jt(t.module.id),e.start),null)})).filter((e=>!!e));return o.length>0?Object.fromEntries(o):xe}const Wo=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function Ho(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some((n=>e[n]!==t[n]))}var qo="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},Ko={memoryUsage:()=>({heapUsed:0})};let Yo=new Map;function Jo(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function Xo(e,t=3){e=Jo(e,t);const n=Ko.memoryUsage().heapUsed,s=qo.now(),i=Yo.get(e);void 0===i?Yo.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function Zo(e,t=3){e=Jo(e,t);const n=Yo.get(e);if(void 0!==n){const e=Ko.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=qo.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function Qo(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of Yo)e[t]=[s,n,i];return e}let ea=Vs,ta=Vs;const na=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function sa(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of na)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){ea(s,4);const t=r.apply(this,e);return ta(s,4),t};let r;"function"==typeof e[n].handler?(r=e[n].handler,e[n].handler=i):(r=e[n],e[n]=i)}return e}function ia(e){e.isExecuted=!0;const t=[e],n=new Set;for(const e of t)for(const s of[...e.dependencies,...e.implicitlyLoadedBefore])s instanceof dn||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const ra={identifier:null,localName:ho};function oa(e,t,n,s,i=new Map){const r=i.get(t);if(r){if(r.has(e))return s?[null]:st((o=t,a=e.id,{code:ut,exporter:a,message:`"${o}" cannot be exported from "${V(a)}" as it is a reexport that references itself.`}));r.add(e)}else i.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i})}function aa(e,t){const n=W(t.sideEffectDependenciesByVariable,e,H);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof oo?s.getDirectOriginalVariable():s instanceof mo?s.syntheticNamespace:null,!s||i.has(s))break;i.add(s),n.add(e);const t=e.sideEffectDependenciesByVariable.get(s);if(t)for(const e of t)n.add(e)}return n}class la{constructor(e,t,n,s,i,r,o,a){this.graph=e,this.id=t,this.options=n,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAttributes=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new po(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(t),this.context=n.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:d,exportAllSources:u,exports:h,implicitlyLoadedAfter:p,implicitlyLoadedBefore:f,importers:m,reexportDescriptions:g,sourcesWithAttributes:y}=this;this.info={ast:null,attributes:a,code:null,get dynamicallyImportedIdResolutions(){return c.map((({argument:e})=>"string"==typeof e&&l.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return c.map((({id:e})=>e)).filter((e=>null!=e))},get dynamicImporters(){return d.sort()},get exportedBindings(){const e={".":[...h.keys()]};for(const[t,{source:n}]of g)(e[n]??=[]).push(t);for(const t of u)(e[t]??=[]).push("*");return e},get exports(){return[...h.keys(),...g.keys(),...[...u].map((()=>"*"))]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,xo).sort()},get implicitlyLoadedBefore(){return Array.from(f,xo).sort()},get importedIdResolutions(){return Array.from(y.keys(),(e=>l.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(y.keys(),(e=>l.resolvedIds[e]?.id)).filter(Boolean)},get importers(){return m.sort()},isEntry:s,isExternal:!1,get isIncluded(){return e.phase!==go.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,syntheticNamedExports:r}}basename(){const e=C(this.id),t=M(this.id);return Ie(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){return this.addLocationToLogProps(e,t),st(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const e of this.exportAllModules)if(e instanceof dn)this.allExportNames.add(`*${e.id}`);else for(const t of e.getAllExportNames())"default"!==t&&this.allExportNames.add(t);return"string"==typeof this.info.syntheticNamedExports&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set,t=new Set,n=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const e of[...this.getReexports(),...this.getExports()]){const[t]=this.getVariableForExportName(e);t?.included&&n.add(t)}for(let s of n){const n=this.sideEffectDependenciesByVariable.get(s);if(n)for(const e of n)t.add(e);s instanceof mo?s=s.getBaseVariable():s instanceof oo&&(s=s.getOriginalVariable()),e.add(s.module)}if(this.options.treeshake&&"no-treeshake"!==this.info.moduleSideEffects)this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t);else for(const e of this.dependencies)this.relevantDependencies.add(e);for(const t of e)this.relevantDependencies.add(t);return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const t of this.getAllExportNames()){let[n]=this.getVariableForExportName(t);if(n instanceof oo&&(n=n.getOriginalVariable()),!n||!(n.included||n instanceof be))continue;const s=e.get(n);s?s.push(t):e.set(n,[t])}return this.exportNamesByVariable=e}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set(this.reexportDescriptions.keys());for(const t of this.exportAllModules)if(t instanceof dn)e.add(`*${t.id}`);else for(const n of[...t.getReexports(),...t.getExports()])"default"!==n&&e.add(n);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],t=[];for(const n of this.exports.keys()){const[s]=this.getVariableForExportName(n);(s?.included?e:t).push(n)}return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){return null===this.syntheticNamespace&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName("string"==typeof this.info.syntheticNamedExports?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:st((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${V(e)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(t)}\` needs ${"string"==typeof t&&"default"!==t?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var e,t}getVariableForExportName(e,{importerForSideEffects:t,isExportAllSearch:n,onlyExplicit:s,searchedNamesAndModules:i}=xe){if("*"===e[0]){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*")}const r=this.reexportDescriptions.get(e);if(r){const[e]=oa(r.module,r.localName,t,!1,i);return e?(t&&(ca(e,t,this),this.info.moduleSideEffects&&W(t.sideEffectDependenciesByVariable,e,H).add(this)),[e]):this.error(Zt(r.localName,this.id,r.module.id),r.start)}const o=this.exports.get(e);if(o){if(o===ra)return[this.exportShimVariable];const e=o.localName,n=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:i});return t&&(ca(n,t,this),W(t.sideEffectDependenciesByVariable,n,H).add(this)),[n]}if(s)return[null];if("default"!==e){const n=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,i);if(this.namespaceReexportsByName.set(e,n),n[0])return n}return this.info.syntheticNamedExports?[W(this.syntheticExports,e,(()=>new mo(this.astContext,e,this.getSyntheticNamespace())))]:!n&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=pn();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){this.isExecuted||(ia(this),this.graph.needsTreeshakingPass=!0);for(const s of this.exports.keys())if(e||s!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(s)[0];if(!e)return st((t=s,n=this.id,{binding:t,code:St,exporter:n,message:`Exported variable "${t}" is not defined in "${V(n)}".`,url:Ue(Ge)}));e.deoptimizePath(Q),e.included||this.includeVariable(e)}var t,n;for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);t&&(t.deoptimizePath(Q),t.included||this.includeVariable(t),t instanceof be&&(t.module.reexported=!0))}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(pn(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(ia(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const n of e){const e=this.getVariableForExportName(n)[0];e&&(e.deoptimizePath(Q),e.included||this.includeVariable(e)),this.exports.has(n)||this.reexportDescriptions.has(n)||(t=!0)}t&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const t of this.exportAllSources){const n=this.graph.modulesById.get(this.resolvedIds[t].id);n instanceof dn?e.push(n):this.exportAllModules.push(n)}this.exportAllModules.push(...e)}log(e,t,n){this.addLocationToLogProps(t,n),this.options.onLog(e,t)}render(e){const t=this.magicString.clone();this.ast.render(t,e),t.trim();const{usesTopLevelAwait:n}=this.astContext;return n&&"es"!==e.format&&"system"!==e.format?st((s=this.id,i=e.format,{code:"INVALID_TLA_FORMAT",id:s,message:`Module format "${i}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:t,usesTopLevelAwait:n};var s,i}async setSource({ast:e,code:t,customTransformCache:n,originalCode:s,originalSourcemap:i,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,...c}){if(t.startsWith("#!")){const e=t.indexOf("\n");this.shebang=t.slice(2,e)}ea("generate ast",3),this.info.code=t,this.originalCode=s,this.originalSourcemap=Eo(i),this.sourcemapChain=o.map((e=>e.missing?e:Eo(e))),bo(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(c);const d=e??await this.tryParseAsync();ta("generate ast",3),ea("analyze ast",3),this.resolvedIds=r??Object.create(null);const u=this.id;this.magicString=new E(t,{filename:this.excludeFromSourcemap?null:u,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:u,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>uo[e]||uo.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new ao(this.graph.scope,this.astContext),this.namespace=new fo(this.astContext),this.ast=new no(d,{context:this.astContext,type:"Module"},this.scope),e||!1!==this.options.cache?this.info.ast=d:Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(u))return this.graph.astLru.get(u);{const e=this.tryParse();return this.graph.astLru.set(u,e),e}}}),ta("analyze ast",3)}toJSON(){return{ast:this.info.ast,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,xo),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:n,searchedNamesAndModules:s}=xe){const i=this.scope.variables.get(e);if(i)return i;const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof la&&"*"===r.name)return e.namespace;const[i]=oa(e,r.name,t||this,n,s);return i||this.error(Zt(r.name,this.id,e.id),r.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:n}){null!=t&&(this.info.moduleSideEffects=t),null!=n&&(this.info.syntheticNamedExports=n),null!=e&&Object.assign(this.info.meta,e)}addDynamicImport(e){let t=e.source;t instanceof io?1===t.quasis.length&&t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):t instanceof Ri&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}assertUniqueExportName(e,t){(this.exports.has(e)||this.reexportDescriptions.has(e))&&this.error(function(e){return{code:"DUPLICATE_EXPORT",message:`Duplicate export "${e}"`}}(e),t)}addExport(e){if(e instanceof er)this.assertUniqueExportName("default",e.start),this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof Zi){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof Ri?e.exported.value:e.exported.name;this.assertUniqueExportName(n,e.exported.start),this.reexportDescriptions.set(n,{localName:"*",module:null,source:t,start:e.start})}else this.exportAllSources.add(t)}else if(e.source instanceof Ri){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=n instanceof Ri?n.value:n.name;this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:s instanceof Ri?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof co)for(const e of t.declarations)for(const t of hn(e.id))this.assertUniqueExportName(t,e.id.start),this.exports.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.assertUniqueExportName(e,t.id.start),this.exports.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:n}of e.specifiers){const e=t.name,s=n instanceof oi?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exports.set(s,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const n of e.specifiers){const e=n.local.name;(this.scope.variables.has(e)||this.importDescriptions.has(e))&&this.error(tn(e),n.local.start);const s=n instanceof ar?"default":n instanceof Fr?"*":n.imported instanceof oi?n.imported.name:n.imported.value;this.importDescriptions.set(e,{module:null,name:s,source:t,start:n.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=Le(n,t,{offsetLine:1});if(s){let{column:i,line:r}=s;try{({column:i,line:r}=function(e,t){const n=e.filter((e=>!e.missing));e:for(;n.length>0;){const e=n.pop().mappings[t.line-1];if(e){const n=e.filter((e=>e.length>1)),s=n[n.length-1];for(const e of n)if(e[0]>=t.column||e===s){t={column:e[3],line:e[2]+1};continue e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:i,line:r})),n=this.originalCode}catch(e){this.options.onLog(Oe,function(e,t,n,s,i){return{cause:e,code:"SOURCEMAP_ERROR",id:t,loc:{column:n,file:t,line:s},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:i}}(e,this.id,i,r,t))}it(e,{column:i,line:r},n,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[t.source];t.module=this.graph.modulesById.get(e)}}addRelevantSideEffectDependencies(e,t,n){const s=new Set,i=r=>{for(const o of r)s.has(o)||(s.add(o),t.has(o)?e.add(o):(o.info.moduleSideEffects||n.has(o))&&(o instanceof dn||o.hasEffects()?e.add(o):i(o.dependencies)))};i(this.dependencies),i(n)}addSource(e,t){const n=(s=t.attributes,s?.length?Object.fromEntries(s.map((e=>[Wo(e),e.value.value]))):xe);var s;const i=this.sourcesWithAttributes.get(e);i?Ho(i,n)&&this.log(Oe,Ht(i,n,e,this.id),t.start):this.sourcesWithAttributes.set(e,n)}getVariableFromNamespaceReexports(e,t,n){let s=null;const i=new Map,r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e)continue;const[a,l]=oa(o,e,t,!0,da(n));o instanceof dn||l?r.add(a):a instanceof mo?s||(s=a):a&&i.set(a,o)}if(i.size>0){const t=[...i],n=t[0][0];return 1===t.length?[n]:(this.options.onLog(Oe,(o=e,a=this.id,l=t.map((([,e])=>e.id)),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${V(a)}" re-exports "${o}" from one of the modules ${je(l.map((e=>V(e))))} (will be ignored).`,reexporter:a})),[null])}var o,a,l;if(r.size>0){const t=[...r],n=t[0];return t.length>1&&this.options.onLog(Oe,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${V(t)}" re-exports "${e}" from one of the external modules ${je(s.map((e=>V(e))))}, guessing "${V(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map((e=>e.module.id)))),[n,!0]}return s?[s]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof dn){const[t]=n.getVariableForExportName("*");t.include(),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.include(),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const t=this.dynamicImports.find((t=>t.node===e)).resolution;if(t instanceof la){t.includedDynamicImporters.push(this);const n=this.options.treeshake?e.getDeterministicImportedNames():void 0;n?t.includeExportsByNames(n):t.includeAllExports(!0)}}includeVariable(e){const t=e.module;if(e.included)t instanceof la&&t!==this&&aa(e,this);else if(e.include(),this.graph.needsTreeshakingPass=!0,t instanceof la&&(t.isExecuted||ia(t),t!==this)){const t=aa(e,this);for(const e of t)e.isExecuted||ia(e)}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;t&&t!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(Oe,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${V(t)}".`})),this.exports.set(e,ra)}tryParse(){try{return Fo(this.info.code)}catch(e){return this.error(nn(e,this.id),e.pos)}}async tryParseAsync(){try{return await jo(this.info.code)}catch(e){return this.error(nn(e,this.id),e.pos)}}}function ca(e,t,n){if(e.module instanceof la&&e.module!==n){const s=e.module.cycles;if(s.size>0){const i=n.cycles;for(const r of i)if(s.has(r)){t.alternativeReexportModules.set(e,n);break}}}}const da=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)])));function ua(e){return e.endsWith(".js")?e.slice(0,-3):e}function ha(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${ua(t)}`:e.id??""}function pa(e,t,n,s,i,r,o,a="return "){const{_:l,getDirectReturnFunction:c,getFunctionIntro:d,getPropertyAccess:u,n:h,s:p}=i;if(!n)return`${h}${h}${a}${function(e,t,n,s,i){if(e.length>0)return e[0].local;for(const{defaultVariableName:e,importPath:r,isChunk:o,name:a,namedExportsMode:l,namespaceVariableName:c,reexports:d}of t)if(d)return fa(a,d[0].imported,l,o,e,c,n,r,s,i)}(e,t,s,o,u)};`;let f="";for(const{defaultVariableName:e,importPath:i,isChunk:a,name:d,namedExportsMode:p,namespaceVariableName:m,reexports:g}of t)if(g&&n)for(const t of g)if("*"!==t.reexported){const n=fa(d,t.imported,p,a,e,m,s,i,o,u);if(f&&(f+=h),"*"!==t.imported&&t.needsLiveBinding){const[e,s]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});f+=`Object.defineProperty(exports,${l}${JSON.stringify(t.reexported)},${l}{${h}${r}enumerable:${l}true,${h}${r}get:${l}${e}${n}${s}${h}});`}else"__proto__"===t.reexported?f+=`Object.defineProperty(exports,${l}"__proto__",${l}{${h}${r}enumerable:${l}true,${h}${r}value:${l}${n}${h}});`:f+=`exports${u(t.reexported)}${l}=${l}${n};`}for(const{exported:t,local:n}of e){const e=`exports${u(t)}`;e!==n&&(f&&(f+=h),f+="__proto__"===t?`Object.defineProperty(exports,${l}"__proto__",${l}{${h}${r}enumerable:${l}true,${h}${r}value:${l}${n}${h}});`:`${e}${l}=${l}${n};`)}for(const{name:e,reexports:s}of t)if(s&&n)for(const t of s)if("*"===t.reexported){f&&(f+=h);const n=`{${h}${r}if${l}(k${l}!==${l}'default'${l}&&${l}!Object.prototype.hasOwnProperty.call(exports,${l}k))${l}${ya(e,t.needsLiveBinding,r,i)}${p}${h}}`;f+=`Object.keys(${e}).forEach(${d(["k"],{isAsync:!1,name:null})}${n});`}return f?`${h}${h}${f}`:""}function fa(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=gr[t]?i:e;return yr(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:br[o(a)])?r:e:`${e}${c(t)}`}function ma(e){return e([["value","true"]],{lineBreakIndent:null})}function ga(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",ma(i)],[null,`[Symbol.toStringTag]:${s}${_r(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${ma(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${_r(i)});`}return""}const ya=(e,t,n,{_:s,getDirectReturnFunction:i,n:r})=>{if(t){const[t,o]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${s}k,${s}{${r}${n}${n}enumerable:${s}true,${r}${n}${n}get:${s}${t}${e}[k]${o}${r}${n}})`}return`k${s}===${s}'__proto__'${s}?${s}Object.defineProperty(exports,${s}k,${s}{${r}${n}${n}enumerable:${s}true,${r}${n}${n}value:${s}${e}[k]${r}${n}})${s}:${s}exports[k]${s}=${s}${e}[k]`};function ba(e,t,n,s,i,r,o,a){const{_:l,cnst:c,n:d}=a,u=new Set,h=[],p=(e,t,n)=>{u.add(t),h.push(`${c} ${e}${l}=${l}/*#__PURE__*/${t}(${n});`)};for(const{defaultVariableName:n,imports:s,importPath:i,isChunk:r,name:o,namedExportsMode:a,namespaceVariableName:l,reexports:c}of e)if(r){for(const{imported:e,reexported:t}of[...s||[],...c||[]])if("*"===e&&"*"!==t){a||p(l,pr,o);break}}else{const e=t(i);let r=!1,a=!1;for(const{imported:t,reexported:i}of[...s||[],...c||[]]){let s,c;"default"===t?r||(r=!0,n!==l&&(c=n,s=gr[e])):"*"!==t||"*"===i||a||(a=!0,s=br[e],c=l),s&&p(c,s,o)}}return`${xr(u,r,o,a,n,s,i)}${h.length>0?`${h.join(d)}${d}${d}`:""}`}function Ea(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":ua(e);var n}const xa=new Set([...s(["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","domain","events","fs","http","http2","https","inspector","module","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","trace_events","tty","url","util","v8","vm","wasi","worker_threads","zlib"]),"assert/strict","dns/promises","fs/promises","path/posix","path/win32","readline/promises","stream/consumers","stream/promises","stream/web","timers/promises","util/types"]);function $a(e,t){const n=t.map((({importPath:e})=>e)).filter((e=>xa.has(e)||e.startsWith("node:")));0!==n.length&&e(Oe,function(e){return{code:Pt,ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${je(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const Aa=(e,t)=>e.split(".").map(t).join("");function Sa(e,t,n,s,{_:i,getPropertyAccess:r}){const o=e.split(".");o[0]=("function"==typeof n?n(o[0]):n[o[0]])||o[0];const a=o.pop();let l=t,c=[...o.map((e=>(l+=r(e),`${l}${i}=${i}${l}${i}||${i}{}`))),`${l}${r(a)}`].join(`,${i}`)+`${i}=${i}${s}`;return o.length>0&&(c=`(${c})`),c}function wa(e){let t=e.length;for(;t--;){const{imports:n,reexports:s}=e[t];if(n||s)return e.slice(0,t+1)}return[]}const va=({dependencies:e,exports:t})=>{const n=new Set(t.map((e=>e.exported)));n.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&n.add(e.reexported);return n},Ia=(e,t,{_:n,cnst:s,getObject:i,n:r})=>{if(e){const o=[...e].map((e=>[e,"1"]));return o.unshift([null,`__proto__:${n}null`]),`${r}${t}${s} _starExcludes${n}=${n}${i(o,{lineBreakIndent:{base:t,t:t}})};`}return""},Pa=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",ka=(e,t,n)=>Na(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,n);function Na(e,t,{_:n,n:s}){return 0===e.length?"":1===e.length?`exports(${JSON.stringify(e[0].name)},${n}${e[0].value});${s}${s}`:`exports({${s}`+e.map((({name:e,value:s})=>`${t}${Ne(e)}:${n}${s}`)).join(`,${s}`)+`${s}});${s}${s}`}const Ca=(e,t,n)=>Na(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,n),Oa=(e,t,n)=>Na(e.filter((e=>e.local===ho)).map((e=>({name:e.exported,value:ho}))),t,n);function Ma(e,t,n){return e?`${t}${Aa(e,n)}`:"null"}var Da={amd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:d,namedExportsMode:u,log:h,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:b,generatedCode:{symbols:E},interop:x,strict:$}){$a(h,n);const A=n.map((e=>`'${Ea(e.importPath,m.forceJsExtensionForImports)}'`)),S=n.map((e=>e.name)),{n:w,getNonArrowFunctionIntro:v,_:I}=f;u&&r&&(S.unshift("exports"),A.unshift("'exports'")),t.has("require")&&(S.unshift("require"),A.unshift("'require'")),t.has("module")&&(S.unshift("module"),A.unshift("'module'"));const P=ha(m,o),k=(P?`'${P}',${I}`:"")+(A.length>0?`[${A.join(`,${I}`)}],${I}`:""),N=$?`${I}'use strict';`:"";e.prepend(`${l}${ba(n,x,y,b,E,t,a,f)}`);const C=pa(s,n,u,x,f,a,y);let O=ga(u&&r,c&&(!0===g||"if-default-prop"===g&&i),d&&E,f);O&&(O=w+w+O),e.append(`${C}${O}${p}`).indent(a).prepend(`${m.define}(${k}(${v(S,{isAsync:!1,name:null})}{${N}${w}${w}`).append(`${w}${w}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:d,outro:u,snippets:h},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,generatedCode:{symbols:b},strict:E}){const{_:x,n:$}=h,A=E?`'use strict';${$}${$}`:"";let S=ga(d&&r,l&&(!0===f||"if-default-prop"===f&&i),c&&b,h);S&&(S+=$+$);const w=function(e,{_:t,cnst:n,n:s},i){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:d}of e)c||d?(r+=i&&o?",":`${r?`;${s}`:""}${n} `,o=!0,r+=`${l}${t}=${t}require('${a}')`):(r&&(r+=i&&!o?",":`;${s}`),o=!1,r+=`require('${a}')`);if(r)return`${r};${s}${s}`;return""}(n,h,p),v=ba(n,y,m,g,b,t,o,h);e.prepend(`${A}${a}${S}${w}${v}`);const I=pa(s,n,d,y,h,o,m,`module.exports${x}=${x}`);e.append(`${I}${u}`)},es:function(e,{accessedGlobals:t,indent:n,intro:s,outro:i,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:d}}){const{n:u}=a,h=function(e,{_:t}){const n=[];for(const{importPath:s,reexports:i,imports:r,name:o,attributes:a}of e){const e=`'${s}'${a?`${t}assert${t}${a}`:""};`;if(i||r){if(r){let s=null,i=null;const o=[];for(const e of r)"default"===e.imported?s=e:"*"===e.imported?i=e:o.push(e);i&&n.push(`import${t}*${t}as ${i.local} from${t}${e}`),s&&0===o.length?n.push(`import ${s.local} from${t}${e}`):o.length>0&&n.push(`import ${s?`${s.local},${t}`:""}{${t}${o.map((e=>e.imported===e.local?e.imported:`${Ce(e.imported)} as ${e.local}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}if(i){let s=null;const a=[],l=[];for(const e of i)"*"===e.reexported?s=e:"*"===e.imported?a.push(e):l.push(e);if(s&&n.push(`export${t}*${t}from${t}${e}`),a.length>0){r&&r.some((e=>"*"===e.imported&&e.local===o))||n.push(`import${t}*${t}as ${o} from${t}${e}`);for(const e of a)n.push(`export${t}{${t}${o===e.reexported?o:`${o} as ${Ce(e.reexported)}`} };`)}l.length>0&&n.push(`export${t}{${t}${l.map((e=>e.imported===e.reexported?Ce(e.imported):`${Ce(e.imported)} as ${Ce(e.reexported)}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}}else n.push(`import${t}${e}`)}return n}(r,a);h.length>0&&(s+=h.join(u)+u+u),(s+=xr(null,t,n,a,l,c,d))&&e.prepend(s);const p=function(e,{_:t,cnst:n}){const s=[],i=[];for(const r of e)r.expression&&s.push(`${n} ${r.local}${t}=${t}${r.expression};`),i.push(r.exported===r.local?r.local:`${r.local} as ${Ce(r.exported)}`);i.length>0&&s.push(`export${t}{${t}${i.join(`,${t}`)}${t}};`);return s}(o,a);p.length>0&&e.append(u+u+p.join(u).trim()),i&&e.append(i),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,namedExportsMode:l,log:c,outro:d,snippets:u},{compact:h,esModule:p,extend:f,freeze:m,externalLiveBindings:g,globals:y,interop:b,name:E,generatedCode:{symbols:x},strict:$}){const{_:A,getNonArrowFunctionIntro:S,getPropertyAccess:w,n:v}=u,I=E&&E.includes("."),P=!f&&!I;if(E&&P&&(ve(k=E)||we.test(k)))return st(function(e){return{code:mt,message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:Ue(Ye)}}(E));var k;$a(c,n);const N=wa(n),C=N.map((e=>e.globalName||"null")),O=N.map((e=>e.name));r&&!E&&c(Oe,{code:It,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Ue(tt)}),l&&r&&(f?(C.unshift(`this${Aa(E,w)}${A}=${A}this${Aa(E,w)}${A}||${A}{}`),O.unshift("exports")):(C.unshift("{}"),O.unshift("exports")));const M=$?`${o}'use strict';${v}`:"",D=ba(n,b,g,m,x,t,o,u);e.prepend(`${a}${D}`);let R=`(${S(O,{isAsync:!1,name:null})}{${v}${M}${v}`;r&&(!E||f&&l||(R=(P?`var ${E}`:`this${Aa(E,w)}`)+`${A}=${A}${R}`),I&&(R=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o){const a=e.split(".");a[0]=("function"==typeof n?n(a[0]):n[a[0]])||a[0],a.pop();let l=t;return a.map((e=>(l+=i(e),`${l}${s}=${s}${l}${s}||${s}{}${r}`))).join(o?",":"\n")+(o&&a.length>0?";":"\n")}(E,"this",y,u,h)+R));let _=`${v}${v}})(${C.join(`,${A}`)});`;r&&!f&&l&&(_=`${v}${v}${o}return exports;${_}`);const L=pa(s,n,l,b,u,o,g);let B=ga(l&&r,!0===p||"if-default-prop"===p&&i,x,u);B&&(B=v+v+B),e.append(`${L}${B}${d}`).indent(o).prepend(R).append(_)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:d,freeze:u,name:h,generatedCode:{symbols:p},strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:b,n:E,s:x}=a,{importBindings:$,setters:A,starExcludes:S}=function(e,t,n,{_:s,cnst:i,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let d=null;for(const{imports:u,reexports:h}of e){const p=[];if(u)for(const e of u)l.push(e.local),"*"===e.imported?p.push(`${e.local}${s}=${s}module;`):p.push(`${e.local}${s}=${s}module${o(e.imported)};`);if(h){const a=[];let l=!1;for(const{imported:e,reexported:t}of h)"*"===t?l=!0:a.push([t,"*"===e?"module":`module${o(e)}`]);if(a.length>1||l)if(l){d||(d=va({dependencies:e,exports:t})),a.unshift([null,`__proto__:${s}null`]);const o=r(a,{lineBreakIndent:null});p.push(`${i} setter${s}=${s}${o};`,`for${s}(${i} name in module)${s}{`,`${n}if${s}(!_starExcludes[name])${s}setter[name]${s}=${s}module[name];`,"}","exports(setter);")}else{const e=r(a,{lineBreakIndent:null});p.push(`exports(${e});`)}else{const[e,t]=a[0];p.push(`exports(${JSON.stringify(e)},${s}${t});`)}}c.push(p.join(`${a}${n}${n}${n}`))}return{importBindings:l,setters:c,starExcludes:d}}(n,s,r,a),w=h?`'${h}',${g}`:"",v=t.has("module")?["exports","module"]:i?["exports"]:[];let I=`System.register(${w}[`+n.map((({importPath:e})=>`'${e}'`)).join(`,${g}`)+`],${g}(${b(v,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+Ia(S,r,a)+Pa($,r,a)+`${E}${r}return${g}{${A.length>0?`${E}${r}${r}setters:${g}[${A.map((e=>e?`${y(["module"],{isAsync:!1,name:null})}{${E}${r}${r}${r}${e}${E}${r}${r}}`:m?"null":`${y([],{isAsync:!1,name:null})}{}`)).join(`,${g}`)}],`:""}${E}`;I+=`${r}${r}execute:${g}(${b([],{isAsync:c,name:null})}{${E}${E}`;const P=`${r}${r}})${E}${r}}${x}${E}}));`;e.prepend(o+xr(null,t,r,a,d,u,p)+ka(s,r,a)).append(`${l}${E}${E}`+Ca(s,r,a)+Oa(s,r,a)).indent(`${r}${r}${r}`).append(P).prepend(I)},umd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:d,outro:u,snippets:h},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:b,interop:E,name:x,generatedCode:{symbols:$},globals:A,noConflict:S,strict:w}){const{_:v,cnst:I,getFunctionIntro:P,getNonArrowFunctionIntro:k,getPropertyAccess:N,n:C,s:O}=h,M=f?"f":"factory",D=f?"g":"global";if(r&&!x)return st({code:It,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:Ue(tt)});$a(d,n);const R=n.map((e=>`'${Ea(e.importPath,p.forceJsExtensionForImports)}'`)),_=n.map((e=>`require('${e.importPath}')`)),L=wa(n),B=L.map((e=>Ma(e.globalName,D,N))),T=L.map((e=>e.name));c&&(r||S)&&(R.unshift("'exports'"),_.unshift("exports"),B.unshift(Sa(x,D,A,(g?`${Ma(x,D,N)}${v}||${v}`:"")+"{}",h)),T.unshift("exports"));const z=ha(p,o),V=(z?`'${z}',${v}`:"")+(R.length>0?`[${R.join(`,${v}`)}],${v}`:""),F=p.define,j=!c&&r?`module.exports${v}=${v}`:"",U=w?`${v}'use strict';${C}`:"";let G;if(S){const e=f?"e":"exports";let t;if(!c&&r)t=`${I} ${e}${v}=${v}${Sa(x,D,A,`${M}(${B.join(`,${v}`)})`,h)};`;else{t=`${I} ${e}${v}=${v}${B.shift()};${C}${a}${a}${M}(${[e,...B].join(`,${v}`)});`}G=`(${P([],{isAsync:!1,name:null})}{${C}${a}${a}${I} current${v}=${v}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map((e=>i+=s(e))).join(`${n}&&${n}`)}(x,D,h)};${C}${a}${a}${t}${C}${a}${a}${e}.noConflict${v}=${v}${P([],{isAsync:!1,name:null})}{${v}${Ma(x,D,N)}${v}=${v}current;${v}return ${e}${O}${v}};${C}${a}})()`}else G=`${M}(${B.join(`,${v}`)})`,!c&&r&&(G=Sa(x,D,A,G,h));const W=r||S&&c||B.length>0,H=[M];W&&H.unshift(D);const q=W?`this,${v}`:"",K=W?`(${D}${v}=${v}typeof globalThis${v}!==${v}'undefined'${v}?${v}globalThis${v}:${v}${D}${v}||${v}self,${v}`:"",Y=W?")":"",J=W?`${a}typeof exports${v}===${v}'object'${v}&&${v}typeof module${v}!==${v}'undefined'${v}?${v}${j}${M}(${_.join(`,${v}`)})${v}:${C}`:"",X=`(${k(H,{isAsync:!1,name:null})}{${C}`+J+`${a}typeof ${F}${v}===${v}'function'${v}&&${v}${F}.amd${v}?${v}${F}(${V}${M})${v}:${C}`+`${a}${K}${G}${Y};${C}`+`})(${q}(${k(T,{isAsync:!1,name:null})}{${U}${C}`,Z=C+C+"}));";e.prepend(`${l}${ba(n,E,y,b,$,t,a,h)}`);const Q=pa(s,n,c,E,h,a,y);let ee=ga(c&&r,!0===m||"if-default-prop"===m&&i,$,h);ee&&(ee=C+C+ee),e.append(`${Q}${ee}${u}`).trim().indent(a).append(Z).prepend(X)}};const Ra=(e,t)=>t?`${e}\n${t}`:e,_a=(e,t)=>t?`${e}\n\n${t}`:e;async function La(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],Ra),t.hookReduceValue("footer",e.footer(n),[n],Ra),t.hookReduceValue("intro",e.intro(n),[n],_a),t.hookReduceValue("outro",e.outro(n),[n],_a)]);return r&&(r+="\n\n"),o&&(o=`\n\n${o}`),s&&(s+="\n"),i&&(i="\n"+i),{banner:s,footer:i,intro:r,outro:o}}catch(e){return st((s=e.message,i=e.hook,r=e.plugin,{code:rt,message:`Could not retrieve "${i}". Check configuration of plugin "${r}".\n\tError Message: ${s}`}))}var s,i,r}const Ba={amd:Va,cjs:Va,es:za,iife:Va,system:za,umd:Va};function Ta(e,t,n,s,i,r,o,a,l,c,d,u,h,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(s,i,u,h);!function(e,t,n){for(const s of t){for(const t of s.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof oo&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,Os(t.name,e,t.forbiddenNames));if(n.has(s)){const t=s.namespace;t.setRenderNames(null,Os(t.name,e,t.forbiddenNames))}}}(s,f,p),Ba[i](s,n,t,r,o,a,l,c,d);for(const e of f)e.scope.deconflict(i,u,h)}function za(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof G)&&(t.variableName=Os(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof dn)?n.setRenderNames(null,(t instanceof dn?a.get(t):o.get(t)).variableName):t instanceof dn&&"default"===s?n.setRenderNames(null,Os([...t.exportedVariables].some((([e,t])=>"*"===t&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,Os(Ie(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,Os(t.name,e,t.forbiddenNames))}function Va(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=Os(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=Os(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&Er(r(t.id),a)?t.namespaceVariableName:Os(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof dn){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=gr[s]?n.defaultVariableName:n.variableName;yr(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,br[r(t.id)]?n.namespaceVariableName:n.variableName):e.setRenderNames(n.variableName,null)}else{const n=l.get(t);o&&e.isNamespace?e.setRenderNames(null,"default"===n.exportMode?n.namespaceVariableName:n.variableName):"default"===n.exportMode?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,n.getVariableExportName(e))}}}function Fa(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return st(Yt("default",o,i))}else if("none"===t&&o.length>0)return st(Yt("none",o,i));return"auto"===t&&(0===o.length?t="none":1===o.length&&"default"===o[0]?t="default":("es"!==s&&"system"!==s&&o.includes("default")&&r(Oe,function(e,t){return{code:Nt,id:e,message:`Entry module "${V(e)}" is using named and default exports together. Consumers of your bundle will have to use \`${t||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:Ue(Ke)}}(i,n)),t="named")),t}function ja(e){const t=e.split("\n"),n=t.filter((e=>/^\t+/.test(e))),s=t.filter((e=>/^ {2,}/.test(e)));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce(((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)}),1/0);return" ".repeat(i)}function Ua(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof dn){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),Ua(e,t,n,s,i,r)):t.push(o)}}const Ga="!~{",Wa="}~",Ha=new RegExp(`${Ga}[0-9a-zA-Z_$]{1,17}${Wa}`,"g"),qa=(e,t)=>e.replace(Ha,(e=>t.get(e)||e)),Ka=(e,t,n)=>e.replace(Ha,(e=>e===t?n:e)),Ya=(e,t)=>{const n=new Set,s=e.replace(Ha,(e=>t.has(e)?(n.add(e),`${Ga}${"0".repeat(e.length-5)}${Wa}`):e));return{containedPlaceholders:n,transformedCode:s}},Ja=Symbol("bundleKeys"),Xa={type:"placeholder"};function Za(e,t,n){return F(e)?st(ln(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,((e,s,i)=>{if(!n.hasOwnProperty(s)||i&&"hash"!==s)return st(ln(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return F(r)?st(ln(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r}))}function Qa(e,{[Ja]:t}){if(!t.has(e.toLowerCase()))return e;const n=M(e);e=e.slice(0,Math.max(0,e.length-n.length));let s,i=1;for(;t.has((s=e+ ++i+n).toLowerCase()););return s}const el=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function tl(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(Oe,(r=e.id,o=e.variableName,{code:wt,id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:Ue(Xe)})),e.variableName):void 0);var r,o}class nl{constructor(e,t,n,s,i,r,o,a,l,c,d,u,h,p,f){this.orderedModules=e,this.inputOptions=t,this.outputOptions=n,this.unsetOptions=s,this.pluginDriver=i,this.modulesById=r,this.chunkByModule=o,this.externalChunkByModule=a,this.facadeChunkByModule=l,this.includedNamespaces=c,this.manualChunkAlias=d,this.getPlaceholder=u,this.bundle=h,this.inputBase=p,this.snippets=f,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.preliminarySourcemapFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=e.length>0?e[0].execIndex:1/0;const m=new Set(e);for(const t of e){o.set(t,this),t.namespace.included&&!n.preserveModules&&c.add(t),this.isEmpty&&t.isIncluded()&&(this.isEmpty=!1),(t.info.isEntry||n.preserveModules)&&this.entryModules.push(t);for(const e of t.includedDynamicImporters)m.has(e)||(this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace)));t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=Ie(this.generateVariableName())}static generateFacade(e,t,n,s,i,r,o,a,l,c,d,u,h,p,f){const m=new nl([],e,t,n,s,i,r,o,a,l,null,u,h,p,f);m.assignFacadeName(d,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof la?r.get(e):o.get(e));return!m.dependencies.has(r.get(c))&&c.info.moduleSideEffects&&c.hasEffects()&&m.dependencies.add(r.get(c)),m.ensureReexportsAreAvailableForModule(c),m.facadeModule=c,m.strictFacade=!0,m}canModuleBeFacade(e,t){const n=e.getExportNamesByVariable();for(const e of this.exports)if(!n.has(e))return!1;for(const s of t)if(!(s.module===e||n.has(s)||s instanceof mo&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>qa(e,s),o=i.fileName,a=this.fileName=r(o);return{...i,code:e,dynamicImports:i.dynamicImports.map(r),fileName:a,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(r),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map((([e,t])=>[r(e),t]))),imports:i.imports.map(r),map:t,preliminaryFileName:o,referencedFiles:i.referencedFiles.map(r),sourcemapFileName:n}}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(null!==this.facadeModule&&(!1!==this.facadeModule.preserveSignature||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[n,s]of t){this.exportNamesByVariable.set(n,[...s]);for(const e of s)this.exportsByName.set(e,n);e.delete(n)}}this.outputOptions.minifyInternalExports?function(e,t,n){let s=0;for(const i of e){let[e]=i.name;if(t.has(e))do{e=Cs(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=Cs(s))}while(Se.has(e)||t.has(e));t.set(e,i),n.set(i,[e])}}(e,this.exportsByName,this.exportNamesByVariable):function(e,t,n){for(const s of e){let e=0,i=s.name;for(;t.has(i);)i=s.name+"$"+ ++e;t.set(i,s),n.set(s,[i])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=Fa(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),n=new Set(this.dynamicEntryModules.map((({namespace:e})=>e)));for(const e of t)if(e.preserveSignature)for(const t of e.getExportNamesByVariable().keys())this.chunkByModule.get(t.module)===this&&n.add(t);for(const s of t){const t=Array.from(new Set(s.chunkNames.filter((({isUserDefined:e})=>e)).map((({name:e})=>e))),(e=>({name:e})));if(0===t.length&&s.isUserDefinedEntryPoint&&t.push({}),t.push(...Array.from(s.chunkFileNames,(e=>({fileName:e})))),0===t.length&&t.push({}),!this.facadeModule){const e=!this.outputOptions.preserveModules&&("strict"===s.preserveSignature||"exports-only"===s.preserveSignature&&s.getExportNamesByVariable().size>0);e&&!this.canModuleBeFacade(s,n)||(this.facadeModule=s,this.facadeChunkByModule.set(s,this),s.preserveSignature&&(this.strictFacade=e),this.assignFacadeName(t.shift(),s,this.outputOptions.preserveModules))}for(const n of t)e.push(nl.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,s,n,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const e of this.dynamicEntryModules)e.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(e,n)?(this.facadeModule=e,this.facadeChunkByModule.set(e,this),this.strictFacade=!0,this.dynamicName=sl(e)):this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,n)?this.strictFacade=!0:this.facadeChunkByModule.get(e)?.strictFacade||(this.includedNamespaces.add(e),this.exports.add(e.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}getChunkName(){return this.name??=this.outputOptions.sanitizeFileName(this.getFallbackChunkName())}getExportNames(){return this.sortedExportNames??=[...this.exportsByName.keys()].sort()}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return T(U(e,this.getFileName(),"amd"===this.outputOptions.format&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){if(this.preliminaryFileName)return this.preliminaryFileName;let e,t=null;const{chunkFileNames:n,entryFileNames:s,file:i,format:r,preserveModules:o}=this.outputOptions;if(i)e=C(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=Za("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e)),name:()=>this.getChunkName()}),t||(e=Qa(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Xa),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;let e=null,t=null;const{sourcemapFileNames:n,format:s}=this.outputOptions;if(!n)return null;{const[i,r]=[n,"output.sourcemapFileNames"];e=Za("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,r,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>s,hash:e=>t||(t=this.getPlaceholder(r,e)),name:()=>this.getChunkName()}),t||(e=Qa(e,this.bundle))}return this.preliminarySourcemapFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(al),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,al),importedBindings:rl(this.getRenderedDependencies(),al),imports:Array.from(this.dependencies,al),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof fo?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,t,n,s){const i=[],r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!r.has(a)){const t=[];Ua(a,t,r,e,n,s),i.unshift(t)}}const o=new Set;for(const e of i)for(const t of e)o.add(t);return o}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const e of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(e),this.setUpChunkImportsAndExportsForModule(e)}async render(){const{dependencies:e,exportMode:t,facadeModule:n,inputOptions:{onLog:s},outputOptions:i,pluginDriver:r,snippets:o}=this,{format:a,hoistTransitiveImports:l,preserveModules:c}=i;if(l&&!c&&null!==n)for(const t of e)t instanceof nl&&this.inlineChunkDependencies(t);const d=this.getPreliminaryFileName(),u=this.getPreliminarySourcemapFileName(),{accessedGlobals:h,indent:p,magicString:f,renderedSource:m,usedModules:g,usesTopLevelAwait:y}=this.renderModules(d.fileName),b=[...this.getRenderedDependencies().values()],E="none"===t?[]:this.getChunkExportDeclarations(a);let x=E.length>0,$=!1;for(const e of b){const{reexports:t}=e;t?.length&&(x=!0,!$&&t.some((e=>"default"===e.reexported))&&($=!0),"es"===a&&(e.reexports=t.filter((({reexported:e})=>!E.find((({exported:t})=>t===e))))))}if(!$)for(const{exported:e}of E)if("default"===e){$=!0;break}const{intro:A,outro:S,banner:w,footer:v}=await La(i,r,this.getRenderedChunkInfo());if(Da[a](m,{accessedGlobals:h,dependencies:b,exports:E,hasDefaultExport:$,hasExports:x,id:d.fileName,indent:p,intro:A,isEntryFacade:c||null!==n&&n.info.isEntry,isModuleFacade:null!==n,log:s,namedExportsMode:"default"!==t,outro:S,snippets:o,usesTopLevelAwait:y},i),w&&f.prepend(w),"es"===a||"cjs"===a){const e=null!==n&&n.info.isEntry&&n.shebang;e&&f.prepend(`#!${e}\n`)}return v&&f.append(v),{chunk:this,magicString:f,preliminaryFileName:d,preliminarySourcemapFileName:u,usedModules:g}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:n}=this;for(const s of e.implicitlyLoadedBefore){const e=t.get(s);e&&e!==this&&n.add(e)}}addNecessaryImportsForFacades(){for(const[e,t]of this.includedReexportsByModule)if(this.includedNamespaces.has(e))for(const e of t)this.imports.add(e)}assignFacadeName({fileName:e,name:t},n,s){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(t||(s?this.getPreserveModulesChunkNameFromModule(n):sl(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof la){const l=this.chunkByModule.get(n);let c;do{if(c=t.alternativeReexportModules.get(e),c){this.chunkByModule.get(c)!==l&&this.inputOptions.onLog(Oe,(s=n.getExportNamesByVariable().get(e)?.[0]||"*",i=n.id,r=c.id,o=t.id,a=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:i,id:o,message:`Export "${s}" of module "${V(i)}" was reexported through module "${V(r)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in "${V(o)}" to point directly to the exporting module or ${a?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:r})),t=c}}while(c)}var s,i,r,o,a}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof mo,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof fo&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof la){const s=this.chunkByModule.get(e);s&&s!==this&&(s.exports.add(i),t.push(i),n&&this.imports.add(i))}}}t.length>0&&this.includedReexportsByModule.set(e,t)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const e=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return e?sl(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const n of this.getExportNames()){if("*"===n[0])continue;const s=this.exportsByName.get(n);if(!(s instanceof mo)){const t=s.module;if(t){const s=this.chunkByModule.get(t);if(s!==this){if(!s||"es"!==e)continue;const t=this.renderedDependencies.get(s);if(!t)continue;const{imports:i,reexports:r}=t,o=r?.find((({reexported:e})=>e===n)),a=i?.find((({imported:e})=>e===o?.imported));if(!a)continue}}}let i=null,r=!1,o=s.getName(this.snippets.getPropertyAccess);if(s instanceof As){for(const e of s.declarations)if(e.parent instanceof Qi||e instanceof er&&e.declaration instanceof Qi){r=!0;break}}else s instanceof mo&&(i=o,"es"===e&&(o=s.renderName));t.push({exported:n,expression:i,hoisted:r,local:o})}return t}getDependenciesToBeDeconflicted(e,t,n){const s=new Set,i=new Set,r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports])if(e||t.isNamespace){const o=t.module;if(o instanceof dn){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?gr[n(o.id)]&&i.add(a):"*"===t.name&&br[n(o.id)]&&r.add(a))}else{const n=this.chunkByModule.get(o);n!==this&&(s.add(n),e&&"default"===n.exportMode&&t.isNamespace&&r.add(n))}}if(t)for(const e of this.dependencies)s.add(e);return{deconflictedDefault:i,deconflictedNamespace:r,dependencies:s}}getDynamicDependencies(){return this.getIncludedDynamicImports().map((e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution)).filter((e=>e!==this&&(e instanceof nl||e instanceof G)))}getDynamicImportStringAndAttributes(e,t){if(e instanceof dn){const n=this.externalChunkByModule.get(e);return[`'${n.getImportPath(t)}'`,n.getImportAttributes(this.snippets)]}return[e||"","es"===this.outputOptions.format&&this.outputOptions.externalImportAttributes||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?z(this.fileName):z(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,t=new Map;for(const n of this.imports){const s=n.module;let i,r;if(s instanceof dn){if(i=this.externalChunkByModule.get(s),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return st(on(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);W(t,i,q).push({imported:r,local:n.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:n,resolution:s}of t.dynamicImports)n.included&&e.push(s instanceof la?{chunk:this.chunkByModule.get(s),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(s),node:n,resolution:s}:s instanceof dn?{chunk:null,externalChunk:this.externalChunkByModule.get(s),facadeChunk:null,node:n,resolution:s}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:s});return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:n,orderedModules:s}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:t&&t.id,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:n.length>0,moduleIds:s.map((({id:e})=>e)),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=il(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(N(e.id.split(ol,1)[0])),r=M(i),o=el.has(r)?i.slice(0,-r.length):i;return P(o)?n&&R(o).startsWith(n)?o.slice(n.length).replace(/^[/\\]/,""):D(this.inputBase,o):`_virtual/${C(o)}`}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o=!1;if("*"===s[0]){const n=s.slice(1);"defaultOnly"===t(n)&&this.inputOptions.onLog(Oe,an(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof mo)continue;const a=n.module;if(a instanceof la){if(i=this.chunkByModule.get(a),i===this)continue;r=i.getVariableExportName(n),o=n.isReassigned}else{if(i=this.externalChunkByModule.get(a),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===t(a.id))return st(on(a.id,r,!0));o=e&&("default"!==r||yr(t(a.id),!0))}}W(n,i,q).push({imported:r,needsLiveBinding:o,reexported:s})}return n}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules)for(const n of t.importMetas){const t=n.getReferencedFileName(this.pluginDriver);t&&e.add(t)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),n=new Map,s=this.getFileName();for(const i of this.dependencies){const r=e.get(i)||null,o=t.get(i)||null,a=i instanceof G||"default"!==i.exportMode,l=i.getImportPath(s);n.set(i,{attributes:i instanceof G?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof G&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&tl(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:i instanceof nl,name:i.variableName,namedExportsMode:a,namespaceVariableName:i.namespaceVariableName,reexports:o})}return this.renderedDependencies=n}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof nl&&this.inlineChunkDependencies(t))}renderModules(e){const{accessedGlobalsByScope:t,dependencies:n,exportNamesByVariable:s,includedNamespaces:i,inputOptions:{onLog:r},isEmpty:o,orderedModules:a,outputOptions:l,pluginDriver:c,renderedModules:d,snippets:u}=this,{compact:h,format:p,freeze:f,generatedCode:{symbols:m}}=l,{_:g,cnst:y,n:b}=u;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const x=new $({separator:`${b}${b}`}),A=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=ja(t.originalCode);if(null!==e)return e}return"\t"}(a,l),S=[];let w="";const v=new Set,I=new Map,P={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,indent:A,pluginDriver:c,snippets:u,symbols:m,useOriginalName:null};let k=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render(P);!P.accessedDocumentCurrentScript&&Gr.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(mr),P.accessedDocumentCurrentScript=!1,({source:n}=r),k||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),I.set(e,n),x.addSource(n),S.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(P);o.renderFirst()?w+=b+e:x.addSource(new E(e))}const a=t.get(e.scope);if(a)for(const e of a)v.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();d[e.id]={get code(){return n?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:s}}w&&x.prepend(w+b+b),this.needsExportsShim&&x.prepend(`${b}${y} ${ho}${g}=${g}void 0;${b}${b}`);const N=h?x:x.trim();var C;return o&&0===this.getExportNames().length&&0===n.size&&r(Oe,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${C=this.getChunkName()}".`,names:[C]}),{accessedGlobals:v,indent:A,magicString:x,renderedSource:N,usedModules:S,usesTopLevelAwait:k}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:n,pluginDriver:s,snippets:i}=this;for(const r of this.getIncludedDynamicImports())if(r.chunk){const{chunk:o,facadeChunk:a,node:l,resolution:c}=r;o===this?l.setInternalResolution(c.namespace):l.setExternalResolution((a||o).exportMode,c,n,i,s,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e);o.setExternalResolution("external",a,n,i,s,t,l,!1,c)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:t},interop:n,preserveModules:s,externalLiveBindings:i}=this.outputOptions,r=new Set;for(const t of this.getExportNames()){const n=this.exportsByName.get(t);"es"!==e&&"system"!==e&&n.isReassigned&&!n.isId?n.setRenderNames("exports",t):n instanceof mo?r.add(n):n.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(["Object","Promise"]);switch(this.needsExportsShim&&o.add(ho),t&&o.add("Symbol"),e){case"system":o.add("module").add("exports");break;case"es":break;case"cjs":o.add("module").add("require").add("__filename").add("__dirname");default:o.add("exports");for(const e of Rr)o.add(e)}Ta(this.orderedModules,this.getDependenciesToBeDeconflicted("es"!==e&&"system"!==e,"amd"===e||"umd"===e||"iife"===e,n),this.imports,o,e,n,s,i,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:n,orderedModules:s,outputOptions:{format:i}}=this;for(const r of s){for(const n of r.importMetas)n.setResolution(i,t,e);n.has(r)&&r.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e)){const n=e.namespace.getMemberVariables();for(const e of Object.values(n))e.included&&t.add(e)}for(let n of t){n instanceof oo&&(n=n.getOriginalVariable()),n instanceof mo&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof la&&(this.checkCircularDependencyImport(n,e),n instanceof fo&&this.outputOptions.preserveModules||t.exports.add(n)))}(this.includedNamespaces.has(e)||e.info.isEntry&&!1!==e.preserveSignature||e.includedDynamicImporters.some((e=>this.chunkByModule.get(e)!==this)))&&this.ensureReexportsAreAvailableForModule(e);for(const{node:t,resolution:n}of e.dynamicImports)t.included&&n instanceof la&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function sl(e){return il(e)??z(e.id)}function il(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function rl(e,t){const n={};for(const[s,i]of e){const e=new Set;if(i.imports)for(const{imported:t}of i.imports)e.add(t);if(i.reexports)for(const{imported:t}of i.reexports)e.add(t);n[t(s)]=[...e]}return n}const ol=/[#?]/,al=e=>e.getFileName();function*ll(e){for(const t of e)yield*t}function cl(e,t,n,s){const{chunkDefinitions:i,modulesInManualChunks:r}=function(e){const t=[],n=new Set(e.keys()),s=Object.create(null);for(const[t,i]of e)dl(t,s[i]||=[],n);for(const[e,n]of Object.entries(s))t.push({alias:e,modules:n});return{chunkDefinitions:t,modulesInManualChunks:n}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(e){const t=new Set,n=new Map,s=[],i=new Set(e);let r=0;for(const e of i){const o=new Set;s.push(o);const a=new Set([e]);for(const e of a){W(n,e,H).add(r);for(const t of e.getDependenciesToBeIncluded())t instanceof dn||a.add(t);for(const{resolution:n}of e.dynamicImports)n instanceof la&&n.includedDynamicImporters.length>0&&!i.has(n)&&(t.add(n),i.add(n),o.add(n));for(const n of e.implicitlyLoadedBefore)i.has(n)||(t.add(n),i.add(n))}r++}const o=[...i],{dynamicEntries:a,dynamicImportsByEntry:l}=function(e,t,n){const s=new Map,i=new Set;for(const[n,r]of e.entries())s.set(r,n),t.has(r)&&i.add(n);const r=[];for(const e of n){const t=new Set;for(const n of e)t.add(s.get(n));r.push(t)}return{dynamicEntries:i,dynamicImportsByEntry:r}}(o,t,s);return{allEntries:o,dependentEntriesByModule:n,dynamicallyDependentEntriesByDynamicEntry:ul(n,a,o),dynamicImportsByEntry:l}}(e),d=function(e){const t=Object.create(null);for(const{dependentEntries:n,modules:s}of e){let e=0n;for(const t of n)e|=1n<<BigInt(t);(t[String(e)]||={dependentEntries:new Set(n),modules:[]}).modules.push(...s)}return Object.values(t)}(function*(e,t){for(const[n,s]of e)t.has(n)||(yield{dependentEntries:s,modules:[n]})}(a,r)),u=function(e,t){const n=e.map((()=>0n));let s=1n;for(const{dependentEntries:e}of t){for(const t of e)n[t]|=s;s<<=1n}return n}(o,d),h=function(e,t,n,s){const i=s.map(((e,n)=>t.has(n)?-1n:0n));for(const[s,r]of t){t.delete(s);const o=i[s];let a=o;for(const t of r)a&=e[t]|i[t];if(a!==o){i[s]=a;for(const e of n[s])W(t,e,H).add(s)}}return i}(u,l,c,o);!function(e,t){let n=1n;for(const{dependentEntries:s}of e){for(const e of s)(t[e]&n)===n&&s.delete(e);n<<=1n}}(d,h);const{chunks:p,sideEffectAtoms:f,sizeByAtom:m}=function(e,t,n,s){const i=Object.create(null),r=new Map,o=[];let a=0n,l=1n;for(const{dependentEntries:c,modules:d}of e){let e=0n,u=-1n;for(const s of c)e|=1n<<BigInt(s),u&=t[s]|n[s];const h=i[String(e)]||={containedAtoms:0n,correlatedAtoms:u,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(c),modules:[],pure:!0,size:0};let p=0,f=!0;for(const e of d)r.set(e,h),e.isIncluded()&&(f&&=!e.hasEffects(),p+=s>1?e.estimateSize():1);f||(a|=l),o.push(p),h.containedAtoms|=l,h.modules.push(...d),h.pure&&=f,h.size+=p,l<<=1n}const c=Object.values(i);return a|=function(e,t,n){const s=new Map;let i=0n;for(const r of e){const{dependencies:e,modules:o}=r;for(const a of o)for(const o of a.getDependenciesToBeIncluded())if(o instanceof dn){if(o.info.moduleSideEffects){const e=W(s,o,(()=>{const e=n;return n<<=1n,i|=e,e}));r.containedAtoms|=e,r.correlatedAtoms|=e}}else{const n=t.get(o);n&&n!==r&&(e.add(n),n.dependentChunks.add(r))}}return i}(c,r,l),{chunks:c,sideEffectAtoms:a,sizeByAtom:o}}(d,u,h,n);return i.push(...function(e,t,n,s,i){ea("optimize chunks",3);const r=function(e,t){const n=[],s=[];for(const i of e)(i.size<t?n:s).push(i);if(0===n.length)return null;return n.sort(hl),s.sort(hl),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return ta("optimize chunks",3),e;return t>1&&i("info",en(e.length,r.small.size,"Initially")),function(e,t,n,s){const{small:i}=e;for(const r of i){const o=pl(r,e,n,s,t<=1?1:1/0);if(o){const{containedAtoms:n,correlatedAtoms:s,modules:a,pure:l,size:c}=r;i.delete(r),gl(o,t,e).delete(o),o.modules.push(...a),o.size+=c,o.pure&&=l;const{dependencies:d,dependentChunks:u,dependentEntries:h}=o;o.correlatedAtoms&=s,o.containedAtoms|=n;for(const e of r.dependentEntries)h.add(e);for(const e of r.dependencies)d.add(e),e.dependentChunks.delete(r),e.dependentChunks.add(o);for(const e of r.dependentChunks)u.add(e),e.dependencies.delete(r),e.dependencies.add(o);d.delete(o),u.delete(o),gl(o,t,e).add(o)}}}(r,t,n,s),t>1&&i("info",en(r.small.size+r.big.size,r.small.size,"After merging chunks")),ta("optimize chunks",3),[...r.small,...r.big]}(p,n,f,m,s).map((({modules:e})=>({alias:null,modules:e})))),i}function dl(e,t,n){const s=new Set([e]);for(const e of s){n.add(e),t.push(e);for(const t of e.dependencies)t instanceof dn||n.has(t)||s.add(t)}}function ul(e,t,n){const s=new Map;for(const i of t){const t=W(s,i,H),r=n[i];for(const n of ll([r.includedDynamicImporters,r.implicitlyLoadedAfter]))for(const s of e.get(n))t.add(s)}return s}function hl({size:e},{size:t}){return e-t}function pl(e,{big:t,small:n},s,i,r){let o=null;for(const a of ll([n,t])){if(e===a)continue;const t=fl(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function fl(e,t,n,s,i){const r=ml(e,t,n,s,i);return r<n?r+ml(t,e,n-r,s,i):1/0}function ml(e,t,n,s,i){const{correlatedAtoms:r}=t;let o=e.containedAtoms;const a=o&s;if((r&a)!==a)return 1/0;const l=new Set(e.dependencies);for(const{dependencies:e,containedAtoms:n}of l){o|=n;const i=n&s;if((r&i)!==i)return 1/0;for(const n of e){if(n===t)return 1/0;l.add(n)}}return function(e,t,n){let s=0,i=0,r=1n;const{length:o}=n;for(;i<o;i++)if((e&r)===r&&(s+=n[i]),r<<=1n,s>=t)return 1/0;return s}(o&~r,n,i)}function gl(e,t,n){return e.size<t?n.small:n.big}const yl=(e,t)=>e.execIndex>t.execIndex?1:-1;function bl(e,t,n){const s=Symbol(e.id),i=[e.id];let r=t;for(e.cycles.add(s);r!==e;)r.cycles.add(s),i.push(r.id),r=n.get(r);return i.push(i[0]),i.reverse(),i}const El=(e,t)=>t?`(${e})`:e;class xl{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,n){return{column:t,line:e,name:n,source:this}}}class $l{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=new Map,n=[],s=[],i=new Map,r=[];for(const o of this.mappings){const a=[];for(const r of o){if(1===r.length)continue;const o=this.sources[r[1]];if(!o)continue;const l=o.traceSegment(r[2],r[3],5===r.length?this.names[r[4]]:"");if(l){const{column:o,line:c,name:d,source:{content:u,filename:h}}=l;let p=t.get(h);if(void 0===p)p=e.length,e.push(h),t.set(h,p),n[p]=u;else if(null==n[p])n[p]=u;else if(null!=u&&n[p]!==u)return st(rn(h));const f=[r[0],p,c,o];if(d){let e=i.get(d);void 0===e&&(e=s.length,s.push(d),i.set(d,e)),f[4]=e}a.push(f)}}r.push(a)}return{mappings:r,names:s,sources:e,sourcesContent:n}}traceSegment(e,t,n){const s=this.mappings[e];if(!s)return null;let i=0,r=s.length-1;for(;i<=r;){const e=i+r>>1,o=s[e];if(o[0]===t||i===r){if(1==o.length)return null;const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],5===o.length?this.names[o[4]]:n):null}o[0]>t?r=e-1:i=e+1}return null}}function Al(e){return function(t,n){return n.missing?(e(Oe,(s=n.plugin,{code:Rt,message:`Sourcemap is likely to be incorrect: a plugin (${s}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:s,url:Ue(We)})),new $l({mappings:[],names:[]},[t])):new $l(n,[t]);var s}}function Sl(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=O(e)||".",o=n.sourceRoot||".",a=t.map(((e,t)=>new xl(R(i,o,e),s[t])));r=new $l(n,a)}else r=new xl(e,t);return s.reduce(i,r)}let wl;function vl(e){let t;return"string"==typeof e?"undefined"==typeof Buffer?(wl??=new TextEncoder,t=wl.encode(e)):t=Buffer.from(e):t=e,function(e){let t,n;try{const r=$o.__wbindgen_add_to_stack_pointer(-16);$o.xxhashBase64Url(r,Co(e));var s=_o()[r/4+0],i=_o()[r/4+1];return t=s,n=i,No(s,i)}finally{$o.__wbindgen_add_to_stack_pointer(16),$o.__wbindgen_free(t,n,1)}}(t)}let Il="sourceMa";async function Pl(e,t,n,s,i){ea("render chunks",2),function(e){for(const t of e)t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint&&t.getPreliminaryFileName()}(e);const r=await Promise.all(e.map((e=>e.render())));ta("render chunks",2),ea("transform chunks",2);const o=function(e){return Object.fromEntries(e.map((e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]})))}(e),{initialHashesByPlaceholder:a,nonHashedChunksWithPlaceholders:l,renderedChunksByPlaceholder:c,hashDependenciesByPlaceholder:d}=await async function(e,t,n,s,i){const r=[],o=new Map,a=new Map,l=new Map,c=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&c.add(t);return await Promise.all(e.map((async({chunk:e,preliminaryFileName:{fileName:d,hashPlaceholder:u},preliminarySourcemapFileName:h,magicString:p,usedModules:f})=>{const m={chunk:e,fileName:d,sourcemapFileName:h?.fileName??null,...await kl(p,d,f,t,n,s,i)},{code:g,map:y}=m;if(u){const{containedPlaceholders:t,transformedCode:n}=Ya(g,c);let i=n;const r=s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],((e,t)=>(t&&(e+=t),e)));r&&(i+=r),o.set(u,m),a.set(u,{containedPlaceholders:t,contentHash:vl(i)})}else r.push(m);const b=h?.hashPlaceholder;y&&b&&l.set(h.hashPlaceholder,vl(y.toString()).slice(0,h.hashPlaceholder.length))}))),{hashDependenciesByPlaceholder:a,initialHashesByPlaceholder:l,nonHashedChunksWithPlaceholders:r,renderedChunksByPlaceholder:o}}(r,o,s,n,i),u=function(e,t,n,s){const i=new Map(n);for(const[n,{fileName:r}]of e){let e="";const o=new Set([n]);for(const n of o){const{containedPlaceholders:s,contentHash:i}=t.get(n);e+=i;for(const e of s)o.add(e)}let a,l;do{l&&(e=l),l=vl(e).slice(0,n.length),a=Ka(r,n,l)}while(s[Ja].has(a.toLowerCase()));s[a]=Xa,i.set(n,l)}return i}(c,d,a,t);!function(e,t,n,s,i,r){for(const{chunk:s,code:o,fileName:a,sourcemapFileName:l,map:c}of e.values()){let e=qa(o,t);const d=qa(a,t);let u=null;c&&(u=l?qa(l,t):`${d}.map`,c.file=qa(c.file,t),e+=Nl(u,c,i,r)),n[d]=s.finalizeChunk(e,c,u,t)}for(const{chunk:e,code:o,fileName:a,sourcemapFileName:l,map:c}of s){let s=t.size>0?qa(o,t):o,d=null;c&&(d=l?qa(l,t):`${a}.map`,s+=Nl(d,c,i,r)),n[a]=e.finalizeChunk(s,c,d,t)}}(c,u,t,l,n,s),ta("transform chunks",2)}async function kl(e,t,n,s,i,r,o){let a=null;const l=[];let c=await r.hookReduceArg0("renderChunk",[e.toString(),s[t],i,{chunks:s}],((e,t,n)=>{if(null==t)return e;if("string"==typeof t&&(t={code:t,map:void 0}),null!==t.map){const e=Eo(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code}));const{compact:u,dir:h,file:p,sourcemap:f,sourcemapExcludeSources:m,sourcemapFile:g,sourcemapPathTransform:y,sourcemapIgnoreList:b}=i;if(u||"\n"===c[c.length-1]||(c+="\n"),f){let s;ea("sourcemaps",3),s=p?R(g||p):h?R(h,t):R(t);a=function(e,t,n,s,i,r){const o=Al(r),a=n.filter((e=>!e.excludeFromSourcemap)).map((e=>Sl(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o))),l=new $l(t,a),c=s.reduce(o,l);let{sources:u,sourcesContent:h,names:p,mappings:f}=c.traceMappings();if(e){const t=O(e);u=u.map((e=>D(t,e))),e=C(e)}h=i?null:h;for(const e of n)bo(e.originalSourcemap,e.sourcemapChain);return new d({file:e,mappings:f,names:p,sources:u,sourcesContent:h})}(s,e.generateDecodedMap({}),n,l,m,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=b(t,n);"boolean"!=typeof i&&st(ln("sourcemapIgnoreList function must return a boolean.")),i&&(void 0===a.x_google_ignoreList&&(a.x_google_ignoreList=[]),a.x_google_ignoreList.includes(e)||a.x_google_ignoreList.push(e)),y&&(t=y(t,n),"string"!=typeof t&&st(ln("sourcemapPathTransform function must return a string."))),a.sources[e]=N(t)}ta("sourcemaps",3)}return{code:c,map:a}}function Nl(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=C(e);r=i?new URL(s,i).toString():s,n.emitFile({fileName:e,source:t.toString(),type:"asset"})}return"hidden"===s?"":`//# ${Il}=${r}\n`}Il+="ppingURL";class Cl{constructor(e,t,n,s,i){this.outputOptions=e,this.unsetOptions=t,this.inputOptions=n,this.pluginDriver=s,this.graph=i,this.facadeChunkByModule=new Map,this.includedNamespaces=new Set}async generate(e){ea("GENERATE",1);const t=Object.create(null),n=(e=>{const t=new Set;return new Proxy(e,{deleteProperty:(e,n)=>("string"==typeof n&&t.delete(n.toLowerCase()),Reflect.deleteProperty(e,n)),get:(e,n)=>n===Ja?t:Reflect.get(e,n),set:(e,n,s)=>("string"==typeof n&&t.add(n.toLowerCase()),Reflect.set(e,n,s))})})(t);this.pluginDriver.setOutputBundle(n,this.outputOptions);try{ea("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),ta("initialize render",2),ea("generate chunks",2);const e=(()=>{let e=0;return(t,n=8)=>{if(n>22)return st(ln(`Hashes cannot be longer than 22 characters, received ${n}. Check the "${t}" option.`));const s=`${Ga}${Cs(++e).padStart(n-5,"0")}${Wa}`;return s.length>n?st(ln(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${s.length}, received ${n}. Check the "${t}" option.`)):s}})(),t=await this.generateChunks(n,e);t.length>1&&function(e,t){if("umd"===e.format||"iife"===e.format)return st(Xt("output.format",Je,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return st(Xt("output.file",qe,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(e.sourcemapFile)return st(Xt("output.sourcemapFile",nt,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(Oe,Xt("output.amd.id",He,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t)e.generateExports();ta("generate chunks",2),await Pl(t,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}return(e=>{const t=new Set,n=Object.values(e);for(const e of n)"asset"===e.type&&e.needsCodeReference&&t.add(e.fileName);for(const e of n)if("chunk"===e.type)for(const n of e.referencedFiles)t.has(n)&&t.delete(n);for(const n of t)delete e[n]})(n),ea("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),ta("generate bundle",2),ta("GENERATE",1),t}async addManualChunks(e){const t=new Map,n=await Promise.all(Object.entries(e).map((async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t,!0)}))));for(const{alias:e,entries:s}of n)for(const n of s)Ol(e,n,t);return t}assignManualChunks(e){const t=[],n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof la){const i=e(s.id,n);"string"==typeof i&&t.push([i,s])}t.sort((([e],[t])=>e>t?1:e<t?-1:0));const s=new Map;for(const[e,n]of t)Ol(e,n,s);return s}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{Fo(t.code)}catch(e){this.inputOptions.onLog(Oe,jt(t,e))}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:n,inlineDynamicImports:s,manualChunks:i,preserveModules:r}=this.outputOptions,o="object"==typeof i?await this.addManualChunks(i):this.assignManualChunks(i),a=function({compact:e,generatedCode:{arrowFunctions:t,constBindings:n,objectShorthand:s,reservedNamesAsProps:i}}){const{_:r,n:o,s:a}=e?{_:"",n:"",s:""}:{_:" ",n:"\n",s:";"},l=n?"const":"var",c=(e,{isAsync:t,name:n})=>`${t?"async ":""}function${n?` ${n}`:""}${r}(${e.join(`,${r}`)})${r}`,d=t?(e,{isAsync:t,name:n})=>{const s=1===e.length;return`${n?`${l} ${n}${r}=${r}`:""}${t?`async${s?" ":r}`:""}${s?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:c,u=(e,{functionReturn:n,lineBreakIndent:s,name:i})=>[`${d(e,{isAsync:!1,name:i})}${t?s?`${o}${s.base}${s.t}`:"":`{${s?`${o}${s.base}${s.t}`:r}${n?"return ":""}`}`,t?`${i?";":""}${s?`${o}${s.base}`:""}`:`${a}${s?`${o}${s.base}`:r}}`],h=i?e=>Pe.test(e):e=>!Se.has(e)&&Pe.test(e);return{_:r,cnst:l,getDirectReturnFunction:u,getDirectReturnIifeLeft:(e,n,{needsArrowReturnParens:s,needsWrappedFunction:i})=>{const[r,o]=u(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${El(`${r}${El(n,t&&s)}${o}`,t||i)}(`},getFunctionIntro:d,getNonArrowFunctionIntro:c,getObject(e,{lineBreakIndent:t}){const n=t?`${o}${t.base}${t.t}`:r;return`{${e.map((([e,t])=>{if(null===e)return`${n}${t}`;const i=Ne(e);return e===t&&s&&e===i?n+e:`${n}${i}:${r}${t}`})).join(",")}${0===e.length?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>h(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:a}}(this.outputOptions),l=function(e){const t=[];for(const n of e.values())n instanceof la&&(n.isIncluded()||n.info.isEntry||n.includedDynamicImporters.length>0)&&t.push(n);return t}(this.graph.modulesById),c=function(e){if(0===e.length)return"/";if(1===e.length)return O(e[0]);const t=e.slice(1).reduce(((e,t)=>{const n=t.split(/\/+|\\+/);let s;for(s=0;e[s]===n[s]&&s<Math.min(e.length,n.length);s++);return e.slice(0,s)}),e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}(function(e,t){const n=[];for(const s of e)(s.info.isEntry||t)&&P(s.id)&&n.push(s.id);return n}(l,r)),d=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof dn&&s.set(i,new G(i,t,n));return s}(this.graph.modulesById,this.outputOptions,c),u=[],h=new Map;for(const{alias:i,modules:p}of s?[{alias:null,modules:l}]:r?l.map((e=>({alias:null,modules:[e]}))):cl(this.graph.entryModules,o,n,this.inputOptions.onLog)){p.sort(yl);const n=new nl(p,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,h,d,this.facadeChunkByModule,this.includedNamespaces,i,t,e,c,a);u.push(n)}for(const e of u)e.link();const p=[];for(const e of u)p.push(...e.generateFacades());return[...u,...p]}}function Ol(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return st((i=t.id,r=e,o=s,{code:gt,message:`Cannot assign "${V(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}const Ml=e=>()=>st(function(e){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${e}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:Ue("plugin-development/#a-simple-example")}}(e)),Dl=Ml("fs.mkdir"),Rl=Ml("fs.readFile"),_l=Ml("fs.writeFile");async function Ll(e,t,n,s,i,r,o,a,l){const c=await function(e,t,n,s,i,r,o,a){let l=null,c=null;if(i){l=new Set;for(const n of i)e===n.source&&t===n.importer&&l.add(n.plugin);c=(e,t)=>({...e,resolve:(e,n,{attributes:r,custom:o,isEntry:a,skipSelf:l}=Ee)=>(l??=!0,s(e,n,o,a,r||xe,l?[...i,{importer:n,plugin:t,source:e}]:i))})}return n.hookFirstAndGetPlugin("resolveId",[e,t,{attributes:a,custom:r,isEntry:o}],c,l)}(e,t,s,i,r,o,a,l);return null==c?Ml("path.resolve")():c[0]}const Bl="at position ",Tl="at output position ";const zl={delete:()=>!1,get(){},has:()=>!1,set(){}};function Vl(e){return e.startsWith(Bl)||e.startsWith(Tl)?st({code:at,message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):st({code:pt,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).`})}const Fl=(e,t,n=Hl)=>{const{onwarn:s,onLog:i}=e,r=jl(n,s);if(i){const e=Re[t];return(t,n)=>i(t,Ul(n),((t,n)=>{if("error"===t)return st(Gl(n));Re[t]>=e&&r(t,Gl(n))}))}return r},jl=(e,t)=>t?(n,s)=>{n===Oe?t(Ul(s),(t=>e(Oe,Gl(t)))):e(n,s)}:e,Ul=e=>(Object.defineProperty(e,"toString",{value:()=>Wl(e),writable:!0}),e),Gl=e=>"string"==typeof e?{message:e}:"function"==typeof e?Gl(e()):e,Wl=e=>{let t="";return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${V(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+e.message},Hl=(e,t)=>{const n=Wl(t);switch(e){case Oe:return console.warn(n);case De:return console.debug(n);default:return console.info(n)}};function ql(e,t,n,s,i=/$./){const r=new Set(t),o=Object.keys(e).filter((e=>!(r.has(e)||i.test(e))));o.length>0&&s(Oe,function(e,t,n){return{code:Lt,message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const Kl={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:$e,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:$e,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:$e,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Yl={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Jl=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};st(Xt(`${n}.preset`,s,`valid values are ${je(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;st(Xt(t,n,`valid values are ${s}${je(Object.keys(e))}. You can also supply an object for more fine-grained control`,i))}return(e=>e&&"object"==typeof e?e:{})(i)})(t,n,s,i)(e)},Xl=async e=>(await async function(e){do{e=(await Promise.all(e)).flat(1/0)}while(e.some((e=>e?.then)));return e}([e])).filter(Boolean);async function Zl(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:Eo(e.map);const a=e.code;let l=e.ast;const c=[],u=[];let h=!1;const p=()=>h=!0;let f="",m=e.code;const g=e=>(t,n)=>{t=Gl(t),n&&it(t,n,m,i),t.id=i,t.hook="transform",e(t)};let y;try{y=await n.hookReduceArg0("transform",[m,i],(function(e,n,i){let o,a;if("string"==typeof n)o=n;else{if(!n||"object"!=typeof n)return e;if(t.updateOptions(n),null==n.code)return(n.map||n.ast)&&s(Oe,function(e){return{code:Ct,message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(i.name)),e;({code:o,map:a,ast:l}=n)}return null!==a&&r.push(Eo("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),m=o,o}),((e,t)=>{return f=t.name,{...e,addWatchFile(t){c.push(t),e.addWatchFile(t)},cache:h?e.cache:(l=e.cache,y=p,{delete:e=>(y(),l.delete(e)),get:e=>(y(),l.get(e)),has:e=>(y(),l.has(e)),set:(e,t)=>(y(),l.set(e,t))}),debug:g(e.debug),emitFile:e=>(u.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&it(t,n,m,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:Eo({version:3,...Sl(e,t,n,s,Al(i)).traceMappings()})}(i,a,o,r,s);if(!e){return new E(a).generateMap({hires:!0,includeContent:!0,source:i})}return o!==e&&(o=e,r.length=0),new d({...e,file:null,sourcesContent:e.sourcesContent})},info:g(e.info),setAssetSource(){return this.error({code:At,message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:g(e.warn)};var l,y}))}catch(e){return st(sn(e,f,{hook:"transform",id:i}))}return!h&&u.length>0&&(t.transformFiles=u),{ast:l,code:y,customTransformCache:h,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:c}}const Ql="resolveDependencies";class ec{constructor(e,t,n,s){this.graph=e,this.modulesById=t,this.options=n,this.pluginDriver=s,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(e,t,n,s,i,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await Ll(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,n,"boolean"==typeof s?s:!t,i),t,e),i),this.hasModuleSideEffects=n.treeshake?n.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,t){const n=this.extendLoadModulesPromise(Promise.all(e.map((e=>this.loadEntryModule(e,!1,void 0,null,t)))));return await this.awaitLoadModulesPromise(),n}async addEntryModules(e,t){const n=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const s=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const i=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null)))).then((i=>{for(const[r,o]of i.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t,nc(o,e[r],t,s+r);const i=this.indexedEntryModules.find((e=>e.module===o));i?i.index=Math.min(i.index,n+r):this.indexedEntryModules.push({index:n+r,module:o})}return this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1)),i})));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:i}}async emitChunk({fileName:e,id:t,importer:n,name:s,implicitlyLoadedAfterOneOf:i,preserveSignature:r}){const o={fileName:e||null,id:t,importer:n,name:s||null},a=i?await this.addEntryWithImplicitDependants(o,i):(await this.addEntryModules([o],!1)).newEntryModules[0];return null!=r&&(a.preserveSignature=r),a}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,xe),void 0,!1,!e.resolveDependencies||Ql)).info}addEntryWithImplicitDependants(e,t){const n=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then((async s=>{if(nc(s,e,!1,n),!s.info.isEntry){const n=await Promise.all(t.map((t=>this.loadEntryModule(t,!1,e.importer,s.id))));if(!s.info.isEntry){this.implicitEntryModules.add(s);for(const e of n)s.implicitlyLoadedAfter.add(e);for(const e of s.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(s)}}return s})))}async addModuleSource(e,t,n){let s;try{s=await this.graph.fileOperationQueue.run((async()=>{const t=await this.pluginDriver.hookFirst("load",[e]);return null!==t?t:(this.graph.watchFiles[e]=!0,await Rl(e,"utf8"))}))}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${V(t)})`),s+=`: ${n.message}`,n.message=s,n}const i="string"==typeof s?{code:s}:null!=s&&"object"==typeof s&&"string"==typeof s.code?s:st(function(e){return{code:"BAD_LOADER",message:`Error loading "${V(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e)),r=i.code;65279===r.charCodeAt(0)&&(i.code=r.slice(1));const o=this.graph.cachedModules.get(e);if(!o||o.customTransformCache||o.originalCode!==i.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:o.ast,code:o.code,id:o.id,meta:o.meta,moduleSideEffects:o.moduleSideEffects,resolvedSources:o.resolvedIds,syntheticNamedExports:o.syntheticNamedExports}]))n.updateOptions(i),await n.setSource(await Zl(i,n,this.pluginDriver,this.options.onLog));else{if(o.transformFiles)for(const e of o.transformFiles)this.pluginDriver.emitFile(e);await n.setSource(o)}}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise,await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){return this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch((()=>{})),e}async fetchDynamicDependencies(e,t){const n=await Promise.all(t.map((t=>t.then((async([t,n])=>null===n?null:"string"==typeof n?(t.resolution=n,null):t.resolution=await this.fetchResolvedDependency(V(n.id),e.id,n))))));for(const t of n)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({attributes:e,id:t,meta:n,moduleSideEffects:s,syntheticNamedExports:i},r,o,a){const l=this.modulesById.get(t);if(l instanceof la)return r&&Ho(e,l.info.attributes)&&this.options.onLog(Oe,Ht(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof dn)return st({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${l.id} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`});const c=new la(this.graph,t,this.options,o,s,i,n,e);this.modulesById.set(t,c);const d=this.addModuleSource(t,r,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),u])),u=ic(d).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));u.catch((()=>{})),this.moduleLoadPromises.set(c,d);const h=await d;return a?a===Ql&&await u:await this.fetchModuleDependencies(c,...h),c}async fetchModuleDependencies(e,t,n,s){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,n)]),e.linkImports(),await s)}fetchResolvedDependency(e,t,n){if(n.external){const{attributes:s,external:i,id:r,moduleSideEffects:o,meta:a}=n;let l=this.modulesById.get(r);if(l){if(!(l instanceof dn))return st(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${V(t)}", but is already an existing non-external module id.`}}(e,t));Ho(l.info.attributes,s)&&this.options.onLog(Oe,Ht(l.info.attributes,s,e,t))}else l=new dn(this.options,r,o,a,"absolute"!==i&&P(r),s),this.modulesById.set(r,l);return Promise.resolve(l)}return this.fetchModule(n,t,!1,!1)}async fetchStaticDependencies(e,t){for(const n of await Promise.all(t.map((t=>t.then((([t,n])=>this.fetchResolvedDependency(t,e.id,n)))))))e.dependencies.add(n),n.importers.push(e.id);if(!this.options.treeshake||"no-treeshake"===e.info.moduleSideEffects)for(const t of e.dependencies)t instanceof la&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,n){const{makeAbsoluteExternalsRelative:s}=this.options;if(e){if("object"==typeof e){const i=e.external||this.options.external(e.id,t,!0);return{...e,external:i&&("relative"===i||!P(e.id)||!0===i&&sc(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(sc(e,n,s)||"absolute"),id:i&&s?tc(e,t):e}}const i=s?tc(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:sc(i,n,s)||"absolute",id:i}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const n=await this.resolveDynamicImport(e,"string"==typeof t.argument?t.argument:t.argument.esTreeNode,e.id,Go(t.node));return n&&"object"==typeof n&&(t.id=n.id),[t,n]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAttributes,(async([t,n])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,xe,!1,n),t,e.id,n)]))}getResolvedIdWithDefaults(e,t){if(!e)return null;const n=e.external||!1;return{attributes:e.attributes||t,external:n,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!n),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,t,n){const s=this.moduleLoadPromises.get(e);if(n)return n===Ql?ic(s):s;if(t){e.info.isEntry=!0,this.implicitEntryModules.delete(e);for(const t of e.implicitlyLoadedAfter)t.implicitlyLoadedBefore.delete(e);e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await s)}handleInvalidResolvedId(e,t,n,s){return null===e?k(t)?st(function(e,t){return{code:Tt,exporter:e,id:t,message:`Could not resolve "${e}" from "${V(t)}"`}}(t,n)):(this.options.onLog(Oe,function(e,t){return{code:Tt,exporter:e,id:t,message:`"${e}" is imported by "${V(t)}", but could not be resolved – treating it as an external dependency.`,url:Ue("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,n)),{attributes:s,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(Oe,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${V(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1){const r=await Ll(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,xe,!0,xe);if(null==r)return st(null===s?function(e){return{code:Bt,message:`Could not resolve entry module "${V(e)}".`}}(e):function(e,t){return{code:vt,message:`Module "${V(e)}" that should be implicitly loaded before "${V(t)}" could not be resolved.`}}(e,s));const o="object"==typeof r&&r.external;return!1===r||o?st(null===s?o&&i?{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${e}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}:function(e){return{code:Bt,message:`Entry module "${V(e)}" cannot be external.`}}(e):function(e,t){return{code:vt,message:`Module "${V(e)}" that should be implicitly loaded before "${V(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},xe),void 0,t,!1)}async resolveDynamicImport(e,t,n,s){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,n,{attributes:s}]);if("string"!=typeof t)return"string"==typeof i?i:i?this.getResolvedIdWithDefaults(i,s):null;if(null==i){const i=e.resolvedIds[t];return i?(Ho(i.attributes,s)&&this.options.onLog(Oe,Ht(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,xe,!1,s),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function tc(e,t){return k(e)?t?R(t,"..",e):R(e):e}function nc(e,{fileName:t,name:n},s,i){if(null!==t)e.chunkFileNames.add(t);else if(null!==n){let t=0;for(;e.chunkNames[t]?.priority<i;)t++;e.chunkNames.splice(t,0,{isUserDefined:s,name:n,priority:i})}}function sc(e,t,n){return!0===n||"ifRelativeSource"===n&&k(t)||!P(e)}async function ic(e){const[t,n]=await e;return Promise.all([...t,...n])}class rc extends Ms{constructor(){super(),this.parent=null,this.variables.set("undefined",new ro)}findVariable(e){let t=this.variables.get(e);return t||(t=new ii(e),this.variables.set(e,t)),t}}function oc(e,t,n,s,i){const r=s.sanitizeFileName(e||"asset");return Qa(Za("function"==typeof s.assetFileNames?s.assetFileNames({name:e,source:t,type:"asset"}):s.assetFileNames,"output.assetFileNames",{ext:()=>M(r).slice(1),extname:()=>M(r),hash:e=>n.slice(0,Math.max(0,e||8)),name:()=>r.slice(0,Math.max(0,r.length-M(r).length))}),i)}function ac(e,{bundle:t},n){t[Ja].has(e.toLowerCase())?n(Oe,function(e){return{code:ft,message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Xa}const lc=new Set(["chunk","asset","prebuilt-chunk"]);function cc(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return st(ln(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}function dc(e,t){return"string"!=typeof e.fileName?st((n=e.name||t,{code:lt,message:`Plugin error - Unable to get file name for asset "${n}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_<referenceId>, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`})):e.fileName;var n}function uc(e,t){return e.fileName?e.fileName:t?t.get(e.module).getFileName():st((n=e.fileName||e.name,{code:dt,message:`Plugin error - Unable to get file name for emitted chunk "${n}". You can only get file names once chunks have been generated after the "renderStart" hook.`}));var n}class hc{constructor(e,t,n){this.graph=e,this.options=t,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=e=>function(e){return Boolean(e&&lc.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!F(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):st(ln(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`)):st(ln(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`)),this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId)if("asset"===t.type&&"string"!=typeof t.fileName)return st({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t.name||e}" - no asset source set.`})},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?uc(t,this.facadeChunkByModule):"prebuilt-chunk"===t.type?t.fileName:dc(t,e):st({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`})},this.setAssetSource=(e,t)=>{const n=this.filesByReferenceId.get(e);if(!n)return st({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return st(ln(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return st({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=cc(t,n,e);if(this.output)this.finalizeAdditionalAsset(n,s,this.output);else{n.source=s;for(const e of this.outputFileEmitters)e.finalizeAdditionalAsset(n,s,e.output)}},this.setChunkInformation=e=>{this.facadeChunkByModule=e},this.setOutputBundle=(e,t)=>{const n=this.output={bundle:e,fileNamesBySource:new Map,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&ac(e.fileName,n,this.options.onLog);const s=new Map;for(const e of this.filesByReferenceId.values())if("asset"===e.type&&void 0!==e.source)if(e.fileName)this.finalizeAdditionalAsset(e,e.source,n);else{W(s,vl(e.source),(()=>[])).push(e)}else"prebuilt-chunk"===e.type&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e));for(const[e,t]of s)this.finalizeAssetsWithSameSource(t,e,n)},this.filesByReferenceId=n?new Map(n.filesByReferenceId):new Map,n?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let n=t;do{n=vl(n).slice(0,8).replaceAll("-","$")}while(this.filesByReferenceId.has(n)||this.outputFileEmitters.some((({filesByReferenceId:e})=>e.has(n))));e.referenceId=n,this.filesByReferenceId.set(n,e);for(const{filesByReferenceId:t}of this.outputFileEmitters)t.set(n,e);return n}createPrebuiltChunk(e){return{code:e.code,dynamicImports:[],exports:e.exports||[],facadeModuleId:null,fileName:e.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:e.map||null,moduleIds:[],modules:{},name:e.fileName,preliminaryFileName:e.fileName,referencedFiles:[],sourcemapFileName:e.sourcemapFileName||null,type:"chunk"}}emitAsset(e){const t=void 0===e.source?void 0:cc(e.source,e,null),n={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,referenceId:"",source:t,type:"asset"},s=this.assignReferenceId(n,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(n,this.output);else for(const e of this.outputFileEmitters)e.emitAssetWithReferenceId(n,e.output);return s}emitAssetWithReferenceId(e,t){const{fileName:n,source:s}=e;n&&ac(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>go.LOAD_AND_PARSE)return st({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return st(ln(`Emitted chunks need to have a valid string id, received "${e.id}"`));const t={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{})),this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if("string"!=typeof e.code)return st(ln(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||F(e.fileName))return st(ln(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const t={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},n=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),n}finalizeAdditionalAsset(e,t,{bundle:n,fileNamesBySource:s,outputOptions:i}){let{fileName:r,needsCodeReference:o,referenceId:a}=e;if(!r){const o=vl(t);r=s.get(o),r||(r=oc(e.name,t,o,i,n),s.set(o,r))}const l={...e,fileName:r,source:t};this.filesByReferenceId.set(a,l);const c=n[r];"asset"===c?.type?c.needsCodeReference&&=o:n[r]={fileName:r,name:e.name,needsCodeReference:o,source:t,type:"asset"}}finalizeAssetsWithSameSource(e,t,{bundle:n,fileNamesBySource:s,outputOptions:i}){let r,o="",a=!0;for(const s of e){a&&=s.needsCodeReference;const e=oc(s.name,s.source,t,i,n);(!o||e.length<o.length||e.length===o.length&&e<o)&&(o=e,r=s)}s.set(t,o);for(const t of e){const e={...t,fileName:o};this.filesByReferenceId.set(t.referenceId,e)}n[o]={fileName:o,name:r.name,needsCodeReference:a,source:r.source,type:"asset"}}}function pc(e,t,n,s,i){return Re[e]<Re[i]?Vs:(i,r)=>{null!=r&&n(Oe,{code:Et,message:`Plugin "${s}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(i=Gl(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}function fc(e,t,s,i,r,o){const{logLevel:a,onLog:l}=i;let c,d=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(Bl)||e.name.startsWith(Tl)||o.has(e.name)?d=!1:o.add(e.name)),t)if(d){const n=e.cacheKey||e.name;h=t[n]||(t[n]=Object.create(null)),c={delete:e=>delete h[e],get(e){const t=h[e];if(t)return t[0]=0,t[1]},has(e){const t=h[e];return!!t&&(t[0]=0,!0)},set(e,t){h[e]=[0,t]}}}else u=e.name,c={delete:()=>Vl(u),get:()=>Vl(u),has:()=>Vl(u),set:()=>Vl(u)};else c=zl;var u,h;return{addWatchFile(e){s.watchFiles[e]=!0},cache:c,debug:pc(De,"PLUGIN_LOG",l,e.name,a),emitFile:r.emitFile.bind(r),error:t=>st(sn(Gl(t),e.name)),getFileName:r.getFileName,getModuleIds:()=>s.modulesById.keys(),getModuleInfo:s.getModuleInfo,getWatchFiles:()=>Object.keys(s.watchFiles),info:pc(Me,"PLUGIN_LOG",l,e.name,a),load:e=>s.moduleLoader.preloadModule(e),meta:{rollupVersion:n,watchMode:s.watchMode},parse:Fo,resolve:(t,n,{attributes:i,custom:r,isEntry:o,skipSelf:a}=Ee)=>(a??=!0,s.moduleLoader.resolveId(t,n,r,o,i||xe,a?[{importer:n,plugin:e,source:t}]:null)),setAssetSource:r.setAssetSource,warn:pc(Oe,"PLUGIN_WARNING",l,e.name,a)}}const mc=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class gc{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new hc(e,t,i&&i.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...i?i.plugins:[],...n];const r=new Set;if(this.pluginContexts=new Map(this.plugins.map((n=>[n,fc(n,s,e,t,this.fileEmitter,r)]))),i)for(const e of n)for(const n of mc)n in e&&t.onLog(Oe,(o=e.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${n}" hook used by the output plugin ${o} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var o}createOutputPluginDriver(e){return new gc(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,n,s){return this.hookFirstAndGetPlugin(e,t,n,s).then((e=>e&&e[0]))}async hookFirstAndGetPlugin(e,t,n,s){for(const i of this.getSortedPlugins(e)){if(s?.has(i))continue;const r=await this.runHook(e,t,i,n);if(null!=r)return[r,i]}return null}hookFirstSync(e,t,n){for(const s of this.getSortedPlugins(e)){const i=this.runHookSync(e,t,s,n);if(null!=i)return i}return null}async hookParallel(e,t,n){const s=[];for(const i of this.getSortedPlugins(e))i[e].sequential?(await Promise.all(s),s.length=0,await this.runHook(e,t,i,n)):s.push(this.runHook(e,t,i,n));await Promise.all(s)}hookReduceArg0(e,[t,...n],s,i){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e))r=r.then((r=>this.runHook(e,[r,...n],t,i).then((e=>s.call(this.pluginContexts.get(t),r,e,t)))));return r}hookReduceArg0Sync(e,[t,...n],s,i){for(const r of this.getSortedPlugins(e)){const o=[t,...n],a=this.runHookSync(e,o,r,i);t=s.call(this.pluginContexts.get(r),t,a,r)}return t}async hookReduceValue(e,t,n,s){const i=[],r=[];for(const t of this.getSortedPlugins(e,Ec))t[e].sequential?(i.push(...await Promise.all(r)),r.length=0,i.push(await this.runHook(e,n,t))):r.push(this.runHook(e,n,t));return i.push(...await Promise.all(r)),i.reduce(s,await t)}hookReduceValueSync(e,t,n,s,i){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,n,t,i);r=s.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,n){let s=Promise.resolve();for(const i of this.getSortedPlugins(e))s=s.then((()=>this.runHook(e,t,i,n)));return s.then(xc)}getSortedPlugins(e,t){return W(this.sortedPlugins,e,(()=>yc(e,this.plugins,t)))}runHook(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;let o=this.pluginContexts.get(n);s&&(o=s(o,n));let a=null;return Promise.resolve().then((()=>{if("function"!=typeof r)return r;const s=r.apply(o,t);return s?.then?(a=[n.name,e,t],this.unfulfilledActions.add(a),Promise.resolve(s).then((e=>(this.unfulfilledActions.delete(a),e)))):s})).catch((t=>(null!==a&&this.unfulfilledActions.delete(a),st(sn(t,n.name,{hook:e})))))}runHookSync(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;let o=this.pluginContexts.get(n);s&&(o=s(o,n));try{return r.apply(o,t)}catch(t){return st(sn(t,n.name,{hook:e}))}}}function yc(e,t,n=bc){const s=[],i=[],r=[];for(const o of t){const t=o[e];if(t){if("object"==typeof t){if(n(t.handler,e,o),"pre"===t.order){s.push(o);continue}if("post"===t.order){r.push(o);continue}}else n(t,e,o);i.push(o)}}return[...s,...i,...r]}function bc(e,t,n){"function"!=typeof e&&st(function(e,t){return{code:$t,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a function hook or an object with a "handler" function.`,plugin:t}}(t,n.name))}function Ec(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return st(function(e,t){return{code:$t,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:t}}(t,n.name))}function xc(){}class $c{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise(((t,n)=>{this.queue.push({reject:n,resolve:t,task:e}),this.work()}))}async work(){if(this.workerCount>=this.maxParallel)return;let e;for(this.workerCount++;e=this.queue.shift();){const{reject:t,resolve:n,task:s}=e;try{n(await s())}catch(e){t(e)}}this.workerCount--}}class Ac{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,n,s,i=e||1;function r(e,r){++t>i&&(s=n,o(1),++t),n[e]=r}function o(e){t=0,n=Object.create(null),e||(s=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==n[e]||void 0!==s[e]},get:function(e){var t=n[e];return void 0!==t?t:void 0!==(t=s[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==n[e]?n[e]=t:r(e,t)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new se,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=go.LOAD_AND_PARSE,this.scope=new rc,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=e=>{const t=this.modulesById.get(e);return t?t.info:null},!1!==e.cache){if(e.cache?.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);this.pluginCache=e.cache?.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.values(t))e[0]++}}if(t){this.watchMode=!0;const e=(...e)=>this.pluginDriver.hookParallel("watchChange",e),n=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",e),t.onCurrentRun("close",n)}this.pluginDriver=new gc(this,e,e.plugins,this.pluginCache),this.moduleLoader=new ec(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new $c(e.maxParallelFileOps),this.pureFunctions=(({treeshake:e})=>{const t=Object.create(null);for(const n of e?e.manualPureFunctions:[]){let e=t;for(const t of n.split("."))e=e[t]||=Object.create(null);e[zs]=!0}return t})(e)}async build(){ea("generate module graph",2),await this.generateModuleGraph(),ta("generate module graph",2),ea("sort and bind modules",2),this.phase=go.ANALYSE,this.sortModules(),ta("sort and bind modules",2),ea("mark included statements",2),this.includeStatements(),ta("mark included statements",2),this.phase=go.GENERATE}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let n=!0;for(const[e,s]of Object.entries(t))s[0]>=this.options.experimentalCacheExpiry?delete t[e]:n=!1;n&&delete this.pluginCache[e]}return{modules:this.modules.map((e=>e.toJSON())),plugins:this.pluginCache}}async generateModuleGraph(){var e;if(({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((e=this.options.input,Array.isArray(e)?e.map((e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:void 0,name:null}))):Object.entries(e).map((([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:void 0,name:e})))),!0)),0===this.entryModules.length)throw new Error("You must supply options.input to rollup");for(const e of this.modulesById.values())e instanceof la?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)ia(t);if(this.options.treeshake){let t=1;do{ea(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)e.isExecuted&&("no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include());if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);ta("treeshaking pass "+t++,3)}while(this.needsTreeshakingPass)}else for(const e of this.modules)e.includeAllInBundle();for(const e of this.externalModules)e.warnUnusedImports();for(const e of this.implicitEntryModules)for(const t of e.implicitlyLoadedAfter)t.info.isEntry||t.isIncluded()||st(Qt(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=function(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=e=>{if(e instanceof la){for(const t of e.dependencies)r.has(t)?s.has(t)||n.push(bl(t,e,r)):(r.set(t,e),a(t));for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{resolution:t}of e.dynamicImports)t instanceof la&&i.add(t);o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),a(t));for(const e of i)r.has(e)||(r.set(e,null),a(e));return{cyclePaths:n,orderedModules:o}}(this.entryModules);for(const e of t)this.options.onLog(Oe,Ut(e));this.modules=e;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of e.importDescriptions.values())"*"===t.name||t.module.getVariableForExportName(t.name)[0]||e.log(Oe,Zt(t.name,e.id,t.module.id),t.start)}}function Sc(e,t){return t()}function wc(e,t,s,i){e=yc("onLog",e);const r=Re[i],o=(i,a,l=Ae)=>{if(!(Re[i]<r)){for(const t of e){if(l.has(t))continue;const{onLog:e}=t,c=e=>Re[e]<r?Vs:n=>o(e,Gl(n),new Set(l).add(t));if(!1===("handler"in e?e.handler:e).call({debug:c(De),error:e=>st(Gl(e)),info:c(Me),meta:{rollupVersion:n,watchMode:s},warn:c(Oe)},i,a))return}t(i,a)}};return o}const vc=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Ic=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>!t.startsWith("\0")&&e(t,...n)||!1;if(e){const n=new Set,s=[];for(const i of(t=e,Array.isArray(t)?t.filter(Boolean):t?[t]:[]))i instanceof RegExp?s.push(i):n.add(i);return(e,...t)=>n.has(e)||s.some((t=>t.test(e)))}var t;return()=>!1},Pc=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},kc=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:20},Nc=(e,t)=>{const n=e.moduleContext;if("function"==typeof n)return e=>n(e)??t;if(n){const e=Object.create(null);for(const[t,s]of Object.entries(n))e[R(t)]=s;return n=>e[n]??t}return()=>t},Cc=e=>{if(!1===e.treeshake)return!1;const t=Jl(e.treeshake,Kl,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??$e,moduleSideEffects:Oc(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Oc=e=>{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)}return e&&st(Xt("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},Mc=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,Dc=/^[a-z]:/i;function Rc(e){const t=Dc.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Mc,"_")}const _c=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return st(Xt("output.file",qe,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return st(Xt("output.file",qe,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},Lc=e=>{const t=e.format;switch(t){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return t;default:return st(Xt("output.format",Je,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Bc=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?st(Xt("output.inlineDynamicImports",Ze,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},Tc=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return st(Xt("output.inlineDynamicImports",Ze,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return st(Xt("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},zc=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return R(t)},Vc=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?st(Xt("output.amd.id",He,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?st(Xt("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):t.autoId?{autoId:!0,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:!1,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}},Fc=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},jc=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?st(Xt("output.dir",qe,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},Uc=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function Gc(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return st({code:yt,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:Ue(Ke)});return n||"auto"}const Wc=(e,t)=>(null!=e.externalImportAssertions&&cn('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),Hc=e=>{const t=Jl(e.generatedCode,Yl,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:!0===t.arrowFunctions,constBindings:!0===t.constBindings,objectShorthand:!0===t.objectShorthand,reservedNamesAsProps:!1!==t.reservedNamesAsProps,symbols:!0===t.symbols}},qc=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},Kc=new Set(["compat","auto","esModule","default","defaultOnly"]),Yc=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||Jc(n=t(s)):s in e?e[s]:Jc(e[s]=t(s))}return void 0===t?()=>"default":()=>Jc(t)},Jc=e=>Kc.has(e)?e:st(Xt("output.interop",Qe,`use one of ${Array.from(Kc,(e=>JSON.stringify(e))).join(", ")}`,e)),Xc=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return st(Xt("output.manualChunks",et,'this option is not supported for "output.inlineDynamicImports"'));if(n)return st(Xt("output.manualChunks",et,'this option is not supported for "output.preserveModules"'))}return s||{}},Zc=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),Qc=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},ed=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(e){try{new URL(e)}catch{return!1}return!0}(t)?(n=t).endsWith("/")?n:n+"/":st(Xt("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n};function td(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function nd(e,t,n,s,i){const{options:r,outputPluginDriver:o,unsetOptions:a}=await async function(e,t,n,s){if(!e)throw new Error("You must supply an options object");const i=await Xl(e.plugins);td(i,Tl);const r=t.createOutputPluginDriver(i);return{...await sd(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return Sc(0,(async()=>{const n=new Cl(r,a,t,o,i),s=await n.generate(e);if(e){if(ea("WRITE",1),!r.dir&&!r.file)return st({code:kt,message:'You must specify "output.file" or "output.dir" for the build.',url:Ue(qe)});await Promise.all(Object.values(s).map((e=>i.fileOperationQueue.run((()=>async function(e,t){const n=R(t.dir||O(t.file),e.fileName);return await Dl(O(n),{recursive:!0}),_l(n,"asset"===e.type?e.source:e.code)}(e,r)))))),await o.hookParallel("writeBundle",[r,s]),ta("WRITE",1)}return l=s,{output:Object.values(l).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>rd(e)-rd(t)))};var l}))}function sd(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=Lc(e),o=Bc(e,t),a=Tc(e,o,t),l=_c(e,a,t),c=Hc(e),d=Wc(e,t),u={amd:Vc(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:Fc(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:jc(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:Uc(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:Gc(e,s),extend:e.extend||!1,externalImportAssertions:d,externalImportAttributes:d,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:Fc(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:c,globals:e.globals||{},hoistTransitiveImports:e.hoistTransitiveImports??!0,indent:qc(e,i),inlineDynamicImports:o,interop:Yc(e),intro:Fc(e,"intro"),manualChunks:Xc(e,o,a),minifyInternalExports:Zc(e,r,i),name:e.name,noConflict:e.noConflict||!1,outro:Fc(e,"outro"),paths:e.paths||{},plugins:await Xl(e.plugins),preserveModules:a,preserveModulesRoot:zc(e),sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Rc,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:ed(e),sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:Qc(e,s),sourcemapIgnoreList:"function"==typeof e.sourcemapIgnoreList?e.sourcemapIgnoreList:!1===e.sourcemapIgnoreList?()=>!1:e=>e.includes("node_modules"),sourcemapPathTransform:e.sourcemapPathTransform,strict:e.strict??!0,systemNullSetters:e.systemNullSetters??!0,validate:e.validate||!1};return ql(e,Object.keys(u),"output options",t.onLog),{options:u,unsetOptions:s}}(s.hookReduceArg0Sync("outputOptions",[n],((e,t)=>t||e),(e=>{const t=()=>e.error({code:ct,message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...e,emitFile:t,setAssetSource:t}})),e,t)}var id;function rd(e){return"asset"===e.type?id.ASSET:e.isEntry?id.ENTRY_CHUNK:id.SECONDARY_CHUNK}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(id||(id={})),e.VERSION=n,e.defineConfig=function(e){return e},e.rollup=function(e){return async function(e,t){const{options:s,unsetOptions:i}=await async function(e,t){if(!e)throw new Error("You must supply an options object to rollup");const s=await async function(e,t){const s=yc("options",await Xl(e.plugins)),i=e.logLevel||Me,r=wc(s,Fl(e,i),t,i);for(const o of s){const{name:s,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:pc(De,"PLUGIN_LOG",r,s,i),error:e=>st(sn(Gl(e),s,{hook:"onLog"})),info:pc(Me,"PLUGIN_LOG",r,s,i),meta:{rollupVersion:n,watchMode:t},warn:pc(Oe,"PLUGIN_WARNING",r,s,i)},e);c&&(e=c)}return e}(e,t),{options:i,unsetOptions:r}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await Xl(e.plugins),r=e.logLevel||Me,o=wc(i,Fl(e,r),t,r),a=e.strictDeprecations||!1,l=kc(e),c={cache:vc(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Ic(e.external),input:Pc(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:Nc(e,s),onLog:o,perf:e.perf||!1,plugins:i,preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveSymlinks:e.preserveSymlinks||!1,shimMissingExports:e.shimMissingExports||!1,strictDeprecations:a,treeshake:Cc(e)};return ql(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(s,t);return td(i.plugins,Bl),{options:i,unsetOptions:r}}(e,null!==t);(function(e){e.perf?(Yo=new Map,ea=Xo,ta=Zo,e.plugins=e.plugins.map(sa)):(ea=Vs,ta=Vs)})(s),await async function(){await zo()}();const r=new Ac(s,t),o=!1!==e.cache;e.cache&&(s.cache=void 0,e.cache=void 0);ea("BUILD",1),await Sc(r.pluginDriver,(async()=>{try{ea("initialize",2),await r.pluginDriver.hookParallel("buildStart",[s]),ta("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);throw t.length>0&&(e.watchFiles=t),await r.pluginDriver.hookParallel("buildEnd",[e]),await r.pluginDriver.hookParallel("closeBundle",[]),e}await r.pluginDriver.hookParallel("buildEnd",[])})),ta("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async e=>a.closed?st(Vt()):nd(!1,s,i,e,r),get watchFiles(){return Object.keys(r.watchFiles)},write:async e=>a.closed?st(Vt()):nd(!0,s,i,e,r)};s.perf&&(a.getTimings=Qo);return a}(e,null)}}));
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rollup={})}(this,(function(e){var t="undefined"!=typeof document?document.currentScript:null,n="4.9.6";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i={exports:{}};!function(e,t){!function(e){const t=",".charCodeAt(0),n=";".charCodeAt(0),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;e<s.length;e++){const t=s.charCodeAt(e);i[e]=t,r[t]=e}const o="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}};function a(e){const t=new Int32Array(5),n=[];let s=0;do{const i=l(e,s),r=[];let o=!0,a=0;t[0]=0;for(let n=s;n<i;n++){let s;n=c(e,n,t,0);const l=t[0];l<a&&(o=!1),a=l,d(e,n,i)?(n=c(e,n,t,1),n=c(e,n,t,2),n=c(e,n,t,3),d(e,n,i)?(n=c(e,n,t,4),s=[l,t[1],t[2],t[3],t[4]]):s=[l,t[1],t[2],t[3]]):s=[l],r.push(s)}o||u(r),n.push(r),s=i+1}while(s<=e.length);return n}function l(e,t){const n=e.indexOf(";",t);return-1===n?e.length:n}function c(e,t,n,s){let i=0,o=0,a=0;do{const n=e.charCodeAt(t++);a=r[n],i|=(31&a)<<o,o+=5}while(32&a);const l=1&i;return i>>>=1,l&&(i=-2147483648|-i),n[s]+=i,t}function d(e,n,s){return!(n>=s)&&e.charCodeAt(n)!==t}function u(e){e.sort(h)}function h(e,t){return e[0]-t[0]}function p(e){const s=new Int32Array(5),i=16384,r=i-36,a=new Uint8Array(i),l=a.subarray(0,r);let c=0,d="";for(let u=0;u<e.length;u++){const h=e[u];if(u>0&&(c===i&&(d+=o.decode(a),c=0),a[c++]=n),0!==h.length){s[0]=0;for(let e=0;e<h.length;e++){const n=h[e];c>r&&(d+=o.decode(l),a.copyWithin(0,r,c),c-=r),e>0&&(a[c++]=t),c=f(a,c,s,n,0),1!==n.length&&(c=f(a,c,s,n,1),c=f(a,c,s,n,2),c=f(a,c,s,n,3),4!==n.length&&(c=f(a,c,s,n,4)))}}}return d+o.decode(a.subarray(0,c))}function f(e,t,n,s,r){const o=s[r];let a=o-n[r];n[r]=o,a=a<0?-a<<1|1:a<<1;do{let n=31&a;a>>>=5,a>0&&(n|=32),e[t++]=i[n]}while(a>0);return t}e.decode=a,e.encode=p,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,i.exports);var r=i.exports;class o{constructor(e){this.bits=e instanceof o?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let a=class e{constructor(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,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(e){return this.start<e&&e<this.end}eachNext(e){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;for(;t;)e(t),t=t.previous}edit(e,t,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}split(t){const n=t-this.start,s=this.original.slice(0,n),i=this.original.slice(n);this.original=s;const r=new e(t,this.end,i);return r.outro=this.outro,this.outro="",this.end=t,this.edited?(r.edit("",!1),this.content=""):this.content=s,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){const e=this.split(this.end-t.length);this.edited&&e.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}return this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0}};function l(){return"undefined"!=typeof window&&"function"==typeof window.btoa?e=>window.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const c=l();class d{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=r.encode(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+c(this.toString())}}function u(e,t){const n=e.split(/[/\\]/),s=t.split(/[/\\]/);for(n.pop();n[0]===s[0];)n.shift(),s.shift();if(n.length){let e=n.length;for(;e--;)n[e]=".."}return n.concat(s).join("/")}const h=Object.prototype.toString;function p(e){return"[object Object]"===h.call(e)}function f(e){const t=e.split("\n"),n=[];for(let e=0,s=0;e<t.length;e++)n.push(s),s+=t[e].length+1;return function(e){let t=0,s=n.length;for(;t<s;){const i=t+s>>1;e<n[i]?s=i:t=i+1}const i=t-1;return{line:i,column:e-n[i]}}}const m=/\w/;class g{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,n,s){if(t.length){let i=t.indexOf("\n",0),r=-1;for(;i>=0;){const o=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&o.push(s),this.rawSegments.push(o),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,r=i,i=t.indexOf("\n",i+1)}const o=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&o.push(s),this.rawSegments.push(o),this.advance(t.slice(r+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,n,s,i){let r=t.start,o=!0,a=!1;for(;r<t.end;){if(this.hires||o||i.has(r)){const t=[this.generatedCodeColumn,e,s.line,s.column];"boundary"===this.hires?m.test(n[r])?a||(this.rawSegments.push(t),a=!0):(this.rawSegments.push(t),a=!1):this.rawSegments.push(t)}"\n"===n[r]?(s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0):(s.column+=1,this.generatedCodeColumn+=1,o=!1),r+=1}this.pending=null}advance(e){if(!e)return;const t=e.split("\n");if(t.length>1){for(let e=0;e<t.length-1;e++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}}const y="\n",b={insertLeft:!1,insertRight:!1,storeName:!1};class E{constructor(e,t={}){const n=new a(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:new o},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList}}),this.byStart[0]=n,this.byEnd[e.length]=n}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this}appendRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this}clone(){const e=new E(this.original,{filename:this.filename});let t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;const s=t.next,i=s&&s.clone();i&&(n.next=i,i.previous=n,n=i),t=s}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new o(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),n=new g(e.hires),s=f(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext((e=>{const i=s(e.start);e.intro.length&&n.advance(e.intro),e.edited?n.addEdit(0,e.content,i,e.storeName?t.indexOf(e.original):-1):n.addUneditedChunk(0,e,this.original,i,this.sourcemapLocations),e.outro.length&&n.advance(e.outro)})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?u(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:n.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new d(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),n=t.filter((e=>/^\t+/.test(e))),s=t.filter((e=>/^ {2,}/.test(e)));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce(((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)}),1/0);return new Array(i+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const n=/^[^\r\n]/gm;if(p(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const s={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach((e=>{for(let t=e[0];t<e[1];t+=1)s[t]=!0}))}let i=!1!==t.indentStart;const r=t=>i?`${e}${t}`:(i=!0,t);this.intro=this.intro.replace(n,r);let o=0,a=this.firstChunk;for(;a;){const t=a.end;if(a.edited)s[o]||(a.content=a.content.replace(n,r),a.content.length&&(i="\n"===a.content[a.content.length-1]));else for(o=a.start;o<t;){if(!s[o]){const t=this.original[o];"\n"===t?i=!0:"\r"!==t&&i&&(i=!1,o===a.start||(this._splitChunk(a,o),a=a.next),a.prependRight(e))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(n,r),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return b.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),b.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return b.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),b.insertRight=!0),this.prependRight(e,t)}move(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);const s=this.byStart[e],i=this.byEnd[t],r=s.previous,o=i.next,a=this.byStart[n];if(!a&&i===this.lastChunk)return this;const l=a?a.previous:this.lastChunk;return r&&(r.next=o),o&&(o.previous=r),l&&(l.next=s),a&&(a.previous=i),s.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=l,i.next=a||null,l||(this.firstChunk=s),a||(this.lastChunk=i),this}overwrite(e,t,n,s){return s=s||{},this.update(e,t,n,{...s,overwrite:!s.contentOnly})}update(e,t,n,s){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===s&&(b.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),b.storeName=!0),s={storeName:!0});const i=void 0!==s&&s.storeName,r=void 0!==s&&s.overwrite;if(i){const n=this.original.slice(e,t);Object.defineProperty(this.storedNames,n,{writable:!0,value:!0,enumerable:!0})}const o=this.byStart[e],l=this.byEnd[t];if(o){let e=o;for(;e!==l;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}o.edit(n,i,!r)}else{const s=new a(e,t,"").edit(n,i);l.next=s,s.previous=l}return this}prepend(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this}remove(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);let n=this.byStart[e];for(;n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let 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]:""}lastLine(){let e=this.outro.lastIndexOf(y);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(e=n.outro.lastIndexOf(y),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(y),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(y),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return e=this.intro.lastIndexOf(y),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;let n="",s=this.firstChunk;for(;s&&(s.start>e||s.end<=e);){if(s.start<t&&s.end>=t)return n;s=s.next}if(s&&s.edited&&s.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const i=s;for(;s;){!s.intro||i===s&&s.start!==e||(n+=s.intro);const r=s.start<t&&s.end>=t;if(r&&s.edited&&s.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const o=i===s?e-s.start:0,a=r?s.content.length+t-s.end:s.content.length;if(n+=s.content.slice(o,a),!s.outro||r&&s.end!==t||(n+=s.outro),r)break;s=s.next}return n}snip(e,t){const n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const n=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=f(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`)}const n=e.split(t);return this.byEnd[t]=e,this.byStart[t]=n,this.byEnd[n.end]=n,e===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let 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}length(){let e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let n=this.lastChunk;do{const e=n.end,s=n.trimEnd(t);if(n.end!==e&&(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),s)return!0;n=n.previous}while(n);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let n=this.firstChunk;do{const e=n.end,s=n.trimStart(t);if(n.end!==e&&(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),s)return!0;n=n.next}while(n);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function n(e,n){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,((t,n)=>{if("$"===n)return"$";if("&"===n)return e[0];return+n<e.length?e[+n]:`$${n}`})):t(...e,e.index,n,e.groups)}if(e.global){(function(e,t){let n;const s=[];for(;n=e.exec(t);)s.push(n);return s})(e,this.original).forEach((e=>{null!=e.index&&this.overwrite(e.index,e.index+e[0].length,n(e,this.original))}))}else{const t=this.original.match(e);t&&null!=t.index&&this.overwrite(t.index,t.index+t[0].length,n(t,this.original))}return this}_replaceString(e,t){const{original:n}=this,s=n.indexOf(e);return-1!==s&&this.overwrite(s,s+e.length,t),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:n}=this,s=e.length;for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s))this.overwrite(i,i+s,t);return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}const x=Object.prototype.hasOwnProperty;let $=class e{constructor(e={}){this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof E)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!p(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","ignoreList","indentExclusionRanges","separator"].forEach((t=>{x.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(x.call(this.uniqueSourceIndexByFilename,e.filename)){const 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}append(e,t){return this.addSource({content:new E(e),separator:t&&t.separator||""}),this}clone(){const t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach((e=>{t.addSource({filename:e.filename,content:e.content.clone(),separator:e.separator})})),t}generateDecodedMap(e={}){const t=[];let n;this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{~t.indexOf(e)||t.push(e)}))}));const s=new g(e.hires);return this.intro&&s.advance(this.intro),this.sources.forEach(((e,i)=>{i>0&&s.advance(this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=f(o.original);o.intro&&s.advance(o.intro),o.firstChunk.eachNext((n=>{const i=a(n.start);n.intro.length&&s.advance(n.intro),e.filename?n.edited?s.addEdit(r,n.content,i,n.storeName?t.indexOf(n.original):-1):s.addUneditedChunk(r,n,o.original,i,o.sourcemapLocations):s.advance(n.content),n.outro.length&&s.advance(n.outro)})),o.outro&&s.advance(o.outro),e.ignoreList&&-1!==r&&(void 0===n&&(n=[]),n.push(r))})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map((t=>e.file?u(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:s.raw,x_google_ignoreList:n}}generateMap(e){return new d(this.generateDecodedMap(e))}getIndentString(){const e={};return this.sources.forEach((t=>{const n=t.content._getRawIndentString();null!==n&&(e[n]||(e[n]=0),e[n]+=1)})),Object.keys(e).sort(((t,n)=>e[t]-e[n]))[0]||"\t"}indent(e){if(arguments.length||(e=this.getIndentString()),""===e)return this;let t=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach(((n,s)=>{const i=void 0!==n.separator?n.separator:this.separator,r=t||s>0&&/\r?\n$/.test(i);n.content.indent(e,{exclude:n.indentExclusionRanges,indentStart:r}),t="\n"===n.content.lastChar()})),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,((t,n)=>n>0?e+t:t))),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map(((e,t)=>{const n=void 0!==e.separator?e.separator:this.separator;return(t>0?n:"")+e.content.toString()})).join("");return this.intro+e}isEmpty(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some((e=>!e.content.isEmpty()))}length(){return this.sources.reduce(((e,t)=>e+t.content.length()),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){let t,n=0;do{if(t=this.sources[n++],!t)break}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let n,s=this.sources.length-1;do{if(n=this.sources[s--],!n){this.intro=this.intro.replace(t,"");break}}while(!n.content.trimEndAborted(e));return this}};const A=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,S=/^\.?\.\//,w=/\\/g,v=/[/\\]/,I=/\.[^.]+$/;function P(e){return A.test(e)}function k(e){return S.test(e)}function N(e){return e.replace(w,"/")}function C(e){return e.split(v).pop()||""}function O(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function M(e){const t=I.exec(C(e));return t?t[0]:""}function D(e,t){const n=e.split(v).filter(Boolean),s=t.split(v).filter(Boolean);for("."===n[0]&&n.shift(),"."===s[0]&&s.shift();n[0]&&s[0]&&n[0]===s[0];)n.shift(),s.shift();for(;".."===s[0]&&n.length>0;)s.shift(),n.pop();for(;n.pop();)s.unshift("..");return s.join("/")}function R(...e){const t=e.shift();if(!t)return"/";let n=t.split(v);for(const t of e)if(P(t))n=t.split(v);else{const e=t.split(v);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&n.pop()}n.push(...e)}return n.join("/")}const _=/[\n\r'\\\u2028\u2029]/,L=/([\n\r'\u2028\u2029])/g,B=/\\/g;function T(e){return _.test(e)?e.replace(B,"\\\\").replace(L,"\\$1"):e}function z(e){const t=C(e);return t.slice(0,Math.max(0,t.length-M(e).length))}function V(e){return P(e)?D(R(),e):e}function F(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||P(e)}const j=/^(\.\.\/)*\.\.$/;function U(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=N(D(O(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+C(t);if(j.test(i))return[...i.split("/"),"..",C(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}class G{constructor(e,t,n){this.options=t,this.inputBase=n,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAttributes=null,this.id=e.id,this.moduleInfo=e.info,this.renormalizeRenderPath=e.renormalizeRenderPath,this.suggestedVariableName=e.suggestedVariableName}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options;return this.fileName=("function"==typeof e?e(this.id):e[this.id])||(this.renormalizeRenderPath?N(D(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=function(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(n.length>0)return t(n,{lineBreakIndent:null});return null}("es"===this.options.format&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return T(this.renormalizeRenderPath?U(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function W(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function H(){return new Set}function q(){return[]}const K=Symbol("Unknown Key"),Y=Symbol("Unknown Non-Accessor Key"),J=Symbol("Unknown Integer"),X=Symbol("Symbol.toStringTag"),Z=[],Q=[K],ee=[Y],te=[J],ne=Symbol("Entities");class se{constructor(){this.entityPaths=Object.create(null,{[ne]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const n=this.getEntities(e);return!!n.has(t)||(n.add(t),!1)}withTrackedEntityAtPath(e,t,n,s){const i=this.getEntities(e);if(i.has(t))return s;i.add(t);const r=n();return i.delete(t),r}getEntities(e){let t=this.entityPaths;for(const n of e)t=t[n]=t[n]||Object.create(null,{[ne]:{value:new Set}});return t[ne]}}const ie=new se;class re{constructor(){this.entityPaths=Object.create(null,{[ne]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]=s[t]||Object.create(null,{[ne]:{value:new Map}});const i=W(s[ne],t,H);return!!i.has(n)||(i.add(n),!1)}}function oe(e,t){return 0!=(e&t)}function ae(e,t,n){return e&~t|-n&t}const le=Symbol("Unknown Value"),ce=Symbol("Unknown Truthy Value");class de{constructor(){this.flags=0}get included(){return oe(this.flags,1)}set included(e){this.flags=ae(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){pe(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return le}getReturnExpressionWhenCalledAtPath(e,t,n,s){return he}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included=!0}includeCallArguments(e,t){for(const n of t)n.include(e,!1)}shouldBeIncluded(e){return!0}}const ue=new class extends de{},he=[ue,!1],pe=e=>{for(const t of e.args)t?.deoptimizePath(Q)},fe={args:[null],type:0},me={args:[null,ue],type:1},ge={args:[null],type:2,withNew:!1};class ye extends de{constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.initReached=!1,this.isId=!1,this.isReassigned=!1,this.kind=null,this.renderBaseName=null,this.renderName=null}addReference(e){}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,t){if(t?.(this))return this.name;if(this.renderedLikeHoisted)return this.renderedLikeHoisted.getName(e,t);const n=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(n)}`:n}hasEffectsOnInteractionAtPath(e,{type:t},n){return 0!==t||e.length>0}include(){this.included=!0,this.renderedLikeHoisted?.include()}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class be extends ye{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>(this.isNamespace?1:0)}include(){super.include(),this.module.used=!0}}const Ee=Object.freeze(Object.create(null)),xe=Object.freeze({}),$e=Object.freeze([]),Ae=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}}),Se=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]),we=/[^\w$]/g,ve=e=>(e=>/\d/.test(e[0]))(e)||Se.has(e)||"arguments"===e;function Ie(e){return e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(we,"_"),ve(e)&&(e=`_${e}`),e||"_"}const Pe=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,ke=/^(?:0|[1-9]\d*)$/;function Ne(e){return Pe.test(e)?"__proto__"===e?'["__proto__"]':e:ke.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function Ce(e){return Pe.test(e)?e:JSON.stringify(e)}const Oe="warn",Me="info",De="debug",Re={[De]:0,[Me]:1,silent:3,[Oe]:2};function _e(e,t){return e.start<=t&&t<e.end}function Le(e,t,n){return function(e,t={}){const{offsetLine:n=0,offsetColumn:s=0}=t;let i=0;const r=e.split("\n").map(((e,t)=>{const n=i+e.length+1,s={start:i,end:n,line:t};return i=n,s}));let o=0;return function(t,i){if("string"==typeof t&&(t=e.indexOf(t,i??0)),-1===t)return;let a=r[o];const l=t>=a.end?1:-1;for(;a;){if(_e(a,t))return{line:n+a.line,column:s+t-a.start,character:t};o+=l,a=r[o]}}}(e,n)(t,n&&n.startIndex)}function Be(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const Te=120,ze=10,Ve="...";function Fe(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(Be(s[t-1].slice(0,n)).length+ze+Ve.length,Te),r=Math.max(0,t-3);let o=Math.min(t+2,s.length);for(s=s.slice(r,o);!/\S/.test(s[s.length-1]);)s.pop(),o-=1;const a=String(o).length;return s.map(((e,s)=>{const o=r+s+1===t;let l=String(s+r+1);for(;l.length<a;)l=` ${l}`;let c=Be(e);if(c.length>i&&(c=`${c.slice(0,i-Ve.length)}${Ve}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+Be(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`})).join("\n")}function je(e,t){const n=e.length<=1,s=e.map((e=>`"${e}"`));let i=n?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;return t&&(i+=` ${n?t[0]:t[1]}`),i}function Ue(e){return`https://rollupjs.org/${e}`}const Ge="troubleshooting/#error-name-is-not-exported-by-module",We="troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect",He="configuration-options/#output-amd-id",qe="configuration-options/#output-dir",Ke="configuration-options/#output-exports",Ye="configuration-options/#output-extend",Je="configuration-options/#output-format",Xe="configuration-options/#output-globals",Ze="configuration-options/#output-inlinedynamicimports",Qe="configuration-options/#output-interop",et="configuration-options/#output-manualchunks",tt="configuration-options/#output-name",nt="configuration-options/#output-sourcemapfile";function st(e){throw e instanceof Error||(e=Object.assign(new Error(e.message),e),Object.defineProperty(e,"name",{value:"RollupError",writable:!0})),e}function it(e,t,n,s){if("object"==typeof t){const{line:n,column:i}=t;e.loc={column:i,file:s,line:n}}else{e.pos=t;const i=Le(n,t,{offsetLine:1});if(!i)return;const{line:r,column:o}=i;e.loc={column:o,file:s,line:r}}if(void 0===e.frame){const{line:t,column:s}=e.loc;e.frame=Fe(n,t,s)}}const rt="ADDON_ERROR",ot="ALREADY_CLOSED",at="ANONYMOUS_PLUGIN_CACHE",lt="ASSET_NOT_FINALISED",ct="CANNOT_EMIT_FROM_OPTIONS_HOOK",dt="CHUNK_NOT_GENERATED",ut="CIRCULAR_REEXPORT",ht="DEPRECATED_FEATURE",pt="DUPLICATE_PLUGIN_NAME",ft="FILE_NAME_CONFLICT",mt="ILLEGAL_IDENTIFIER_AS_NAME",gt="INVALID_CHUNK",yt="INVALID_EXPORT_OPTION",bt="INVALID_IMPORT_ATTRIBUTE",Et="INVALID_LOG_POSITION",xt="INVALID_OPTION",$t="INVALID_PLUGIN_HOOK",At="INVALID_SETASSETSOURCE",St="MISSING_EXPORT",wt="MISSING_GLOBAL_NAME",vt="MISSING_IMPLICIT_DEPENDANT",It="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",Pt="MISSING_NODE_BUILTINS",kt="MISSING_OPTION",Nt="MIXED_EXPORTS",Ct="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",Ot="OPTIMIZE_CHUNK_STATUS",Mt="PARSE_ERROR",Dt="PLUGIN_ERROR",Rt="SOURCEMAP_BROKEN",_t="UNEXPECTED_NAMED_IMPORT",Lt="UNKNOWN_OPTION",Bt="UNRESOLVED_ENTRY",Tt="UNRESOLVED_IMPORT",zt="VALIDATION_ERROR";function Vt(){return{code:ot,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function Ft(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function jt({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return it(i,n,t,e),i}function Ut(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(V).join(" -> ")}`}}function Gt(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${V(t)} is at (${n}:${s})\n${Fe(e,n,s)}`}}function Wt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${V(t)}".`}}function Ht(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${V(s)}" tried to import "${V(n)}" with ${qt(t)} attributes, but it was already imported elsewhere with ${qt(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const qt=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function Kt(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${V(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:Ue("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function Yt(e,t,n){return{code:yt,message:`"${e}" was specified for "output.exports", but entry module "${V(n)}" has the following exports: ${je(t)}`,url:Ue(Ke)}}function Jt(e){return{code:bt,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${V(e)}". Import attributes need to have string keys and values. The attribute will be removed.`}}function Xt(e,t,n,s){return{code:xt,message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:Ue(t)}}function Zt(e,t,n){const s=".json"===M(n);return{binding:e,code:St,exporter:n,id:t,message:`"${e}" is not exported by "${V(n)}", imported by "${V(t)}".${s?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:Ue(Ge)}}function Qt(e){const t=[...e.implicitlyLoadedBefore].map((e=>V(e.id))).sort();return{code:vt,message:`Module "${V(e.id)}" that should be implicitly loaded before ${je(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function en(e,t,n){return{code:Ot,message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function tn(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function nn(e,t){let n=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?n+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),{cause:e,code:Mt,id:t,message:n,stack:e.stack}}function sn(e,t,{hook:n,id:s}={}){const i=e.code;return e.pluginCode||null==i||"string"==typeof i&&i.startsWith("PLUGIN_")||(e.pluginCode=i),e.code=Dt,e.plugin=t,n&&(e.hook=n),s&&(e.id=s),e}function rn(e){return{code:Rt,message:`Multiple conflicting contents for sourcemap source ${e}`}}function on(e,t,n){const s=n?"reexport":"import";return{code:_t,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${V(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:Ue(Qe)}}function an(e){return{code:_t,exporter:e,message:`There was a namespace "*" reexport from the external module "${V(e)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:Ue(Qe)}}function ln(e){return{code:zt,message:e}}function cn(e,t,n,s,i){!function(e,t,n,s,i,r){if(n||i){const n=function(e,t,n){return{code:ht,message:e,url:Ue(t),...n?{plugin:n}:{}}}(e,t,r);if(i)return st(n);s(Oe,n)}}(e,t,n,s.onLog,s.strictDeprecations,i)}class dn{constructor(e,t,n,s,i,r){this.options=e,this.id=t,this.renormalizeRenderPath=i,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=Ie(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:$e,dynamicallyImportedIds:$e,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:$e,implicitlyLoadedBefore:$e,importedIdResolutions:$e,importedIds:$e,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,syntheticNamedExports:!1}}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const n=new be(this,e);return this.declarations.set(e,n),this.exportedVariables.set(n,e),[n]}suggestName(e){const t=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,t),t>this.mostCommonSuggestion&&(this.mostCommonSuggestion=t,this.suggestedVariableName=e)}warnUnusedImports(){const e=[...this.declarations].filter((([e,t])=>"*"!==e&&!t.included&&!this.reexported&&!t.referenced)).map((([e])=>e));if(0===e.length)return;const t=new Set;for(const n of e)for(const e of this.declarations.get(n).module.importers)t.add(e);const n=[...t];var s,i,r;this.options.onLog(Oe,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${je(i=e,["is","are"])} imported from external module "${s}" but never used in ${je(r.map((e=>V(e))))}.`,names:i})}}const un={ArrayPattern(e,t){for(const n of t.elements)n&&un[n.type](e,n)},AssignmentPattern(e,t){un[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?un.RestElement(e,n):un[n.value.type](e,n.value)},RestElement(e,t){un[t.argument.type](e,t.argument)}},hn=function(e){const t=[];return un[e.type](t,e),t};function pn(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function fn(){return{accessed:new se,assigned:new se,brokenFlow:!1,called:new re,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new re,replacedVariableInits:new Map}}function mn(e,t=null){return Object.create(t,e)}new Set("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 arguments 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(" ")).add("");const gn=new class extends de{getLiteralValueAtPath(){}},yn={value:{hasEffectsWhenCalled:null,returns:ue}},bn=new class extends de{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?On(In,e[0]):he}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Cn(In,e[0],t,n)}},En={value:{hasEffectsWhenCalled:null,returns:bn}},xn=new class extends de{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?On(Pn,e[0]):he}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Cn(Pn,e[0],t,n)}},$n={value:{hasEffectsWhenCalled:null,returns:xn}},An=new class extends de{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?On(Nn,e[0]):he}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Cn(Nn,e[0],t,n)}},Sn={value:{hasEffectsWhenCalled:null,returns:An}},wn={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(Z,ie,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(Z,ge,t)},returns:An}},vn=mn({hasOwnProperty:En,isPrototypeOf:En,propertyIsEnumerable:En,toLocaleString:Sn,toString:Sn,valueOf:yn}),In=mn({valueOf:En},vn),Pn=mn({toExponential:Sn,toFixed:Sn,toLocaleString:Sn,toPrecision:Sn,valueOf:$n},vn),kn=mn({exec:yn,test:En},vn),Nn=mn({anchor:Sn,at:yn,big:Sn,blink:Sn,bold:Sn,charAt:Sn,charCodeAt:$n,codePointAt:yn,concat:Sn,endsWith:En,fixed:Sn,fontcolor:Sn,fontsize:Sn,includes:En,indexOf:$n,italics:Sn,lastIndexOf:$n,link:Sn,localeCompare:$n,match:yn,matchAll:yn,normalize:Sn,padEnd:Sn,padStart:Sn,repeat:Sn,replace:wn,replaceAll:wn,search:$n,slice:Sn,small:Sn,split:yn,startsWith:En,strike:Sn,sub:Sn,substr:Sn,substring:Sn,sup:Sn,toLocaleLowerCase:Sn,toLocaleUpperCase:Sn,toLowerCase:Sn,toString:Sn,toUpperCase:Sn,trim:Sn,trimEnd:Sn,trimLeft:Sn,trimRight:Sn,trimStart:Sn,valueOf:Sn},vn);function Cn(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function On(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:he}const Mn=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects"],Dn="_rollupAnnotations",Rn="_rollupRemoved";function _n(e,t){return Bn(0,new Uint32Array(e),t)}const Ln=[function(e,t,n){const s=t[e++];st(function(e,t){return{code:Mt,message:e,pos:t}}(Fn(e,t,n),s))},function(e,t,n){return{type:"ArrayExpression",start:t[e++],end:t[e++],elements:Tn(e,t,n)}},function(e,t,n){return{type:"ArrayPattern",start:t[e++],end:t[e++],elements:Tn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=1==(1&r),a=2==(2&r),l=4==(4&r),c=Tn(t[e++],t,n),d=Bn(t[e++],t,n),u=zn(e,t);return{type:"ArrowFunctionExpression",start:s,end:i,async:o,expression:a,generator:l,...u.length>0?{[Dn]:u}:{},params:c,body:d,id:null}},function(e,t,n){const s=t[e++],i=t[e++],r=Mn[t[e++]],o=Bn(t[e++],t,n);return{type:"AssignmentExpression",start:s,end:i,operator:r,left:Bn(e,t,n),right:o}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n);return{type:"AssignmentPattern",start:s,end:i,left:Bn(e,t,n),right:r}},function(e,t,n){return{type:"AwaitExpression",start:t[e++],end:t[e++],argument:Bn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=Mn[t[e++]],o=Bn(t[e++],t,n);return{type:"BinaryExpression",start:s,end:i,operator:r,left:Bn(e,t,n),right:o}},function(e,t,n){return{type:"BlockStatement",start:t[e++],end:t[e++],body:Tn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e];return{type:"BreakStatement",start:s,end:i,label:0===r?null:Bn(r,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=1==(1&t[e++]),o=Bn(t[e++],t,n),a=Tn(t[e++],t,n),l=zn(e,t);return{type:"CallExpression",start:s,end:i,optional:r,...l.length>0?{[Dn]:l}:{},callee:o,arguments:a}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++];return{type:"CatchClause",start:s,end:i,param:0===r?null:Bn(r,t,n),body:Bn(t[e],t,n)}},function(e,t,n){return{type:"ChainExpression",start:t[e++],end:t[e++],expression:Bn(e,t,n)}},function(e,t,n){return{type:"ClassBody",start:t[e++],end:t[e++],body:Tn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=0===r?null:Bn(r,t,n),a=t[e++];return{type:"ClassDeclaration",start:s,end:i,id:o,superClass:0===a?null:Bn(a,t,n),body:Bn(t[e],t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=0===r?null:Bn(r,t,n),a=t[e++];return{type:"ClassExpression",start:s,end:i,id:o,superClass:0===a?null:Bn(a,t,n),body:Bn(t[e],t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n),o=Bn(t[e++],t,n);return{type:"ConditionalExpression",start:s,end:i,test:Bn(e,t,n),consequent:r,alternate:o}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e];return{type:"ContinueStatement",start:s,end:i,label:0===r?null:Bn(r,t,n)}},function(e,t){return{type:"DebuggerStatement",start:t[e++],end:t[e++]}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n),o=Fn(e,t,n);return{type:"ExpressionStatement",start:s,end:i,directive:o,expression:r}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n);return{type:"DoWhileStatement",start:s,end:i,body:Bn(e,t,n),test:r}},function(e,t){return{type:"EmptyStatement",start:t[e++],end:t[e++]}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++];return{type:"ExportAllDeclaration",start:s,end:i,exported:0===r?null:Bn(r,t,n),source:Bn(t[e++],t,n),attributes:Tn(t[e],t,n)}},function(e,t,n){return{type:"ExportDefaultDeclaration",start:t[e++],end:t[e++],declaration:Bn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=0===r?null:Bn(r,t,n),a=Tn(t[e++],t,n),l=t[e++],c=0===l?null:Bn(l,t,n);return{type:"ExportNamedDeclaration",start:s,end:i,specifiers:Tn(e,t,n),source:o,attributes:a,declaration:c}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=Bn(e,t,n);return{type:"ExportSpecifier",start:s,end:i,local:o,exported:0===r?{...o}:Bn(r,t,n)}},function(e,t,n){return{type:"ExpressionStatement",start:t[e++],end:t[e++],expression:Bn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n),o=Bn(t[e++],t,n);return{type:"ForInStatement",start:s,end:i,left:Bn(e,t,n),right:r,body:o}},function(e,t,n){const s=t[e++],i=t[e++],r=1==(1&t[e++]),o=Bn(t[e++],t,n),a=Bn(t[e++],t,n);return{type:"ForOfStatement",start:s,end:i,await:r,left:Bn(e,t,n),right:o,body:a}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=0===r?null:Bn(r,t,n),a=t[e++],l=0===a?null:Bn(a,t,n),c=t[e++];return{type:"ForStatement",start:s,end:i,init:o,test:l,update:0===c?null:Bn(c,t,n),body:Bn(t[e],t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=1==(1&r),a=2==(2&r),l=t[e++],c=0===l?null:Bn(l,t,n),d=Tn(t[e++],t,n),u=Bn(t[e++],t,n),h=zn(e,t);return{type:"FunctionDeclaration",start:s,end:i,async:o,generator:a,...h.length>0?{[Dn]:h}:{},id:c,params:d,body:u,expression:!1}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=1==(1&r),a=2==(2&r),l=t[e++],c=0===l?null:Bn(l,t,n),d=Tn(t[e++],t,n),u=Bn(t[e++],t,n),h=zn(e,t);return{type:"FunctionExpression",start:s,end:i,async:o,generator:a,...h.length>0?{[Dn]:h}:{},id:c,params:d,body:u,expression:!1}},function(e,t,n){return{type:"Identifier",start:t[e++],end:t[e++],name:Fn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n),o=t[e++],a=0===o?null:Bn(o,t,n);return{type:"IfStatement",start:s,end:i,test:Bn(e,t,n),consequent:r,alternate:a}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n);return{type:"ImportAttribute",start:s,end:i,key:Bn(e,t,n),value:r}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n),o=Tn(t[e++],t,n);return{type:"ImportDeclaration",start:s,end:i,specifiers:Tn(e,t,n),source:r,attributes:o}},function(e,t,n){return{type:"ImportDefaultSpecifier",start:t[e++],end:t[e++],local:Bn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=0===r?null:Bn(r,t,n);return{type:"ImportExpression",start:s,end:i,source:Bn(e,t,n),options:o}},function(e,t,n){return{type:"ImportNamespaceSpecifier",start:t[e++],end:t[e++],local:Bn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=Bn(t[e],t,n);return{type:"ImportSpecifier",start:s,end:i,imported:0===r?{...o}:Bn(r,t,n),local:o}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n);return{type:"LabeledStatement",start:s,end:i,label:Bn(e,t,n),body:r}},function(e,t,n){const s=t[e++],i=t[e++],r=Fn(t[e++],t,n),o=Fn(e,t,n);return{type:"Literal",start:s,end:i,bigint:o,raw:r,value:BigInt(o)}},function(e,t){const n=t[e++],s=t[e++],i=1==(1&t[e++]);return{type:"Literal",start:n,end:s,value:i,raw:i?"true":"false"}},function(e,t){return{type:"Literal",start:t[e++],end:t[e++],raw:"null",value:null}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++];return{type:"Literal",start:s,end:i,raw:0===r?void 0:Fn(r,t,n),value:new DataView(t.buffer).getFloat64(e<<2,!0)}},function(e,t,n){const s=t[e++],i=t[e++],r=Fn(t[e++],t,n),o=Fn(e,t,n);return{type:"Literal",start:s,end:i,raw:`/${r}/${o}`,regex:{flags:o,pattern:r},value:new RegExp(r,o)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=0===r?void 0:Fn(r,t,n);return{type:"Literal",start:s,end:i,value:Fn(e,t,n),raw:o}},function(e,t,n){const s=t[e++],i=t[e++],r=Mn[t[e++]],o=Bn(t[e++],t,n);return{type:"LogicalExpression",start:s,end:i,operator:r,left:Bn(e,t,n),right:o}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=1==(1&r),a=2==(2&r),l=Bn(t[e++],t,n);return{type:"MemberExpression",start:s,end:i,computed:o,optional:a,object:Bn(e,t,n),property:l}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n);return{type:"MetaProperty",start:s,end:i,meta:Bn(e,t,n),property:r}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=1==(1&r),a=2==(2&r),l=Bn(t[e++],t,n),c=Mn[t[e++]];return{type:"MethodDefinition",start:s,end:i,computed:o,static:a,key:Bn(e,t,n),value:l,kind:c}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n),o=Tn(t[e++],t,n),a=zn(e,t);return{type:"NewExpression",start:s,end:i,...a.length>0?{[Dn]:a}:{},callee:r,arguments:o}},function(e,t,n){return{type:"ObjectExpression",start:t[e++],end:t[e++],properties:Tn(e,t,n)}},function(e,t,n){return{type:"ObjectPattern",start:t[e++],end:t[e++],properties:Tn(e,t,n)}},function(e,t,n){return{type:"PrivateIdentifier",start:t[e++],end:t[e++],name:Fn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=zn(t[e++],t);return{type:"Program",start:s,end:i,body:Tn(e,t,n),...r.length>0?{[Rn]:r}:{},sourceType:"module"}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=1==(1&r),a=2==(2&r),l=4==(4&r),c=t[e++],d=Bn(t[e++],t,n),u=Mn[t[e]];return{type:"Property",start:s,end:i,method:o,shorthand:a,computed:l,key:0===c?{...d}:Bn(c,t,n),value:d,kind:u}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=1==(1&r),a=2==(2&r),l=t[e++],c=0===l?null:Bn(l,t,n);return{type:"PropertyDefinition",start:s,end:i,computed:o,static:a,key:Bn(e,t,n),value:c}},function(e,t,n){return{type:"RestElement",start:t[e++],end:t[e++],argument:Bn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e];return{type:"ReturnStatement",start:s,end:i,argument:0===r?null:Bn(r,t,n)}},function(e,t,n){return{type:"SequenceExpression",start:t[e++],end:t[e++],expressions:Tn(e,t,n)}},function(e,t,n){return{type:"SpreadElement",start:t[e++],end:t[e++],argument:Bn(e,t,n)}},function(e,t,n){return{type:"StaticBlock",start:t[e++],end:t[e++],body:Tn(e,t,n)}},function(e,t){return{type:"Super",start:t[e++],end:t[e++]}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++];return{type:"SwitchCase",start:s,end:i,test:0===r?null:Bn(r,t,n),consequent:Tn(t[e],t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=Tn(t[e++],t,n);return{type:"SwitchStatement",start:s,end:i,discriminant:Bn(e,t,n),cases:r}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n);return{type:"TaggedTemplateExpression",start:s,end:i,tag:Bn(e,t,n),quasi:r}},function(e,t,n){const s=t[e++],i=t[e++],r=1==(1&t[e++]),o=t[e++];return{type:"TemplateElement",start:s,end:i,tail:r,value:{cooked:0===o?void 0:Fn(o,t,n),raw:Fn(e,t,n)}}},function(e,t,n){const s=t[e++],i=t[e++],r=Tn(t[e++],t,n);return{type:"TemplateLiteral",start:s,end:i,quasis:Tn(e,t,n),expressions:r}},function(e,t){return{type:"ThisExpression",start:t[e++],end:t[e++]}},function(e,t,n){return{type:"ThrowStatement",start:t[e++],end:t[e++],argument:Bn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=0===r?null:Bn(r,t,n),a=t[e++],l=0===a?null:Bn(a,t,n);return{type:"TryStatement",start:s,end:i,block:Bn(e,t,n),handler:o,finalizer:l}},function(e,t,n){return{type:"UnaryExpression",start:t[e++],end:t[e++],operator:Mn[t[e++]],argument:Bn(e,t,n),prefix:!0}},function(e,t,n){return{type:"UpdateExpression",start:t[e++],end:t[e++],prefix:1==(1&t[e++]),operator:Mn[t[e++]],argument:Bn(e,t,n)}},function(e,t,n){return{type:"VariableDeclaration",start:t[e++],end:t[e++],kind:Mn[t[e++]],declarations:Tn(e,t,n)}},function(e,t,n){const s=t[e++],i=t[e++],r=t[e++],o=0===r?null:Bn(r,t,n);return{type:"VariableDeclarator",start:s,end:i,id:Bn(e,t,n),init:o}},function(e,t,n){const s=t[e++],i=t[e++],r=Bn(t[e++],t,n);return{type:"WhileStatement",start:s,end:i,test:Bn(e,t,n),body:r}},function(e,t,n){const s=t[e++],i=t[e++],r=1==(1&t[e++]),o=t[e];return{type:"YieldExpression",start:s,end:i,delegate:r,argument:0===o?null:Bn(o,t,n)}}];function Bn(e,t,n){const s=t[e],i=Ln[s];if(!i)throw console.trace(),new Error(`Unknown node type: ${s}`);return i(e+1,t,n)}function Tn(e,t,n){const s=t[e++],i=[];for(let r=0;r<s;r++){const s=t[e++];i.push(s?Bn(s,t,n):null)}return i}const zn=(e,t)=>{const n=t[e++],s=[];for(let i=0;i<n;i++)s.push(Vn(t[e++],t));return s},Vn=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:Mn[t[e]]}},Fn=(e,t,n)=>{const s=t[e++];return n(e<<2,s)},jn={Literal:[],Program:["body"]};const Un="variables";class Gn extends de{get deoptimized(){return oe(this.flags,2)}set deoptimized(e){this.flags=ae(this.flags,2,e)}constructor(e,t,n,s=!1){super(),s&&(this.esTreeNode=e);const{type:i}=e;jn[i]||=function(e){return Object.keys(e).filter((t=>"object"==typeof e[t]&&95!==t.charCodeAt(0)))}(e),this.parent=t,this.scope=n,this.createScope(n),this.parseNode(e),this.initialise(),this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(e,t){}bind(){for(const e of jn[this.type]){const t=this[e];if(Array.isArray(t))for(const e of t)e?.bind();else t&&t.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of jn[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n)){for(const t of n)if(t?.hasEffects(e))return!0}else if(n.hasEffects(e))return!0}return!1}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(Z,this.assignmentInteraction,e)}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const n of jn[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.include(e,t);else s.include(e,t)}}includeAsAssignmentTarget(e,t,n){this.include(e,t)}initialise(){}parseNode(e,t){for(const[n,s]of Object.entries(e))if(!this.hasOwnProperty(n))if(95===n.charCodeAt(0)){if(n===Dn){const e=s;this.annotations=e,this.scope.context.options.treeshake.annotations&&(this.annotationNoSideEffects=e.some((e=>"noSideEffects"===e.type)),this.annotationPure=e.some((e=>"pure"===e.type)))}else if(n===Rn)for(const{start:e,end:t,type:n}of s)this.scope.context.magicString.remove(e,t),"pure"!==n&&"noSideEffects"!==n||this.scope.context.log(Oe,Kt(this.scope.context.code.slice(e,t),this.scope.context.module.id,n),e)}else if("object"!=typeof s||null===s)this[n]=s;else if(Array.isArray(s)){this[n]=[];for(const e of s)this[n].push(null===e?null:new(this.scope.context.getNodeConstructor(e.type))(e,this,this.scope,t?.includes(n)))}else this[n]=new(this.scope.context.getNodeConstructor(s.type))(s,this,this.scope,t?.includes(n))}removeAnnotations(e){if(this.annotations)for(const t of this.annotations)e.remove(t.start,t.end)}render(e,t){for(const n of jn[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.render(e,t);else s.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(fn())}applyDeoptimizations(){this.deoptimized=!0;for(const e of jn[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(Q);else t.deoptimizePath(Q)}this.scope.context.requestTreeshakingPass()}}class Wn extends Gn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[K,...t],n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return this.argument.hasEffects(e)||t&&("always"===t||this.argument.hasEffectsOnInteractionAtPath(Q,fe,e))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([K,K]),this.scope.context.requestTreeshakingPass()}}class Hn extends de{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(te),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(Q)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?he:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||ue:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(e.length>(0===s?1:0))return!0;if(2===s){const{args:e}=t;if(!0===this.description.mutatesSelfAsArray&&e[0]?.hasEffectsOnInteractionAtPath(te,me,n))return!0;if(this.description.callsArgs)for(const t of this.description.callsArgs)if(e[t+1]?.hasEffectsOnInteractionAtPath(Z,ge,n))return!0}return!1}}const qn=[new Hn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:bn})],Kn=[new Hn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:An})],Yn=[new Hn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:xn})],Jn=[new Hn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ue})],Xn=/^\d+$/;class Zn extends de{get hasLostTrack(){return oe(this.flags,2048)}set hasLostTrack(e){this.flags=ae(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return oe(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=ae(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return oe(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=ae(this.flags,8192,e)}constructor(e,t,n=!1){if(super(),this.prototypeExpression=t,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of Object.values(e))this.allProperties.push(...t)}}deoptimizeAllProperties(e){const t=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!t){for(const e of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const t of e)t.deoptimizePath(Q);this.prototypeExpression?.deoptimizePath([K,K]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const[s,...i]=t,{args:r,type:o}=e;if(this.hasLostTrack||(2===o||t.length>1)&&(this.hasUnknownDeoptimizedProperty||"string"==typeof s&&this.deoptimizedPaths[s]))return void pe(e);const[a,l,c]=2===o||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:0===o?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof s){if(a[s]){const t=l[s];if(t)for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);return}for(const t of c)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if(Xn.test(s))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}else{for(const t of[...Object.values(l),c])for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey))if(Xn.test(e))for(const e of t)e.deoptimizePath(Q);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if("string"!=typeof t)return t===J?this.deoptimizeIntegerProperties():this.deoptimizeAllProperties(t===Y);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const e=this.expressionsToBeDeoptimizedByKey[t];if(e)for(const t of e)t.deoptimizeCache()}}const n=1===e.length?Q:e.slice(1);for(const e of"string"==typeof t?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(1===e.length?[...e,K]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return ce;const s=e[0],i=this.getMemberExpressionAndTrackDeopt(s,n);return i?i.getLiteralValueAtPath(e.slice(1),t,n):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,t,n):1!==e.length?le:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return he;const[i,...r]=e,o=this.getMemberExpressionAndTrackDeopt(i,s);return o?o.getReturnExpressionWhenCalledAtPath(r,t,n,s):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,n,s):he}hasEffectsOnInteractionAtPath(e,t,n){const[s,...i]=e;if(i.length>0||2===t.type){const r=this.getMemberExpression(s);return r?r.hasEffectsOnInteractionAtPath(i,t,n):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}if(s===Y)return!1;if(this.hasLostTrack)return!0;const[r,o,a]=0===t.type?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof s){if(r[s]){const e=o[s];if(e)for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!1}for(const e of a)if(e.hasEffectsOnInteractionAtPath(i,t,n))return!0}else for(const e of[...Object.values(o),a])for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:n,propertiesAndSettersByKey:s,settersByKey:i,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchableGetters:l,unmatchableSetters:c}=this,d=[];for(let u=e.length-1;u>=0;u--){const{key:h,kind:p,property:f}=e[u];if(t.push(f),"string"==typeof h)"set"===p?s[h]||(s[h]=[f,...d],i[h]=[f,...c]):"get"===p?n[h]||(n[h]=[f,...a],r[h]=[f,...l]):(s[h]||(s[h]=[f,...d]),n[h]||(n[h]=[f,...a]));else{if(h===J){o.push(f);continue}"set"===p&&c.push(f),"get"===p&&l.push(f),"get"!==p&&d.push(f),"set"!==p&&a.push(f)}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey))for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Q)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(Xn.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(te)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&Xn.test(e)||this.deoptimizedPaths[e])return ue;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&Xn.test(e)?ue:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return ue;const n=this.getMemberExpression(e);if(n!==ue&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return n}}const Qn=e=>"string"==typeof e&&/^\d+$/.test(e),es=new class extends de{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||Qn(t[0])||pe(e)}getLiteralValueAtPath(e){return 1===e.length&&Qn(e[0])?void 0:le}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},ts=new Zn({__proto__:null,hasOwnProperty:qn,isPrototypeOf:qn,propertyIsEnumerable:qn,toLocaleString:Kn,toString:Kn,valueOf:Jn},es,!0),ns=[{key:J,kind:"init",property:ue},{key:"length",kind:"init",property:xn}],ss=[new Hn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:bn})],is=[new Hn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:xn})],rs=[new Hn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new Zn(ns,fs),returnsPrimitive:null})],os=[new Hn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Zn(ns,fs),returnsPrimitive:null})],as=[new Hn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Zn(ns,fs),returnsPrimitive:null})],ls=[new Hn({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:xn})],cs=[new Hn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ue})],ds=[new Hn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ue})],us=[new Hn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ue})],hs=[new Hn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ps=[new Hn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],fs=new Zn({__proto__:null,at:ds,concat:os,copyWithin:hs,entries:os,every:ss,fill:hs,filter:as,find:us,findIndex:is,findLast:us,findLastIndex:is,flat:os,flatMap:as,forEach:us,includes:qn,indexOf:Yn,join:Kn,keys:Jn,lastIndexOf:Yn,map:as,pop:cs,push:ls,reduce:us,reduceRight:us,reverse:hs,shift:cs,slice:os,some:ss,sort:ps,splice:rs,toLocaleString:Kn,toString:Kn,unshift:ls,values:ds},ts,!0);class ms extends Gn{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let t=0;t<this.elements.length;t++){const n=this.elements[t];n&&(e||n instanceof Wn)&&(e=!0,n.deoptimizePath(Q))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:xn}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof Wn?s&&(t=!0,e.unshift({key:J,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:gn})}return this.objectEntity=new Zn(e,fs)}}class gs extends Gn{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e){const t=[];for(const n of this.elements)null!==n&&t.push(...n.declare(e,ue));return t}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(Z)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(Z,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}const ys="ArrowFunctionExpression",bs="ExpressionStatement",Es="Identifier",xs="Program";class $s extends ye{constructor(e,t,n,s,i){super(e),this.init=n,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=s.deoptimizationTracker,this.module=s.module,this.kind=i}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers){for(const e of this.additionalInitializers)e.deoptimizePath(Q);this.additionalInitializers=null}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned?pe(e):n.withTrackedEntityAtPath(t,this.init,(()=>this.init.deoptimizeArgumentsOnInteractionAtPath(e,t,n)),void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){this.isReassigned=!0;const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=$e;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath(Q)}else this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.isReassigned?le:t.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath(e,t,n))),le)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned?he:n.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath(e,t,n,s))),he)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n)}}include(){if(!this.included){super.include();for(const e of this.declarations){e.included||e.include(pn(),!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==xs);)t=t.parent}}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init))for(const n of t)n.include(e,!1);else e.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),e.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=ue,this.isReassigned=!0),this.additionalInitializers}}const As=$e,Ss=new Set([K]),ws=new se,vs=new Set([ue]);class Is extends $s{constructor(e,t,n){super(e,t,ue,n,"parameter"),this.deoptimizationInteractions=[],this.deoptimizations=new se,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set}addEntityToBeDeoptimized(e){if(e===ue){if(!this.entitiesToBeDeoptimized.has(ue)){this.entitiesToBeDeoptimized.add(ue);for(const{interaction:e}of this.deoptimizationInteractions)pe(e);this.deoptimizationInteractions=As}}else if(this.deoptimizedFields.has(K))e.deoptimizePath(Q);else if(!this.entitiesToBeDeoptimized.has(e)){this.entitiesToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,n,ie)}}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(ue)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(K)||2===e.type&&this.deoptimizedFields.has(t[0])))pe(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.entitiesToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,t,ie);this.entitiesToBeDeoptimized.has(ue)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length||this.deoptimizedFields.has(K))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.entitiesToBeDeoptimized)e.deoptimizePath([t]);t===K&&(this.deoptimizationInteractions=As,this.deoptimizations=ws,this.deoptimizedFields=Ss,this.entitiesToBeDeoptimized=vs)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(Q):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),he}}const Ps="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",ks=64;function Ns(e){let t="";do{const n=e%ks;e=e/ks|0,t=Ps[n]+t}while(0!==e);return t}function Cs(e,t,n){let s=e,i=1;for(;t.has(s)||Se.has(s)||n?.has(s);)s=`${e}$${Ns(i++)}`;return t.add(s),s}class Os{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if("var"===s&&"var"===o)return r.addDeclaration(e,n),r;t.error(tn(i),e.start)}const o=new $s(e.name,e,n,t,s);return this.variables.set(i,o),o}addHoistedVariable(e,t){(this.hoistedVariables||=new Map).set(e,t)}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class Ms extends Os{constructor(e,t){super(),this.parent=e,this.context=t,this.accessedOutsideVariables=new Map,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof Ms&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,t){const n=t.get(this)||new Set;for(const t of e)n.add(t);t.set(this,n),this.parent instanceof Ms&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Ms&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,n,s){for(const s of this.accessedOutsideVariables.values())s.included&&(e.add(s.getBaseVariableName()),"system"===t&&n.has(s)&&e.add("exports"));const i=s.get(this);if(i)for(const t of i)e.add(t)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,n){const s=new Set;if(this.addUsedOutsideNames(s,e,t,n),this.accessedDynamicImports)for(const e of this.accessedDynamicImports)e.inlineNamespace&&s.add(e.inlineNamespace.getBaseVariableName());for(const[e,t]of this.variables)(t.included||t.alwaysRendered)&&t.setRenderNames(null,Cs(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,n),n}}class Ds extends Ms{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s){if("var"===s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if("parameter"===o&&"CatchClause"===r.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,gn,s);return r.renderLikeHoisted(n),this.addHoistedVariable(i,n),n}return"var"===o?(r.addDeclaration(e,n),r):t.error(tn(i),e.start)}const o=this.parent.parent.addDeclaration(e,t,n,s);return o.markInitializersForDeoptimization(),this.addHoistedVariable(i,o),o}return super.addDeclaration(e,t,n,s)}}class Rs extends Ms{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if(!("var"!==s&&"function"!==s||"var"!==o&&"function"!==o&&"parameter"!==o))return r.addDeclaration(e,n),r;t.error(tn(i),e.start)}const o=new $s(e.name,e,n,t,s);return this.variables.set(i,o),o}}class _s extends Ms{constructor(e,t){super(e,e.context),this.parameters=[],this.hasRest=!1,this.bodyScope=t?new Ds(this):new Rs(this)}addParameterDeclaration(e){const{name:t,start:n}=e;if(this.variables.get(t))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(t),n);const s=new Is(t,e,this.context);return this.variables.set(t,s),this.bodyScope.addHoistedVariable(t,s),s}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments(e,t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];for(const n of t)if(n instanceof Wn){for(const n of t)n.include(e,!1);break}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||i,a=t[r];if(o)if(n=!1,0===o.length)s=!0;else for(const e of o)e.included&&(s=!0),e.calledFromTryStatement&&(n=!0);!s&&a.shouldBeIncluded(e)&&(s=!0),s&&a.include(e,n)}}}class Ls extends _s{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=ue;for(const e of this.returnExpressions)e.deoptimizePath(Q)}}}function Bs(e,t){if("MemberExpression"===e.type)return!e.computed&&Bs(e.object,e);if("Identifier"===e.type){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}const Ts=Symbol("PureFunction"),zs=()=>{},Vs=Symbol("Value Properties"),Fs=()=>ce,js=()=>!1,Us=()=>!0,Gs={deoptimizeArgumentsOnCall:zs,getLiteralValue:Fs,hasEffectsWhenCalled:js},Ws={deoptimizeArgumentsOnCall:zs,getLiteralValue:Fs,hasEffectsWhenCalled:Us},Hs={__proto__:null,[Vs]:Ws},qs={__proto__:null,[Vs]:Gs},Ks={__proto__:null,[Vs]:{deoptimizeArgumentsOnCall:zs,getLiteralValue:Fs,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof de)||s.hasEffectsOnInteractionAtPath(Q,fe,t)}}},Ys={__proto__:null,[Vs]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(Q)},getLiteralValue:Fs,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(ee,me,t)}},Js={__proto__:null,[Vs]:Ws,prototype:Hs},Xs={__proto__:null,[Vs]:Gs,prototype:Hs},Zs={__proto__:null,[Vs]:{deoptimizeArgumentsOnCall:zs,getLiteralValue:Fs,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof ms)},prototype:Hs},Qs={__proto__:null,[Vs]:Gs,from:Hs,of:qs,prototype:Hs},ei={__proto__:null,[Vs]:Gs,supportedLocalesOf:Xs},ti={global:Hs,globalThis:Hs,self:Hs,window:Hs,__proto__:null,[Vs]:Ws,Array:{__proto__:null,[Vs]:Ws,from:Hs,isArray:qs,of:qs,prototype:Hs},ArrayBuffer:{__proto__:null,[Vs]:Gs,isView:qs,prototype:Hs},Atomics:Hs,BigInt:Js,BigInt64Array:Js,BigUint64Array:Js,Boolean:Xs,constructor:Js,DataView:Xs,Date:{__proto__:null,[Vs]:Gs,now:qs,parse:qs,prototype:Hs,UTC:qs},decodeURI:qs,decodeURIComponent:qs,encodeURI:qs,encodeURIComponent:qs,Error:Xs,escape:qs,eval:Hs,EvalError:Xs,Float32Array:Qs,Float64Array:Qs,Function:Js,hasOwnProperty:Hs,Infinity:Hs,Int16Array:Qs,Int32Array:Qs,Int8Array:Qs,isFinite:qs,isNaN:qs,isPrototypeOf:Hs,JSON:Hs,Map:Zs,Math:{__proto__:null,[Vs]:Ws,abs:qs,acos:qs,acosh:qs,asin:qs,asinh:qs,atan:qs,atan2:qs,atanh:qs,cbrt:qs,ceil:qs,clz32:qs,cos:qs,cosh:qs,exp:qs,expm1:qs,floor:qs,fround:qs,hypot:qs,imul:qs,log:qs,log10:qs,log1p:qs,log2:qs,max:qs,min:qs,pow:qs,random:qs,round:qs,sign:qs,sin:qs,sinh:qs,sqrt:qs,tan:qs,tanh:qs,trunc:qs},NaN:Hs,Number:{__proto__:null,[Vs]:Gs,isFinite:qs,isInteger:qs,isNaN:qs,isSafeInteger:qs,parseFloat:qs,parseInt:qs,prototype:Hs},Object:{__proto__:null,[Vs]:Gs,create:qs,defineProperty:Ys,defineProperties:Ys,freeze:Ys,getOwnPropertyDescriptor:qs,getOwnPropertyDescriptors:qs,getOwnPropertyNames:qs,getOwnPropertySymbols:qs,getPrototypeOf:qs,hasOwn:qs,is:qs,isExtensible:qs,isFrozen:qs,isSealed:qs,keys:qs,fromEntries:Hs,entries:Ks,values:Ks,prototype:Hs},parseFloat:qs,parseInt:qs,Promise:{__proto__:null,[Vs]:Ws,all:Hs,allSettled:Hs,any:Hs,prototype:Hs,race:Hs,reject:Hs,resolve:Hs},propertyIsEnumerable:Hs,Proxy:Hs,RangeError:Xs,ReferenceError:Xs,Reflect:Hs,RegExp:Xs,Set:Zs,SharedArrayBuffer:Js,String:{__proto__:null,[Vs]:Gs,fromCharCode:qs,fromCodePoint:qs,prototype:Hs,raw:qs},Symbol:{__proto__:null,[Vs]:Gs,for:qs,keyFor:qs,prototype:Hs,toStringTag:{__proto__:null,[Vs]:{deoptimizeArgumentsOnCall:zs,getLiteralValue:()=>X,hasEffectsWhenCalled:Us}}},SyntaxError:Xs,toLocaleString:Hs,toString:Hs,TypeError:Xs,Uint16Array:Qs,Uint32Array:Qs,Uint8Array:Qs,Uint8ClampedArray:Qs,unescape:qs,URIError:Xs,valueOf:Hs,WeakMap:Zs,WeakSet:Zs,clearInterval:Js,clearTimeout:Js,console:{__proto__:null,[Vs]:Ws,assert:Js,clear:Js,count:Js,countReset:Js,debug:Js,dir:Js,dirxml:Js,error:Js,exception:Js,group:Js,groupCollapsed:Js,groupEnd:Js,info:Js,log:Js,table:Js,time:Js,timeEnd:Js,timeLog:Js,trace:Js,warn:Js},Intl:{__proto__:null,[Vs]:Ws,Collator:ei,DateTimeFormat:ei,DisplayNames:ei,ListFormat:ei,Locale:ei,NumberFormat:ei,PluralRules:ei,RelativeTimeFormat:ei,Segmenter:ei},setInterval:Js,setTimeout:Js,TextDecoder:Js,TextEncoder:Js,URL:{__proto__:null,[Vs]:Ws,prototype:Hs,canParse:qs},URLSearchParams:Js,AbortController:Js,AbortSignal:Js,addEventListener:Hs,alert:Hs,AnalyserNode:Js,Animation:Js,AnimationEvent:Js,applicationCache:Hs,ApplicationCache:Js,ApplicationCacheErrorEvent:Js,atob:Hs,Attr:Js,Audio:Js,AudioBuffer:Js,AudioBufferSourceNode:Js,AudioContext:Js,AudioDestinationNode:Js,AudioListener:Js,AudioNode:Js,AudioParam:Js,AudioProcessingEvent:Js,AudioScheduledSourceNode:Js,AudioWorkletNode:Js,BarProp:Js,BaseAudioContext:Js,BatteryManager:Js,BeforeUnloadEvent:Js,BiquadFilterNode:Js,Blob:Js,BlobEvent:Js,blur:Hs,BroadcastChannel:Js,btoa:Hs,ByteLengthQueuingStrategy:Js,Cache:Js,caches:Hs,CacheStorage:Js,cancelAnimationFrame:Hs,cancelIdleCallback:Hs,CanvasCaptureMediaStreamTrack:Js,CanvasGradient:Js,CanvasPattern:Js,CanvasRenderingContext2D:Js,ChannelMergerNode:Js,ChannelSplitterNode:Js,CharacterData:Js,clientInformation:Hs,ClipboardEvent:Js,close:Hs,closed:Hs,CloseEvent:Js,Comment:Js,CompositionEvent:Js,confirm:Hs,ConstantSourceNode:Js,ConvolverNode:Js,CountQueuingStrategy:Js,createImageBitmap:Hs,Credential:Js,CredentialsContainer:Js,crypto:Hs,Crypto:Js,CryptoKey:Js,CSS:Js,CSSConditionRule:Js,CSSFontFaceRule:Js,CSSGroupingRule:Js,CSSImportRule:Js,CSSKeyframeRule:Js,CSSKeyframesRule:Js,CSSMediaRule:Js,CSSNamespaceRule:Js,CSSPageRule:Js,CSSRule:Js,CSSRuleList:Js,CSSStyleDeclaration:Js,CSSStyleRule:Js,CSSStyleSheet:Js,CSSSupportsRule:Js,CustomElementRegistry:Js,customElements:Hs,CustomEvent:{__proto__:null,[Vs]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:Fs,hasEffectsWhenCalled:js},prototype:Hs},DataTransfer:Js,DataTransferItem:Js,DataTransferItemList:Js,defaultstatus:Hs,defaultStatus:Hs,DelayNode:Js,DeviceMotionEvent:Js,DeviceOrientationEvent:Js,devicePixelRatio:Hs,dispatchEvent:Hs,document:Hs,Document:Js,DocumentFragment:Js,DocumentType:Js,DOMError:Js,DOMException:Js,DOMImplementation:Js,DOMMatrix:Js,DOMMatrixReadOnly:Js,DOMParser:Js,DOMPoint:Js,DOMPointReadOnly:Js,DOMQuad:Js,DOMRect:Js,DOMRectReadOnly:Js,DOMStringList:Js,DOMStringMap:Js,DOMTokenList:Js,DragEvent:Js,DynamicsCompressorNode:Js,Element:Js,ErrorEvent:Js,Event:Js,EventSource:Js,EventTarget:Js,external:Hs,fetch:Hs,File:Js,FileList:Js,FileReader:Js,find:Hs,focus:Hs,FocusEvent:Js,FontFace:Js,FontFaceSetLoadEvent:Js,FormData:Js,frames:Hs,GainNode:Js,Gamepad:Js,GamepadButton:Js,GamepadEvent:Js,getComputedStyle:Hs,getSelection:Hs,HashChangeEvent:Js,Headers:Js,history:Hs,History:Js,HTMLAllCollection:Js,HTMLAnchorElement:Js,HTMLAreaElement:Js,HTMLAudioElement:Js,HTMLBaseElement:Js,HTMLBodyElement:Js,HTMLBRElement:Js,HTMLButtonElement:Js,HTMLCanvasElement:Js,HTMLCollection:Js,HTMLContentElement:Js,HTMLDataElement:Js,HTMLDataListElement:Js,HTMLDetailsElement:Js,HTMLDialogElement:Js,HTMLDirectoryElement:Js,HTMLDivElement:Js,HTMLDListElement:Js,HTMLDocument:Js,HTMLElement:Js,HTMLEmbedElement:Js,HTMLFieldSetElement:Js,HTMLFontElement:Js,HTMLFormControlsCollection:Js,HTMLFormElement:Js,HTMLFrameElement:Js,HTMLFrameSetElement:Js,HTMLHeadElement:Js,HTMLHeadingElement:Js,HTMLHRElement:Js,HTMLHtmlElement:Js,HTMLIFrameElement:Js,HTMLImageElement:Js,HTMLInputElement:Js,HTMLLabelElement:Js,HTMLLegendElement:Js,HTMLLIElement:Js,HTMLLinkElement:Js,HTMLMapElement:Js,HTMLMarqueeElement:Js,HTMLMediaElement:Js,HTMLMenuElement:Js,HTMLMetaElement:Js,HTMLMeterElement:Js,HTMLModElement:Js,HTMLObjectElement:Js,HTMLOListElement:Js,HTMLOptGroupElement:Js,HTMLOptionElement:Js,HTMLOptionsCollection:Js,HTMLOutputElement:Js,HTMLParagraphElement:Js,HTMLParamElement:Js,HTMLPictureElement:Js,HTMLPreElement:Js,HTMLProgressElement:Js,HTMLQuoteElement:Js,HTMLScriptElement:Js,HTMLSelectElement:Js,HTMLShadowElement:Js,HTMLSlotElement:Js,HTMLSourceElement:Js,HTMLSpanElement:Js,HTMLStyleElement:Js,HTMLTableCaptionElement:Js,HTMLTableCellElement:Js,HTMLTableColElement:Js,HTMLTableElement:Js,HTMLTableRowElement:Js,HTMLTableSectionElement:Js,HTMLTemplateElement:Js,HTMLTextAreaElement:Js,HTMLTimeElement:Js,HTMLTitleElement:Js,HTMLTrackElement:Js,HTMLUListElement:Js,HTMLUnknownElement:Js,HTMLVideoElement:Js,IDBCursor:Js,IDBCursorWithValue:Js,IDBDatabase:Js,IDBFactory:Js,IDBIndex:Js,IDBKeyRange:Js,IDBObjectStore:Js,IDBOpenDBRequest:Js,IDBRequest:Js,IDBTransaction:Js,IDBVersionChangeEvent:Js,IdleDeadline:Js,IIRFilterNode:Js,Image:Js,ImageBitmap:Js,ImageBitmapRenderingContext:Js,ImageCapture:Js,ImageData:Js,indexedDB:Hs,innerHeight:Hs,innerWidth:Hs,InputEvent:Js,IntersectionObserver:Js,IntersectionObserverEntry:Js,isSecureContext:Hs,KeyboardEvent:Js,KeyframeEffect:Js,length:Hs,localStorage:Hs,location:Hs,Location:Js,locationbar:Hs,matchMedia:Hs,MediaDeviceInfo:Js,MediaDevices:Js,MediaElementAudioSourceNode:Js,MediaEncryptedEvent:Js,MediaError:Js,MediaKeyMessageEvent:Js,MediaKeySession:Js,MediaKeyStatusMap:Js,MediaKeySystemAccess:Js,MediaList:Js,MediaQueryList:Js,MediaQueryListEvent:Js,MediaRecorder:Js,MediaSettingsRange:Js,MediaSource:Js,MediaStream:Js,MediaStreamAudioDestinationNode:Js,MediaStreamAudioSourceNode:Js,MediaStreamEvent:Js,MediaStreamTrack:Js,MediaStreamTrackEvent:Js,menubar:Hs,MessageChannel:Js,MessageEvent:Js,MessagePort:Js,MIDIAccess:Js,MIDIConnectionEvent:Js,MIDIInput:Js,MIDIInputMap:Js,MIDIMessageEvent:Js,MIDIOutput:Js,MIDIOutputMap:Js,MIDIPort:Js,MimeType:Js,MimeTypeArray:Js,MouseEvent:Js,moveBy:Hs,moveTo:Hs,MutationEvent:Js,MutationObserver:Js,MutationRecord:Js,name:Hs,NamedNodeMap:Js,NavigationPreloadManager:Js,navigator:Hs,Navigator:Js,NetworkInformation:Js,Node:Js,NodeFilter:Hs,NodeIterator:Js,NodeList:Js,Notification:Js,OfflineAudioCompletionEvent:Js,OfflineAudioContext:Js,offscreenBuffering:Hs,OffscreenCanvas:Js,open:Hs,openDatabase:Hs,Option:Js,origin:Hs,OscillatorNode:Js,outerHeight:Hs,outerWidth:Hs,PageTransitionEvent:Js,pageXOffset:Hs,pageYOffset:Hs,PannerNode:Js,parent:Hs,Path2D:Js,PaymentAddress:Js,PaymentRequest:Js,PaymentRequestUpdateEvent:Js,PaymentResponse:Js,performance:Hs,Performance:Js,PerformanceEntry:Js,PerformanceLongTaskTiming:Js,PerformanceMark:Js,PerformanceMeasure:Js,PerformanceNavigation:Js,PerformanceNavigationTiming:Js,PerformanceObserver:Js,PerformanceObserverEntryList:Js,PerformancePaintTiming:Js,PerformanceResourceTiming:Js,PerformanceTiming:Js,PeriodicWave:Js,Permissions:Js,PermissionStatus:Js,personalbar:Hs,PhotoCapabilities:Js,Plugin:Js,PluginArray:Js,PointerEvent:Js,PopStateEvent:Js,postMessage:Hs,Presentation:Js,PresentationAvailability:Js,PresentationConnection:Js,PresentationConnectionAvailableEvent:Js,PresentationConnectionCloseEvent:Js,PresentationConnectionList:Js,PresentationReceiver:Js,PresentationRequest:Js,print:Hs,ProcessingInstruction:Js,ProgressEvent:Js,PromiseRejectionEvent:Js,prompt:Hs,PushManager:Js,PushSubscription:Js,PushSubscriptionOptions:Js,queueMicrotask:Hs,RadioNodeList:Js,Range:Js,ReadableStream:Js,RemotePlayback:Js,removeEventListener:Hs,Request:Js,requestAnimationFrame:Hs,requestIdleCallback:Hs,resizeBy:Hs,ResizeObserver:Js,ResizeObserverEntry:Js,resizeTo:Hs,Response:Js,RTCCertificate:Js,RTCDataChannel:Js,RTCDataChannelEvent:Js,RTCDtlsTransport:Js,RTCIceCandidate:Js,RTCIceTransport:Js,RTCPeerConnection:Js,RTCPeerConnectionIceEvent:Js,RTCRtpReceiver:Js,RTCRtpSender:Js,RTCSctpTransport:Js,RTCSessionDescription:Js,RTCStatsReport:Js,RTCTrackEvent:Js,screen:Hs,Screen:Js,screenLeft:Hs,ScreenOrientation:Js,screenTop:Hs,screenX:Hs,screenY:Hs,ScriptProcessorNode:Js,scroll:Hs,scrollbars:Hs,scrollBy:Hs,scrollTo:Hs,scrollX:Hs,scrollY:Hs,SecurityPolicyViolationEvent:Js,Selection:Js,ServiceWorker:Js,ServiceWorkerContainer:Js,ServiceWorkerRegistration:Js,sessionStorage:Hs,ShadowRoot:Js,SharedWorker:Js,SourceBuffer:Js,SourceBufferList:Js,speechSynthesis:Hs,SpeechSynthesisEvent:Js,SpeechSynthesisUtterance:Js,StaticRange:Js,status:Hs,statusbar:Hs,StereoPannerNode:Js,stop:Hs,Storage:Js,StorageEvent:Js,StorageManager:Js,styleMedia:Hs,StyleSheet:Js,StyleSheetList:Js,SubtleCrypto:Js,SVGAElement:Js,SVGAngle:Js,SVGAnimatedAngle:Js,SVGAnimatedBoolean:Js,SVGAnimatedEnumeration:Js,SVGAnimatedInteger:Js,SVGAnimatedLength:Js,SVGAnimatedLengthList:Js,SVGAnimatedNumber:Js,SVGAnimatedNumberList:Js,SVGAnimatedPreserveAspectRatio:Js,SVGAnimatedRect:Js,SVGAnimatedString:Js,SVGAnimatedTransformList:Js,SVGAnimateElement:Js,SVGAnimateMotionElement:Js,SVGAnimateTransformElement:Js,SVGAnimationElement:Js,SVGCircleElement:Js,SVGClipPathElement:Js,SVGComponentTransferFunctionElement:Js,SVGDefsElement:Js,SVGDescElement:Js,SVGDiscardElement:Js,SVGElement:Js,SVGEllipseElement:Js,SVGFEBlendElement:Js,SVGFEColorMatrixElement:Js,SVGFEComponentTransferElement:Js,SVGFECompositeElement:Js,SVGFEConvolveMatrixElement:Js,SVGFEDiffuseLightingElement:Js,SVGFEDisplacementMapElement:Js,SVGFEDistantLightElement:Js,SVGFEDropShadowElement:Js,SVGFEFloodElement:Js,SVGFEFuncAElement:Js,SVGFEFuncBElement:Js,SVGFEFuncGElement:Js,SVGFEFuncRElement:Js,SVGFEGaussianBlurElement:Js,SVGFEImageElement:Js,SVGFEMergeElement:Js,SVGFEMergeNodeElement:Js,SVGFEMorphologyElement:Js,SVGFEOffsetElement:Js,SVGFEPointLightElement:Js,SVGFESpecularLightingElement:Js,SVGFESpotLightElement:Js,SVGFETileElement:Js,SVGFETurbulenceElement:Js,SVGFilterElement:Js,SVGForeignObjectElement:Js,SVGGElement:Js,SVGGeometryElement:Js,SVGGradientElement:Js,SVGGraphicsElement:Js,SVGImageElement:Js,SVGLength:Js,SVGLengthList:Js,SVGLinearGradientElement:Js,SVGLineElement:Js,SVGMarkerElement:Js,SVGMaskElement:Js,SVGMatrix:Js,SVGMetadataElement:Js,SVGMPathElement:Js,SVGNumber:Js,SVGNumberList:Js,SVGPathElement:Js,SVGPatternElement:Js,SVGPoint:Js,SVGPointList:Js,SVGPolygonElement:Js,SVGPolylineElement:Js,SVGPreserveAspectRatio:Js,SVGRadialGradientElement:Js,SVGRect:Js,SVGRectElement:Js,SVGScriptElement:Js,SVGSetElement:Js,SVGStopElement:Js,SVGStringList:Js,SVGStyleElement:Js,SVGSVGElement:Js,SVGSwitchElement:Js,SVGSymbolElement:Js,SVGTextContentElement:Js,SVGTextElement:Js,SVGTextPathElement:Js,SVGTextPositioningElement:Js,SVGTitleElement:Js,SVGTransform:Js,SVGTransformList:Js,SVGTSpanElement:Js,SVGUnitTypes:Js,SVGUseElement:Js,SVGViewElement:Js,TaskAttributionTiming:Js,Text:Js,TextEvent:Js,TextMetrics:Js,TextTrack:Js,TextTrackCue:Js,TextTrackCueList:Js,TextTrackList:Js,TimeRanges:Js,toolbar:Hs,top:Hs,Touch:Js,TouchEvent:Js,TouchList:Js,TrackEvent:Js,TransitionEvent:Js,TreeWalker:Js,UIEvent:Js,ValidityState:Js,visualViewport:Hs,VisualViewport:Js,VTTCue:Js,WaveShaperNode:Js,WebAssembly:Hs,WebGL2RenderingContext:Js,WebGLActiveInfo:Js,WebGLBuffer:Js,WebGLContextEvent:Js,WebGLFramebuffer:Js,WebGLProgram:Js,WebGLQuery:Js,WebGLRenderbuffer:Js,WebGLRenderingContext:Js,WebGLSampler:Js,WebGLShader:Js,WebGLShaderPrecisionFormat:Js,WebGLSync:Js,WebGLTexture:Js,WebGLTransformFeedback:Js,WebGLUniformLocation:Js,WebGLVertexArrayObject:Js,WebSocket:Js,WheelEvent:Js,Window:Js,Worker:Js,WritableStream:Js,XMLDocument:Js,XMLHttpRequest:Js,XMLHttpRequestEventTarget:Js,XMLHttpRequestUpload:Js,XMLSerializer:Js,XPathEvaluator:Js,XPathExpression:Js,XPathResult:Js,XSLTProcessor:Js};for(const e of["window","global","self","globalThis"])ti[e]=ti;function ni(e){let t=ti;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return null}return t[Vs]}class si extends ye{constructor(){super(...arguments),this.isReassigned=!0}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(ni([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=ni([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=ni([this.name,...e]);return s?s.getLiteralValue():le}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!ni([this.name]):!ni([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=ni([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}const ii={__proto__:null,class:!0,const:!0,let:!0,var:!0};class ri extends Gn{constructor(){super(...arguments),this.variable=null}get isTDZAccess(){return oe(this.flags,4)?oe(this.flags,8):null}set isTDZAccess(e){this.flags=ae(this.flags,4,!0),this.flags=ae(this.flags,8,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&Bs(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this))}declare(e,t){let n;const{treeshake:s}=this.scope.context.options;switch(e){case"var":n=this.scope.addDeclaration(this,this.scope.context,t,e),s&&s.correctVarValueBeforeDeclaration&&n.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"class":n=this.scope.addDeclaration(this,this.scope.context,t,e);break;case"parameter":n=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}return[this.variable=n]}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){0!==e.length||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const[i,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,n,s);return[i,r||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||"var"===this.variable.kind)||this.scope.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof si&&!this.isPureFunction(Z)&&this.variable.hasEffectsOnInteractionAtPath(Z,fe,e)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return null!==this.variable&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,n);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n)}}include(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof $s&&this.variable.kind&&this.variable.kind in ii&&this.variable.module===this.scope.context.module))return this.isTDZAccess=!1;let t;return this.variable.declarations&&1===this.variable.declarations.length&&(t=this.variable.declarations[0])&&this.start<t.start&&oi(this)===oi(t)||!this.variable.initReached&&this.scope.context.module.isExecuted?this.isTDZAccess=!0:this.isTDZAccess=!1}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=Ee){if(this.variable){const o=this.variable.getName(t,n);o!==this.name&&(e.overwrite(this.start,this.end,o,{contentOnly:!0,storeName:!0}),r&&e.prependRight(this.start,`${this.name}: `)),"eval"===o&&"CallExpression"===s&&i&&e.appendRight(this.start,"0, ")}}disallowImportReassignment(){return this.scope.context.error(Wt(this.name,this.scope.context.module.id),this.start)}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof $s&&(this.variable.consolidateInitializers(),this.scope.context.requestTreeshakingPass())}getVariableRespectingTDZ(){return this.isPossibleTDZ()?ue:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[Ts])return!0;t=t[n]}return t?.[Ts]}}function oi(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}function ai(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const li={isNoStatement:!0};function ci(e,t,n=0){let s,i;for(s=e.indexOf(t,n);;){if(-1===(n=e.indexOf("/",n))||n>=s)return s;i=e.charCodeAt(++n),++n,(n=47===i?e.indexOf("\n",n)+1:e.indexOf("*/",n)+2)>s&&(s=e.indexOf(t,n))}}const di=/\S/g;function ui(e,t){di.lastIndex=t;return di.exec(e).index}function hi(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[t,t+1];if(n=e.charCodeAt(s+1),47===n)return[s,t+1];s=e.indexOf("*/",s+2)+2,s>t&&(t=e.indexOf("\n",s))}}function pi(e,t,n,s,i){let r,o,a,l,c=e[0],d=!c.included||c.needsBoundaries;d&&(l=n+hi(t.original.slice(n,c.start))[1]);for(let n=1;n<=e.length;n++)r=c,o=l,a=d,c=e[n],d=void 0!==c&&(!c.included||c.needsBoundaries),a||d?(l=r.end+hi(t.original.slice(r.end,void 0===c?s:c.start))[1],r.included?a?r.render(t,i,{end:l,start:o}):r.render(t,i):ai(r,t,o,l)):r.render(t,i)}function fi(e,t,n,s){const i=[];let r,o,a,l,c=n-1;for(const s of e){for(void 0!==r&&(c=r.end+ci(t.original.slice(r.end,s.start),",")),o=a=c+1+hi(t.original.slice(c+1,s.start))[1];l=t.original.charCodeAt(o),32===l||9===l||10===l||13===l;)o++;void 0!==r&&i.push({contentEnd:a,end:o,node:r,separator:c,start:n}),r=s,n=o}return i.push({contentEnd:s,end:s,node:r,separator:null,start:n}),i}function mi(e,t,n){for(;;){const[s,i]=hi(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}class gi extends Ms{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s){if("var"===s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r)return"var"===r.kind||"var"===s&&"parameter"===r.kind?(r.addDeclaration(e,n),r):t.error(tn(i),e.start);const o=this.parent.addDeclaration(e,t,n,s);return o.markInitializersForDeoptimization(),this.addHoistedVariable(i,o),o}return super.addDeclaration(e,t,n,s)}}class yi extends Gn{initialise(){var e,t;this.directive&&"use strict"!==this.directive&&this.parent.type===xs&&this.scope.context.log(Oe,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${V(t)}" was ignored.`}),this.start)}removeAnnotations(e){this.expression.removeAnnotations(e)}render(e,t){super.render(e,t),";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}shouldBeIncluded(e){return this.directive&&"use strict"!==this.directive?this.parent.type!==xs:super.shouldBeIncluded(e)}applyDeoptimizations(){}}class bi extends Gn{get deoptimizeBody(){return oe(this.flags,32768)}set deoptimizeBody(e){this.flags=ae(this.flags,32768,e)}get directlyIncluded(){return oe(this.flags,16384)}set directlyIncluded(e){this.flags=ae(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(ue)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new gi(e)}hasEffects(e){if(this.deoptimizeBody)return!0;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(t=!0);for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}}initialise(){const e=this.body[0];this.deoptimizeBody=e instanceof yi&&"use asm"===e.directive}render(e,t){this.body.length>0?pi(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class Ei extends Gn{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){return this.declarationInit=t,this.argument.declare(e,ue)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Z)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Z,t,n)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([K,K]),this.scope.context.requestTreeshakingPass())}}class xi extends Gn{constructor(){super(...arguments),this.objectEntity=null}get async(){return oe(this.flags,256)}set async(e){this.flags=ae(this.flags,256,e)}get deoptimizedReturn(){return oe(this.flags,512)}set deoptimizedReturn(e){this.flags=ae(this.flags,512,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){if(2===e.type){const{parameters:t}=this.scope,{args:n}=e;let s=!1;for(let e=0;e<n.length-1;e++){const i=this.params[e],r=n[e+1];s||i instanceof Ei?(s=!0,r.deoptimizePath(Q)):i instanceof ri?(t[e][0].addEntityToBeDeoptimized(r),this.addArgumentToBeDeoptimized(r)):i?r.deoptimizePath(Q):this.addArgumentToBeDeoptimized(r)}}else this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){if(this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===K){this.scope.getReturnExpression().deoptimizePath(Q);for(const e of this.scope.parameters)for(const t of e)t.deoptimizePath(Q)}}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return e.length>0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(Q),this.scope.context.requestTreeshakingPass()),he):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],ge,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],fe,n)))return!0}for(const e of this.params)if(e.hasEffects(n))return!0;return!1}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){this.body instanceof bi?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(e){const{body:t,params:n}=e,s=this.params=[],{scope:i}=this,{bodyScope:r,context:o}=i;for(const e of n)s.push(new(o.getNodeConstructor(e.type))(e,this,i,!1));i.addParameterVariables(s.map((e=>e.declare("parameter",ue))),s[s.length-1]instanceof Ei),this.body=new(o.getNodeConstructor(t.type))(t,this,r),super.parseNode(e)}addArgumentToBeDeoptimized(e){}applyDeoptimizations(){}}xi.prototype.preventChildBlockScope=!0;class $i extends xi{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Ls(e,!1)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const{ignore:e,brokenFlow:t}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(n))return!0;n.ignore=e,n.brokenFlow=t}return!1}include(e,t){super.include(e,t);for(const n of this.params)n instanceof ri||n.include(e,t)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Zn([],ts)}}function Ai(e,{exportNamesByVariable:t,snippets:{_:n,getObject:s,getPropertyAccess:i}},r=""){if(1===e.length&&1===t.get(e[0]).length){const s=e[0];return`exports(${JSON.stringify(t.get(s)[0])},${n}${s.getName(i)}${r})`}{const n=[];for(const s of e)for(const e of t.get(s))n.push([e,s.getName(i)+r]);return`exports(${s(n,{lineBreakIndent:null})})`}}function Si(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function wi(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${Ai([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}class vi extends Gn{addExportedVariables(e,t){for(const n of this.properties)"Property"===n.type?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t){const n=[];for(const s of this.properties)n.push(...s.declare(e,t));return n}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.properties)if(e.hasEffectsOnInteractionAtPath(Z,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}}class Ii extends $s{constructor(e){super("arguments",null,ue,e,"other"),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){this.included?e.deoptimizePath(Q):this.deoptimizedArguments.push(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(){super.include();for(const e of this.deoptimizedArguments)e.deoptimizePath(Q);this.deoptimizedArguments.length=0}}class Pi extends Is{constructor(e){super("this",null,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||ue).hasEffectsOnInteractionAtPath(e,t,n)}}class ki extends Ls{constructor(e){const{context:t}=e;super(e,!1),this.variables.set("arguments",this.argumentsVariable=new Ii(t)),this.variables.set("this",this.thisVariable=new Pi(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included)for(const n of t)n.included||n.include(e,!1)}}class Ni extends xi{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new ki(e),this.constructedEntity=new Zn(Object.create(null),ts),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(e.args[0])}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:ue);const{brokenFlow:s,ignore:i,replacedVariableInits:r}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(n))return!0;n.brokenFlow=s,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),n.ignore=i}return!1}include(e,t){super.include(e,t),this.id?.include();const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof ri&&!n||s.include(e,t)}initialise(){super.initialise(),this.id?.declare("function",this)}addArgumentToBeDeoptimized(e){this.scope.argumentsVariable.addArgumentToBeDeoptimized(e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Zn([{key:"prototype",kind:"init",property:new Zn([],ts)}],ts)}}class Ci extends Gn{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;e:if(!this.scope.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof Ni||e instanceof $i)break e}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}}this.argument.include(e,t)}}const Oi={"!=":(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)=>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};function Mi(e,t,n){if(n.arguments.length>0)if(n.arguments[n.arguments.length-1].included)for(const s of n.arguments)s.render(e,t);else{let s=n.arguments.length-2;for(;s>=0&&!n.arguments[s].included;)s--;if(s>=0){for(let i=0;i<=s;i++)n.arguments[i].render(e,t);e.remove(ci(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(ci(e.original,"(",n.callee.end)+1,n.end-1)}}class Di extends Gn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.scope.context.code.charCodeAt(this.start)||"bigint"==typeof this.value||47===this.scope.context.code.charCodeAt(this.start)?le:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?he:On(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return e.length>(null===this.value?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||(1!==e.length||Cn(this.members,e[0],t,n))}}initialise(){this.members=function(e){if(e instanceof RegExp)return kn;switch(typeof e){case"boolean":return In;case"number":return Pn;case"string":return Nn}return Object.create(null)}(this.value)}parseNode(e){this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(e){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function Ri(e){return e.computed?function(e){if(e instanceof Di)return String(e.value);return null}(e.property):e.property.name}function _i(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof ri)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof Li){const s=_i(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}class Li extends Gn{constructor(){super(...arguments),this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return oe(this.flags,1024)}set computed(e){this.flags=ae(this.flags,1024,e)}get optional(){return oe(this.flags,128)}set optional(e){this.flags=ae(this.flags,128,e)}get assignmentDeoptimized(){return oe(this.flags,16)}set assignmentDeoptimized(e){this.flags=ae(this.flags,16,e)}get bound(){return oe(this.flags,32)}set bound(e){this.flags=ae(this.flags,32,e)}get isUndefined(){return oe(this.flags,64)}set isUndefined(e){this.flags=ae(this.flags,64,e)}bind(){this.bound=!0;const e=_i(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=Bi(t,e.slice(1),this.scope.context);n?"undefined"===n?this.isUndefined=!0:(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()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.isUndefined||(t.length<7?this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.getPropertyKey(),...t],n):pe(e))}deoptimizeCache(){const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=$e,this.propertyKey=K,t.deoptimizePath(Q);for(const t of e)t.deoptimizeCache()}deoptimizePath(e){if(0===e.length&&this.disallowNamespaceReassignment(),this.variable)this.variable.deoptimizePath(e);else if(!this.isUndefined&&e.length<7){const t=this.getPropertyKey();this.object.deoptimizePath([t===K?Y:t,...e])}}getLiteralValueAtPath(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:this.propertyKey!==K&&e.length<7?(this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([this.getPropertyKey(),...e],t,n)):le}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s):this.isUndefined?[gn,!1]:this.propertyKey!==K&&e.length<7?(this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(),...e],t,n,s)):he}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsAssignmentTarget(e,t){return t&&!this.deoptimized&&this.applyDeoptimizations(),this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.property.hasEffects(e)||this.object.hasEffects(e)||t&&this.hasAccessEffect(e)||this.hasEffectsOnInteractionAtPath(Z,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||(!(e.length<7)||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(),...e],t,n))}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.includeProperties(e,t)}includeAsAssignmentTarget(e,t,n){this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),n?this.include(e,t):this.includeProperties(e,t)}includeCallArguments(e,t){this.variable?this.variable.includeCallArguments(e,t):super.includeCallArguments(e,t)}initialise(){this.propertyKey=Ri(this),this.accessInteraction={args:[this.object],type:0}}isSkippedAsOptional(e){return!this.variable&&!this.isUndefined&&(this.object.isSkippedAsOptional?.(e)||this.optional&&null==this.object.getLiteralValueAtPath(Z,ie,e))}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=Ee){if(this.variable||this.isUndefined){const{snippets:{getPropertyAccess:i}}=t;let r=this.variable?this.variable.getName(i):"undefined";n&&s&&(r="0, "+r),e.overwrite(this.start,this.end,r,{contentOnly:!0,storeName:!0})}else n&&s&&e.appendRight(this.start,"0, "),this.object.render(e,t,{renderedSurroundingElement:i}),this.property.render(e,t)}setAssignedValue(e){this.assignmentInteraction={args:[this.object,e],type:1}}applyDeoptimizations(){this.deoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;if(this.bound&&e&&!this.variable&&!this.isUndefined){const e=this.getPropertyKey();this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[e],ie),this.scope.context.requestTreeshakingPass()}}applyAssignmentDeoptimization(){this.assignmentDeoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;this.bound&&e&&!this.variable&&!this.isUndefined&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.assignmentInteraction,[this.getPropertyKey()],ie),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){if(this.object instanceof ri){this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable),this.scope.context.log(Oe,Wt(this.object.name,this.scope.context.module.id),this.start))}}getPropertyKey(){if(null===this.propertyKey){this.propertyKey=K;const e=this.property.getLiteralValueAtPath(Z,ie,this);return this.propertyKey=e===X?e:"symbol"==typeof e?K:String(e)}return this.propertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()],this.accessInteraction,e))}includeProperties(e,t){this.included||(this.included=!0,this.variable&&this.scope.context.includeVariableInModule(this.variable)),this.object.include(e,t),this.property.include(e,t)}}function Bi(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof be)return null;const s=t[0].key,i=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(Oe,Zt(s,n.module.id,i),t[0].pos),"undefined"}return null}return Bi(i,t.slice(1),n)}class Ti extends Gn{constructor(){super(...arguments),this.returnExpression=null,this.deoptimizableDependentExpressions=[],this.expressionsToBeDeoptimized=new Set}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const{args:s}=e,[i,r]=this.getReturnExpression(n);if(r)return;const o=s.filter((e=>!!e&&e!==ue));if(0!==o.length)if(i===ue)for(const e of o)e.deoptimizePath(Q);else n.withTrackedEntityAtPath(t,i,(()=>{for(const e of o)this.expressionsToBeDeoptimized.add(e);i.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}),null)}deoptimizeCache(){if(this.returnExpression?.[0]!==ue){this.returnExpression=he;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Ae,this.deoptimizableDependentExpressions=$e;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(Q)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==ue&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===ue?le:t.withTrackedEntityAtPath(e,s,(()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n))),le)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===ue?i:n.withTrackedEntityAtPath(e,i,(()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]}),he)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(2===s){const{args:s,withNew:i}=t;if((i?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,s,this))return!1}else if((1===s?n.assigned:n.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[i,r]=this.getReturnExpression();return(1===s||!r)&&i.hasEffectsOnInteractionAtPath(e,t,n)}}class zi extends Ti{get optional(){return oe(this.flags,128)}set optional(e){this.flags=ae(this.flags,128,e)}bind(){if(super.bind(),this.callee instanceof ri){this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(Oe,Ft(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(Oe,{code:"EVAL",id:e=this.scope.context.module.id,message:`Use of eval in "${V(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Ue("troubleshooting/#avoiding-eval")},this.start)}var e;this.interaction={args:[this.callee instanceof Li&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Z,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?(super.include(e,t),t===Un&&this.callee instanceof ri&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}isSkippedAsOptional(e){return this.callee.isSkippedAsOptional?.(e)||this.optional&&null==this.callee.getLiteralValueAtPath(Z,ie,e)}render(e,t,{renderedSurroundingElement:n}=Ee){this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),Mi(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Z,ie),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=ie){return null===this.returnExpression?(this.returnExpression=he,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Z,this.interaction,e,this)):this.returnExpression}}class Vi extends Gn{createScope(e){this.scope=new _s(e,!0)}parseNode(e){const{body:t,param:n,type:s}=e;this.type=s,n&&(this.param=new(this.scope.context.getNodeConstructor(n.type))(n,this,this.scope),this.param.declare("parameter",ue)),this.body=new bi(t,this,this.scope.bodyScope),super.parseNode(e)}}Vi.prototype.preventChildBlockScope=!0;class Fi extends Ms{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new $s("this",null,t,n,"other")),this.instanceScope=new Ms(this,n),this.instanceScope.variables.set("this",new Pi(n))}findLexicalBoundary(){return this}}class ji extends Gn{constructor(){super(...arguments),this.accessedValue=null}get computed(){return oe(this.flags,1024)}set computed(e){this.flags=ae(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){return 0===e.type&&"get"===this.kind&&0===t.length||1===e.type&&"set"===this.kind&&0===t.length?this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:2,withNew:!1},Z,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){return"get"===this.kind&&0===t.type&&0===e.length||"set"===this.kind&&1===t.type?this.value.hasEffectsOnInteractionAtPath(Z,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=he,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Z,ge,ie,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class Ui extends ji{applyDeoptimizations(){}}class Gi extends de{constructor(e,t){super(),this.object=e,this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],n)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([this.key,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,n)}}class Wi extends Gn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Ms(e,e.context)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),t||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){return 2===t.type&&0===e.length?!t.withNew||(null===this.classConstructor?this.superClass?.hasEffectsOnInteractionAtPath(e,t,n):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,n))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.superClass?.include(e,t),this.body.include(e,t),this.id&&(this.id.markDeclarationReached(),this.id.include())}initialise(){this.id?.declare("class",this);for(const e of this.body.body)if(e instanceof Ui&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)e.static||e instanceof Ui&&"constructor"===e.kind||e.deoptimizePath(Q);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){const s=n.static?e:t,i=n.kind;if(s===t&&!i)continue;const r="set"===i||"get"===i?i:"init";let o;if(n.computed){const e=n.key.getLiteralValueAtPath(Z,ie,this);if("symbol"==typeof e){s.push({key:K,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof ri?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new Zn(t,this.superClass?new Gi(this.superClass,"prototype"):ts)}),this.objectEntity=new Zn(e,this.superClass||ts)}}class Hi extends Wi{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new ri(e.id,this,this.scope.parent)),super.parseNode(e)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:a}=this.id;"system"===s&&n.has(o)&&e.appendLeft(this.end,`${i}${Ai([o],t)};`);const l=o.getName(r);if(l!==a)return this.superClass?.render(e,t),this.body.render(e,{...t,useOriginalName:e=>e===o}),e.prependRight(this.start,`let ${l}${i}=${i}`),void e.prependLeft(this.end,";")}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:n,variable:s}=e;for(const e of t.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}class qi extends Wi{render(e,t,{renderedSurroundingElement:n}=Ee){super.render(e,t),n===bs&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Ki extends de{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new Ki(this.expressions.map((i=>i.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]))),!1]}hasEffectsOnInteractionAtPath(e,t,n){for(const s of this.expressions)if(s.hasEffectsOnInteractionAtPath(e,t,n))return!0;return!1}}function Yi(e,t){const{brokenFlow:n,hasBreak:s,hasContinue:i,ignore:r}=e,{breaks:o,continues:a}=r;return r.breaks=!0,r.continues=!0,e.hasBreak=!1,e.hasContinue=!1,!!t.hasEffects(e)||(r.breaks=o,r.continues=a,e.hasBreak=s,e.hasContinue=i,e.brokenFlow=n,!1)}function Ji(e,t,n){const{brokenFlow:s,hasBreak:i,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,n,{asSingleStatement:!0}),e.hasBreak=i,e.hasContinue=r,e.brokenFlow=s}class Xi extends Gn{hasEffects(){return!1}initialise(){this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}Xi.prototype.needsBoundaries=!0;class Zi extends Ni{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new ri(e.id,this,this.scope.parent)),super.parseNode(e)}}class Qi extends Gn{include(e,t){super.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable)}initialise(){const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.scope.context.getModuleName(),this,this.scope.context),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n,r=function(e,t){return ui(e,ci(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof Zi)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=ci(e,"function",t)+8;e=e.slice(n,ci(e,"(",n));const s=ci(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof Hi)this.renderNamedDeclaration(e,r,null===this.declaration.id?ci(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void ai(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:bs}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}applyDeoptimizations(){}renderNamedDeclaration(e,t,n,s){const{exportNamesByVariable:i,format:r,snippets:{getPropertyAccess:o}}=s,a=this.variable.getName(o);e.remove(this.start,t),null!==n&&e.appendLeft(n,` ${a}`),"system"===r&&this.declaration instanceof Hi&&i.has(this.variable)&&e.appendLeft(this.end,` ${Ai([this.variable],s)};`)}renderVariableDeclaration(e,t,{format:n,exportNamesByVariable:s,snippets:{cnst:i,getPropertyAccess:r}}){const o=59===e.original.charCodeAt(this.end-1),a="system"===n&&s.get(this.variable);a?(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = exports(${JSON.stringify(a[0])}, `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),o||e.appendLeft(this.end,";"))}}Qi.prototype.needsBoundaries=!0;class er extends Gn{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){this.scope.context.addExport(this)}removeAnnotations(e){this.declaration?.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n;null===this.declaration?e.remove(s,i):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{end:i,start:s}))}applyDeoptimizations(){}}er.prototype.needsBoundaries=!0;class tr extends Ni{createScope(e){super.createScope(this.idScope=new Ms(e,e.context))}parseNode(e){null!==e.id&&(this.id=new ri(e.id,this,this.idScope)),super.parseNode(e)}render(e,t,{renderedSurroundingElement:n}=Ee){super.render(e,t),n===bs&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class nr extends gi{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s)}}const sr=Symbol("unset");class ir extends Gn{constructor(){super(...arguments),this.testValue=sr}deoptimizeCache(){this.testValue=le}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getTestValue();if("symbol"==typeof t){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return!0;const n=e.brokenFlow;return e.brokenFlow=t,null===this.alternate?!1:!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&n,!1)}return t?this.consequent.hasEffects(e):!!this.alternate?.hasEffects(e)}include(e,t){if(this.included=!0,t)this.includeRecursively(t,e);else{const t=this.getTestValue();"symbol"==typeof t?this.includeUnknownTest(e):this.includeKnownTest(e,t)}}parseNode(e){this.consequentScope=new nr(this.scope),this.consequent=new(this.scope.context.getNodeConstructor(e.consequent.type))(e.consequent,this,this.consequentScope),e.alternate&&(this.alternateScope=new nr(this.scope),this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(e.alternate,this,this.alternateScope)),super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:n}}=t,s=this.getTestValue(),i=[],r=this.test.included,o=!this.scope.context.options.treeshake;r?this.test.render(e,t):e.remove(this.start,this.consequent.start),this.consequent.included&&(o||"symbol"==typeof s||s)?this.consequent.render(e,t):(e.overwrite(this.consequent.start,this.consequent.end,r?";":""),i.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&"symbol"!=typeof s&&s?(r&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),i.push(...this.alternateScope.hoistedDeclarations)):(r?101===e.original.charCodeAt(this.alternate.start-1)&&e.prependLeft(this.alternate.start," "):e.remove(this.consequent.end,this.alternate.start),this.alternate.render(e,t))),this.renderHoistedDeclarations(i,e,n)}applyDeoptimizations(){}getTestValue(){return this.testValue===sr?this.testValue=this.test.getLiteralValueAtPath(Z,ie,this):this.testValue}includeKnownTest(e,t){this.test.shouldBeIncluded(e)&&this.test.include(e,!1),t&&this.consequent.shouldBeIncluded(e)&&this.consequent.include(e,!1,{asSingleStatement:!0}),!t&&this.alternate?.shouldBeIncluded(e)&&this.alternate.include(e,!1,{asSingleStatement:!0})}includeRecursively(e,t){this.test.include(t,e),this.consequent.include(t,e),this.alternate?.include(t,e)}includeUnknownTest(e){this.test.include(e,!1);const{brokenFlow:t}=e;let n=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),n=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&n)}renderHoistedDeclarations(e,t,n){const s=[...new Set(e.map((e=>{const t=e.variable;return t.included?t.getName(n):""})))].filter(Boolean).join(", ");if(s){const e=this.parent.type,n=e!==xs&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof ir&&e.alternate)return!0;if(e instanceof bi)return!1;e=e.parent}while(e);return!1}}class rr extends Gn{bind(){}hasEffects(){return!1}initialise(){this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}rr.prototype.needsBoundaries=!0;class or extends Gn{applyDeoptimizations(){}}const ar="_interopDefault",lr="_interopDefaultCompat",cr="_interopNamespace",dr="_interopNamespaceCompat",ur="_interopNamespaceDefault",hr="_interopNamespaceDefaultOnly",pr="_mergeNamespaces",fr="_documentCurrentScript",mr={auto:ar,compat:lr,default:null,defaultOnly:null,esModule:null},gr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),yr={auto:cr,compat:dr,default:ur,defaultOnly:hr,esModule:null},br=(e,t)=>"esModule"!==e&&gr(e,t),Er=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of Dr)t.has(e)&&a.add(e);return Dr.map((e=>a.has(e)?xr[e](n,s,i,r,o,a):"")).join("")},xr={[fr]:(e,{_:t,n:n})=>`var${t}${fr}${t}=${t}typeof${t}document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[lr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:lr});return`${o}${Sr(t)}${s}?${s}${n?$r(t):Ar(t)}${a}${r}${r}`},[ar](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:ar});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?$r(t):Ar(t)}${a}${r}${r}`},[dr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(ur)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:dr});return`${e}${Sr(t)}${o}?${o}e${o}:${o}${ur}(e)${n}${l}${l}`}return`function ${dr}(e)${o}{${l}${e}if${o}(${Sr(t)})${o}return e;${l}`+wr(e,e,t,n,s,i)+`}${l}${l}`},[hr](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,d]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:hr});return`${c}${Or(s,Mr(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${d}${a}${a}`},[ur](e,t,n,s,i){const{_:r,n:o}=t;return`function ${ur}(e)${r}{${o}`+wr(e,e,t,n,s,i)+`}${o}${o}`},[cr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(ur)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:cr});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${ur}(e)${t}${l}${l}`}return`function ${cr}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+wr(e,e,t,n,s,i)+`}${l}${l}`},[pr](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${pr}(n, m)${r}{${a}${e}${Ir(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?kr:Nr:Cr)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Or(s,Mr(i,"n",t))};${a}}${a}${a}`}},$r=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Ar=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Sr=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,wr=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:d,s:u}=n,h=`{${d}`+(s?Pr:Cr)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Rr(l)}${o}}`:""});${d}${t}if${o}(e)${o}{${d}${t}${e}${vr(h,!s,n)}${d}${t}}${d}${t}n${c("default")}${o}=${o}e;${d}${t}return ${Or(i,"n")}${u}${d}`},vr=(e,t,{_:n,cnst:s,getFunctionIntro:i,s:r})=>"var"!==s||t?`for${n}(${s} k in e)${n}${e}`:`Object.keys(e).forEach(${i(["k"],{isAsync:!1,name:null})}${e})${r}`,Ir=(e,t,n,{_:s,cnst:i,getDirectReturnFunction:r,getFunctionIntro:o,n:a})=>{if(t){const[t,i]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:n,t:n},name:null});return`m.forEach(${t}e${s}&&${s}typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e)${s}&&${s}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${i});`}return`for${s}(var i${s}=${s}0;${s}i${s}<${s}m.length;${s}i++)${s}{${a}${n}${n}${i} e${s}=${s}m[i];${a}${n}${n}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${i} k in e)${s}${e}${s}}${a}${n}}`},Pr=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+kr(e,t+e,n)+`${t}}${i}`},kr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}enumerable:${n}true,${r}${t}${e}get:${n}${o}e[k]${a}${r}${t}});${r}`},Nr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}if${n}(d)${n}{${r}${t}${e}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}${e}enumerable:${n}true,${r}${t}${e}${e}get:${n}${o}e[k]${a}${r}${t}${e}});${r}${t}}${r}`},Cr=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,Or=(e,t)=>e?`Object.freeze(${t})`:t,Mr=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${Rr(s)})`:t,Dr=Object.keys(xr);function Rr(e){return e([["value","'Module'"]],{lineBreakIndent:null})}function _r(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}class Lr extends Gn{declareDeclarator(e){this.id.declare(e,this.init||gn)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.id.hasEffects(e)}include(e,t){const{deoptimized:n,id:s,init:i}=this;n||this.applyDeoptimizations(),this.included=!0,i?.include(e,t),s.markDeclarationReached(),(t||s.shouldBeIncluded(e))&&s.include(e,t)}removeAnnotations(e){this.init?.removeAnnotations(e)}render(e,t){const{exportNamesByVariable:n,snippets:{_:s,getPropertyAccess:i}}=t,{end:r,id:o,init:a,start:l}=this,c=o.included;if(c)o.render(e,t);else{const t=ci(e.original,"=",o.end);e.remove(l,ui(e.original,t+1))}if(a){if(o instanceof ri&&a instanceof qi&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?Ee:{renderedSurroundingElement:bs})}else o instanceof ri&&_r(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:e,init:t}=this;if(t&&e instanceof ri&&t instanceof qi&&!t.id){const{name:n,variable:s}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}function Br(e,t,n){return"external"===t?yr[n(e instanceof dn?e.id:null)]:"default"===t?hr:null}const Tr={amd:["require"],cjs:["require"],system:["module"]};function zr(e){const t=[];for(const n of e.properties){if("RestElement"===n.type||n.computed||"Identifier"!==n.key.type)return;t.push(n.key.name)}return t}class Vr extends Gn{applyDeoptimizations(){}}const Fr="ROLLUP_FILE_URL_",jr="import";const Ur=["cjs","iife","umd"],Gr={amd:["document","module","URL"],cjs:["document","require","URL",fr],es:[],iife:["document","URL",fr],system:["module"],umd:["document","require","URL",fr]},Wr={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Hr=(e,t="URL")=>`new ${t}(${e}).href`,qr=(e,t=!1)=>Hr(`'${T(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.src || document.baseURI`),Kr=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},Yr=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,Jr=e=>Yr(`__dirname + '/${e}'`),Xr=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${fr} && ${fr}.src || new URL('${T(e)}', document.baseURI).href)`,Zr={amd:e=>("."!==e[0]&&(e="./"+e),Hr(`require.toUrl('${e}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${Jr(e)} : ${qr(e)})`,es:e=>Hr(`'${e}', import.meta.url`),iife:e=>qr(e),system:e=>Hr(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Jr(e)} : ${qr(e,!0)})`},Qr={amd:Kr((()=>Hr("module.uri, document.baseURI"))),cjs:Kr((e=>`(typeof document === 'undefined' ? ${Yr("__filename")} : ${Xr(e)})`)),iife:Kr((e=>Xr(e))),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:Kr((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Yr("__filename")} : ${Xr(e,!0)})`))};class eo extends Gn{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}render(e,t,{renderedSurroundingElement:n}=Ee){super.render(e,t),n!==bs&&n!==ys||(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=ts;const t=[];for(const n of this.properties){if(n instanceof Wn){t.push({key:K,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(Z,ie,this);if("symbol"==typeof e){t.push({key:K,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof ri?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){e=n.value instanceof Di&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new Zn(t,e)}}class to extends Gn{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(fn()):this.hasCachedEffect)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e)){if(this.scope.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:e,log:n,module:s}=this.scope.context;n(Me,Gt(e,s.id,Le(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(e,t){this.included=!0;for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t){let n=this.start;if(e.original.startsWith("#!")&&(n=Math.min(e.original.indexOf("\n")+1,this.end),e.remove(0,n)),this.body.length>0){for(;"/"===e.original[n]&&/[*/]/.test(e.original[n+1]);){const t=hi(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}pi(this.body,e,n,this.end,t)}else super.render(e,t)}applyDeoptimizations(){}}class no extends Gn{hasEffects(e){if(this.test?.hasEffects(e))return!0;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){this.included=!0,this.test?.include(e,t);for(const n of this.consequent)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t,n){if(this.consequent.length>0){this.test&&this.test.render(e,t);const s=this.test?this.test.end:ci(e.original,"default",this.start)+7,i=ci(e.original,":",s)+1;pi(this.consequent,e,i,n.end,t)}else super.render(e,t)}}no.prototype.needsBoundaries=!0;class so extends Gn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?le:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?he:On(Nn,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Cn(Nn,e[0],t,n)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class io extends ye{constructor(){super("undefined")}getLiteralValueAtPath(){}}class ro extends $s{constructor(e,t,n){super(e,t,t.declaration,n,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const s=t.declaration;(s instanceof Zi||s instanceof Hi)&&s.id?(this.hasId=!0,this.originalId=s.id):s instanceof ri&&(this.originalId=s)}addReference(e){this.hasId||(this.name=e.name)}forbidName(e){const t=this.getOriginalVariable();t===this?super.forbidName(e):t.forbidName(e)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const e=this.getOriginalVariable();return e===this?super.getBaseVariableName():e.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof io||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(e){const t=this.getOriginalVariable();return t===this?super.getName(e):t.getName(e)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e,t=this;const n=new Set;do{n.add(t),e=t,t=e.getDirectOriginalVariable()}while(t instanceof ro&&!n.has(t));return this.originalVariable=t||e}}class oo extends Ms{constructor(e,t){super(e,t),this.variables.set("this",new $s("this",null,gn,t,"other"))}addDeclaration(e,t,n,s){return this.context.module.importDescriptions.has(e.name)&&t.error(tn(e.name),e.start),super.addDeclaration(e,t,n,s)}addExportDefaultDeclaration(e,t,n){const s=new ro(e,t,n);return this.variables.set("default",s),s}addNamespaceMemberAccess(){}deconflict(e,t,n){for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.context.traceVariable(e)||this.parent.findVariable(e);return n instanceof si&&this.accessedOutsideVariables.set(e,n),n}}const ao={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>le,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class lo extends Gn{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Z)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=Ee){this.included=!0;for(const s of this.declarations){(t||s.shouldBeIncluded(e))&&s.include(e,t);const{id:i,init:r}=s;n&&i.include(e,t),r&&i.included&&!r.included&&(i instanceof vi||i instanceof gs)&&r.include(e,t)}}initialise(){for(const e of this.declarations)e.declareDeclarator(this.kind)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=Ee){if(function(e,t){for(const n of e){if(!n.id.included)return!1;if(n.id.type===Es){if(t.has(n.id.variable))return!1}else{const e=[];if(n.id.addExportedVariables(e,t),e.length>0)return!1}}return!0}(this.declarations,t.exportNamesByVariable)){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)}applyDeoptimizations(){}renderDeclarationEnd(e,t,n,s,i,r,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),t+=";",null===n?e.appendLeft(i,t):(10!==e.original.charCodeAt(s-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(s--,13===e.original.charCodeAt(s)&&s--),s===n+1?e.overwrite(n,i,t):(e.overwrite(n,n+1,t),e.remove(s,i))),r.length>0&&e.appendLeft(i,` ${Ai(r,o)};`)}renderReplacedDeclarations(e,t){const n=fi(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=ui(e.original,this.start+this.kind.length);let r=i-1;e.remove(this.start,r);let o,a,l=!1,c=!1,d="";const u=[],h=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof ri&&i.init&&0===n.length&&1===t.exportNamesByVariable.get(i.id.variable)?.length?(s=i.id.variable,n.push(s)):i.id.addExportedVariables(n,t.exportNamesByVariable);n.length>1?s=null:s&&(n.length=0)}return s}(n,t,u);for(const{node:u,start:p,separator:f,contentEnd:m,end:g}of n)if(u.included){if(u.render(e,t),o="",a="",!u.id.included||u.id instanceof ri&&_r(u.id.variable,t.exportNamesByVariable))c&&(d+=";"),l=!1;else{if(h&&h===u.id.variable){const n=ci(e.original,"=",u.id.end);Si(h,ui(e.original,n+1),null===f?m:f,e,t)}l?d+=",":(c&&(d+=";"),o+=`${this.kind} `,l=!0)}i===r+1?e.overwrite(r,i,d+o):(e.overwrite(r,r+1,d),e.appendLeft(i,o)),s=m,i=g,c=!0,r=f,d=""}else e.remove(p,g),u.removeAnnotations(e);this.renderDeclarationEnd(e,d,r,s,i,u,t)}}const co={ArrayExpression:ms,ArrayPattern:gs,ArrowFunctionExpression:$i,AssignmentExpression:class extends Gn{hasEffects(e){const{deoptimized:t,left:n,operator:s,right:i}=this;return t||this.applyDeoptimizations(),i.hasEffects(e)||n.hasEffectsAsAssignmentTarget(e,"="!==s)}hasEffectsOnInteractionAtPath(e,t,n){return this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,left:s,right:i,operator:r}=this;n||this.applyDeoptimizations(),this.included=!0,(t||"="!==r||s.included||s.hasEffectsAsAssignmentTarget(fn(),!1))&&s.includeAsAssignmentTarget(e,t,"="!==r),i.include(e,t)}initialise(){this.left.setAssignedValue(this.right)}render(e,t,{preventASI:n,renderedParentType:s,renderedSurroundingElement:i}=Ee){const{left:r,right:o,start:a,end:l,parent:c}=this;if(r.included)r.render(e,t),o.render(e,t);else{const l=ui(e.original,ci(e.original,"=",r.end)+1);e.remove(a,l),n&&mi(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof ri){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?Si(n,a,l,e,t):wi(n,a,l,c.type!==bs,e,t))}else{const n=[];if(r.addExportedVariables(n,t.exportNamesByVariable),n.length>0)return void function(e,t,n,s,i,r){const{_:o,getDirectReturnIifeLeft:a}=r.snippets;i.prependRight(t,a(["v"],`${Ai(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===bs,e,t)}r.included&&r instanceof vi&&(i===bs||i===ys)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Z),this.right.deoptimizePath(Q),this.scope.context.requestTreeshakingPass()}},AssignmentPattern:class extends Gn{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(Z,t,n)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=Ee){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Z),this.right.deoptimizePath(Q),this.scope.context.requestTreeshakingPass()}},AwaitExpression:Ci,BinaryExpression:class extends Gn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){if(e.length>0)return le;const s=this.left.getLiteralValueAtPath(Z,t,n);if("symbol"==typeof s)return le;const i=this.right.getLiteralValueAtPath(Z,t,n);if("symbol"==typeof i)return le;const r=Oi[this.operator];return r?r(s,i):le}hasEffects(e){return"+"===this.operator&&this.parent instanceof yi&&""===this.left.getLiteralValueAtPath(Z,ie,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=Ee){this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t)}},BlockStatement:bi,BreakStatement:class extends Gn{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return!0;e.hasBreak=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}},CallExpression:zi,CatchClause:Vi,ChainExpression:class extends Gn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){if(!this.expression.isSkippedAsOptional(n))return this.expression.getLiteralValueAtPath(e,t,n)}hasEffects(e){return!this.expression.isSkippedAsOptional(this)&&this.expression.hasEffects(e)}removeAnnotations(e){this.expression.removeAnnotations(e)}},ClassBody:class extends Gn{createScope(e){this.scope=new Fi(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable);for(const n of this.body)n.include(e,t)}parseNode(e){const t=this.body=[];for(const n of e.body)t.push(new(this.scope.context.getNodeConstructor(n.type))(n,this,n.static?this.scope:this.scope.instanceScope));super.parseNode(e)}applyDeoptimizations(){}},ClassDeclaration:Hi,ClassExpression:qi,ConditionalExpression:class extends Gn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return oe(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=ae(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(null!==this.usedBranch){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(Q);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=$e;for(const e of t)e.deoptimizeCache()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){const s=this.getUsedBranch();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):le}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new Ki([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]]),!1]}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getUsedBranch();return t?t.hasEffects(e):this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.consequent.hasEffectsOnInteractionAtPath(e,t,n)||this.alternate.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();t||this.test.shouldBeIncluded(e)||null===n?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(e,t)}includeCallArguments(e,t){const n=this.getUsedBranch();n?n.includeCallArguments(e,t):(this.consequent.includeCallArguments(e,t),this.alternate.includeCallArguments(e,t))}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=Ee){const o=this.getUsedBranch();if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const a=ci(e.original,":",this.consequent.end),l=ui(e.original,(this.consequent.included?ci(e.original,"?",this.test.end):a)+1);s&&mi(e,l,o.start),e.remove(this.start,l),this.consequent.included&&e.remove(a,this.end),this.test.removeAnnotations(e),o.render(e,t,{isCalleeOfRenderedParent:n,preventASI:!0,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(Z,ie,this);return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}},ContinueStatement:class extends Gn{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return!0;e.hasContinue=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}},DoWhileStatement:class extends Gn{hasEffects(e){return!!this.test.hasEffects(e)||Yi(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Ji(e,this.body,t)}},EmptyStatement:class extends Gn{hasEffects(){return!1}},ExportAllDeclaration:Xi,ExportDefaultDeclaration:Qi,ExportNamedDeclaration:er,ExportSpecifier:class extends Gn{applyDeoptimizations(){}},ExpressionStatement:yi,ForInStatement:class extends Gn{createScope(e){this.scope=new gi(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||Yi(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included=!0,i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Ji(e,n,t)}initialise(){this.left.setAssignedValue(ue)}render(e,t){this.left.render(e,t,li),this.right.render(e,t,li),110===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Z),this.scope.context.requestTreeshakingPass()}},ForOfStatement:class extends Gn{get await(){return oe(this.flags,131072)}set await(e){this.flags=ae(this.flags,131072,e)}createScope(e){this.scope=new gi(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included=!0,i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Ji(e,n,t)}initialise(){this.left.setAssignedValue(ue)}render(e,t){this.left.render(e,t,li),this.right.render(e,t,li),102===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Z),this.right.deoptimizePath(Q),this.scope.context.requestTreeshakingPass()}},ForStatement:class extends Gn{createScope(e){this.scope=new gi(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Yi(e,this.body)}include(e,t){this.included=!0,this.init?.include(e,t,{asSingleStatement:!0}),this.test?.include(e,t),this.update?.include(e,t),Ji(e,this.body,t)}render(e,t){this.init?.render(e,t,li),this.test?.render(e,t,li),this.update?.render(e,t,li),this.body.render(e,t)}},FunctionDeclaration:Zi,FunctionExpression:tr,Identifier:ri,IfStatement:ir,ImportAttribute:class extends Gn{},ImportDeclaration:rr,ImportDefaultSpecifier:or,ImportExpression:class extends Gn{constructor(){super(...arguments),this.inlineNamespace=null,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof yi)return $e;if(e instanceof Ci){const t=e.parent;if(t instanceof yi)return $e;if(t instanceof Lr){const e=t.id;return e instanceof vi?zr(e):void 0}if(t instanceof Li){const e=t.property;if(!t.computed&&e instanceof ri)return[e.name]}}else if(e instanceof Li){const t=e.parent,n=e.property;if(!(t instanceof zi&&n instanceof ri))return;const s=n.name;if(t.parent instanceof yi&&["catch","finally"].includes(s))return $e;if("then"!==s)return;if(0===t.arguments.length)return $e;const i=t.arguments[0];if(1!==t.arguments.length||!(i instanceof $i||i instanceof tr))return;if(0===i.params.length)return $e;const r=i.params[0];return 1===i.params.length&&r instanceof vi?zr(r):void 0}}hasEffects(){return!0}include(e,t){this.included||(this.included=!0,this.scope.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(e,t)}initialise(){this.scope.context.addDynamicImport(this)}parseNode(e){super.parseNode(e,["source"])}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}else{if(this.mechanism&&(e.overwrite(this.start,ci(e.original,"(",this.start+6)+1,this.mechanism.left),e.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(e.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[t,n]=s(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${n})`)}}else this.source.render(e,t);!0!==this.attributes&&(this.options&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.attributes&&e.appendLeft(this.end-1,`,${n}${i([["assert",this.attributes]],{lineBreakIndent:null})}`))}}setExternalResolution(e,t,n,s,i,r,o,a,l){const{format:c}=n;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.attributes=l;const d=[...Tr[c]||[]];let u;({helper:u,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,n,s,i)),u&&d.push(u),d.length>0&&this.scope.addAccessedGlobals(d,r)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:n,dynamicImportInCjs:s,format:i,generatedCode:{arrowFunctions:r},interop:o},{_:a,getDirectReturnFunction:l,getDirectReturnIifeLeft:c},d){const u=d.hookFirstSync("renderDynamicImport",[{customResolution:"string"==typeof this.resolution?this.resolution:null,format:i,moduleId:this.scope.context.module.id,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(u)return{helper:null,mechanism:u};const h=!this.resolution||"string"==typeof this.resolution;switch(i){case"cjs":{if(s&&(!e||"string"==typeof e||e instanceof dn))return{helper:null,mechanism:null};const n=Br(e,t,o);let i="require(",a=")";n&&(i=`/*#__PURE__*/${n}(${i}`,a+=")");const[d,u]=l([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${d}${i}`,a+=`${u})`,!r&&h&&(i=c(["t"],`${i}t${a}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),a=")"),{helper:n,mechanism:{left:i,right:a}}}case"amd":{const s=n?"c":"resolve",i=n?"e":"reject",d=Br(e,t,o),[u,p]=l(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),f=d?`${u}${s}(/*#__PURE__*/${d}(m))${p}`:s,[m,g]=l([s,i],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,b=`],${a}${f},${a}${i})${g})`;return!r&&h&&(y=c(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:d,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}},ImportNamespaceSpecifier:Vr,ImportSpecifier:class extends Gn{applyDeoptimizations(){}},LabeledStatement:class extends Gn{hasEffects(e){const{brokenFlow:t,includedLabels:n}=e;e.ignore.labels.add(this.label.name),e.includedLabels=new Set;let s=!1;return this.body.hasEffects(e)?s=!0:(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=t)),e.includedLabels=new Set([...n,...e.includedLabels]),s}include(e,t){this.included=!0;const{brokenFlow:n,includedLabels:s}=e;e.includedLabels=new Set,this.body.include(e,t),(t||e.includedLabels.has(this.label.name))&&(this.label.include(),e.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,ui(e.original,ci(e.original,":",this.label.end)+1)),this.body.render(e,t)}},Literal:Di,LogicalExpression:class extends Gn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return oe(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=ae(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(Q);const{scope:{context:t},expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=$e;for(const e of n)e.deoptimizeCache();t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){const s=this.getUsedBranch();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):le}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new Ki([this.left.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.left.hasEffectsOnInteractionAtPath(e,t,n)||this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();t||n===this.right&&this.left.shouldBeIncluded(e)||!n?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=Ee){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=ci(e.original,this.operator,this.left.end);if(this.right.included){const t=ui(e.original,o+2);e.remove(this.start,t),s&&mi(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(o,this.end);this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(Z,ie,this);if("symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&e||"&&"===this.operator&&!e||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}},MemberExpression:Li,MetaProperty:class extends Gn{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;return t===jr&&n?.startsWith(Fr)?e.getFileName(n.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){if(!this.included&&(this.included=!0,this.meta.name===jr)){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Li&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(Fr)&&(this.referenceId=t.slice(16))}}render(e,t){const{format:n,pluginDriver:s,snippets:i}=t,{scope:{context:{module:r}},meta:{name:o},metaProperty:a,parent:l,preliminaryChunkId:c,referenceId:d,start:u,end:h}=this,{id:p}=r;if(o!==jr)return;const f=c;if(d){const t=s.getFileName(d),i=N(D(O(f),t)),r=s.hookFirstSync("resolveFileUrl",[{chunkId:f,fileName:t,format:n,moduleId:p,referenceId:d,relativePath:i}])||Zr[n](i);return void e.overwrite(l.start,l.end,r,{contentOnly:!0})}let m=s.hookFirstSync("resolveImportMeta",[a,{chunkId:f,format:n,moduleId:p}]);m||(m=Qr[n]?.(a,{chunkId:f,snippets:i}),t.accessedDocumentCurrentScript||=Ur.includes(n)&&"undefined"!==m),"string"==typeof m&&(l instanceof Li?e.overwrite(l.start,l.end,m,{contentOnly:!0}):e.overwrite(u,h,m,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(Fr)?Wr:Gr)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}},MethodDefinition:Ui,NewExpression:class extends Gn{hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Z,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}initialise(){this.interaction={args:[null,...this.arguments],type:2,withNew:!0}}render(e,t){this.callee.render(e,t),Mi(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Z,ie),this.scope.context.requestTreeshakingPass()}},ObjectExpression:eo,ObjectPattern:vi,PrivateIdentifier:class extends Gn{},Program:to,Property:class extends ji{constructor(){super(...arguments),this.declarationInit=null}get method(){return oe(this.flags,262144)}set method(e){this.flags=ae(this.flags,262144,e)}get shorthand(){return oe(this.flags,524288)}set shorthand(e){this.flags=ae(this.flags,524288,e)}declare(e,t){return this.declarationInit=t,this.value.declare(e,ue)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.treeshake.propertyReadSideEffects;return"ObjectPattern"===this.parent.type&&"always"===t||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([K,K]),this.scope.context.requestTreeshakingPass())}},PropertyDefinition:class extends Gn{get computed(){return oe(this.flags,1024)}set computed(e){this.flags=ae(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.value?this.value.getLiteralValueAtPath(e,t,n):le}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):he}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}},RestElement:Ei,ReturnStatement:class extends Gn{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included=!0,this.argument?.include(e,t),e.brokenFlow=!0}initialise(){this.scope.addReturnExpression(this.argument||ue)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends Gn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){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}hasEffectsOnInteractionAtPath(e,t,n){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.expressions[this.expressions.length-1];for(const s of this.expressions)(t||s===n&&!(this.parent instanceof yi)||s.shouldBeIncluded(e))&&s.include(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=Ee){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:d,end:u}of fi(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&mi(e,d,l.start),1===r){const i=n||this.parent.type;l.render(e,t,{isCalleeOfRenderedParent:s&&l===a,renderedParentType:i,renderedSurroundingElement:i})}else l.render(e,t);else ai(l,e,d,u);o&&e.remove(o,this.end)}},SpreadElement:Wn,StaticBlock:class extends Gn{createScope(e){this.scope=new gi(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e,t){this.included=!0;for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t){if(this.body.length>0){const n=ci(e.original.slice(this.start,this.end),"{")+1;pi(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}},Super:class extends Gn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){this.included||(this.included=!0,this.scope.context.includeVariableInModule(this.variable))}},SwitchCase:no,SwitchStatement:class extends Gn{createScope(e){this.parentScope=e,this.scope=new gi(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:t,hasBreak:n,ignore:s}=e,{breaks:i}=s;s.breaks=!0,e.hasBreak=!1;let r=!0;for(const n of this.cases){if(n.hasEffects(e))return!0;r&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=t}return null!==this.defaultCase&&(e.brokenFlow=r),s.breaks=i,e.hasBreak=n,!1}include(e,t){this.included=!0,this.discriminant.include(e,t);const{brokenFlow:n,hasBreak:s}=e;e.hasBreak=!1;let i=!0,r=t||null!==this.defaultCase&&this.defaultCase<this.cases.length-1;for(let s=this.cases.length-1;s>=0;s--){const o=this.cases[s];if(o.included&&(r=!0),!r){const e=fn();e.ignore.breaks=!0,r=o.hasEffects(e)}r?(o.include(e,t),i&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=n):i=n}r&&null!==this.defaultCase&&(e.brokenFlow=i),e.hasBreak=s}initialise(){for(let e=0;e<this.cases.length;e++)if(null===this.cases[e].test)return void(this.defaultCase=e);this.defaultCase=null}parseNode(e){this.discriminant=new(this.scope.context.getNodeConstructor(e.discriminant.type))(e.discriminant,this,this.parentScope),super.parseNode(e)}render(e,t){this.discriminant.render(e,t),this.cases.length>0&&pi(this.cases,e,this.cases[0].start,this.end-1,t)}},TaggedTemplateExpression:class extends Ti{bind(){if(super.bind(),this.tag.type===Es){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(Oe,Ft(e),this.start)}}hasEffects(e){try{for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(Z,this.interaction,e)}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.tag.include(e,t),this.quasi.include(e,t)),this.tag.includeCallArguments(e,this.args);const[n]=this.getReturnExpression();n.included||n.include(e,!1)}initialise(){this.args=[ue,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Li&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Z,ie),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=ie){return null===this.returnExpression?(this.returnExpression=he,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Z,this.interaction,e,this)):this.returnExpression}},TemplateElement:class extends Gn{get tail(){return oe(this.flags,1048576)}set tail(e){this.flags=ae(this.flags,1048576,e)}bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(e){this.value=e.value,super.parseNode(e)}render(){}},TemplateLiteral:so,ThisExpression:class extends Gn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return 0===e.length?0!==t.type:this.variable.hasEffectsOnInteractionAtPath(e,t,n)}include(){this.included||(this.included=!0,this.scope.context.includeVariableInModule(this.variable))}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof oo?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(Oe,{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:Ue("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends Gn{hasEffects(){return!0}include(e,t){this.included=!0,this.argument.include(e,t),e.brokenFlow=!0}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}},TryStatement:class extends Gn{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){return(this.scope.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const n=this.scope.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:s,includedLabels:i}=e;if(this.directlyIncluded&&n){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)i.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,n?Un:t),i.size>0&&(this.includedLabelsAfterBlock=[...i]),e.brokenFlow=s;null!==this.handler&&(this.handler.include(e,t),e.brokenFlow=s),this.finalizer?.include(e,t)}},UnaryExpression:class extends Gn{get prefix(){return oe(this.flags,2097152)}set prefix(e){this.flags=ae(this.flags,2097152,e)}getLiteralValueAtPath(e,t,n){if(e.length>0)return le;const s=this.argument.getLiteralValueAtPath(Z,t,n);return"symbol"==typeof s?le:ao[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof ri)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Z,me,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>("void"===this.operator?0:1)}applyDeoptimizations(){this.deoptimized=!0,"delete"===this.operator&&(this.argument.deoptimizePath(Z),this.scope.context.requestTreeshakingPass())}},UnknownNode:class extends Gn{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:class extends Gn{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){this.argument.setAssignedValue(ue)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i}}=t;if(this.argument.render(e,t),"system"===s){const s=this.argument.variable,r=n.get(s);if(r)if(this.prefix)1===r.length?Si(s,this.start,this.end,e,t):wi(s,this.start,this.end,this.parent.type!==bs,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${Ai([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==bs,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(Z),this.argument instanceof ri){this.scope.findVariable(this.argument.name).isReassigned=!0}this.scope.context.requestTreeshakingPass()}},VariableDeclaration:lo,VariableDeclarator:Lr,WhileStatement:class extends Gn{hasEffects(e){return!!this.test.hasEffects(e)||Yi(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Ji(e,this.body,t)}},YieldExpression:class extends Gn{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}},uo="_missingExportShim";class ho extends ye{constructor(e){super(uo),this.module=e}include(){super.include(),this.module.needsExportShim=!0}}class po extends ye{constructor(e){super(e.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module}addReference(e){this.references.push(e),this.name=e.name}deoptimizeArgumentsOnInteractionAtPath(e,t,n){if(t.length>1||1===t.length&&2===e.type){const s=t[0];"string"==typeof s?this.getMemberVariables()[s]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):pe(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];"string"==typeof t&&this.getMemberVariables()[t]?.deoptimizePath(e.slice(1))}}getLiteralValueAtPath(e){return e[0]===X?"Module":le}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const n of t)if("*"!==n[0]&&n!==this.module.info.syntheticNamedExports){const t=this.context.traceExport(n);t&&(e[n]=t)}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(0===e.length)return!0;if(1===e.length&&2!==s)return 1===s;const i=e[0];if("string"!=typeof i)return!0;const r=this.getMemberVariables()[i];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,n)}include(){super.include(),this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([pr],e)}renderBlock(e){const{exportNamesByVariable:t,format:n,freeze:s,indent:i,symbols:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:d,s:u}}=e,h=this.getMemberVariables(),p=Object.entries(h).filter((([e,t])=>t.included)).map((([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${Ne(e)}${o}()${o}{${o}return ${t.getName(c)}${u}${o}}`]:[e,t.getName(c)]));p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(c)));f=`/*#__PURE__*/${pr}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${Rr(l)})`),s&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===n&&t.has(this)&&(f+=`${d}${Ai([this],e)};`),f}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references){const{context:n}=e.scope;if(n.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}}po.prototype.isNamespace=!0;class fo extends ye{constructor(e,t,n){super(t),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=n}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof ro||e instanceof fo;){if(e instanceof ro){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof fo&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){super.include(),this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}var mo;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(mo||(mo={}));const go=new WeakMap;function yo(e,t){if(e){const t=go.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=r.encode(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||yo(e)}function bo(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),!e.mappings)return{mappings:[],names:[],sources:[],version:3};const t=e.mappings,n=Array.isArray(t),s={decodedMappings:n?t:void 0,encodedMappings:n?void 0:t},i={...e,get mappings(){return s.decodedMappings||(s.decodedMappings=s.encodedMappings?r.decode(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return go.set(i,s),i}function Eo(e){return e.id}let xo;const $o=new Array(128).fill(void 0);function Ao(e){return $o[e]}$o.push(void 0,null,!0,!1);let So=$o.length;function wo(e){const t=Ao(e);return function(e){e<132||($o[e]=So,So=e)}(e),t}const vo="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&vo.decode();let Io=null;function Po(){return null!==Io&&0!==Io.byteLength||(Io=new Uint8Array(xo.memory.buffer)),Io}function ko(e,t){return e>>>=0,vo.decode(Po().subarray(e,e+t))}function No(e){So===$o.length&&$o.push($o.length+1);const t=So;return So=$o[t],$o[t]=e,t}let Co=0;const Oo="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Mo="function"==typeof Oo.encodeInto?function(e,t){return Oo.encodeInto(e,t)}:function(e,t){const n=Oo.encode(e);return t.set(n),{read:e.length,written:n.length}};let Do=null;function Ro(){return null!==Do&&0!==Do.byteLength||(Do=new Int32Array(xo.memory.buffer)),Do}function _o(e,t){try{const a=xo.__wbindgen_add_to_stack_pointer(-16),l=function(e,t,n){if(void 0===n){const n=Oo.encode(e),s=t(n.length,1)>>>0;return Po().subarray(s,s+n.length).set(n),Co=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=Po();let o=0;for(;o<s;o++){const t=e.charCodeAt(o);if(t>127)break;r[i+o]=t}if(o!==s){0!==o&&(e=e.slice(o)),i=n(i,s,s=o+3*e.length,1)>>>0;const t=Po().subarray(i+o,i+s);o+=Mo(e,t).written}return Co=o,i}(e,xo.__wbindgen_malloc,xo.__wbindgen_realloc),c=Co;xo.parse(a,l,c,t);var n=Ro()[a/4+0],s=Ro()[a/4+1],i=(r=n,o=s,r>>>=0,Po().subarray(r/1,r/1+o)).slice();return xo.__wbindgen_free(n,1*s,1),i}finally{xo.__wbindgen_add_to_stack_pointer(16)}var r,o}function Lo(e,t){try{return e.apply(this,t)}catch(e){xo.__wbindgen_exn_store(No(e))}}function Bo(){const e={wbg:{}};return e.wbg.__wbindgen_object_drop_ref=function(e){wo(e)},e.wbg.__wbg_crypto_d05b68a3572bb8ca=function(e){return No(Ao(e).crypto)},e.wbg.__wbindgen_is_object=function(e){const t=Ao(e);return"object"==typeof t&&null!==t},e.wbg.__wbg_process_b02b3570280d0366=function(e){return No(Ao(e).process)},e.wbg.__wbg_versions_c1cb42213cedf0f5=function(e){return No(Ao(e).versions)},e.wbg.__wbg_node_43b1089f407e4ec2=function(e){return No(Ao(e).node)},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof Ao(e)},e.wbg.__wbg_msCrypto_10fc94afee92bd76=function(e){return No(Ao(e).msCrypto)},e.wbg.__wbg_require_9a7e0f667ead4995=function(){return Lo((function(){return No(module.require)}),arguments)},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof Ao(e)},e.wbg.__wbindgen_string_new=function(e,t){return No(ko(e,t))},e.wbg.__wbg_randomFillSync_b70ccbdf4926a99d=function(){return Lo((function(e,t){Ao(e).randomFillSync(wo(t))}),arguments)},e.wbg.__wbg_getRandomValues_7e42b4fb8779dc6d=function(){return Lo((function(e,t){Ao(e).getRandomValues(Ao(t))}),arguments)},e.wbg.__wbg_newnoargs_5859b6d41c6fe9f7=function(e,t){return No(new Function(ko(e,t)))},e.wbg.__wbg_call_a79f1973a4f07d5e=function(){return Lo((function(e,t){return No(Ao(e).call(Ao(t)))}),arguments)},e.wbg.__wbindgen_object_clone_ref=function(e){return No(Ao(e))},e.wbg.__wbg_self_086b5302bcafb962=function(){return Lo((function(){return No(self.self)}),arguments)},e.wbg.__wbg_window_132fa5d7546f1de5=function(){return Lo((function(){return No(window.window)}),arguments)},e.wbg.__wbg_globalThis_e5f801a37ad7d07b=function(){return Lo((function(){return No(globalThis.globalThis)}),arguments)},e.wbg.__wbg_global_f9a61fce4af6b7c1=function(){return Lo((function(){return No(global.global)}),arguments)},e.wbg.__wbindgen_is_undefined=function(e){return void 0===Ao(e)},e.wbg.__wbg_call_f6a2bc58c19c53c6=function(){return Lo((function(e,t,n){return No(Ao(e).call(Ao(t),Ao(n)))}),arguments)},e.wbg.__wbg_buffer_5d1b598a01b41a42=function(e){return No(Ao(e).buffer)},e.wbg.__wbg_newwithbyteoffsetandlength_d695c7957788f922=function(e,t,n){return No(new Uint8Array(Ao(e),t>>>0,n>>>0))},e.wbg.__wbg_new_ace717933ad7117f=function(e){return No(new Uint8Array(Ao(e)))},e.wbg.__wbg_set_74906aa30864df5a=function(e,t,n){Ao(e).set(Ao(t),n>>>0)},e.wbg.__wbg_length_f0764416ba5bb237=function(e){return Ao(e).length},e.wbg.__wbg_newwithlength_728575f3bba9959b=function(e){return No(new Uint8Array(e>>>0))},e.wbg.__wbg_subarray_7f7a652672800851=function(e,t,n){return No(Ao(e).subarray(t>>>0,n>>>0))},e.wbg.__wbindgen_throw=function(e,t){throw new Error(ko(e,t))},e.wbg.__wbindgen_memory=function(){return No(xo.memory)},e}async function To(e){if(void 0!==xo)return xo;void 0===e&&(e=new URL("bindings_wasm_bg.wasm","undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:t&&t.src||new URL("rollup.browser.js",document.baseURI).href));const n=Bo();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:s,module:i}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await e,n);return function(e,t){return xo=e.exports,To.__wbindgen_wasm_module=t,Do=null,Io=null,xo}(s,i)}function zo(e){if("undefined"!=typeof Buffer&&e instanceof Buffer)return function(t,n){return e.toString("utf8",t,t+n)};{const t=new TextDecoder;return function(n,s){return t.decode(e.subarray(n,n+s))}}}const Vo=(e,{allowReturnOutsideFunction:t=!1}={})=>{const n=_o(e,t);return _n(n.buffer,zo(n))},Fo=async(e,{allowReturnOutsideFunction:t=!1,signal:n}={})=>{const s=await async function(e,t,n){return _o(e,t)}(e,t);return _n(s.buffer,zo(s))},jo=new Set(["assert","with"]);function Uo(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof eo))return n&&t.module.log(Oe,Jt(t.module.id),s),xe;const i=n.properties.find((e=>jo.has(Go(e))))?.value;if(!i)return xe;if(!(i instanceof eo))return t.module.log(Oe,(r=t.module.id,{code:bt,message:`Rollup could not statically analyze the options argument of a dynamic import in "${V(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),xe;var r;const o=i.properties.map((e=>{const n=Go(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(Oe,Jt(t.module.id),e.start),null)})).filter((e=>!!e));return o.length>0?Object.fromEntries(o):xe}const Go=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function Wo(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some((n=>e[n]!==t[n]))}var Ho="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},qo={memoryUsage:()=>({heapUsed:0})};let Ko=new Map;function Yo(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function Jo(e,t=3){e=Yo(e,t);const n=qo.memoryUsage().heapUsed,s=Ho.now(),i=Ko.get(e);void 0===i?Ko.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function Xo(e,t=3){e=Yo(e,t);const n=Ko.get(e);if(void 0!==n){const e=qo.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=Ho.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function Zo(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of Ko)e[t]=[s,n,i];return e}let Qo=zs,ea=zs;const ta=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function na(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of ta)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){Qo(s,4);const t=r.apply(this,e);return ea(s,4),t};let r;"function"==typeof e[n].handler?(r=e[n].handler,e[n].handler=i):(r=e[n],e[n]=i)}return e}function sa(e){e.isExecuted=!0;const t=[e],n=new Set;for(const e of t)for(const s of[...e.dependencies,...e.implicitlyLoadedBefore])s instanceof dn||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const ia={identifier:null,localName:uo};function ra(e,t,n,s,i=new Map){const r=i.get(t);if(r){if(r.has(e))return s?[null]:st((o=t,a=e.id,{code:ut,exporter:a,message:`"${o}" cannot be exported from "${V(a)}" as it is a reexport that references itself.`}));r.add(e)}else i.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i})}function oa(e,t){const n=W(t.sideEffectDependenciesByVariable,e,H);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof ro?s.getDirectOriginalVariable():s instanceof fo?s.syntheticNamespace:null,!s||i.has(s))break;i.add(s),n.add(e);const t=e.sideEffectDependenciesByVariable.get(s);if(t)for(const e of t)n.add(e)}return n}class aa{constructor(e,t,n,s,i,r,o,a){this.graph=e,this.id=t,this.options=n,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAttributes=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new ho(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(t),this.context=n.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:d,exportAllSources:u,exports:h,implicitlyLoadedAfter:p,implicitlyLoadedBefore:f,importers:m,reexportDescriptions:g,sourcesWithAttributes:y}=this;this.info={ast:null,attributes:a,code:null,get dynamicallyImportedIdResolutions(){return c.map((({argument:e})=>"string"==typeof e&&l.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return c.map((({id:e})=>e)).filter((e=>null!=e))},get dynamicImporters(){return d.sort()},get exportedBindings(){const e={".":[...h.keys()]};for(const[t,{source:n}]of g)(e[n]??=[]).push(t);for(const t of u)(e[t]??=[]).push("*");return e},get exports(){return[...h.keys(),...g.keys(),...[...u].map((()=>"*"))]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,Eo).sort()},get implicitlyLoadedBefore(){return Array.from(f,Eo).sort()},get importedIdResolutions(){return Array.from(y.keys(),(e=>l.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(y.keys(),(e=>l.resolvedIds[e]?.id)).filter(Boolean)},get importers(){return m.sort()},isEntry:s,isExternal:!1,get isIncluded(){return e.phase!==mo.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,syntheticNamedExports:r}}basename(){const e=C(this.id),t=M(this.id);return Ie(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){return this.addLocationToLogProps(e,t),st(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const e of this.exportAllModules)if(e instanceof dn)this.allExportNames.add(`*${e.id}`);else for(const t of e.getAllExportNames())"default"!==t&&this.allExportNames.add(t);return"string"==typeof this.info.syntheticNamedExports&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set,t=new Set,n=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const e of[...this.getReexports(),...this.getExports()]){const[t]=this.getVariableForExportName(e);t?.included&&n.add(t)}for(let s of n){const n=this.sideEffectDependenciesByVariable.get(s);if(n)for(const e of n)t.add(e);s instanceof fo?s=s.getBaseVariable():s instanceof ro&&(s=s.getOriginalVariable()),e.add(s.module)}if(this.options.treeshake&&"no-treeshake"!==this.info.moduleSideEffects)this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t);else for(const e of this.dependencies)this.relevantDependencies.add(e);for(const t of e)this.relevantDependencies.add(t);return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const t of this.getAllExportNames()){let[n]=this.getVariableForExportName(t);if(n instanceof ro&&(n=n.getOriginalVariable()),!n||!(n.included||n instanceof be))continue;const s=e.get(n);s?s.push(t):e.set(n,[t])}return this.exportNamesByVariable=e}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set(this.reexportDescriptions.keys());for(const t of this.exportAllModules)if(t instanceof dn)e.add(`*${t.id}`);else for(const n of[...t.getReexports(),...t.getExports()])"default"!==n&&e.add(n);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],t=[];for(const n of this.exports.keys()){const[s]=this.getVariableForExportName(n);(s?.included?e:t).push(n)}return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){return null===this.syntheticNamespace&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName("string"==typeof this.info.syntheticNamedExports?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:st((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${V(e)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(t)}\` needs ${"string"==typeof t&&"default"!==t?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var e,t}getVariableForExportName(e,{importerForSideEffects:t,isExportAllSearch:n,onlyExplicit:s,searchedNamesAndModules:i}=xe){if("*"===e[0]){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*")}const r=this.reexportDescriptions.get(e);if(r){const[e]=ra(r.module,r.localName,t,!1,i);return e?(t&&(la(e,t,this),this.info.moduleSideEffects&&W(t.sideEffectDependenciesByVariable,e,H).add(this)),[e]):this.error(Zt(r.localName,this.id,r.module.id),r.start)}const o=this.exports.get(e);if(o){if(o===ia)return[this.exportShimVariable];const e=o.localName,n=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:i});return t&&(la(n,t,this),W(t.sideEffectDependenciesByVariable,n,H).add(this)),[n]}if(s)return[null];if("default"!==e){const n=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,i);if(this.namespaceReexportsByName.set(e,n),n[0])return n}return this.info.syntheticNamedExports?[W(this.syntheticExports,e,(()=>new fo(this.astContext,e,this.getSyntheticNamespace())))]:!n&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=pn();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){this.isExecuted||(sa(this),this.graph.needsTreeshakingPass=!0);for(const s of this.exports.keys())if(e||s!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(s)[0];if(!e)return st((t=s,n=this.id,{binding:t,code:St,exporter:n,message:`Exported variable "${t}" is not defined in "${V(n)}".`,url:Ue(Ge)}));e.deoptimizePath(Q),e.included||this.includeVariable(e)}var t,n;for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);t&&(t.deoptimizePath(Q),t.included||this.includeVariable(t),t instanceof be&&(t.module.reexported=!0))}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(pn(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(sa(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const n of e){const e=this.getVariableForExportName(n)[0];e&&(e.deoptimizePath(Q),e.included||this.includeVariable(e)),this.exports.has(n)||this.reexportDescriptions.has(n)||(t=!0)}t&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const t of this.exportAllSources){const n=this.graph.modulesById.get(this.resolvedIds[t].id);n instanceof dn?e.push(n):this.exportAllModules.push(n)}this.exportAllModules.push(...e)}log(e,t,n){this.addLocationToLogProps(t,n),this.options.onLog(e,t)}render(e){const t=this.magicString.clone();this.ast.render(t,e),t.trim();const{usesTopLevelAwait:n}=this.astContext;return n&&"es"!==e.format&&"system"!==e.format?st((s=this.id,i=e.format,{code:"INVALID_TLA_FORMAT",id:s,message:`Module format "${i}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:t,usesTopLevelAwait:n};var s,i}async setSource({ast:e,code:t,customTransformCache:n,originalCode:s,originalSourcemap:i,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,...c}){if(t.startsWith("#!")){const e=t.indexOf("\n");this.shebang=t.slice(2,e)}Qo("generate ast",3),this.info.code=t,this.originalCode=s,this.originalSourcemap=bo(i),this.sourcemapChain=o.map((e=>e.missing?e:bo(e))),yo(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(c);const d=e??await this.tryParseAsync();ea("generate ast",3),Qo("analyze ast",3),this.resolvedIds=r??Object.create(null);const u=this.id;this.magicString=new E(t,{filename:this.excludeFromSourcemap?null:u,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:u,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>co[e]||co.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new oo(this.graph.scope,this.astContext),this.namespace=new po(this.astContext),this.ast=new to(d,{context:this.astContext,type:"Module"},this.scope),e||!1!==this.options.cache?this.info.ast=d:Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(u))return this.graph.astLru.get(u);{const e=this.tryParse();return this.graph.astLru.set(u,e),e}}}),ea("analyze ast",3)}toJSON(){return{ast:this.info.ast,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,Eo),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:n,searchedNamesAndModules:s}=xe){const i=this.scope.variables.get(e);if(i)return i;const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof aa&&"*"===r.name)return e.namespace;const[i]=ra(e,r.name,t||this,n,s);return i||this.error(Zt(r.name,this.id,e.id),r.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:n}){null!=t&&(this.info.moduleSideEffects=t),null!=n&&(this.info.syntheticNamedExports=n),null!=e&&Object.assign(this.info.meta,e)}addDynamicImport(e){let t=e.source;t instanceof so?1===t.quasis.length&&t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):t instanceof Di&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}assertUniqueExportName(e,t){(this.exports.has(e)||this.reexportDescriptions.has(e))&&this.error(function(e){return{code:"DUPLICATE_EXPORT",message:`Duplicate export "${e}"`}}(e),t)}addExport(e){if(e instanceof Qi)this.assertUniqueExportName("default",e.start),this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof Xi){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof Di?e.exported.value:e.exported.name;this.assertUniqueExportName(n,e.exported.start),this.reexportDescriptions.set(n,{localName:"*",module:null,source:t,start:e.start})}else this.exportAllSources.add(t)}else if(e.source instanceof Di){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=n instanceof Di?n.value:n.name;this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:s instanceof Di?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof lo)for(const e of t.declarations)for(const t of hn(e.id))this.assertUniqueExportName(t,e.id.start),this.exports.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.assertUniqueExportName(e,t.id.start),this.exports.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:n}of e.specifiers){const e=t.name,s=n instanceof ri?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exports.set(s,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const n of e.specifiers){const e=n.local.name;(this.scope.variables.has(e)||this.importDescriptions.has(e))&&this.error(tn(e),n.local.start);const s=n instanceof or?"default":n instanceof Vr?"*":n.imported instanceof ri?n.imported.name:n.imported.value;this.importDescriptions.set(e,{module:null,name:s,source:t,start:n.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=Le(n,t,{offsetLine:1});if(s){let{column:i,line:r}=s;try{({column:i,line:r}=function(e,t){const n=e.filter((e=>!e.missing));e:for(;n.length>0;){const e=n.pop().mappings[t.line-1];if(e){const n=e.filter((e=>e.length>1)),s=n[n.length-1];for(const e of n)if(e[0]>=t.column||e===s){t={column:e[3],line:e[2]+1};continue e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:i,line:r})),n=this.originalCode}catch(e){this.options.onLog(Oe,function(e,t,n,s,i){return{cause:e,code:"SOURCEMAP_ERROR",id:t,loc:{column:n,file:t,line:s},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:i}}(e,this.id,i,r,t))}it(e,{column:i,line:r},n,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[t.source];t.module=this.graph.modulesById.get(e)}}addRelevantSideEffectDependencies(e,t,n){const s=new Set,i=r=>{for(const o of r)s.has(o)||(s.add(o),t.has(o)?e.add(o):(o.info.moduleSideEffects||n.has(o))&&(o instanceof dn||o.hasEffects()?e.add(o):i(o.dependencies)))};i(this.dependencies),i(n)}addSource(e,t){const n=(s=t.attributes,s?.length?Object.fromEntries(s.map((e=>[Go(e),e.value.value]))):xe);var s;const i=this.sourcesWithAttributes.get(e);i?Wo(i,n)&&this.log(Oe,Ht(i,n,e,this.id),t.start):this.sourcesWithAttributes.set(e,n)}getVariableFromNamespaceReexports(e,t,n){let s=null;const i=new Map,r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e)continue;const[a,l]=ra(o,e,t,!0,ca(n));o instanceof dn||l?r.add(a):a instanceof fo?s||(s=a):a&&i.set(a,o)}if(i.size>0){const t=[...i],n=t[0][0];return 1===t.length?[n]:(this.options.onLog(Oe,(o=e,a=this.id,l=t.map((([,e])=>e.id)),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${V(a)}" re-exports "${o}" from one of the modules ${je(l.map((e=>V(e))))} (will be ignored).`,reexporter:a})),[null])}var o,a,l;if(r.size>0){const t=[...r],n=t[0];return t.length>1&&this.options.onLog(Oe,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${V(t)}" re-exports "${e}" from one of the external modules ${je(s.map((e=>V(e))))}, guessing "${V(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map((e=>e.module.id)))),[n,!0]}return s?[s]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof dn){const[t]=n.getVariableForExportName("*");t.include(),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.include(),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const t=this.dynamicImports.find((t=>t.node===e)).resolution;if(t instanceof aa){t.includedDynamicImporters.push(this);const n=this.options.treeshake?e.getDeterministicImportedNames():void 0;n?t.includeExportsByNames(n):t.includeAllExports(!0)}}includeVariable(e){const t=e.module;if(e.included)t instanceof aa&&t!==this&&oa(e,this);else if(e.include(),this.graph.needsTreeshakingPass=!0,t instanceof aa&&(t.isExecuted||sa(t),t!==this)){const t=oa(e,this);for(const e of t)e.isExecuted||sa(e)}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;t&&t!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(Oe,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${V(t)}".`})),this.exports.set(e,ia)}tryParse(){try{return Vo(this.info.code)}catch(e){return this.error(nn(e,this.id),e.pos)}}async tryParseAsync(){try{return await Fo(this.info.code)}catch(e){return this.error(nn(e,this.id),e.pos)}}}function la(e,t,n){if(e.module instanceof aa&&e.module!==n){const s=e.module.cycles;if(s.size>0){const i=n.cycles;for(const r of i)if(s.has(r)){t.alternativeReexportModules.set(e,n);break}}}}const ca=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)])));function da(e){return e.endsWith(".js")?e.slice(0,-3):e}function ua(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${da(t)}`:e.id??""}function ha(e,t,n,s,i,r,o,a="return "){const{_:l,getDirectReturnFunction:c,getFunctionIntro:d,getPropertyAccess:u,n:h,s:p}=i;if(!n)return`${h}${h}${a}${function(e,t,n,s,i){if(e.length>0)return e[0].local;for(const{defaultVariableName:e,importPath:r,isChunk:o,name:a,namedExportsMode:l,namespaceVariableName:c,reexports:d}of t)if(d)return pa(a,d[0].imported,l,o,e,c,n,r,s,i)}(e,t,s,o,u)};`;let f="";for(const{defaultVariableName:e,importPath:i,isChunk:a,name:d,namedExportsMode:p,namespaceVariableName:m,reexports:g}of t)if(g&&n)for(const t of g)if("*"!==t.reexported){const n=pa(d,t.imported,p,a,e,m,s,i,o,u);if(f&&(f+=h),"*"!==t.imported&&t.needsLiveBinding){const[e,s]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});f+=`Object.defineProperty(exports,${l}${JSON.stringify(t.reexported)},${l}{${h}${r}enumerable:${l}true,${h}${r}get:${l}${e}${n}${s}${h}});`}else"__proto__"===t.reexported?f+=`Object.defineProperty(exports,${l}"__proto__",${l}{${h}${r}enumerable:${l}true,${h}${r}value:${l}${n}${h}});`:f+=`exports${u(t.reexported)}${l}=${l}${n};`}for(const{exported:t,local:n}of e){const e=`exports${u(t)}`;e!==n&&(f&&(f+=h),f+="__proto__"===t?`Object.defineProperty(exports,${l}"__proto__",${l}{${h}${r}enumerable:${l}true,${h}${r}value:${l}${n}${h}});`:`${e}${l}=${l}${n};`)}for(const{name:e,reexports:s}of t)if(s&&n)for(const t of s)if("*"===t.reexported){f&&(f+=h);const n=`{${h}${r}if${l}(k${l}!==${l}'default'${l}&&${l}!Object.prototype.hasOwnProperty.call(exports,${l}k))${l}${ga(e,t.needsLiveBinding,r,i)}${p}${h}}`;f+=`Object.keys(${e}).forEach(${d(["k"],{isAsync:!1,name:null})}${n});`}return f?`${h}${h}${f}`:""}function pa(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=mr[t]?i:e;return gr(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:yr[o(a)])?r:e:`${e}${c(t)}`}function fa(e){return e([["value","true"]],{lineBreakIndent:null})}function ma(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",fa(i)],[null,`[Symbol.toStringTag]:${s}${Rr(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${fa(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${Rr(i)});`}return""}const ga=(e,t,n,{_:s,getDirectReturnFunction:i,n:r})=>{if(t){const[t,o]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${s}k,${s}{${r}${n}${n}enumerable:${s}true,${r}${n}${n}get:${s}${t}${e}[k]${o}${r}${n}})`}return`k${s}===${s}'__proto__'${s}?${s}Object.defineProperty(exports,${s}k,${s}{${r}${n}${n}enumerable:${s}true,${r}${n}${n}value:${s}${e}[k]${r}${n}})${s}:${s}exports[k]${s}=${s}${e}[k]`};function ya(e,t,n,s,i,r,o,a){const{_:l,cnst:c,n:d}=a,u=new Set,h=[],p=(e,t,n)=>{u.add(t),h.push(`${c} ${e}${l}=${l}/*#__PURE__*/${t}(${n});`)};for(const{defaultVariableName:n,imports:s,importPath:i,isChunk:r,name:o,namedExportsMode:a,namespaceVariableName:l,reexports:c}of e)if(r){for(const{imported:e,reexported:t}of[...s||[],...c||[]])if("*"===e&&"*"!==t){a||p(l,hr,o);break}}else{const e=t(i);let r=!1,a=!1;for(const{imported:t,reexported:i}of[...s||[],...c||[]]){let s,c;"default"===t?r||(r=!0,n!==l&&(c=n,s=mr[e])):"*"!==t||"*"===i||a||(a=!0,s=yr[e],c=l),s&&p(c,s,o)}}return`${Er(u,r,o,a,n,s,i)}${h.length>0?`${h.join(d)}${d}${d}`:""}`}function ba(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":da(e);var n}const Ea=new Set([...s(["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","domain","events","fs","http","http2","https","inspector","module","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","trace_events","tty","url","util","v8","vm","wasi","worker_threads","zlib"]),"assert/strict","dns/promises","fs/promises","path/posix","path/win32","readline/promises","stream/consumers","stream/promises","stream/web","timers/promises","util/types"]);function xa(e,t){const n=t.map((({importPath:e})=>e)).filter((e=>Ea.has(e)||e.startsWith("node:")));0!==n.length&&e(Oe,function(e){return{code:Pt,ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${je(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const $a=(e,t)=>e.split(".").map(t).join("");function Aa(e,t,n,s,{_:i,getPropertyAccess:r}){const o=e.split(".");o[0]=("function"==typeof n?n(o[0]):n[o[0]])||o[0];const a=o.pop();let l=t,c=[...o.map((e=>(l+=r(e),`${l}${i}=${i}${l}${i}||${i}{}`))),`${l}${r(a)}`].join(`,${i}`)+`${i}=${i}${s}`;return o.length>0&&(c=`(${c})`),c}function Sa(e){let t=e.length;for(;t--;){const{imports:n,reexports:s}=e[t];if(n||s)return e.slice(0,t+1)}return[]}const wa=({dependencies:e,exports:t})=>{const n=new Set(t.map((e=>e.exported)));n.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&n.add(e.reexported);return n},va=(e,t,{_:n,cnst:s,getObject:i,n:r})=>{if(e){const o=[...e].map((e=>[e,"1"]));return o.unshift([null,`__proto__:${n}null`]),`${r}${t}${s} _starExcludes${n}=${n}${i(o,{lineBreakIndent:{base:t,t:t}})};`}return""},Ia=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",Pa=(e,t,n)=>ka(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,n);function ka(e,t,{_:n,n:s}){return 0===e.length?"":1===e.length?`exports(${JSON.stringify(e[0].name)},${n}${e[0].value});${s}${s}`:`exports({${s}`+e.map((({name:e,value:s})=>`${t}${Ne(e)}:${n}${s}`)).join(`,${s}`)+`${s}});${s}${s}`}const Na=(e,t,n)=>ka(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,n),Ca=(e,t,n)=>ka(e.filter((e=>e.local===uo)).map((e=>({name:e.exported,value:uo}))),t,n);function Oa(e,t,n){return e?`${t}${$a(e,n)}`:"null"}var Ma={amd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:d,namedExportsMode:u,log:h,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:b,generatedCode:{symbols:E},interop:x,strict:$}){xa(h,n);const A=n.map((e=>`'${ba(e.importPath,m.forceJsExtensionForImports)}'`)),S=n.map((e=>e.name)),{n:w,getNonArrowFunctionIntro:v,_:I}=f;u&&r&&(S.unshift("exports"),A.unshift("'exports'")),t.has("require")&&(S.unshift("require"),A.unshift("'require'")),t.has("module")&&(S.unshift("module"),A.unshift("'module'"));const P=ua(m,o),k=(P?`'${P}',${I}`:"")+(A.length>0?`[${A.join(`,${I}`)}],${I}`:""),N=$?`${I}'use strict';`:"";e.prepend(`${l}${ya(n,x,y,b,E,t,a,f)}`);const C=ha(s,n,u,x,f,a,y);let O=ma(u&&r,c&&(!0===g||"if-default-prop"===g&&i),d&&E,f);O&&(O=w+w+O),e.append(`${C}${O}${p}`).indent(a).prepend(`${m.define}(${k}(${v(S,{isAsync:!1,name:null})}{${N}${w}${w}`).append(`${w}${w}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:d,outro:u,snippets:h},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,generatedCode:{symbols:b},strict:E}){const{_:x,n:$}=h,A=E?`'use strict';${$}${$}`:"";let S=ma(d&&r,l&&(!0===f||"if-default-prop"===f&&i),c&&b,h);S&&(S+=$+$);const w=function(e,{_:t,cnst:n,n:s},i){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:d}of e)c||d?(r+=i&&o?",":`${r?`;${s}`:""}${n} `,o=!0,r+=`${l}${t}=${t}require('${a}')`):(r&&(r+=i&&!o?",":`;${s}`),o=!1,r+=`require('${a}')`);if(r)return`${r};${s}${s}`;return""}(n,h,p),v=ya(n,y,m,g,b,t,o,h);e.prepend(`${A}${a}${S}${w}${v}`);const I=ha(s,n,d,y,h,o,m,`module.exports${x}=${x}`);e.append(`${I}${u}`)},es:function(e,{accessedGlobals:t,indent:n,intro:s,outro:i,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:d}}){const{n:u}=a,h=function(e,{_:t}){const n=[];for(const{importPath:s,reexports:i,imports:r,name:o,attributes:a}of e){const e=`'${s}'${a?`${t}assert${t}${a}`:""};`;if(i||r){if(r){let s=null,i=null;const o=[];for(const e of r)"default"===e.imported?s=e:"*"===e.imported?i=e:o.push(e);i&&n.push(`import${t}*${t}as ${i.local} from${t}${e}`),s&&0===o.length?n.push(`import ${s.local} from${t}${e}`):o.length>0&&n.push(`import ${s?`${s.local},${t}`:""}{${t}${o.map((e=>e.imported===e.local?e.imported:`${Ce(e.imported)} as ${e.local}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}if(i){let s=null;const a=[],l=[];for(const e of i)"*"===e.reexported?s=e:"*"===e.imported?a.push(e):l.push(e);if(s&&n.push(`export${t}*${t}from${t}${e}`),a.length>0){r&&r.some((e=>"*"===e.imported&&e.local===o))||n.push(`import${t}*${t}as ${o} from${t}${e}`);for(const e of a)n.push(`export${t}{${t}${o===e.reexported?o:`${o} as ${Ce(e.reexported)}`} };`)}l.length>0&&n.push(`export${t}{${t}${l.map((e=>e.imported===e.reexported?Ce(e.imported):`${Ce(e.imported)} as ${Ce(e.reexported)}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}}else n.push(`import${t}${e}`)}return n}(r,a);h.length>0&&(s+=h.join(u)+u+u),(s+=Er(null,t,n,a,l,c,d))&&e.prepend(s);const p=function(e,{_:t,cnst:n}){const s=[],i=[];for(const r of e)r.expression&&s.push(`${n} ${r.local}${t}=${t}${r.expression};`),i.push(r.exported===r.local?r.local:`${r.local} as ${Ce(r.exported)}`);i.length>0&&s.push(`export${t}{${t}${i.join(`,${t}`)}${t}};`);return s}(o,a);p.length>0&&e.append(u+u+p.join(u).trim()),i&&e.append(i),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,namedExportsMode:l,log:c,outro:d,snippets:u},{compact:h,esModule:p,extend:f,freeze:m,externalLiveBindings:g,globals:y,interop:b,name:E,generatedCode:{symbols:x},strict:$}){const{_:A,getNonArrowFunctionIntro:S,getPropertyAccess:w,n:v}=u,I=E&&E.includes("."),P=!f&&!I;if(E&&P&&(ve(k=E)||we.test(k)))return st(function(e){return{code:mt,message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:Ue(Ye)}}(E));var k;xa(c,n);const N=Sa(n),C=N.map((e=>e.globalName||"null")),O=N.map((e=>e.name));r&&!E&&c(Oe,{code:It,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Ue(tt)}),l&&r&&(f?(C.unshift(`this${$a(E,w)}${A}=${A}this${$a(E,w)}${A}||${A}{}`),O.unshift("exports")):(C.unshift("{}"),O.unshift("exports")));const M=$?`${o}'use strict';${v}`:"",D=ya(n,b,g,m,x,t,o,u);e.prepend(`${a}${D}`);let R=`(${S(O,{isAsync:!1,name:null})}{${v}${M}${v}`;r&&(!E||f&&l||(R=(P?`var ${E}`:`this${$a(E,w)}`)+`${A}=${A}${R}`),I&&(R=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o){const a=e.split(".");a[0]=("function"==typeof n?n(a[0]):n[a[0]])||a[0],a.pop();let l=t;return a.map((e=>(l+=i(e),`${l}${s}=${s}${l}${s}||${s}{}${r}`))).join(o?",":"\n")+(o&&a.length>0?";":"\n")}(E,"this",y,u,h)+R));let _=`${v}${v}})(${C.join(`,${A}`)});`;r&&!f&&l&&(_=`${v}${v}${o}return exports;${_}`);const L=ha(s,n,l,b,u,o,g);let B=ma(l&&r,!0===p||"if-default-prop"===p&&i,x,u);B&&(B=v+v+B),e.append(`${L}${B}${d}`).indent(o).prepend(R).append(_)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:d,freeze:u,name:h,generatedCode:{symbols:p},strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:b,n:E,s:x}=a,{importBindings:$,setters:A,starExcludes:S}=function(e,t,n,{_:s,cnst:i,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let d=null;for(const{imports:u,reexports:h}of e){const p=[];if(u)for(const e of u)l.push(e.local),"*"===e.imported?p.push(`${e.local}${s}=${s}module;`):p.push(`${e.local}${s}=${s}module${o(e.imported)};`);if(h){const a=[];let l=!1;for(const{imported:e,reexported:t}of h)"*"===t?l=!0:a.push([t,"*"===e?"module":`module${o(e)}`]);if(a.length>1||l)if(l){d||(d=wa({dependencies:e,exports:t})),a.unshift([null,`__proto__:${s}null`]);const o=r(a,{lineBreakIndent:null});p.push(`${i} setter${s}=${s}${o};`,`for${s}(${i} name in module)${s}{`,`${n}if${s}(!_starExcludes[name])${s}setter[name]${s}=${s}module[name];`,"}","exports(setter);")}else{const e=r(a,{lineBreakIndent:null});p.push(`exports(${e});`)}else{const[e,t]=a[0];p.push(`exports(${JSON.stringify(e)},${s}${t});`)}}c.push(p.join(`${a}${n}${n}${n}`))}return{importBindings:l,setters:c,starExcludes:d}}(n,s,r,a),w=h?`'${h}',${g}`:"",v=t.has("module")?["exports","module"]:i?["exports"]:[];let I=`System.register(${w}[`+n.map((({importPath:e})=>`'${e}'`)).join(`,${g}`)+`],${g}(${b(v,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+va(S,r,a)+Ia($,r,a)+`${E}${r}return${g}{${A.length>0?`${E}${r}${r}setters:${g}[${A.map((e=>e?`${y(["module"],{isAsync:!1,name:null})}{${E}${r}${r}${r}${e}${E}${r}${r}}`:m?"null":`${y([],{isAsync:!1,name:null})}{}`)).join(`,${g}`)}],`:""}${E}`;I+=`${r}${r}execute:${g}(${b([],{isAsync:c,name:null})}{${E}${E}`;const P=`${r}${r}})${E}${r}}${x}${E}}));`;e.prepend(o+Er(null,t,r,a,d,u,p)+Pa(s,r,a)).append(`${l}${E}${E}`+Na(s,r,a)+Ca(s,r,a)).indent(`${r}${r}${r}`).append(P).prepend(I)},umd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:d,outro:u,snippets:h},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:b,interop:E,name:x,generatedCode:{symbols:$},globals:A,noConflict:S,strict:w}){const{_:v,cnst:I,getFunctionIntro:P,getNonArrowFunctionIntro:k,getPropertyAccess:N,n:C,s:O}=h,M=f?"f":"factory",D=f?"g":"global";if(r&&!x)return st({code:It,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:Ue(tt)});xa(d,n);const R=n.map((e=>`'${ba(e.importPath,p.forceJsExtensionForImports)}'`)),_=n.map((e=>`require('${e.importPath}')`)),L=Sa(n),B=L.map((e=>Oa(e.globalName,D,N))),T=L.map((e=>e.name));c&&(r||S)&&(R.unshift("'exports'"),_.unshift("exports"),B.unshift(Aa(x,D,A,(g?`${Oa(x,D,N)}${v}||${v}`:"")+"{}",h)),T.unshift("exports"));const z=ua(p,o),V=(z?`'${z}',${v}`:"")+(R.length>0?`[${R.join(`,${v}`)}],${v}`:""),F=p.define,j=!c&&r?`module.exports${v}=${v}`:"",U=w?`${v}'use strict';${C}`:"";let G;if(S){const e=f?"e":"exports";let t;if(!c&&r)t=`${I} ${e}${v}=${v}${Aa(x,D,A,`${M}(${B.join(`,${v}`)})`,h)};`;else{t=`${I} ${e}${v}=${v}${B.shift()};${C}${a}${a}${M}(${[e,...B].join(`,${v}`)});`}G=`(${P([],{isAsync:!1,name:null})}{${C}${a}${a}${I} current${v}=${v}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map((e=>i+=s(e))).join(`${n}&&${n}`)}(x,D,h)};${C}${a}${a}${t}${C}${a}${a}${e}.noConflict${v}=${v}${P([],{isAsync:!1,name:null})}{${v}${Oa(x,D,N)}${v}=${v}current;${v}return ${e}${O}${v}};${C}${a}})()`}else G=`${M}(${B.join(`,${v}`)})`,!c&&r&&(G=Aa(x,D,A,G,h));const W=r||S&&c||B.length>0,H=[M];W&&H.unshift(D);const q=W?`this,${v}`:"",K=W?`(${D}${v}=${v}typeof globalThis${v}!==${v}'undefined'${v}?${v}globalThis${v}:${v}${D}${v}||${v}self,${v}`:"",Y=W?")":"",J=W?`${a}typeof exports${v}===${v}'object'${v}&&${v}typeof module${v}!==${v}'undefined'${v}?${v}${j}${M}(${_.join(`,${v}`)})${v}:${C}`:"",X=`(${k(H,{isAsync:!1,name:null})}{${C}`+J+`${a}typeof ${F}${v}===${v}'function'${v}&&${v}${F}.amd${v}?${v}${F}(${V}${M})${v}:${C}`+`${a}${K}${G}${Y};${C}`+`})(${q}(${k(T,{isAsync:!1,name:null})}{${U}${C}`,Z=C+C+"}));";e.prepend(`${l}${ya(n,E,y,b,$,t,a,h)}`);const Q=ha(s,n,c,E,h,a,y);let ee=ma(c&&r,!0===m||"if-default-prop"===m&&i,$,h);ee&&(ee=C+C+ee),e.append(`${Q}${ee}${u}`).trim().indent(a).append(Z).prepend(X)}};const Da=(e,t)=>t?`${e}\n${t}`:e,Ra=(e,t)=>t?`${e}\n\n${t}`:e;async function _a(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],Da),t.hookReduceValue("footer",e.footer(n),[n],Da),t.hookReduceValue("intro",e.intro(n),[n],Ra),t.hookReduceValue("outro",e.outro(n),[n],Ra)]);return r&&(r+="\n\n"),o&&(o=`\n\n${o}`),s&&(s+="\n"),i&&(i="\n"+i),{banner:s,footer:i,intro:r,outro:o}}catch(e){return st((s=e.message,i=e.hook,r=e.plugin,{code:rt,message:`Could not retrieve "${i}". Check configuration of plugin "${r}".\n\tError Message: ${s}`}))}var s,i,r}const La={amd:za,cjs:za,es:Ta,iife:za,system:Ta,umd:za};function Ba(e,t,n,s,i,r,o,a,l,c,d,u,h,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(s,i,u,h);!function(e,t,n){for(const s of t){for(const t of s.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof ro&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,Cs(t.name,e,t.forbiddenNames));if(n.has(s)){const t=s.namespace;t.setRenderNames(null,Cs(t.name,e,t.forbiddenNames))}}}(s,f,p),La[i](s,n,t,r,o,a,l,c,d);for(const e of f)e.scope.deconflict(i,u,h)}function Ta(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof G)&&(t.variableName=Cs(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof dn)?n.setRenderNames(null,(t instanceof dn?a.get(t):o.get(t)).variableName):t instanceof dn&&"default"===s?n.setRenderNames(null,Cs([...t.exportedVariables].some((([e,t])=>"*"===t&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,Cs(Ie(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,Cs(t.name,e,t.forbiddenNames))}function za(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=Cs(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=Cs(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&br(r(t.id),a)?t.namespaceVariableName:Cs(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof dn){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=mr[s]?n.defaultVariableName:n.variableName;gr(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,yr[r(t.id)]?n.namespaceVariableName:n.variableName):e.setRenderNames(n.variableName,null)}else{const n=l.get(t);o&&e.isNamespace?e.setRenderNames(null,"default"===n.exportMode?n.namespaceVariableName:n.variableName):"default"===n.exportMode?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,n.getVariableExportName(e))}}}function Va(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return st(Yt("default",o,i))}else if("none"===t&&o.length>0)return st(Yt("none",o,i));return"auto"===t&&(0===o.length?t="none":1===o.length&&"default"===o[0]?t="default":("es"!==s&&"system"!==s&&o.includes("default")&&r(Oe,function(e,t){return{code:Nt,id:e,message:`Entry module "${V(e)}" is using named and default exports together. Consumers of your bundle will have to use \`${t||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:Ue(Ke)}}(i,n)),t="named")),t}function Fa(e){const t=e.split("\n"),n=t.filter((e=>/^\t+/.test(e))),s=t.filter((e=>/^ {2,}/.test(e)));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce(((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)}),1/0);return" ".repeat(i)}function ja(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof dn){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),ja(e,t,n,s,i,r)):t.push(o)}}const Ua="!~{",Ga="}~",Wa=new RegExp(`${Ua}[0-9a-zA-Z_$]{1,17}${Ga}`,"g"),Ha=(e,t)=>e.replace(Wa,(e=>t.get(e)||e)),qa=(e,t,n)=>e.replace(Wa,(e=>e===t?n:e)),Ka=(e,t)=>{const n=new Set,s=e.replace(Wa,(e=>t.has(e)?(n.add(e),`${Ua}${"0".repeat(e.length-5)}${Ga}`):e));return{containedPlaceholders:n,transformedCode:s}},Ya=Symbol("bundleKeys"),Ja={type:"placeholder"};function Xa(e,t,n){return F(e)?st(ln(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,((e,s,i)=>{if(!n.hasOwnProperty(s)||i&&"hash"!==s)return st(ln(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return F(r)?st(ln(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r}))}function Za(e,{[Ya]:t}){if(!t.has(e.toLowerCase()))return e;const n=M(e);e=e.slice(0,Math.max(0,e.length-n.length));let s,i=1;for(;t.has((s=e+ ++i+n).toLowerCase()););return s}const Qa=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function el(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(Oe,(r=e.id,o=e.variableName,{code:wt,id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:Ue(Xe)})),e.variableName):void 0);var r,o}class tl{constructor(e,t,n,s,i,r,o,a,l,c,d,u,h,p,f){this.orderedModules=e,this.inputOptions=t,this.outputOptions=n,this.unsetOptions=s,this.pluginDriver=i,this.modulesById=r,this.chunkByModule=o,this.externalChunkByModule=a,this.facadeChunkByModule=l,this.includedNamespaces=c,this.manualChunkAlias=d,this.getPlaceholder=u,this.bundle=h,this.inputBase=p,this.snippets=f,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.preliminarySourcemapFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=e.length>0?e[0].execIndex:1/0;const m=new Set(e);for(const t of e){o.set(t,this),t.namespace.included&&!n.preserveModules&&c.add(t),this.isEmpty&&t.isIncluded()&&(this.isEmpty=!1),(t.info.isEntry||n.preserveModules)&&this.entryModules.push(t);for(const e of t.includedDynamicImporters)m.has(e)||(this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace)));t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=Ie(this.generateVariableName())}static generateFacade(e,t,n,s,i,r,o,a,l,c,d,u,h,p,f){const m=new tl([],e,t,n,s,i,r,o,a,l,null,u,h,p,f);m.assignFacadeName(d,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof aa?r.get(e):o.get(e));return!m.dependencies.has(r.get(c))&&c.info.moduleSideEffects&&c.hasEffects()&&m.dependencies.add(r.get(c)),m.ensureReexportsAreAvailableForModule(c),m.facadeModule=c,m.strictFacade=!0,m}canModuleBeFacade(e,t){const n=e.getExportNamesByVariable();for(const e of this.exports)if(!n.has(e))return!1;for(const s of t)if(!(s.module===e||n.has(s)||s instanceof fo&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>Ha(e,s),o=i.fileName,a=this.fileName=r(o);return{...i,code:e,dynamicImports:i.dynamicImports.map(r),fileName:a,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(r),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map((([e,t])=>[r(e),t]))),imports:i.imports.map(r),map:t,preliminaryFileName:o,referencedFiles:i.referencedFiles.map(r),sourcemapFileName:n}}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(null!==this.facadeModule&&(!1!==this.facadeModule.preserveSignature||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[n,s]of t){this.exportNamesByVariable.set(n,[...s]);for(const e of s)this.exportsByName.set(e,n);e.delete(n)}}this.outputOptions.minifyInternalExports?function(e,t,n){let s=0;for(const i of e){let[e]=i.name;if(t.has(e))do{e=Ns(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=Ns(s))}while(Se.has(e)||t.has(e));t.set(e,i),n.set(i,[e])}}(e,this.exportsByName,this.exportNamesByVariable):function(e,t,n){for(const s of e){let e=0,i=s.name;for(;t.has(i);)i=s.name+"$"+ ++e;t.set(i,s),n.set(s,[i])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=Va(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),n=new Set(this.dynamicEntryModules.map((({namespace:e})=>e)));for(const e of t)if(e.preserveSignature)for(const t of e.getExportNamesByVariable().keys())this.chunkByModule.get(t.module)===this&&n.add(t);for(const s of t){const t=Array.from(new Set(s.chunkNames.filter((({isUserDefined:e})=>e)).map((({name:e})=>e))),(e=>({name:e})));if(0===t.length&&s.isUserDefinedEntryPoint&&t.push({}),t.push(...Array.from(s.chunkFileNames,(e=>({fileName:e})))),0===t.length&&t.push({}),!this.facadeModule){const e=!this.outputOptions.preserveModules&&("strict"===s.preserveSignature||"exports-only"===s.preserveSignature&&s.getExportNamesByVariable().size>0);e&&!this.canModuleBeFacade(s,n)||(this.facadeModule=s,this.facadeChunkByModule.set(s,this),s.preserveSignature&&(this.strictFacade=e),this.assignFacadeName(t.shift(),s,this.outputOptions.preserveModules))}for(const n of t)e.push(tl.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,s,n,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const e of this.dynamicEntryModules)e.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(e,n)?(this.facadeModule=e,this.facadeChunkByModule.set(e,this),this.strictFacade=!0,this.dynamicName=nl(e)):this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,n)?this.strictFacade=!0:this.facadeChunkByModule.get(e)?.strictFacade||(this.includedNamespaces.add(e),this.exports.add(e.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}getChunkName(){return this.name??=this.outputOptions.sanitizeFileName(this.getFallbackChunkName())}getExportNames(){return this.sortedExportNames??=[...this.exportsByName.keys()].sort()}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return T(U(e,this.getFileName(),"amd"===this.outputOptions.format&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){if(this.preliminaryFileName)return this.preliminaryFileName;let e,t=null;const{chunkFileNames:n,entryFileNames:s,file:i,format:r,preserveModules:o}=this.outputOptions;if(i)e=C(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=Xa("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e)),name:()=>this.getChunkName()}),t||(e=Za(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Ja),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;let e=null,t=null;const{sourcemapFileNames:n,format:s}=this.outputOptions;if(!n)return null;{const[i,r]=[n,"output.sourcemapFileNames"];e=Xa("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,r,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>s,hash:e=>t||(t=this.getPlaceholder(r,e)),name:()=>this.getChunkName()}),t||(e=Za(e,this.bundle))}return this.preliminarySourcemapFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(ol),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,ol),importedBindings:il(this.getRenderedDependencies(),ol),imports:Array.from(this.dependencies,ol),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof po?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,t,n,s){const i=[],r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!r.has(a)){const t=[];ja(a,t,r,e,n,s),i.unshift(t)}}const o=new Set;for(const e of i)for(const t of e)o.add(t);return o}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const e of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(e),this.setUpChunkImportsAndExportsForModule(e)}async render(){const{dependencies:e,exportMode:t,facadeModule:n,inputOptions:{onLog:s},outputOptions:i,pluginDriver:r,snippets:o}=this,{format:a,hoistTransitiveImports:l,preserveModules:c}=i;if(l&&!c&&null!==n)for(const t of e)t instanceof tl&&this.inlineChunkDependencies(t);const d=this.getPreliminaryFileName(),u=this.getPreliminarySourcemapFileName(),{accessedGlobals:h,indent:p,magicString:f,renderedSource:m,usedModules:g,usesTopLevelAwait:y}=this.renderModules(d.fileName),b=[...this.getRenderedDependencies().values()],E="none"===t?[]:this.getChunkExportDeclarations(a);let x=E.length>0,$=!1;for(const e of b){const{reexports:t}=e;t?.length&&(x=!0,!$&&t.some((e=>"default"===e.reexported))&&($=!0),"es"===a&&(e.reexports=t.filter((({reexported:e})=>!E.find((({exported:t})=>t===e))))))}if(!$)for(const{exported:e}of E)if("default"===e){$=!0;break}const{intro:A,outro:S,banner:w,footer:v}=await _a(i,r,this.getRenderedChunkInfo());if(Ma[a](m,{accessedGlobals:h,dependencies:b,exports:E,hasDefaultExport:$,hasExports:x,id:d.fileName,indent:p,intro:A,isEntryFacade:c||null!==n&&n.info.isEntry,isModuleFacade:null!==n,log:s,namedExportsMode:"default"!==t,outro:S,snippets:o,usesTopLevelAwait:y},i),w&&f.prepend(w),"es"===a||"cjs"===a){const e=null!==n&&n.info.isEntry&&n.shebang;e&&f.prepend(`#!${e}\n`)}return v&&f.append(v),{chunk:this,magicString:f,preliminaryFileName:d,preliminarySourcemapFileName:u,usedModules:g}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:n}=this;for(const s of e.implicitlyLoadedBefore){const e=t.get(s);e&&e!==this&&n.add(e)}}addNecessaryImportsForFacades(){for(const[e,t]of this.includedReexportsByModule)if(this.includedNamespaces.has(e))for(const e of t)this.imports.add(e)}assignFacadeName({fileName:e,name:t},n,s){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(t||(s?this.getPreserveModulesChunkNameFromModule(n):nl(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof aa){const l=this.chunkByModule.get(n);let c;do{if(c=t.alternativeReexportModules.get(e),c){this.chunkByModule.get(c)!==l&&this.inputOptions.onLog(Oe,(s=n.getExportNamesByVariable().get(e)?.[0]||"*",i=n.id,r=c.id,o=t.id,a=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:i,id:o,message:`Export "${s}" of module "${V(i)}" was reexported through module "${V(r)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in "${V(o)}" to point directly to the exporting module or ${a?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:r})),t=c}}while(c)}var s,i,r,o,a}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof fo,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof po&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof aa){const s=this.chunkByModule.get(e);s&&s!==this&&(s.exports.add(i),t.push(i),n&&this.imports.add(i))}}}t.length>0&&this.includedReexportsByModule.set(e,t)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const e=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return e?nl(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const n of this.getExportNames()){if("*"===n[0])continue;const s=this.exportsByName.get(n);if(!(s instanceof fo)){const t=s.module;if(t){const s=this.chunkByModule.get(t);if(s!==this){if(!s||"es"!==e)continue;const t=this.renderedDependencies.get(s);if(!t)continue;const{imports:i,reexports:r}=t,o=r?.find((({reexported:e})=>e===n)),a=i?.find((({imported:e})=>e===o?.imported));if(!a)continue}}}let i=null,r=!1,o=s.getName(this.snippets.getPropertyAccess);if(s instanceof $s){for(const e of s.declarations)if(e.parent instanceof Zi||e instanceof Qi&&e.declaration instanceof Zi){r=!0;break}}else s instanceof fo&&(i=o,"es"===e&&(o=s.renderName));t.push({exported:n,expression:i,hoisted:r,local:o})}return t}getDependenciesToBeDeconflicted(e,t,n){const s=new Set,i=new Set,r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports])if(e||t.isNamespace){const o=t.module;if(o instanceof dn){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?mr[n(o.id)]&&i.add(a):"*"===t.name&&yr[n(o.id)]&&r.add(a))}else{const n=this.chunkByModule.get(o);n!==this&&(s.add(n),e&&"default"===n.exportMode&&t.isNamespace&&r.add(n))}}if(t)for(const e of this.dependencies)s.add(e);return{deconflictedDefault:i,deconflictedNamespace:r,dependencies:s}}getDynamicDependencies(){return this.getIncludedDynamicImports().map((e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution)).filter((e=>e!==this&&(e instanceof tl||e instanceof G)))}getDynamicImportStringAndAttributes(e,t){if(e instanceof dn){const n=this.externalChunkByModule.get(e);return[`'${n.getImportPath(t)}'`,n.getImportAttributes(this.snippets)]}return[e||"","es"===this.outputOptions.format&&this.outputOptions.externalImportAttributes||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?z(this.fileName):z(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,t=new Map;for(const n of this.imports){const s=n.module;let i,r;if(s instanceof dn){if(i=this.externalChunkByModule.get(s),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return st(on(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);W(t,i,q).push({imported:r,local:n.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:n,resolution:s}of t.dynamicImports)n.included&&e.push(s instanceof aa?{chunk:this.chunkByModule.get(s),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(s),node:n,resolution:s}:s instanceof dn?{chunk:null,externalChunk:this.externalChunkByModule.get(s),facadeChunk:null,node:n,resolution:s}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:s});return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:n,orderedModules:s}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:t&&t.id,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:n.length>0,moduleIds:s.map((({id:e})=>e)),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=sl(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(N(e.id.split(rl,1)[0])),r=M(i),o=Qa.has(r)?i.slice(0,-r.length):i;return P(o)?n&&R(o).startsWith(n)?o.slice(n.length).replace(/^[/\\]/,""):D(this.inputBase,o):`_virtual/${C(o)}`}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o=!1;if("*"===s[0]){const n=s.slice(1);"defaultOnly"===t(n)&&this.inputOptions.onLog(Oe,an(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof fo)continue;const a=n.module;if(a instanceof aa){if(i=this.chunkByModule.get(a),i===this)continue;r=i.getVariableExportName(n),o=n.isReassigned}else{if(i=this.externalChunkByModule.get(a),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===t(a.id))return st(on(a.id,r,!0));o=e&&("default"!==r||gr(t(a.id),!0))}}W(n,i,q).push({imported:r,needsLiveBinding:o,reexported:s})}return n}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules)for(const n of t.importMetas){const t=n.getReferencedFileName(this.pluginDriver);t&&e.add(t)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),n=new Map,s=this.getFileName();for(const i of this.dependencies){const r=e.get(i)||null,o=t.get(i)||null,a=i instanceof G||"default"!==i.exportMode,l=i.getImportPath(s);n.set(i,{attributes:i instanceof G?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof G&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&el(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:i instanceof tl,name:i.variableName,namedExportsMode:a,namespaceVariableName:i.namespaceVariableName,reexports:o})}return this.renderedDependencies=n}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof tl&&this.inlineChunkDependencies(t))}renderModules(e){const{accessedGlobalsByScope:t,dependencies:n,exportNamesByVariable:s,includedNamespaces:i,inputOptions:{onLog:r},isEmpty:o,orderedModules:a,outputOptions:l,pluginDriver:c,renderedModules:d,snippets:u}=this,{compact:h,format:p,freeze:f,generatedCode:{symbols:m}}=l,{_:g,cnst:y,n:b}=u;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const x=new $({separator:`${b}${b}`}),A=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=Fa(t.originalCode);if(null!==e)return e}return"\t"}(a,l),S=[];let w="";const v=new Set,I=new Map,P={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,indent:A,pluginDriver:c,snippets:u,symbols:m,useOriginalName:null};let k=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render(P);!P.accessedDocumentCurrentScript&&Ur.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(fr),P.accessedDocumentCurrentScript=!1,({source:n}=r),k||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),I.set(e,n),x.addSource(n),S.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(P);o.renderFirst()?w+=b+e:x.addSource(new E(e))}const a=t.get(e.scope);if(a)for(const e of a)v.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();d[e.id]={get code(){return n?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:s}}w&&x.prepend(w+b+b),this.needsExportsShim&&x.prepend(`${b}${y} ${uo}${g}=${g}void 0;${b}${b}`);const N=h?x:x.trim();var C;return o&&0===this.getExportNames().length&&0===n.size&&r(Oe,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${C=this.getChunkName()}".`,names:[C]}),{accessedGlobals:v,indent:A,magicString:x,renderedSource:N,usedModules:S,usesTopLevelAwait:k}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:n,pluginDriver:s,snippets:i}=this;for(const r of this.getIncludedDynamicImports())if(r.chunk){const{chunk:o,facadeChunk:a,node:l,resolution:c}=r;o===this?l.setInternalResolution(c.namespace):l.setExternalResolution((a||o).exportMode,c,n,i,s,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e);o.setExternalResolution("external",a,n,i,s,t,l,!1,c)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:t},interop:n,preserveModules:s,externalLiveBindings:i}=this.outputOptions,r=new Set;for(const t of this.getExportNames()){const n=this.exportsByName.get(t);"es"!==e&&"system"!==e&&n.isReassigned&&!n.isId?n.setRenderNames("exports",t):n instanceof fo?r.add(n):n.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(["Object","Promise"]);switch(this.needsExportsShim&&o.add(uo),t&&o.add("Symbol"),e){case"system":o.add("module").add("exports");break;case"es":break;case"cjs":o.add("module").add("require").add("__filename").add("__dirname");default:o.add("exports");for(const e of Dr)o.add(e)}Ba(this.orderedModules,this.getDependenciesToBeDeconflicted("es"!==e&&"system"!==e,"amd"===e||"umd"===e||"iife"===e,n),this.imports,o,e,n,s,i,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:n,orderedModules:s,outputOptions:{format:i}}=this;for(const r of s){for(const n of r.importMetas)n.setResolution(i,t,e);n.has(r)&&r.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e)){const n=e.namespace.getMemberVariables();for(const e of Object.values(n))e.included&&t.add(e)}for(let n of t){n instanceof ro&&(n=n.getOriginalVariable()),n instanceof fo&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof aa&&(this.checkCircularDependencyImport(n,e),n instanceof po&&this.outputOptions.preserveModules||t.exports.add(n)))}(this.includedNamespaces.has(e)||e.info.isEntry&&!1!==e.preserveSignature||e.includedDynamicImporters.some((e=>this.chunkByModule.get(e)!==this)))&&this.ensureReexportsAreAvailableForModule(e);for(const{node:t,resolution:n}of e.dynamicImports)t.included&&n instanceof aa&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function nl(e){return sl(e)??z(e.id)}function sl(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function il(e,t){const n={};for(const[s,i]of e){const e=new Set;if(i.imports)for(const{imported:t}of i.imports)e.add(t);if(i.reexports)for(const{imported:t}of i.reexports)e.add(t);n[t(s)]=[...e]}return n}const rl=/[#?]/,ol=e=>e.getFileName();function*al(e){for(const t of e)yield*t}function ll(e,t,n,s){const{chunkDefinitions:i,modulesInManualChunks:r}=function(e){const t=[],n=new Set(e.keys()),s=Object.create(null);for(const[t,i]of e)cl(t,s[i]||=[],n);for(const[e,n]of Object.entries(s))t.push({alias:e,modules:n});return{chunkDefinitions:t,modulesInManualChunks:n}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(e){const t=new Set,n=new Map,s=[],i=new Set(e);let r=0;for(const e of i){const o=new Set;s.push(o);const a=new Set([e]);for(const e of a){W(n,e,H).add(r);for(const t of e.getDependenciesToBeIncluded())t instanceof dn||a.add(t);for(const{resolution:n}of e.dynamicImports)n instanceof aa&&n.includedDynamicImporters.length>0&&!i.has(n)&&(t.add(n),i.add(n),o.add(n));for(const n of e.implicitlyLoadedBefore)i.has(n)||(t.add(n),i.add(n))}r++}const o=[...i],{dynamicEntries:a,dynamicImportsByEntry:l}=function(e,t,n){const s=new Map,i=new Set;for(const[n,r]of e.entries())s.set(r,n),t.has(r)&&i.add(n);const r=[];for(const e of n){const t=new Set;for(const n of e)t.add(s.get(n));r.push(t)}return{dynamicEntries:i,dynamicImportsByEntry:r}}(o,t,s);return{allEntries:o,dependentEntriesByModule:n,dynamicallyDependentEntriesByDynamicEntry:dl(n,a,o),dynamicImportsByEntry:l}}(e),d=function(e){const t=Object.create(null);for(const{dependentEntries:n,modules:s}of e){let e=0n;for(const t of n)e|=1n<<BigInt(t);(t[String(e)]||={dependentEntries:new Set(n),modules:[]}).modules.push(...s)}return Object.values(t)}(function*(e,t){for(const[n,s]of e)t.has(n)||(yield{dependentEntries:s,modules:[n]})}(a,r)),u=function(e,t){const n=e.map((()=>0n));let s=1n;for(const{dependentEntries:e}of t){for(const t of e)n[t]|=s;s<<=1n}return n}(o,d),h=function(e,t,n,s){const i=s.map(((e,n)=>t.has(n)?-1n:0n));for(const[s,r]of t){t.delete(s);const o=i[s];let a=o;for(const t of r)a&=e[t]|i[t];if(a!==o){i[s]=a;for(const e of n[s])W(t,e,H).add(s)}}return i}(u,l,c,o);!function(e,t){let n=1n;for(const{dependentEntries:s}of e){for(const e of s)(t[e]&n)===n&&s.delete(e);n<<=1n}}(d,h);const{chunks:p,sideEffectAtoms:f,sizeByAtom:m}=function(e,t,n,s){const i=Object.create(null),r=new Map,o=[];let a=0n,l=1n;for(const{dependentEntries:c,modules:d}of e){let e=0n,u=-1n;for(const s of c)e|=1n<<BigInt(s),u&=t[s]|n[s];const h=i[String(e)]||={containedAtoms:0n,correlatedAtoms:u,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(c),modules:[],pure:!0,size:0};let p=0,f=!0;for(const e of d)r.set(e,h),e.isIncluded()&&(f&&=!e.hasEffects(),p+=s>1?e.estimateSize():1);f||(a|=l),o.push(p),h.containedAtoms|=l,h.modules.push(...d),h.pure&&=f,h.size+=p,l<<=1n}const c=Object.values(i);return a|=function(e,t,n){const s=new Map;let i=0n;for(const r of e){const{dependencies:e,modules:o}=r;for(const a of o)for(const o of a.getDependenciesToBeIncluded())if(o instanceof dn){if(o.info.moduleSideEffects){const e=W(s,o,(()=>{const e=n;return n<<=1n,i|=e,e}));r.containedAtoms|=e,r.correlatedAtoms|=e}}else{const n=t.get(o);n&&n!==r&&(e.add(n),n.dependentChunks.add(r))}}return i}(c,r,l),{chunks:c,sideEffectAtoms:a,sizeByAtom:o}}(d,u,h,n);return i.push(...function(e,t,n,s,i){Qo("optimize chunks",3);const r=function(e,t){const n=[],s=[];for(const i of e)(i.size<t?n:s).push(i);if(0===n.length)return null;return n.sort(ul),s.sort(ul),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return ea("optimize chunks",3),e;return t>1&&i("info",en(e.length,r.small.size,"Initially")),function(e,t,n,s){const{small:i}=e;for(const r of i){const o=hl(r,e,n,s,t<=1?1:1/0);if(o){const{containedAtoms:n,correlatedAtoms:s,modules:a,pure:l,size:c}=r;i.delete(r),ml(o,t,e).delete(o),o.modules.push(...a),o.size+=c,o.pure&&=l;const{dependencies:d,dependentChunks:u,dependentEntries:h}=o;o.correlatedAtoms&=s,o.containedAtoms|=n;for(const e of r.dependentEntries)h.add(e);for(const e of r.dependencies)d.add(e),e.dependentChunks.delete(r),e.dependentChunks.add(o);for(const e of r.dependentChunks)u.add(e),e.dependencies.delete(r),e.dependencies.add(o);d.delete(o),u.delete(o),ml(o,t,e).add(o)}}}(r,t,n,s),t>1&&i("info",en(r.small.size+r.big.size,r.small.size,"After merging chunks")),ea("optimize chunks",3),[...r.small,...r.big]}(p,n,f,m,s).map((({modules:e})=>({alias:null,modules:e})))),i}function cl(e,t,n){const s=new Set([e]);for(const e of s){n.add(e),t.push(e);for(const t of e.dependencies)t instanceof dn||n.has(t)||s.add(t)}}function dl(e,t,n){const s=new Map;for(const i of t){const t=W(s,i,H),r=n[i];for(const n of al([r.includedDynamicImporters,r.implicitlyLoadedAfter]))for(const s of e.get(n))t.add(s)}return s}function ul({size:e},{size:t}){return e-t}function hl(e,{big:t,small:n},s,i,r){let o=null;for(const a of al([n,t])){if(e===a)continue;const t=pl(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function pl(e,t,n,s,i){const r=fl(e,t,n,s,i);return r<n?r+fl(t,e,n-r,s,i):1/0}function fl(e,t,n,s,i){const{correlatedAtoms:r}=t;let o=e.containedAtoms;const a=o&s;if((r&a)!==a)return 1/0;const l=new Set(e.dependencies);for(const{dependencies:e,containedAtoms:n}of l){o|=n;const i=n&s;if((r&i)!==i)return 1/0;for(const n of e){if(n===t)return 1/0;l.add(n)}}return function(e,t,n){let s=0,i=0,r=1n;const{length:o}=n;for(;i<o;i++)if((e&r)===r&&(s+=n[i]),r<<=1n,s>=t)return 1/0;return s}(o&~r,n,i)}function ml(e,t,n){return e.size<t?n.small:n.big}const gl=(e,t)=>e.execIndex>t.execIndex?1:-1;function yl(e,t,n){const s=Symbol(e.id),i=[e.id];let r=t;for(e.cycles.add(s);r!==e;)r.cycles.add(s),i.push(r.id),r=n.get(r);return i.push(i[0]),i.reverse(),i}const bl=(e,t)=>t?`(${e})`:e;class El{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,n){return{column:t,line:e,name:n,source:this}}}class xl{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=new Map,n=[],s=[],i=new Map,r=[];for(const o of this.mappings){const a=[];for(const r of o){if(1===r.length)continue;const o=this.sources[r[1]];if(!o)continue;const l=o.traceSegment(r[2],r[3],5===r.length?this.names[r[4]]:"");if(l){const{column:o,line:c,name:d,source:{content:u,filename:h}}=l;let p=t.get(h);if(void 0===p)p=e.length,e.push(h),t.set(h,p),n[p]=u;else if(null==n[p])n[p]=u;else if(null!=u&&n[p]!==u)return st(rn(h));const f=[r[0],p,c,o];if(d){let e=i.get(d);void 0===e&&(e=s.length,s.push(d),i.set(d,e)),f[4]=e}a.push(f)}}r.push(a)}return{mappings:r,names:s,sources:e,sourcesContent:n}}traceSegment(e,t,n){const s=this.mappings[e];if(!s)return null;let i=0,r=s.length-1;for(;i<=r;){const e=i+r>>1,o=s[e];if(o[0]===t||i===r){if(1==o.length)return null;const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],5===o.length?this.names[o[4]]:n):null}o[0]>t?r=e-1:i=e+1}return null}}function $l(e){return function(t,n){return n.missing?(e(Oe,(s=n.plugin,{code:Rt,message:`Sourcemap is likely to be incorrect: a plugin (${s}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:s,url:Ue(We)})),new xl({mappings:[],names:[]},[t])):new xl(n,[t]);var s}}function Al(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=O(e)||".",o=n.sourceRoot||".",a=t.map(((e,t)=>new El(R(i,o,e),s[t])));r=new xl(n,a)}else r=new El(e,t);return s.reduce(i,r)}let Sl;function wl(e){let t;return"string"==typeof e?"undefined"==typeof Buffer?(Sl??=new TextEncoder,t=Sl.encode(e)):t=Buffer.from(e):t=e,function(e){let t,n;try{const r=xo.__wbindgen_add_to_stack_pointer(-16);xo.xxhashBase64Url(r,No(e));var s=Ro()[r/4+0],i=Ro()[r/4+1];return t=s,n=i,ko(s,i)}finally{xo.__wbindgen_add_to_stack_pointer(16),xo.__wbindgen_free(t,n,1)}}(t)}let vl="sourceMa";async function Il(e,t,n,s,i){Qo("render chunks",2),function(e){for(const t of e)t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint&&t.getPreliminaryFileName()}(e);const r=await Promise.all(e.map((e=>e.render())));ea("render chunks",2),Qo("transform chunks",2);const o=function(e){return Object.fromEntries(e.map((e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]})))}(e),{initialHashesByPlaceholder:a,nonHashedChunksWithPlaceholders:l,renderedChunksByPlaceholder:c,hashDependenciesByPlaceholder:d}=await async function(e,t,n,s,i){const r=[],o=new Map,a=new Map,l=new Map,c=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&c.add(t);return await Promise.all(e.map((async({chunk:e,preliminaryFileName:{fileName:d,hashPlaceholder:u},preliminarySourcemapFileName:h,magicString:p,usedModules:f})=>{const m={chunk:e,fileName:d,sourcemapFileName:h?.fileName??null,...await Pl(p,d,f,t,n,s,i)},{code:g,map:y}=m;if(u){const{containedPlaceholders:t,transformedCode:n}=Ka(g,c);let i=n;const r=s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],((e,t)=>(t&&(e+=t),e)));r&&(i+=r),o.set(u,m),a.set(u,{containedPlaceholders:t,contentHash:wl(i)})}else r.push(m);const b=h?.hashPlaceholder;y&&b&&l.set(h.hashPlaceholder,wl(y.toString()).slice(0,h.hashPlaceholder.length))}))),{hashDependenciesByPlaceholder:a,initialHashesByPlaceholder:l,nonHashedChunksWithPlaceholders:r,renderedChunksByPlaceholder:o}}(r,o,s,n,i),u=function(e,t,n,s){const i=new Map(n);for(const[n,{fileName:r}]of e){let e="";const o=new Set([n]);for(const n of o){const{containedPlaceholders:s,contentHash:i}=t.get(n);e+=i;for(const e of s)o.add(e)}let a,l;do{l&&(e=l),l=wl(e).slice(0,n.length),a=qa(r,n,l)}while(s[Ya].has(a.toLowerCase()));s[a]=Ja,i.set(n,l)}return i}(c,d,a,t);!function(e,t,n,s,i,r){for(const{chunk:s,code:o,fileName:a,sourcemapFileName:l,map:c}of e.values()){let e=Ha(o,t);const d=Ha(a,t);let u=null;c&&(u=l?Ha(l,t):`${d}.map`,c.file=Ha(c.file,t),e+=kl(u,c,i,r)),n[d]=s.finalizeChunk(e,c,u,t)}for(const{chunk:e,code:o,fileName:a,sourcemapFileName:l,map:c}of s){let s=t.size>0?Ha(o,t):o,d=null;c&&(d=l?Ha(l,t):`${a}.map`,s+=kl(d,c,i,r)),n[a]=e.finalizeChunk(s,c,d,t)}}(c,u,t,l,n,s),ea("transform chunks",2)}async function Pl(e,t,n,s,i,r,o){let a=null;const l=[];let c=await r.hookReduceArg0("renderChunk",[e.toString(),s[t],i,{chunks:s}],((e,t,n)=>{if(null==t)return e;if("string"==typeof t&&(t={code:t,map:void 0}),null!==t.map){const e=bo(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code}));const{compact:u,dir:h,file:p,sourcemap:f,sourcemapExcludeSources:m,sourcemapFile:g,sourcemapPathTransform:y,sourcemapIgnoreList:b}=i;if(u||"\n"===c[c.length-1]||(c+="\n"),f){let s;Qo("sourcemaps",3),s=p?R(g||p):h?R(h,t):R(t);a=function(e,t,n,s,i,r){const o=$l(r),a=n.filter((e=>!e.excludeFromSourcemap)).map((e=>Al(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o))),l=new xl(t,a),c=s.reduce(o,l);let{sources:u,sourcesContent:h,names:p,mappings:f}=c.traceMappings();if(e){const t=O(e);u=u.map((e=>D(t,e))),e=C(e)}h=i?null:h;for(const e of n)yo(e.originalSourcemap,e.sourcemapChain);return new d({file:e,mappings:f,names:p,sources:u,sourcesContent:h})}(s,e.generateDecodedMap({}),n,l,m,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=b(t,n);"boolean"!=typeof i&&st(ln("sourcemapIgnoreList function must return a boolean.")),i&&(void 0===a.x_google_ignoreList&&(a.x_google_ignoreList=[]),a.x_google_ignoreList.includes(e)||a.x_google_ignoreList.push(e)),y&&(t=y(t,n),"string"!=typeof t&&st(ln("sourcemapPathTransform function must return a string."))),a.sources[e]=N(t)}ea("sourcemaps",3)}return{code:c,map:a}}function kl(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=C(e);r=i?new URL(s,i).toString():s,n.emitFile({fileName:e,source:t.toString(),type:"asset"})}return"hidden"===s?"":`//# ${vl}=${r}\n`}vl+="ppingURL";class Nl{constructor(e,t,n,s,i){this.outputOptions=e,this.unsetOptions=t,this.inputOptions=n,this.pluginDriver=s,this.graph=i,this.facadeChunkByModule=new Map,this.includedNamespaces=new Set}async generate(e){Qo("GENERATE",1);const t=Object.create(null),n=(e=>{const t=new Set;return new Proxy(e,{deleteProperty:(e,n)=>("string"==typeof n&&t.delete(n.toLowerCase()),Reflect.deleteProperty(e,n)),get:(e,n)=>n===Ya?t:Reflect.get(e,n),set:(e,n,s)=>("string"==typeof n&&t.add(n.toLowerCase()),Reflect.set(e,n,s))})})(t);this.pluginDriver.setOutputBundle(n,this.outputOptions);try{Qo("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),ea("initialize render",2),Qo("generate chunks",2);const e=(()=>{let e=0;return(t,n=8)=>{if(n>22)return st(ln(`Hashes cannot be longer than 22 characters, received ${n}. Check the "${t}" option.`));const s=`${Ua}${Ns(++e).padStart(n-5,"0")}${Ga}`;return s.length>n?st(ln(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${s.length}, received ${n}. Check the "${t}" option.`)):s}})(),t=await this.generateChunks(n,e);t.length>1&&function(e,t){if("umd"===e.format||"iife"===e.format)return st(Xt("output.format",Je,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return st(Xt("output.file",qe,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(e.sourcemapFile)return st(Xt("output.sourcemapFile",nt,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(Oe,Xt("output.amd.id",He,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t)e.generateExports();ea("generate chunks",2),await Il(t,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}return(e=>{const t=new Set,n=Object.values(e);for(const e of n)"asset"===e.type&&e.needsCodeReference&&t.add(e.fileName);for(const e of n)if("chunk"===e.type)for(const n of e.referencedFiles)t.has(n)&&t.delete(n);for(const n of t)delete e[n]})(n),Qo("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),ea("generate bundle",2),ea("GENERATE",1),t}async addManualChunks(e){const t=new Map,n=await Promise.all(Object.entries(e).map((async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t,!0)}))));for(const{alias:e,entries:s}of n)for(const n of s)Cl(e,n,t);return t}assignManualChunks(e){const t=[],n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof aa){const i=e(s.id,n);"string"==typeof i&&t.push([i,s])}t.sort((([e],[t])=>e>t?1:e<t?-1:0));const s=new Map;for(const[e,n]of t)Cl(e,n,s);return s}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{Vo(t.code)}catch(e){this.inputOptions.onLog(Oe,jt(t,e))}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:n,inlineDynamicImports:s,manualChunks:i,preserveModules:r}=this.outputOptions,o="object"==typeof i?await this.addManualChunks(i):this.assignManualChunks(i),a=function({compact:e,generatedCode:{arrowFunctions:t,constBindings:n,objectShorthand:s,reservedNamesAsProps:i}}){const{_:r,n:o,s:a}=e?{_:"",n:"",s:""}:{_:" ",n:"\n",s:";"},l=n?"const":"var",c=(e,{isAsync:t,name:n})=>`${t?"async ":""}function${n?` ${n}`:""}${r}(${e.join(`,${r}`)})${r}`,d=t?(e,{isAsync:t,name:n})=>{const s=1===e.length;return`${n?`${l} ${n}${r}=${r}`:""}${t?`async${s?" ":r}`:""}${s?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:c,u=(e,{functionReturn:n,lineBreakIndent:s,name:i})=>[`${d(e,{isAsync:!1,name:i})}${t?s?`${o}${s.base}${s.t}`:"":`{${s?`${o}${s.base}${s.t}`:r}${n?"return ":""}`}`,t?`${i?";":""}${s?`${o}${s.base}`:""}`:`${a}${s?`${o}${s.base}`:r}}`],h=i?e=>Pe.test(e):e=>!Se.has(e)&&Pe.test(e);return{_:r,cnst:l,getDirectReturnFunction:u,getDirectReturnIifeLeft:(e,n,{needsArrowReturnParens:s,needsWrappedFunction:i})=>{const[r,o]=u(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${bl(`${r}${bl(n,t&&s)}${o}`,t||i)}(`},getFunctionIntro:d,getNonArrowFunctionIntro:c,getObject(e,{lineBreakIndent:t}){const n=t?`${o}${t.base}${t.t}`:r;return`{${e.map((([e,t])=>{if(null===e)return`${n}${t}`;const i=Ne(e);return e===t&&s&&e===i?n+e:`${n}${i}:${r}${t}`})).join(",")}${0===e.length?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>h(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:a}}(this.outputOptions),l=function(e){const t=[];for(const n of e.values())n instanceof aa&&(n.isIncluded()||n.info.isEntry||n.includedDynamicImporters.length>0)&&t.push(n);return t}(this.graph.modulesById),c=function(e){if(0===e.length)return"/";if(1===e.length)return O(e[0]);const t=e.slice(1).reduce(((e,t)=>{const n=t.split(/\/+|\\+/);let s;for(s=0;e[s]===n[s]&&s<Math.min(e.length,n.length);s++);return e.slice(0,s)}),e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}(function(e,t){const n=[];for(const s of e)(s.info.isEntry||t)&&P(s.id)&&n.push(s.id);return n}(l,r)),d=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof dn&&s.set(i,new G(i,t,n));return s}(this.graph.modulesById,this.outputOptions,c),u=[],h=new Map;for(const{alias:i,modules:p}of s?[{alias:null,modules:l}]:r?l.map((e=>({alias:null,modules:[e]}))):ll(this.graph.entryModules,o,n,this.inputOptions.onLog)){p.sort(gl);const n=new tl(p,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,h,d,this.facadeChunkByModule,this.includedNamespaces,i,t,e,c,a);u.push(n)}for(const e of u)e.link();const p=[];for(const e of u)p.push(...e.generateFacades());return[...u,...p]}}function Cl(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return st((i=t.id,r=e,o=s,{code:gt,message:`Cannot assign "${V(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}const Ol=e=>()=>st(function(e){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${e}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:Ue("plugin-development/#a-simple-example")}}(e)),Ml=Ol("fs.mkdir"),Dl=Ol("fs.readFile"),Rl=Ol("fs.writeFile");async function _l(e,t,n,s,i,r,o,a,l){const c=await function(e,t,n,s,i,r,o,a){let l=null,c=null;if(i){l=new Set;for(const n of i)e===n.source&&t===n.importer&&l.add(n.plugin);c=(e,t)=>({...e,resolve:(e,n,{attributes:r,custom:o,isEntry:a,skipSelf:l}=Ee)=>(l??=!0,s(e,n,o,a,r||xe,l?[...i,{importer:n,plugin:t,source:e}]:i))})}return n.hookFirstAndGetPlugin("resolveId",[e,t,{attributes:a,custom:r,isEntry:o}],c,l)}(e,t,s,i,r,o,a,l);return null==c?Ol("path.resolve")():c[0]}const Ll="at position ",Bl="at output position ";const Tl={delete:()=>!1,get(){},has:()=>!1,set(){}};function zl(e){return e.startsWith(Ll)||e.startsWith(Bl)?st({code:at,message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):st({code:pt,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).`})}const Vl=(e,t,n=Wl)=>{const{onwarn:s,onLog:i}=e,r=Fl(n,s);if(i){const e=Re[t];return(t,n)=>i(t,jl(n),((t,n)=>{if("error"===t)return st(Ul(n));Re[t]>=e&&r(t,Ul(n))}))}return r},Fl=(e,t)=>t?(n,s)=>{n===Oe?t(jl(s),(t=>e(Oe,Ul(t)))):e(n,s)}:e,jl=e=>(Object.defineProperty(e,"toString",{value:()=>Gl(e),writable:!0}),e),Ul=e=>"string"==typeof e?{message:e}:"function"==typeof e?Ul(e()):e,Gl=e=>{let t="";return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${V(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+e.message},Wl=(e,t)=>{const n=Gl(t);switch(e){case Oe:return console.warn(n);case De:return console.debug(n);default:return console.info(n)}};function Hl(e,t,n,s,i=/$./){const r=new Set(t),o=Object.keys(e).filter((e=>!(r.has(e)||i.test(e))));o.length>0&&s(Oe,function(e,t,n){return{code:Lt,message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const ql={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:$e,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:$e,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:$e,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Kl={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Yl=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};st(Xt(`${n}.preset`,s,`valid values are ${je(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;st(Xt(t,n,`valid values are ${s}${je(Object.keys(e))}. You can also supply an object for more fine-grained control`,i))}return(e=>e&&"object"==typeof e?e:{})(i)})(t,n,s,i)(e)},Jl=async e=>(await async function(e){do{e=(await Promise.all(e)).flat(1/0)}while(e.some((e=>e?.then)));return e}([e])).filter(Boolean);async function Xl(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:bo(e.map);const a=e.code;let l=e.ast;const c=[],u=[];let h=!1;const p=()=>h=!0;let f="",m=e.code;const g=e=>(t,n)=>{t=Ul(t),n&&it(t,n,m,i),t.id=i,t.hook="transform",e(t)};let y;try{y=await n.hookReduceArg0("transform",[m,i],(function(e,n,i){let o,a;if("string"==typeof n)o=n;else{if(!n||"object"!=typeof n)return e;if(t.updateOptions(n),null==n.code)return(n.map||n.ast)&&s(Oe,function(e){return{code:Ct,message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(i.name)),e;({code:o,map:a,ast:l}=n)}return null!==a&&r.push(bo("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),m=o,o}),((e,t)=>{return f=t.name,{...e,addWatchFile(t){c.push(t),e.addWatchFile(t)},cache:h?e.cache:(l=e.cache,y=p,{delete:e=>(y(),l.delete(e)),get:e=>(y(),l.get(e)),has:e=>(y(),l.has(e)),set:(e,t)=>(y(),l.set(e,t))}),debug:g(e.debug),emitFile:e=>(u.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&it(t,n,m,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:bo({version:3,...Al(e,t,n,s,$l(i)).traceMappings()})}(i,a,o,r,s);if(!e){return new E(a).generateMap({hires:!0,includeContent:!0,source:i})}return o!==e&&(o=e,r.length=0),new d({...e,file:null,sourcesContent:e.sourcesContent})},info:g(e.info),setAssetSource(){return this.error({code:At,message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:g(e.warn)};var l,y}))}catch(e){return st(sn(e,f,{hook:"transform",id:i}))}return!h&&u.length>0&&(t.transformFiles=u),{ast:l,code:y,customTransformCache:h,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:c}}const Zl="resolveDependencies";class Ql{constructor(e,t,n,s){this.graph=e,this.modulesById=t,this.options=n,this.pluginDriver=s,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(e,t,n,s,i,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await _l(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,n,"boolean"==typeof s?s:!t,i),t,e),i),this.hasModuleSideEffects=n.treeshake?n.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,t){const n=this.extendLoadModulesPromise(Promise.all(e.map((e=>this.loadEntryModule(e,!1,void 0,null,t)))));return await this.awaitLoadModulesPromise(),n}async addEntryModules(e,t){const n=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const s=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const i=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null)))).then((i=>{for(const[r,o]of i.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t,tc(o,e[r],t,s+r);const i=this.indexedEntryModules.find((e=>e.module===o));i?i.index=Math.min(i.index,n+r):this.indexedEntryModules.push({index:n+r,module:o})}return this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1)),i})));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:i}}async emitChunk({fileName:e,id:t,importer:n,name:s,implicitlyLoadedAfterOneOf:i,preserveSignature:r}){const o={fileName:e||null,id:t,importer:n,name:s||null},a=i?await this.addEntryWithImplicitDependants(o,i):(await this.addEntryModules([o],!1)).newEntryModules[0];return null!=r&&(a.preserveSignature=r),a}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,xe),void 0,!1,!e.resolveDependencies||Zl)).info}addEntryWithImplicitDependants(e,t){const n=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then((async s=>{if(tc(s,e,!1,n),!s.info.isEntry){const n=await Promise.all(t.map((t=>this.loadEntryModule(t,!1,e.importer,s.id))));if(!s.info.isEntry){this.implicitEntryModules.add(s);for(const e of n)s.implicitlyLoadedAfter.add(e);for(const e of s.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(s)}}return s})))}async addModuleSource(e,t,n){let s;try{s=await this.graph.fileOperationQueue.run((async()=>{const t=await this.pluginDriver.hookFirst("load",[e]);return null!==t?t:(this.graph.watchFiles[e]=!0,await Dl(e,"utf8"))}))}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${V(t)})`),s+=`: ${n.message}`,n.message=s,n}const i="string"==typeof s?{code:s}:null!=s&&"object"==typeof s&&"string"==typeof s.code?s:st(function(e){return{code:"BAD_LOADER",message:`Error loading "${V(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e)),r=i.code;65279===r.charCodeAt(0)&&(i.code=r.slice(1));const o=this.graph.cachedModules.get(e);if(!o||o.customTransformCache||o.originalCode!==i.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:o.ast,code:o.code,id:o.id,meta:o.meta,moduleSideEffects:o.moduleSideEffects,resolvedSources:o.resolvedIds,syntheticNamedExports:o.syntheticNamedExports}]))n.updateOptions(i),await n.setSource(await Xl(i,n,this.pluginDriver,this.options.onLog));else{if(o.transformFiles)for(const e of o.transformFiles)this.pluginDriver.emitFile(e);await n.setSource(o)}}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise,await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){return this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch((()=>{})),e}async fetchDynamicDependencies(e,t){const n=await Promise.all(t.map((t=>t.then((async([t,n])=>null===n?null:"string"==typeof n?(t.resolution=n,null):t.resolution=await this.fetchResolvedDependency(V(n.id),e.id,n))))));for(const t of n)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({attributes:e,id:t,meta:n,moduleSideEffects:s,syntheticNamedExports:i},r,o,a){const l=this.modulesById.get(t);if(l instanceof aa)return r&&Wo(e,l.info.attributes)&&this.options.onLog(Oe,Ht(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof dn)return st({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${l.id} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`});const c=new aa(this.graph,t,this.options,o,s,i,n,e);this.modulesById.set(t,c);const d=this.addModuleSource(t,r,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),u])),u=sc(d).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));u.catch((()=>{})),this.moduleLoadPromises.set(c,d);const h=await d;return a?a===Zl&&await u:await this.fetchModuleDependencies(c,...h),c}async fetchModuleDependencies(e,t,n,s){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,n)]),e.linkImports(),await s)}fetchResolvedDependency(e,t,n){if(n.external){const{attributes:s,external:i,id:r,moduleSideEffects:o,meta:a}=n;let l=this.modulesById.get(r);if(l){if(!(l instanceof dn))return st(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${V(t)}", but is already an existing non-external module id.`}}(e,t));Wo(l.info.attributes,s)&&this.options.onLog(Oe,Ht(l.info.attributes,s,e,t))}else l=new dn(this.options,r,o,a,"absolute"!==i&&P(r),s),this.modulesById.set(r,l);return Promise.resolve(l)}return this.fetchModule(n,t,!1,!1)}async fetchStaticDependencies(e,t){for(const n of await Promise.all(t.map((t=>t.then((([t,n])=>this.fetchResolvedDependency(t,e.id,n)))))))e.dependencies.add(n),n.importers.push(e.id);if(!this.options.treeshake||"no-treeshake"===e.info.moduleSideEffects)for(const t of e.dependencies)t instanceof aa&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,n){const{makeAbsoluteExternalsRelative:s}=this.options;if(e){if("object"==typeof e){const i=e.external||this.options.external(e.id,t,!0);return{...e,external:i&&("relative"===i||!P(e.id)||!0===i&&nc(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(nc(e,n,s)||"absolute"),id:i&&s?ec(e,t):e}}const i=s?ec(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:nc(i,n,s)||"absolute",id:i}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const n=await this.resolveDynamicImport(e,"string"==typeof t.argument?t.argument:t.argument.esTreeNode,e.id,Uo(t.node));return n&&"object"==typeof n&&(t.id=n.id),[t,n]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAttributes,(async([t,n])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,xe,!1,n),t,e.id,n)]))}getResolvedIdWithDefaults(e,t){if(!e)return null;const n=e.external||!1;return{attributes:e.attributes||t,external:n,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!n),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,t,n){const s=this.moduleLoadPromises.get(e);if(n)return n===Zl?sc(s):s;if(t){e.info.isEntry=!0,this.implicitEntryModules.delete(e);for(const t of e.implicitlyLoadedAfter)t.implicitlyLoadedBefore.delete(e);e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await s)}handleInvalidResolvedId(e,t,n,s){return null===e?k(t)?st(function(e,t){return{code:Tt,exporter:e,id:t,message:`Could not resolve "${e}" from "${V(t)}"`}}(t,n)):(this.options.onLog(Oe,function(e,t){return{code:Tt,exporter:e,id:t,message:`"${e}" is imported by "${V(t)}", but could not be resolved – treating it as an external dependency.`,url:Ue("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,n)),{attributes:s,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(Oe,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${V(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1){const r=await _l(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,xe,!0,xe);if(null==r)return st(null===s?function(e){return{code:Bt,message:`Could not resolve entry module "${V(e)}".`}}(e):function(e,t){return{code:vt,message:`Module "${V(e)}" that should be implicitly loaded before "${V(t)}" could not be resolved.`}}(e,s));const o="object"==typeof r&&r.external;return!1===r||o?st(null===s?o&&i?{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${e}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}:function(e){return{code:Bt,message:`Entry module "${V(e)}" cannot be external.`}}(e):function(e,t){return{code:vt,message:`Module "${V(e)}" that should be implicitly loaded before "${V(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},xe),void 0,t,!1)}async resolveDynamicImport(e,t,n,s){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,n,{attributes:s}]);if("string"!=typeof t)return"string"==typeof i?i:i?this.getResolvedIdWithDefaults(i,s):null;if(null==i){const i=e.resolvedIds[t];return i?(Wo(i.attributes,s)&&this.options.onLog(Oe,Ht(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,xe,!1,s),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function ec(e,t){return k(e)?t?R(t,"..",e):R(e):e}function tc(e,{fileName:t,name:n},s,i){if(null!==t)e.chunkFileNames.add(t);else if(null!==n){let t=0;for(;e.chunkNames[t]?.priority<i;)t++;e.chunkNames.splice(t,0,{isUserDefined:s,name:n,priority:i})}}function nc(e,t,n){return!0===n||"ifRelativeSource"===n&&k(t)||!P(e)}async function sc(e){const[t,n]=await e;return Promise.all([...t,...n])}class ic extends Os{constructor(){super(),this.parent=null,this.variables.set("undefined",new io)}findVariable(e){let t=this.variables.get(e);return t||(t=new si(e),this.variables.set(e,t)),t}}function rc(e,t,n,s,i){const r=s.sanitizeFileName(e||"asset");return Za(Xa("function"==typeof s.assetFileNames?s.assetFileNames({name:e,source:t,type:"asset"}):s.assetFileNames,"output.assetFileNames",{ext:()=>M(r).slice(1),extname:()=>M(r),hash:e=>n.slice(0,Math.max(0,e||8)),name:()=>r.slice(0,Math.max(0,r.length-M(r).length))}),i)}function oc(e,{bundle:t},n){t[Ya].has(e.toLowerCase())?n(Oe,function(e){return{code:ft,message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Ja}const ac=new Set(["chunk","asset","prebuilt-chunk"]);function lc(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return st(ln(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}function cc(e,t){return"string"!=typeof e.fileName?st((n=e.name||t,{code:lt,message:`Plugin error - Unable to get file name for asset "${n}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_<referenceId>, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`})):e.fileName;var n}function dc(e,t){return e.fileName?e.fileName:t?t.get(e.module).getFileName():st((n=e.fileName||e.name,{code:dt,message:`Plugin error - Unable to get file name for emitted chunk "${n}". You can only get file names once chunks have been generated after the "renderStart" hook.`}));var n}class uc{constructor(e,t,n){this.graph=e,this.options=t,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=e=>function(e){return Boolean(e&&ac.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!F(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):st(ln(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`)):st(ln(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`)),this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId)if("asset"===t.type&&"string"!=typeof t.fileName)return st({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t.name||e}" - no asset source set.`})},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?dc(t,this.facadeChunkByModule):"prebuilt-chunk"===t.type?t.fileName:cc(t,e):st({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`})},this.setAssetSource=(e,t)=>{const n=this.filesByReferenceId.get(e);if(!n)return st({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return st(ln(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return st({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=lc(t,n,e);if(this.output)this.finalizeAdditionalAsset(n,s,this.output);else{n.source=s;for(const e of this.outputFileEmitters)e.finalizeAdditionalAsset(n,s,e.output)}},this.setChunkInformation=e=>{this.facadeChunkByModule=e},this.setOutputBundle=(e,t)=>{const n=this.output={bundle:e,fileNamesBySource:new Map,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&oc(e.fileName,n,this.options.onLog);const s=new Map;for(const e of this.filesByReferenceId.values())if("asset"===e.type&&void 0!==e.source)if(e.fileName)this.finalizeAdditionalAsset(e,e.source,n);else{W(s,wl(e.source),(()=>[])).push(e)}else"prebuilt-chunk"===e.type&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e));for(const[e,t]of s)this.finalizeAssetsWithSameSource(t,e,n)},this.filesByReferenceId=n?new Map(n.filesByReferenceId):new Map,n?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let n=t;do{n=wl(n).slice(0,8).replaceAll("-","$")}while(this.filesByReferenceId.has(n)||this.outputFileEmitters.some((({filesByReferenceId:e})=>e.has(n))));e.referenceId=n,this.filesByReferenceId.set(n,e);for(const{filesByReferenceId:t}of this.outputFileEmitters)t.set(n,e);return n}createPrebuiltChunk(e){return{code:e.code,dynamicImports:[],exports:e.exports||[],facadeModuleId:null,fileName:e.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:e.map||null,moduleIds:[],modules:{},name:e.fileName,preliminaryFileName:e.fileName,referencedFiles:[],sourcemapFileName:e.sourcemapFileName||null,type:"chunk"}}emitAsset(e){const t=void 0===e.source?void 0:lc(e.source,e,null),n={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,referenceId:"",source:t,type:"asset"},s=this.assignReferenceId(n,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(n,this.output);else for(const e of this.outputFileEmitters)e.emitAssetWithReferenceId(n,e.output);return s}emitAssetWithReferenceId(e,t){const{fileName:n,source:s}=e;n&&oc(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>mo.LOAD_AND_PARSE)return st({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return st(ln(`Emitted chunks need to have a valid string id, received "${e.id}"`));const t={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{})),this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if("string"!=typeof e.code)return st(ln(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||F(e.fileName))return st(ln(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const t={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},n=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),n}finalizeAdditionalAsset(e,t,{bundle:n,fileNamesBySource:s,outputOptions:i}){let{fileName:r,needsCodeReference:o,referenceId:a}=e;if(!r){const o=wl(t);r=s.get(o),r||(r=rc(e.name,t,o,i,n),s.set(o,r))}const l={...e,fileName:r,source:t};this.filesByReferenceId.set(a,l);const c=n[r];"asset"===c?.type?c.needsCodeReference&&=o:n[r]={fileName:r,name:e.name,needsCodeReference:o,source:t,type:"asset"}}finalizeAssetsWithSameSource(e,t,{bundle:n,fileNamesBySource:s,outputOptions:i}){let r,o="",a=!0;for(const s of e){a&&=s.needsCodeReference;const e=rc(s.name,s.source,t,i,n);(!o||e.length<o.length||e.length===o.length&&e<o)&&(o=e,r=s)}s.set(t,o);for(const t of e){const e={...t,fileName:o};this.filesByReferenceId.set(t.referenceId,e)}n[o]={fileName:o,name:r.name,needsCodeReference:a,source:r.source,type:"asset"}}}function hc(e,t,n,s,i){return Re[e]<Re[i]?zs:(i,r)=>{null!=r&&n(Oe,{code:Et,message:`Plugin "${s}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(i=Ul(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}function pc(e,t,s,i,r,o){const{logLevel:a,onLog:l}=i;let c,d=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(Ll)||e.name.startsWith(Bl)||o.has(e.name)?d=!1:o.add(e.name)),t)if(d){const n=e.cacheKey||e.name;h=t[n]||(t[n]=Object.create(null)),c={delete:e=>delete h[e],get(e){const t=h[e];if(t)return t[0]=0,t[1]},has(e){const t=h[e];return!!t&&(t[0]=0,!0)},set(e,t){h[e]=[0,t]}}}else u=e.name,c={delete:()=>zl(u),get:()=>zl(u),has:()=>zl(u),set:()=>zl(u)};else c=Tl;var u,h;return{addWatchFile(e){s.watchFiles[e]=!0},cache:c,debug:hc(De,"PLUGIN_LOG",l,e.name,a),emitFile:r.emitFile.bind(r),error:t=>st(sn(Ul(t),e.name)),getFileName:r.getFileName,getModuleIds:()=>s.modulesById.keys(),getModuleInfo:s.getModuleInfo,getWatchFiles:()=>Object.keys(s.watchFiles),info:hc(Me,"PLUGIN_LOG",l,e.name,a),load:e=>s.moduleLoader.preloadModule(e),meta:{rollupVersion:n,watchMode:s.watchMode},parse:Vo,resolve:(t,n,{attributes:i,custom:r,isEntry:o,skipSelf:a}=Ee)=>(a??=!0,s.moduleLoader.resolveId(t,n,r,o,i||xe,a?[{importer:n,plugin:e,source:t}]:null)),setAssetSource:r.setAssetSource,warn:hc(Oe,"PLUGIN_WARNING",l,e.name,a)}}const fc=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class mc{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new uc(e,t,i&&i.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...i?i.plugins:[],...n];const r=new Set;if(this.pluginContexts=new Map(this.plugins.map((n=>[n,pc(n,s,e,t,this.fileEmitter,r)]))),i)for(const e of n)for(const n of fc)n in e&&t.onLog(Oe,(o=e.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${n}" hook used by the output plugin ${o} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var o}createOutputPluginDriver(e){return new mc(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,n,s){return this.hookFirstAndGetPlugin(e,t,n,s).then((e=>e&&e[0]))}async hookFirstAndGetPlugin(e,t,n,s){for(const i of this.getSortedPlugins(e)){if(s?.has(i))continue;const r=await this.runHook(e,t,i,n);if(null!=r)return[r,i]}return null}hookFirstSync(e,t,n){for(const s of this.getSortedPlugins(e)){const i=this.runHookSync(e,t,s,n);if(null!=i)return i}return null}async hookParallel(e,t,n){const s=[];for(const i of this.getSortedPlugins(e))i[e].sequential?(await Promise.all(s),s.length=0,await this.runHook(e,t,i,n)):s.push(this.runHook(e,t,i,n));await Promise.all(s)}hookReduceArg0(e,[t,...n],s,i){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e))r=r.then((r=>this.runHook(e,[r,...n],t,i).then((e=>s.call(this.pluginContexts.get(t),r,e,t)))));return r}hookReduceArg0Sync(e,[t,...n],s,i){for(const r of this.getSortedPlugins(e)){const o=[t,...n],a=this.runHookSync(e,o,r,i);t=s.call(this.pluginContexts.get(r),t,a,r)}return t}async hookReduceValue(e,t,n,s){const i=[],r=[];for(const t of this.getSortedPlugins(e,bc))t[e].sequential?(i.push(...await Promise.all(r)),r.length=0,i.push(await this.runHook(e,n,t))):r.push(this.runHook(e,n,t));return i.push(...await Promise.all(r)),i.reduce(s,await t)}hookReduceValueSync(e,t,n,s,i){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,n,t,i);r=s.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,n){let s=Promise.resolve();for(const i of this.getSortedPlugins(e))s=s.then((()=>this.runHook(e,t,i,n)));return s.then(Ec)}getSortedPlugins(e,t){return W(this.sortedPlugins,e,(()=>gc(e,this.plugins,t)))}runHook(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;let o=this.pluginContexts.get(n);s&&(o=s(o,n));let a=null;return Promise.resolve().then((()=>{if("function"!=typeof r)return r;const s=r.apply(o,t);return s?.then?(a=[n.name,e,t],this.unfulfilledActions.add(a),Promise.resolve(s).then((e=>(this.unfulfilledActions.delete(a),e)))):s})).catch((t=>(null!==a&&this.unfulfilledActions.delete(a),st(sn(t,n.name,{hook:e})))))}runHookSync(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;let o=this.pluginContexts.get(n);s&&(o=s(o,n));try{return r.apply(o,t)}catch(t){return st(sn(t,n.name,{hook:e}))}}}function gc(e,t,n=yc){const s=[],i=[],r=[];for(const o of t){const t=o[e];if(t){if("object"==typeof t){if(n(t.handler,e,o),"pre"===t.order){s.push(o);continue}if("post"===t.order){r.push(o);continue}}else n(t,e,o);i.push(o)}}return[...s,...i,...r]}function yc(e,t,n){"function"!=typeof e&&st(function(e,t){return{code:$t,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a function hook or an object with a "handler" function.`,plugin:t}}(t,n.name))}function bc(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return st(function(e,t){return{code:$t,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:t}}(t,n.name))}function Ec(){}class xc{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise(((t,n)=>{this.queue.push({reject:n,resolve:t,task:e}),this.work()}))}async work(){if(this.workerCount>=this.maxParallel)return;let e;for(this.workerCount++;e=this.queue.shift();){const{reject:t,resolve:n,task:s}=e;try{n(await s())}catch(e){t(e)}}this.workerCount--}}class $c{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,n,s,i=e||1;function r(e,r){++t>i&&(s=n,o(1),++t),n[e]=r}function o(e){t=0,n=Object.create(null),e||(s=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==n[e]||void 0!==s[e]},get:function(e){var t=n[e];return void 0!==t?t:void 0!==(t=s[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==n[e]?n[e]=t:r(e,t)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new se,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=mo.LOAD_AND_PARSE,this.scope=new ic,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=e=>{const t=this.modulesById.get(e);return t?t.info:null},!1!==e.cache){if(e.cache?.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);this.pluginCache=e.cache?.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.values(t))e[0]++}}if(t){this.watchMode=!0;const e=(...e)=>this.pluginDriver.hookParallel("watchChange",e),n=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",e),t.onCurrentRun("close",n)}this.pluginDriver=new mc(this,e,e.plugins,this.pluginCache),this.moduleLoader=new Ql(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new xc(e.maxParallelFileOps),this.pureFunctions=(({treeshake:e})=>{const t=Object.create(null);for(const n of e?e.manualPureFunctions:[]){let e=t;for(const t of n.split("."))e=e[t]||=Object.create(null);e[Ts]=!0}return t})(e)}async build(){Qo("generate module graph",2),await this.generateModuleGraph(),ea("generate module graph",2),Qo("sort and bind modules",2),this.phase=mo.ANALYSE,this.sortModules(),ea("sort and bind modules",2),Qo("mark included statements",2),this.includeStatements(),ea("mark included statements",2),this.phase=mo.GENERATE}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let n=!0;for(const[e,s]of Object.entries(t))s[0]>=this.options.experimentalCacheExpiry?delete t[e]:n=!1;n&&delete this.pluginCache[e]}return{modules:this.modules.map((e=>e.toJSON())),plugins:this.pluginCache}}async generateModuleGraph(){var e;if(({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((e=this.options.input,Array.isArray(e)?e.map((e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:void 0,name:null}))):Object.entries(e).map((([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:void 0,name:e})))),!0)),0===this.entryModules.length)throw new Error("You must supply options.input to rollup");for(const e of this.modulesById.values())e instanceof aa?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)sa(t);if(this.options.treeshake){let t=1;do{Qo(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)e.isExecuted&&("no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include());if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);ea("treeshaking pass "+t++,3)}while(this.needsTreeshakingPass)}else for(const e of this.modules)e.includeAllInBundle();for(const e of this.externalModules)e.warnUnusedImports();for(const e of this.implicitEntryModules)for(const t of e.implicitlyLoadedAfter)t.info.isEntry||t.isIncluded()||st(Qt(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=function(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=e=>{if(e instanceof aa){for(const t of e.dependencies)r.has(t)?s.has(t)||n.push(yl(t,e,r)):(r.set(t,e),a(t));for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{resolution:t}of e.dynamicImports)t instanceof aa&&i.add(t);o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),a(t));for(const e of i)r.has(e)||(r.set(e,null),a(e));return{cyclePaths:n,orderedModules:o}}(this.entryModules);for(const e of t)this.options.onLog(Oe,Ut(e));this.modules=e;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of e.importDescriptions.values())"*"===t.name||t.module.getVariableForExportName(t.name)[0]||e.log(Oe,Zt(t.name,e.id,t.module.id),t.start)}}function Ac(e,t){return t()}function Sc(e,t,s,i){e=gc("onLog",e);const r=Re[i],o=(i,a,l=Ae)=>{if(!(Re[i]<r)){for(const t of e){if(l.has(t))continue;const{onLog:e}=t,c=e=>Re[e]<r?zs:n=>o(e,Ul(n),new Set(l).add(t));if(!1===("handler"in e?e.handler:e).call({debug:c(De),error:e=>st(Ul(e)),info:c(Me),meta:{rollupVersion:n,watchMode:s},warn:c(Oe)},i,a))return}t(i,a)}};return o}const wc=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,vc=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>!t.startsWith("\0")&&e(t,...n)||!1;if(e){const n=new Set,s=[];for(const i of(t=e,Array.isArray(t)?t.filter(Boolean):t?[t]:[]))i instanceof RegExp?s.push(i):n.add(i);return(e,...t)=>n.has(e)||s.some((t=>t.test(e)))}var t;return()=>!1},Ic=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},Pc=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:20},kc=(e,t)=>{const n=e.moduleContext;if("function"==typeof n)return e=>n(e)??t;if(n){const e=Object.create(null);for(const[t,s]of Object.entries(n))e[R(t)]=s;return n=>e[n]??t}return()=>t},Nc=e=>{if(!1===e.treeshake)return!1;const t=Yl(e.treeshake,ql,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??$e,moduleSideEffects:Cc(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Cc=e=>{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)}return e&&st(Xt("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},Oc=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,Mc=/^[a-z]:/i;function Dc(e){const t=Mc.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Oc,"_")}const Rc=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return st(Xt("output.file",qe,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return st(Xt("output.file",qe,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},_c=e=>{const t=e.format;switch(t){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return t;default:return st(Xt("output.format",Je,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Lc=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?st(Xt("output.inlineDynamicImports",Ze,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},Bc=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return st(Xt("output.inlineDynamicImports",Ze,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return st(Xt("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},Tc=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return R(t)},zc=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?st(Xt("output.amd.id",He,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?st(Xt("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):t.autoId?{autoId:!0,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:!1,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}},Vc=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},Fc=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?st(Xt("output.dir",qe,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},jc=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function Uc(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return st({code:yt,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:Ue(Ke)});return n||"auto"}const Gc=(e,t)=>(null!=e.externalImportAssertions&&cn('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),Wc=e=>{const t=Yl(e.generatedCode,Kl,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:!0===t.arrowFunctions,constBindings:!0===t.constBindings,objectShorthand:!0===t.objectShorthand,reservedNamesAsProps:!1!==t.reservedNamesAsProps,symbols:!0===t.symbols}},Hc=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},qc=new Set(["compat","auto","esModule","default","defaultOnly"]),Kc=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||Yc(n=t(s)):s in e?e[s]:Yc(e[s]=t(s))}return void 0===t?()=>"default":()=>Yc(t)},Yc=e=>qc.has(e)?e:st(Xt("output.interop",Qe,`use one of ${Array.from(qc,(e=>JSON.stringify(e))).join(", ")}`,e)),Jc=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return st(Xt("output.manualChunks",et,'this option is not supported for "output.inlineDynamicImports"'));if(n)return st(Xt("output.manualChunks",et,'this option is not supported for "output.preserveModules"'))}return s||{}},Xc=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),Zc=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},Qc=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(e){try{new URL(e)}catch{return!1}return!0}(t)?(n=t).endsWith("/")?n:n+"/":st(Xt("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n};function ed(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function td(e,t,n,s,i){const{options:r,outputPluginDriver:o,unsetOptions:a}=await async function(e,t,n,s){if(!e)throw new Error("You must supply an options object");const i=await Jl(e.plugins);ed(i,Bl);const r=t.createOutputPluginDriver(i);return{...await nd(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return Ac(0,(async()=>{const n=new Nl(r,a,t,o,i),s=await n.generate(e);if(e){if(Qo("WRITE",1),!r.dir&&!r.file)return st({code:kt,message:'You must specify "output.file" or "output.dir" for the build.',url:Ue(qe)});await Promise.all(Object.values(s).map((e=>i.fileOperationQueue.run((()=>async function(e,t){const n=R(t.dir||O(t.file),e.fileName);return await Ml(O(n),{recursive:!0}),Rl(n,"asset"===e.type?e.source:e.code)}(e,r)))))),await o.hookParallel("writeBundle",[r,s]),ea("WRITE",1)}return l=s,{output:Object.values(l).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>id(e)-id(t)))};var l}))}function nd(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=_c(e),o=Lc(e,t),a=Bc(e,o,t),l=Rc(e,a,t),c=Wc(e),d=Gc(e,t),u={amd:zc(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:Vc(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:Fc(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:jc(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:Uc(e,s),extend:e.extend||!1,externalImportAssertions:d,externalImportAttributes:d,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:Vc(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:c,globals:e.globals||{},hoistTransitiveImports:e.hoistTransitiveImports??!0,indent:Hc(e,i),inlineDynamicImports:o,interop:Kc(e),intro:Vc(e,"intro"),manualChunks:Jc(e,o,a),minifyInternalExports:Xc(e,r,i),name:e.name,noConflict:e.noConflict||!1,outro:Vc(e,"outro"),paths:e.paths||{},plugins:await Jl(e.plugins),preserveModules:a,preserveModulesRoot:Tc(e),sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Dc,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:Qc(e),sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:Zc(e,s),sourcemapIgnoreList:"function"==typeof e.sourcemapIgnoreList?e.sourcemapIgnoreList:!1===e.sourcemapIgnoreList?()=>!1:e=>e.includes("node_modules"),sourcemapPathTransform:e.sourcemapPathTransform,strict:e.strict??!0,systemNullSetters:e.systemNullSetters??!0,validate:e.validate||!1};return Hl(e,Object.keys(u),"output options",t.onLog),{options:u,unsetOptions:s}}(s.hookReduceArg0Sync("outputOptions",[n],((e,t)=>t||e),(e=>{const t=()=>e.error({code:ct,message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...e,emitFile:t,setAssetSource:t}})),e,t)}var sd;function id(e){return"asset"===e.type?sd.ASSET:e.isEntry?sd.ENTRY_CHUNK:sd.SECONDARY_CHUNK}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(sd||(sd={})),e.VERSION=n,e.defineConfig=function(e){return e},e.rollup=function(e){return async function(e,t){const{options:s,unsetOptions:i}=await async function(e,t){if(!e)throw new Error("You must supply an options object to rollup");const s=await async function(e,t){const s=gc("options",await Jl(e.plugins)),i=e.logLevel||Me,r=Sc(s,Vl(e,i),t,i);for(const o of s){const{name:s,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:hc(De,"PLUGIN_LOG",r,s,i),error:e=>st(sn(Ul(e),s,{hook:"onLog"})),info:hc(Me,"PLUGIN_LOG",r,s,i),meta:{rollupVersion:n,watchMode:t},warn:hc(Oe,"PLUGIN_WARNING",r,s,i)},e);c&&(e=c)}return e}(e,t),{options:i,unsetOptions:r}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await Jl(e.plugins),r=e.logLevel||Me,o=Sc(i,Vl(e,r),t,r),a=e.strictDeprecations||!1,l=Pc(e),c={cache:wc(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:vc(e.external),input:Ic(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:kc(e,s),onLog:o,perf:e.perf||!1,plugins:i,preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveSymlinks:e.preserveSymlinks||!1,shimMissingExports:e.shimMissingExports||!1,strictDeprecations:a,treeshake:Nc(e)};return Hl(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(s,t);return ed(i.plugins,Ll),{options:i,unsetOptions:r}}(e,null!==t);(function(e){e.perf?(Ko=new Map,Qo=Jo,ea=Xo,e.plugins=e.plugins.map(na)):(Qo=zs,ea=zs)})(s),await async function(){await To()}();const r=new $c(s,t),o=!1!==e.cache;e.cache&&(s.cache=void 0,e.cache=void 0);Qo("BUILD",1),await Ac(r.pluginDriver,(async()=>{try{Qo("initialize",2),await r.pluginDriver.hookParallel("buildStart",[s]),ea("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);throw t.length>0&&(e.watchFiles=t),await r.pluginDriver.hookParallel("buildEnd",[e]),await r.pluginDriver.hookParallel("closeBundle",[]),e}await r.pluginDriver.hookParallel("buildEnd",[])})),ea("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async e=>a.closed?st(Vt()):td(!1,s,i,e,r),get watchFiles(){return Object.keys(r.watchFiles)},write:async e=>a.closed?st(Vt()):td(!0,s,i,e,r)};s.perf&&(a.getTimings=Zo);return a}(e,null)}}));
|
|
11
11
|
//# sourceMappingURL=rollup.browser.js.map
|