@rollup/browser 4.63.2 → 4.63.3

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.
@@ -1,10 +1,10 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.63.2
4
- Sat, 12 Sep 2026 06:36:48 GMT - commit 43ed4ec364940fbce7054d8da1f92c695d1e6808
3
+ Rollup.js v4.63.3
4
+ Mon, 14 Sep 2026 12:44:36 GMT - commit 250deca2945f8817350564f7d52bab0f79175d1b
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
8
8
  Released under the MIT License.
9
9
  */
10
- var e="4.63.2",t=",".charCodeAt(0),n=";".charCodeAt(0),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;e<64;e++){const t=s.charCodeAt(e);i[e]=t,r[t]=e}function o(e){let t=0,n=0,s=0;do{const i=e.next();s=r[i],t|=(31&s)<<n,n+=5}while(32&s);return t}function a(e){return 1&e?-2147483648|-(e>>>1):e>>>1}function l(e,t){do{let n=31&t;(t>>>=5)>0&&(n|=32),e.write(i[n])}while(t>0)}function c(e){return e<0?-e<<1|1:e<<1}function u(e,n){return!(e.pos>=n)&&e.peek()!==t}var d="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}},h=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=d.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:n}=this;return n>0?t+d.decode(e.subarray(0,n)):t}},p=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:t,pos:n}=this,s=t.indexOf(e,n);return-1===s?t.length:s}};function f(e){e.sort(m)}function m(e,t){return e[0]-t[0]}function g(e){const s=new h;let i=0,r=0,o=0,a=0;for(let u=0;u<e.length;u++){const d=e[u];if(u>0&&s.write(n),0===d.length)continue;let h=0;for(let e=0;e<d.length;e++){const n=d[e];e>0&&s.write(t),l(s,c(n[0]-h)),h=n[0],1!==n.length&&(l(s,c(n[1]-i)),l(s,c(n[2]-r)),l(s,c(n[3]-o)),i=n[1],r=n[2],o=n[3],4!==n.length&&(l(s,c(n[4]-a)),a=n[4]))}}return s.flush()}var y=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}},b=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){e(this);let t=this.next;for(;t;)e(t),t=t.next}eachPrevious(e){e(this);let t=this.previous;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}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}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.edited?this.edit(t,this.storeName,!0):this.split(this.start+t.length).edit("",void 0,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.edited?this.edit(t,this.storeName,!0):(this.split(this.end-t.length),this.edit("",void 0,!0))),!0):(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0)}},E=class extends Error{name="MagicStringError";constructor(e,t){super(`[MagicString] ${e}`,t)}};function x(){if("undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa)return e=>globalThis.btoa(unescape(encodeURIComponent(e)));const e=globalThis.Buffer;return e?t=>e.from(t,"utf-8").toString("base64"):()=>{throw new E("unsupported environment: `btoa` or `Buffer` is required")}}const A=x();var S=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=g(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList),void 0!==e.debugId&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return`data:application/json;charset=utf-8;base64,${A(this.toString())}`}};function $(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]}}}function v(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 P=Object.prototype.toString;function I(e){return"[object Object]"===P.call(e)}const w=/\w/;var N=class{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){const i=t.length-1;let r=t.indexOf("\n",0),o=-1;for(;r>=0&&i>r;){const i=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&i.push(s),this.rawSegments.push(i),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=r,r=t.indexOf("\n",r+1)}const a=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&a.push(s),this.rawSegments.push(a),this.advance(t.slice(o+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("\n"===n[r])s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0,a=!1;else{if(this.hires||o||i.has(r)){const t=[this.generatedCodeColumn,e,s.line,s.column];"boundary"===this.hires?w.test(n[r])?a||(this.rawSegments.push(t),a=!0):(this.rawSegments.push(t),a=!1):this.rawSegments.push(t)}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 k="\n",C="\n".charCodeAt(0),R="\r".charCodeAt(0),D={insertLeft:!1,insertRight:!1,storeName:!1};var O=class e{constructor(e,t={}){const n=new b(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:new Map([[0,n]])},byEnd:{writable:!0,value:new Map([[e.length,n]])},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new y},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0},hasMovedChunks:{writable:!0,value:!1}})}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new E("content must be a string, got "+typeof e);return this.outro+=e,this}appendLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new E("content must be a string, got "+typeof t);this._split(e);const n=this.byEnd.get(e);return n?n.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new E("content must be a string, got "+typeof t);this._split(e);const n=this.byStart.get(e);return n?n.appendRight(t):this.outro+=t,this}clone(){const t=new e(this.original,{filename:this.filename,ignoreList:this.ignoreList,offset:this.offset});let n=this.firstChunk,s=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart.set(s.start,s),t.byEnd.set(s.end,s);const e=n.next,i=e&&e.clone();i&&(s.next=i,i.previous=s,s=i),n=e}return t.lastChunk=s,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new y(this.sourcemapLocations),t.storedNames={...this.storedNames},t.intro=this.intro,t.outro=this.outro,t.hasMovedChunks=this.hasMovedChunks,t}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),n=new N(e.hires),s=$(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)}),this.outro&&n.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?v(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 S(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" ".repeat(i)}(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(I(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const s=e,i={};(t=t||{}).exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)i[t]=!0});let r=!1!==t.indentStart;const o=e=>r?`${s}${e}`:(r=!0,e);this.intro=this.intro.replace(n,o);let a=0,l=this.firstChunk;const c=e=>{r=!1,e===l.start||(this._splitChunk(l,e),l=l.next),l.prependRight(s)};for(;l;){const e=l.end;if(l.edited)i[a]||(l.content=l.content.replace(n,o),l.content.length&&(r="\n"===l.content[l.content.length-1]));else if(t.exclude)for(a=l.start;a<e;){if(!i[a]){const e=this.original.charCodeAt(a);e===C?r=!0:e!==R&&r&&c(a)}a+=1}else for(a=l.start;a<e;){if(!r){const t=this.original.indexOf(k,a);if(-1===t||t>=e)break;r=!0,a=t+1;continue}const t=this.original.charCodeAt(a);t!==C&&t!==R?(c(a),a+=1):a+=1}a=l.end,l=l.next}return this.outro=this.outro.replace(n,o),this}insert(){throw new E("insert() is deprecated, use appendLeft() or prependRight()")}insertLeft(e,t){return D.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),D.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return D.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),D.insertRight=!0),this.prependRight(e,t)}move(e,t,n){if(e+=this.offset,t+=this.offset,n+=this.offset,e===t)return this;if(n>=e&&n<=t)throw new E("cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);const s=this.byStart.get(e),i=this.byEnd.get(t);if(this.hasMovedChunks){let n=s;for(;n!==i;)if(n=n.next,!n||n.start<e||n.end>t)throw new E(`cannot move ${e} to ${t} because an earlier move split that range`)}const r=s.previous,o=i.next,a=this.byStart.get(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.hasMovedChunks=!0,this}overwrite(e,t,n,s){const i="object"==typeof s&&s?s:{};return this.update(e,t,n,{...i,overwrite:!i.contentOnly})}update(e,t,n,s){if(e+=this.offset,t+=this.offset,"string"!=typeof n)throw new E("content must be a string, got "+typeof n);if(0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e<0)throw new E(`start ${e} is out of bounds`);if(t>this.original.length)throw new E(`end ${t} is out of bounds`);if(e===t)throw new E(`cannot overwrite a zero-length range at ${e}, use appendLeft() or prependRight()`);if(e>t)throw new E(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t),!0===s&&(D.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),D.storeName=!0),s={storeName:!0});const i="object"==typeof s&&s?s:{},r=i.storeName||!1,o=i.overwrite||!1;if(r){const n=this.original.slice(e,t);Object.defineProperty(this.storedNames,n,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart.get(e),l=this.byEnd.get(t);if(a){let e=a;for(;e!==l;){if(e.next!==this.byStart.get(e.end))throw new E("cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(n,r,!o)}else{const s=new b(e,t,"").edit(n,r);l.next=s,s.previous=l}return this}prepend(e){if("string"!=typeof e)throw new E("content must be a string, got "+typeof e);return this.intro=e+this.intro,this}prependLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new E("content must be a string, got "+typeof t);this._split(e);const n=this.byEnd.get(e);return n?n.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new E("content must be a string, got "+typeof t);this._split(e);const n=this.byStart.get(e);return n?n.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e===t)return this;if(e<0||t>this.original.length)throw new E(`range ${e}–${t} is out of bounds`);if(e>t)throw new E(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t);let n=this.byStart.get(e);for(;n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart.get(n.end):null;return this}reset(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e===t)return this;if(e<0||t>this.original.length)throw new E(`range ${e}–${t} is out of bounds`);if(e>t)throw new E(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t);let n=this.byStart.get(e);for(;n;)n.reset(),n=t>n.end?this.byStart.get(n.end):null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;for(;e;){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];e=e.previous}return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(k);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,n=this.lastChunk;for(;n;){if(n.outro.length>0){if(e=n.outro.lastIndexOf(k),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(k),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(k),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}n=n.previous}return e=this.intro.lastIndexOf(k),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(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 E(`cannot use edited 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 E(`cannot use edited 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.get(e)||this.byEnd.get(e))return;let t=this.lastSearchedChunk,n=t;const s=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);if(t=s?this.byStart.get(t.end):this.byEnd.get(t.start),t===n)return;n=t}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=$(this.original)(t);throw new E(`cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`)}const n=e.split(t);return this.byEnd.set(t,e),this.byStart.set(t,n),this.byEnd.set(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;for(;e;){if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;e=e.next}return!0}length(){let e=this.firstChunk,t=0;for(;e;)t+=e.intro.length+e.content.length+e.outro.length,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.set(n.end,n),this.byStart.set(n.next.start,n.next),this.byEnd.set(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.set(n.end,n),this.byStart.set(n.next.start,n.next),this.byEnd.set(n.next.end,n.next)),s)return!0;n=n.next}while(n);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){if(this.intro||this.outro)return!0;let e=0,t=this.firstChunk;for(;t;){if(t.intro||t.outro)return!0;if(t.edited||t.start!==e){if(!this.original.startsWith(t.content,e))return!0;e+=t.content.length}else e=t.end;t=t.next}return e!==this.original.length}_replaceRegexp(e,t){function n(e,n){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,(t,n)=>"$"===n?"$":"&"===n?e[0]:+n<e.length?e[+n]:`$${n}`):t(e[0],...e.slice(1),e.index,n,e.groups)}const s=e=>{if(null==e.index)return;const t=n(e,this.original);t!==e[0]&&(0===e[0].length?this.appendRight(e.index,t):this.overwrite(e.index,e.index+e[0].length,t))};if(e.global){e.lastIndex=0;for(const t of this.original.matchAll(e))s(t)}else{const t=this.original.match(e);t&&s(t)}return this}_replaceString(e,t){const{original:n}=this,s=n.indexOf(e);return-1!==s&&("function"==typeof t&&(t=t(e,s,n)),e!==t&&(0===e.length?this.appendRight(s,t):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;if(0===s){for(let e=0;e<=n.length;e+=1){const s="function"==typeof t?t("",e,n):t;""!==s&&this.appendRight(e,s)}return this}for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s)){const e=n.slice(i,i+s),r="function"==typeof t?t(e,i,n):t;e!==r&&this.overwrite(i,i+s,r)}return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new E("replaceAll() requires a global RegExp");return this._replaceRegexp(e,t)}};const M=Object.prototype.hasOwnProperty;var _=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 O)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!I(e)||!e.content)throw new E("addSource() requires a `content` property that is a MagicString");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(t=>{M.call(e,t)||(e[t]=e.content[t])}),void 0===e.separator&&(e.separator=this.separator),e.filename)if(M.call(this.uniqueSourceIndexByFilename,e.filename)){const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new E(`duplicate filename "${e.filename}" with different content, use unique filenames`)}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 O(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(),ignoreList:e.ignoreList,indentExclusionRanges:e.indentExclusionRanges,separator:e.separator})}),t}generateDecodedMap(e={}){const t=[];let n;this.sources.forEach(e=>{Object.keys(e.content.storedNames).forEach(e=>{t.includes(e)||t.push(e)})});const s=new N(e.hires);return this.intro&&s.advance(this.intro),this.sources.forEach((e,i)=>{i>0&&s.advance(void 0!==e.separator?e.separator:this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=$(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?v(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 S(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[n]-e[t])[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,t)=>{const n=void 0!==e.separator?e.separator:this.separator;return t>0&&""!==n.trim()||!e.content.isEmpty()})}length(){return this.sources.reduce((e,t,n)=>{const s=void 0!==t.separator?t.separator:this.separator;return e+(n>0?s.length:0)+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)for(let n=0;n<this.sources.length;n+=1){const s=this.sources[n];if(n>0&&(s.separator=(void 0!==s.separator?s.separator:this.separator).replace(t,""),s.separator))break;if(s.content.trimStartAborted(e))break}return this}trimEnd(e){const t=new RegExp(`${e||"\\s"}+$`);for(let n=this.sources.length-1;n>=0;n-=1){const s=this.sources[n];if(s.content.trimEndAborted(e))return this;if(n>0&&(s.separator=(void 0!==s.separator?s.separator:this.separator).replace(t,""),s.separator))return this}return this.intro=this.intro.replace(t,""),this}};const L=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,T=/^\.?\.\//,B=/\\/g,z=/[/\\]/,V=/\.[^.]+$/;function F(e){return L.test(e)}function j(e){return T.test(e)}function U(e){return e.replace(B,"/")}function G(e){return e.split(z).pop()||""}function H(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function W(e){const t=V.exec(G(e));return t?t[0]:""}function q(e,t=!1){const n=[];for(const s of e)".."===s?n.length>0&&".."!==n[n.length-1]?n.pop():t||n.push(".."):"."!==s&&""!==s&&n.push(s);return n.join("/")}function K(e,t){const n=e.split(z).filter(Boolean),s=t.split(z).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 X(...e){let t=[],n=!1;for(const s of e)F(s)?(t=s.split(z),n=!0):t.push(...s.split(z));const s=q(t,n);return n?/^[A-Za-z]:/.test(s)?s:"/"+s:s||"/"}function J(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const Y={isNoStatement:!0};function Z(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 Q=/\S/g;function ee(e,t){Q.lastIndex=t;return Q.exec(e).index}const te=/\s/;function ne(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 se(e,t,n,s,i){let r,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=n+ne(t.original.slice(n,c.start))[1]);for(let n=1;n<=e.length;n++)r=c,o=l,a=u,c=e[n],u=void 0!==c&&(!c.included||c.needsBoundaries),a||u?(l=r.end+ne(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):J(r,t,o,l)):r.render(t,i)}function ie(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+Z(t.original.slice(r.end,s.start),",")),o=a=c+1+ne(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 re(e,t,n){for(;;){const[s,i]=ne(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}function oe(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 ae(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function le(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${oe([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}const ce=Object.freeze(Object.create(null)),ue=Object.freeze({}),de=Object.freeze([]),he=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function pe(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function fe(){return new Set}function me(){return[]}const ge=Symbol("Unknown Key"),ye=Symbol("Unknown Non-Accessor Key"),be=Symbol("Unknown Integer"),Ee=Symbol("Unknown Well-Known"),xe=Symbol("Symbol.toStringTag"),Ae=Symbol("Symbol.asyncDispose"),Se=Symbol("Symbol.dispose"),$e=Symbol("Symbol.hasInstance"),ve=new Set([xe,Ae,Se,$e]),Pe=e=>ve.has(e)||e===Ee,Ie=new Set([$e,Ae,Se]),we=e=>"string"==typeof e||ve.has(e),Ne=[],ke=[ge],Ce=[ye],Re=[be],De=[$e],Oe=Symbol("Entities");class Me{constructor(){this.entityPaths=Object.create(null,{[Oe]:{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]||=Object.create(null,{[Oe]:{value:new Set}});return t[Oe]}}const _e=new Me;class Le{constructor(){this.entityPaths=Object.create(null,{[Oe]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]||=Object.create(null,{[Oe]:{value:new Map}});const i=pe(s[Oe],t,fe);return!!i.has(n)||(i.add(n),!1)}}const Te=Object.freeze({[ge]:ue});class Be{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0,n=this,s="includedPaths",i=this.includedPaths||=(t=!1,Object.create(null));for(const r of e){if(i[ge])return!0;if(!we(r))return n[s]=Te,!1;n=i,s=r,i=i[r]||=(t=!1,Object.create(null))}return t}}const ze=Object.freeze({[ge]:!0});class Ve{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0;const n=this.includedPaths||=(t=!1,Object.create(null));if(n[ge])return!0;const[s,i]=e;return s?we(s)?i?n[s]===ge||(n[s]=ge,!1):!!n[s]||(n[s]=!0,!1):(this.includedPaths=ze,!1):t}includeAllPaths(e,t,n){const{includedPaths:s}=this;if(s)if(s[ge])e.includePath([...n,ge],t);else{const i=Object.entries(s);if(0===i.length)e.includePath(n,t);else for(const[s,r]of i)e.includePath(r===ge?[...n,s,ge]:[...n,s],t)}}}function Fe(e,t){if("MemberExpression"===e.type)return!e.computed&&Fe(e.object,e);if("Identifier"!==e.type)return!1;switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"MetaProperty":return t.meta===e;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}}function je(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function Ue(){return{accessed:new Me,assigned:new Me,brokenFlow:!1,called:new Le,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Le,replacedVariableInits:new Map}}function Ge(e,t){return 0!==(e&t)}function He(e,t,n){return e&~t|-n&t}const We=Symbol("Unknown Value"),qe=Symbol("Unknown Truthy Value"),Ke=Symbol("Unknown Falsy Value");class Xe{constructor(){this.flags=0}get included(){return Ge(this.flags,1)}set included(e){this.flags=He(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){Ze(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return We}getReturnExpressionWhenCalledAtPath(e,t,n,s){return Ye}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included||this.includeNode(e)}includeNode(e){this.included=!0}includePath(e,t){this.included||this.includeNode(t)}includeCallArguments(e,t){Qe(e,t)}shouldBeIncluded(e){return!0}}const Je=new class extends Xe{},Ye=[Je,!1],Ze=e=>{for(const t of e.args)t?.deoptimizePath(ke)},Qe=(e,t)=>{e.args[0]?.includePath(ke,t),et(e,t)},et=({args:e},t)=>{for(let n=1;n<e.length;n++){const s=e[n];s&&(s.includePath(ke,t),s.include(t,!1))}},tt={args:[null],type:0},nt={args:[null,Je],type:1},st={args:[null],type:2,withNew:!1},it="ArrowFunctionExpression",rt="CallExpression",ot="ExportDefaultDeclaration",at="ExpressionStatement",lt="Identifier",ct="Program",ut="Property";function dt(e,t){return e.start<=t&&t<e.end}function ht(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(dt(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 pt(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}const ft="...";function mt(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(pt(s[t-1].slice(0,n)).length+10+3,120),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=pt(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${ft}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+pt(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`}).join("\n")}const gt="silent",yt="warn",bt="info",Et="debug",xt={[Et]:0,[bt]:1,[gt]:3,[yt]:2};function At(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 St(e){const t=G(e);return t.slice(0,Math.max(0,t.length-W(e).length))}function $t(e){return F(e)?K(X(),e):e}function vt(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||F(e)}const Pt=/^(\.\.\/)*\.\.$/;function It(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=U(K(H(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+G(t);if(Pt.test(i))return[...i.split("/"),"..",G(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function wt(e){return`https://rollupjs.org/${e}`}const Nt="troubleshooting/#error-name-is-not-exported-by-module",kt="configuration-options/#jsx",Ct="configuration-options/#output-amd-id",Rt="configuration-options/#output-dir",Dt="configuration-options/#output-exports",Ot="configuration-options/#output-format",Mt="configuration-options/#output-inlinedynamicimports",_t="configuration-options/#output-interop",Lt="configuration-options/#output-manualchunks",Tt="configuration-options/#output-name",Bt="configuration-options/#output-sourcemapfile",zt="es-module-syntax/#source-phase-import",Vt="plugin-development/#generatebundle";function Ft(e){throw e instanceof Error?e:jt(e)}function jt(e){Ht(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function Ut(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=ht(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=mt(n,t,s)}}const Gt=Symbol("augmented");function Ht(e){if(!e.plugin&&!e.loc||e[Gt])return;e[Gt]=!0;let t="";e.plugin&&(t+=`[plugin ${e.plugin}] `);const n=e.id||e.loc?.file;if(n){const s=e.loc?` (${e.loc.line}:${e.loc.column})`:"";t+=`${$t(n)}${s}: `}const s=e.message;e.message=t+e.message,gn(e,s)}const Wt="INVALID_EXPORT_OPTION",qt="INVALID_IMPORT_ATTRIBUTE",Kt="INVALID_PLUGIN_HOOK",Xt="MISSING_EXPORT",Jt="MISSING_IMPLICIT_DEPENDANT",Yt="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",Zt="PARSE_ERROR",Qt="SOURCEMAP_BROKEN",en="UNEXPECTED_NAMED_IMPORT",tn="UNRESOLVED_ENTRY",nn="UNRESOLVED_IMPORT";function sn(e){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${e}" - no asset source set.`}}function rn(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function on({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return Ut(i,n,t,e),i}function an(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map($t).join(" -> ")}`}}function ln(e,t,n,s,i){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:t,id:s,message:`Export "${e}" of module "${$t(t)}" was reexported through module "${$t(n)}" 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 "${$t(s)}" to point directly to the exporting module or ${i?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:n}}function cn(e){return{code:"FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY",message:`The output file name "${e}" is not contained in the output directory. Make sure all file names are relative paths without ".." segments.`}}function un(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${$t(t)} is at (${n}:${s})\n${mt(e,n,s)}`}}function dn(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${$t(t)}".`}}function hn(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${$t(s)}" tried to import "${$t(n)}" with ${pn(t)} attributes, but it was already imported elsewhere with ${pn(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const pn=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map(([e,t])=>`"${e}": "${t}"`).join(", ")};function fn(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${$t(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:wt("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function mn(e,t){return{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${t}" hook used by the output plugin ${e} 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.`}}function gn(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function yn(e,t,n){return{code:Wt,message:`"${e}" was specified for "output.exports", but entry module "${$t(n)}" has the following exports: ${At(t)}`,url:wt(Dt)}}function bn(e){return{code:qt,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${$t(e)}". Import attributes need to have string keys and values.`}}function En(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:wt(t)}}function xn(e,t){return{binding:e,code:Xt,exporter:t,message:`Exported variable "${e}" is not defined in "${$t(t)}".`,url:wt(Nt)}}function An(e,t,n,s){const i={binding:e,code:Xt,exporter:n,id:t,url:wt(Nt)};if(s)return{...i,message:`Exported variable "${e}" is not defined in "${$t(n)}", but it is imported by "${$t(t)}".`};const r=".json"===W(n);return{...i,message:`"${e}" is not exported by "${$t(n)}", imported by "${$t(t)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function Sn(e){const t=[...e.implicitlyLoadedBefore].map(e=>$t(e.id)).sort();return{code:Jt,message:`Module "${$t(e.id)}" that should be implicitly loaded before ${At(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 $n(e,t){return{code:"NON_EXTERNAL_SOURCE_PHASE_IMPORT",message:`Source phase import "${e}" in "${$t(t)}" must be external. Source phase imports are only supported for external modules. Use the "external" option to mark this module as external.`,url:wt(zt)}}function vn(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function Pn(e,t){return{code:Zt,message:e,pos:t}}function In(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function wn(e){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${e}"`}}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)"),gn({cause:e,code:Zt,id:t,message:n,stack:e.stack},e.message)}function kn(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="PLUGIN_ERROR",e.plugin=t,n&&(e.hook=n),s&&(e.id=s),e}function Cn(e){return{code:Qt,message:`Multiple conflicting contents for sourcemap source ${e}`}}function Rn(e,t,n){const s=n?"reexport":"import";return{code:en,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${$t(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:wt(_t)}}function Dn(e){return{code:en,exporter:e,message:`There was a namespace "*" reexport from the external module "${$t(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:wt(_t)}}function On(e){return{code:"VALIDATION_ERROR",message:e}}function Mn(e,t,n,s,i){!function(e,t,n,s,i){if(n||i){const n=function(e,t){return{code:"DEPRECATED_FEATURE",message:e,url:wt(t)}}(e,t);if(i)return Ft(n);s(yt,n)}}(e,t,n,s.onLog,s.strictDeprecations)}const _n=Symbol("PureFunction");class Ln extends Xe{markReassigned(){this.isReassigned=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.globalName=null,this.initReached=!1,this.isId=!1,this.kind=null,this.renderBaseName=null,this.renderName=null,this.isReassigned=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===rt&&e.parent.callee===e||e.parent.type===ot||(this.onlyFunctionCallUsed=!1)}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,t){if(this.globalName)return this.globalName;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}includePath(e,t){this.included=!0,this.renderedLikeHoisted?.includePath(e,t)}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}const Tn="*source";class Bn extends Ln{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t,this.isSourcePhase=t===Tn}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)}includePath(e,t){super.includePath(e,t),this.module.used=!0}}function zn(e,t){for(const n of t){const t=Object.getOwnPropertyDescriptor(e,n).get;Object.defineProperty(e,n,{get(){const s=t.call(e);return Object.defineProperty(e,n,{value:s}),s}})}}const Vn=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"]),Fn=/[^\w$]/g,jn=/[^\w$]/,Un=e=>(e=>/\d/.test(e[0]))(e)||Vn.has(e)||"arguments"===e;function Gn(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(Fn,"_"),Un(e)&&(e=`_${e}`),e||"_"}const Hn=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,Wn=/^(?:0|[1-9]\d*)$/;function qn(e){return Hn.test(e)?"__proto__"===e?'["__proto__"]':e:Wn.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function Kn(e){return Hn.test(e)?e:JSON.stringify(e)}class Xn{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.importersByExportedName=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=Gn(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:de,dynamicallyImportedIds:de,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:de,implicitlyLoadedBefore:de,importedIdResolutions:de,importedIds:de,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,safeVariableNames:null,syntheticNamedExports:!1}}cacheInfoGetters(){zn(this.info,["dynamicImporters","importers"])}getVariableForExportName(e,{importChain:t}){const n=this.declarations.get(e);for(const n of t)pe(this.importersByExportedName,e,fe).add(n);if(n)return[n];const s=new Bn(this,e);return this.declarations.set(e,s),this.exportedVariables.set(s,e),[s]}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){const e=this.importersByExportedName.get(n);for(const n of this.importers)e?.has(n)&&t.add(n)}const n=[...t];var s,i,r;this.options.onLog(yt,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${At(i=e,["is","are"])} imported from external module "${s}" but never used in ${At(r.map(e=>$t(e)))}.`,names:i})}}function Jn(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 Xn||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const Yn=()=>{};var Zn=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using","source","defer"];const Qn="_rollupAnnotations",es="_rollupRemoved",ts=(e,t)=>{if(0===e)return de;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++)s[i]=ns(t[e++],t);return s},ns=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:Zn[t[e]]}},ss={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],Decorator:["expression"],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["specifiers","source","attributes","declaration"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["decorators","key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PanicError:[],ParseError:[],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["decorators","key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],YieldExpression:["argument"]},is="variables",rs=Symbol("IS_SKIPPED_CHAIN");class os extends Xe{get deoptimized(){return Ge(this.flags,2)}set deoptimized(e){this.flags=He(this.flags,2,e)}constructor(e,t){super(),this.parent=e,this.scope=t,this.createScope(t)}addExportedVariables(e,t){}bind(){for(const e of ss[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 ss[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(Ne,this.assignmentInteraction,e)}include(e,t,n){this.included||this.includeNode(e);for(const n of ss[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)}}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of ss[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n))for(const t of n)t?.includePath(ke,e);else n.includePath(ke,e)}}includeAsAssignmentTarget(e,t,n){this.include(e,t)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}parseNode(e){for(const[t,n]of Object.entries(e))if(!this.hasOwnProperty(t))if(95===t.charCodeAt(0))t===Qn?this.annotations=n:t===es&&(this.invalidAnnotations=n);else if("object"!=typeof n||null===n)this[t]=n;else if(Array.isArray(n)){this[t]=new Array(n.length);let e=0;for(const s of n)this[t][e++]=null===s?null:new(this.scope.context.getNodeConstructor(s.type))(this,this.scope).parseNode(s)}else this[t]=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n);return ss[e.type]||=function(e){return Object.keys(e).filter(t=>"object"==typeof e[t]&&95!==t.charCodeAt(0))}(e),this.initialise(),this}removeAnnotations(e){if(this.annotations)for(const t of this.annotations)e.remove(t.start,t.end)}render(e,t){for(const n of ss[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(Ue())}applyDeoptimizations(){this.deoptimized=!0;for(const e of ss[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(ke);else t.deoptimizePath(ke)}this.scope.context.requestTreeshakingPass()}}function as(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function ls(){this.included=!0}function cs(){this.deoptimized=!0}function us(e){return e instanceof os&&e.type===it}function ds(e){return e instanceof os&&"FunctionExpression"===e.type}function hs(e){return e instanceof os&&e.type===rt}function ps(e){return e instanceof os&&"MemberExpression"===e.type}function fs(e){return e instanceof os&&e.type===lt}function ms(e){return e instanceof os&&e.type===at}function gs(e,t=null){return Object.create(t,e)}const ys=new class extends Xe{getLiteralValueAtPath(e){return e.length>0?We:void 0}},bs={value:{hasEffectsWhenCalled:null,returns:Je}},Es=new class extends Xe{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Ds(ws,e[0]):Ye}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Rs(ws,e[0],t,n)}},xs={value:{hasEffectsWhenCalled:null,returns:Es}},As=new class extends Xe{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Ds(Ns,e[0]):Ye}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Rs(Ns,e[0],t,n)}},Ss={value:{hasEffectsWhenCalled:null,returns:As}},$s=new class extends Xe{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Ds(Cs,e[0]):Ye}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Rs(Cs,e[0],t,n)}},vs={value:{hasEffectsWhenCalled:null,returns:$s}},Ps={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(Ne,_e,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(Ne,st,t)},returns:$s}},Is=gs({hasOwnProperty:xs,isPrototypeOf:xs,propertyIsEnumerable:xs,toLocaleString:vs,toString:vs,valueOf:bs}),ws=gs({valueOf:xs},Is),Ns=gs({toExponential:vs,toFixed:vs,toLocaleString:vs,toPrecision:vs,valueOf:Ss},Is),ks=gs({exec:bs,test:xs},Is),Cs=gs({anchor:vs,at:bs,big:vs,blink:vs,bold:vs,charAt:vs,charCodeAt:Ss,codePointAt:bs,concat:vs,endsWith:xs,fixed:vs,fontcolor:vs,fontsize:vs,includes:xs,indexOf:Ss,italics:vs,lastIndexOf:Ss,link:vs,localeCompare:Ss,match:bs,matchAll:bs,normalize:vs,padEnd:vs,padStart:vs,repeat:vs,replace:Ps,replaceAll:Ps,search:Ss,slice:vs,small:vs,split:bs,startsWith:xs,strike:vs,sub:vs,substr:vs,substring:vs,sup:vs,toLocaleLowerCase:vs,toLocaleUpperCase:vs,toLowerCase:vs,toString:vs,toUpperCase:vs,trim:vs,trimEnd:vs,trimLeft:vs,trimRight:vs,trimStart:vs,valueOf:vs},Is);function Rs(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function Ds(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:Ye}class Os extends Xe{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(Re),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(ke)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?Ye:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||Je:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,{args:t,type:n},s){if(e.length>(0===n?1:0))return!0;if(2===n){if(!0===this.description.mutatesSelfAsArray&&t[0]?.hasEffectsOnInteractionAtPath(Re,nt,s))return!0;if(this.description.callsArgs)for(const e of this.description.callsArgs)if(t[e+1]?.hasEffectsOnInteractionAtPath(Ne,st,s))return!0}return!1}}const Ms=[new Os({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Es})],_s=[new Os({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:$s})],Ls=[new Os({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:As})],Ts=[new Os({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Je})],Bs=/^\d+$/;class zs extends Xe{get hasLostTrack(){return Ge(this.flags,2048)}set hasLostTrack(e){this.flags=He(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return Ge(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=He(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return Ge(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=He(this.flags,8192,e)}constructor(e,t,n=!1){if(super(),this.prototypeExpression=t,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.alwaysIncludedProperties=new Set,this.deoptimizedPaths=new Map,this.expressionsToBeDeoptimizedByKey=new Map,this.gettersByKey=new Map,this.propertiesAndGettersByKey=new Map,this.propertiesAndSettersByKey=new Map,this.settersByKey=new Map,this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchablePropertiesAndSetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of e.values())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[...this.propertiesAndGettersByKey.values(),...this.settersByKey.values()])for(const t of e)t.deoptimizePath(ke);this.prototypeExpression?.deoptimizePath([ge,ge]),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||we(s)&&this.deoptimizedPaths.get(s)))return void Ze(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(we(s)){if(a.get(s)){const t=l.get(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("string"==typeof s&&Bs.test(s))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}else{for(const t of[...l.values(),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 this.propertiesAndGettersByKey.entries())if("string"==typeof e&&Bs.test(e))for(const e of t)e.deoptimizePath(ke);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===be)return this.deoptimizeIntegerProperties();if(!we(t))return this.deoptimizeAllProperties(t===ye);if(!this.deoptimizedPaths.get(t)){this.deoptimizedPaths.set(t,!0);const e=this.expressionsToBeDeoptimizedByKey.get(t);if(e)for(const t of e)t.deoptimizeCache()}}const n=1===e.length?ke:e.slice(1);for(const e of we(t)?[...this.propertiesAndGettersByKey.get(t)||this.unmatchablePropertiesAndGetters,...this.settersByKey.get(t)||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(1===e.length?[e[0],ge]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return We;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?We:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return Ye;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):Ye}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===ye)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(we(s)){if(r.get(s)){const e=o.get(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[...o.values(),a])for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;for(const n of this.allProperties)(t||n.shouldBeIncluded(e)||this.alwaysIncludedProperties.has(n))&&n.include(e,t);this.prototypeExpression?.include(e,t)}includePath(e,t){this.included=!0;for(const e of this.alwaysIncludedProperties)e.includePath(ke,t);if(0===e.length)return;const[n,...s]=e,[i,r]=we(n)?[new Set([...this.propertiesAndGettersByKey.get(n)||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey.get(n)||this.unmatchablePropertiesAndSetters]),s]:[this.allProperties,ke];for(const e of i)e.includePath(r,t);this.prototypeExpression?.includePath(e,t)}buildPropertyMaps(e){const{allProperties:t,alwaysIncludedProperties:n,propertiesAndGettersByKey:s,propertiesAndSettersByKey:i,settersByKey:r,gettersByKey:o,unknownIntegerProps:a,unmatchablePropertiesAndGetters:l,unmatchablePropertiesAndSetters:c,unmatchableGetters:u,unmatchableSetters:d}=this;for(let h=e.length-1;h>=0;h--){const{key:p,kind:f,property:m}=e[h];if(t.push(m),!Pe(p)||Ie.has(p)||(n.add(m),p!==Ee))if(we(p))"set"===f?i.has(p)||(i.set(p,[m,...c]),r.set(p,[m,...d])):"get"===f?s.has(p)||(s.set(p,[m,...l]),o.set(p,[m,...u])):(i.has(p)||i.set(p,[m,...c]),s.has(p)||s.set(p,[m,...l]));else{if(p===be){a.push(m);continue}"set"===f&&d.push(m),"get"===f&&u.push(m),"get"!==f&&c.push(m),"set"!==f&&l.push(m)}}}deoptimizeCachedEntities(){for(const e of this.expressionsToBeDeoptimizedByKey.values())for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(ke)}deoptimizeCachedIntegerEntities(){for(const[e,t]of this.expressionsToBeDeoptimizedByKey.entries())if("string"==typeof e&&Bs.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Re)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!we(e)||this.hasUnknownDeoptimizedInteger&&"string"==typeof e&&Bs.test(e)||this.deoptimizedPaths.get(e))return Je;const t=this.propertiesAndGettersByKey.get(e);return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&"string"==typeof e&&Bs.test(e)?Je:null}getMemberExpressionAndTrackDeopt(e,t){if(!we(e))return Je;const n=this.getMemberExpression(e);if(n!==Je&&!this.immutable){let n=this.expressionsToBeDeoptimizedByKey.get(e);n||this.expressionsToBeDeoptimizedByKey.set(e,n=[]),n.push(t)}return n}}const Vs=e=>"string"==typeof e&&/^\d+$/.test(e),Fs=new class extends Xe{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||Vs(t[0])||Ze(e)}getLiteralValueAtPath(e){return 1===e.length&&Vs(e[0])?void 0:We}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},js=new zs(new Map([["hasOwnProperty",Ms],["isPrototypeOf",Ms],["propertyIsEnumerable",Ms],["toLocaleString",_s],["toString",_s],["valueOf",Ts]]),Fs,!0),Us=[{key:be,kind:"init",property:Je},{key:"length",kind:"init",property:As}],Gs=[new Os({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Es})],Hs=[new Os({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:As})],Ws=[new Os({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new zs(Us,ti),returnsPrimitive:null})],qs=[new Os({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new zs(Us,ti),returnsPrimitive:null})],Ks=[new Os({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new zs(Us,ti),returnsPrimitive:null})],Xs=[new Os({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:As})],Js=[new Os({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Je})],Ys=[new Os({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Je})],Zs=[new Os({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Je})],Qs=[new Os({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ei=[new Os({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ti=new zs(new Map([["at",Ys],["concat",qs],["copyWithin",Qs],["entries",qs],["every",Gs],["fill",Qs],["filter",Ks],["find",Zs],["findIndex",Hs],["findLast",Zs],["findLastIndex",Hs],["flat",qs],["flatMap",Ks],["forEach",Zs],["includes",Ms],["indexOf",Ls],["join",_s],["keys",Ts],["lastIndexOf",Ls],["map",Ks],["pop",Js],["push",Xs],["reduce",Zs],["reduceRight",Zs],["reverse",Qs],["shift",Js],["slice",qs],["some",Gs],["sort",ei],["splice",Ws],["toLocaleString",_s],["toString",_s],["unshift",Xs],["values",Ys]]),js,!0);class ni extends os{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,ke,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(ke,tt,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(ke,e)}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([ge,ge]),this.scope.context.requestTreeshakingPass()}}class si extends os{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)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.elements)t&&t?.includePath(ke,e)}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 ni)&&(e=!0,n.deoptimizePath(ke))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:As}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof ni?s&&(t=!0,e.unshift({key:be,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:ys})}return this.objectEntity=new zs(e,ti)}}const ii=Symbol("Value Properties"),ri=()=>We,oi=()=>!1,ai=()=>!0,li=e=>({__proto__:null,[ii]:{deoptimizeArgumentsOnCall:Yn,getLiteralValue:()=>e,hasEffectsWhenCalled:ai}}),ci={deoptimizeArgumentsOnCall:Yn,getLiteralValue:ri,hasEffectsWhenCalled:oi},ui={deoptimizeArgumentsOnCall:Yn,getLiteralValue:ri,hasEffectsWhenCalled:ai},di={deoptimizeArgumentsOnCall:Yn,getLiteralValue:ri,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof si)},hi={deoptimizeArgumentsOnCall:Yn,getLiteralValue:ri,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof Xe)||s.hasEffectsOnInteractionAtPath(ke,tt,t)}},pi={__proto__:null,[ii]:ui},fi={__proto__:null,[ii]:ci},mi={__proto__:null,[ii]:hi},gi={__proto__:null,[ii]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(ke)},getLiteralValue:ri,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(Ce,nt,t)}},yi={__proto__:null,[ii]:ui,prototype:pi},bi={__proto__:null,[ii]:ci,prototype:pi},Ei={__proto__:null,[ii]:di,prototype:pi},xi={__proto__:null,[ii]:ci,from:pi,of:fi,prototype:pi},Ai={__proto__:null,[ii]:ci,supportedLocalesOf:bi},Si={deoptimizeArgumentsOnCall:Yn,getLiteralValue:()=>Ee,hasEffectsWhenCalled:ai},$i={global:pi,globalThis:pi,self:pi,window:pi,__proto__:null,[ii]:ui,Array:{__proto__:null,[ii]:ui,from:pi,isArray:fi,of:fi,prototype:pi},ArrayBuffer:{__proto__:null,[ii]:ci,isView:fi,prototype:pi},AggregateError:Ei,Atomics:pi,BigInt:yi,BigInt64Array:yi,BigUint64Array:yi,Boolean:bi,constructor:yi,DataView:bi,Date:{__proto__:null,[ii]:ci,now:fi,parse:fi,prototype:pi,UTC:fi},decodeURI:fi,decodeURIComponent:fi,encodeURI:fi,encodeURIComponent:fi,Error:bi,escape:fi,eval:pi,EvalError:bi,FinalizationRegistry:yi,Float32Array:xi,Float64Array:xi,Function:yi,hasOwnProperty:pi,Infinity:pi,Int16Array:xi,Int32Array:xi,Int8Array:xi,isFinite:fi,isNaN:fi,isPrototypeOf:pi,JSON:pi,Map:Ei,Math:{__proto__:null,[ii]:ui,abs:fi,acos:fi,acosh:fi,asin:fi,asinh:fi,atan:fi,atan2:fi,atanh:fi,cbrt:fi,ceil:fi,clz32:fi,cos:fi,cosh:fi,exp:fi,expm1:fi,floor:fi,fround:fi,hypot:fi,imul:fi,log:fi,log10:fi,log1p:fi,log2:fi,max:fi,min:fi,pow:fi,random:fi,round:fi,sign:fi,sin:fi,sinh:fi,sqrt:fi,tan:fi,tanh:fi,trunc:fi},NaN:pi,Number:{__proto__:null,[ii]:ci,isFinite:fi,isInteger:fi,isNaN:fi,isSafeInteger:fi,parseFloat:fi,parseInt:fi,prototype:pi},Object:{__proto__:null,[ii]:ci,create:fi,defineProperty:gi,defineProperties:gi,freeze:gi,getOwnPropertyDescriptor:fi,getOwnPropertyDescriptors:fi,getOwnPropertyNames:fi,getOwnPropertySymbols:fi,getPrototypeOf:fi,hasOwn:fi,is:fi,isExtensible:fi,isFrozen:fi,isSealed:fi,keys:fi,fromEntries:pi,entries:mi,values:mi,prototype:pi},parseFloat:fi,parseInt:fi,Promise:{__proto__:null,[ii]:ui,all:pi,allSettled:pi,any:pi,prototype:pi,race:pi,reject:pi,resolve:pi},propertyIsEnumerable:pi,Proxy:{__proto__:null,[ii]:{deoptimizeArgumentsOnCall:({args:[,e,t]})=>{if((n=t)instanceof os&&"ObjectExpression"===n.type){const n=t.properties.some(e=>!function(e){return e instanceof os&&e.type===ut}(e));if(!n){for(const n of t.properties)n.deoptimizeArgumentsOnInteractionAtPath({args:[null,e],type:2,withNew:!1},Ne,_e);return}}var n;e.deoptimizePath(ke)},getLiteralValue:ri,hasEffectsWhenCalled:ai}},RangeError:bi,ReferenceError:bi,Reflect:pi,RegExp:bi,Set:Ei,SharedArrayBuffer:yi,String:{__proto__:null,[ii]:ci,fromCharCode:fi,fromCodePoint:fi,prototype:pi,raw:fi},Symbol:{__proto__:null,[ii]:ci,for:fi,keyFor:fi,prototype:pi,asyncDispose:li(Se),dispose:li(Ae),hasInstance:li($e),toStringTag:li(xe)},SyntaxError:bi,toLocaleString:pi,toString:pi,TypeError:bi,Uint16Array:xi,Uint32Array:xi,Uint8Array:xi,Uint8ClampedArray:xi,unescape:fi,URIError:bi,valueOf:pi,WeakMap:Ei,WeakRef:yi,WeakSet:Ei,clearInterval:yi,clearTimeout:yi,console:{__proto__:null,[ii]:ui,assert:yi,clear:yi,count:yi,countReset:yi,debug:yi,dir:yi,dirxml:yi,error:yi,exception:yi,group:yi,groupCollapsed:yi,groupEnd:yi,info:yi,log:yi,table:yi,time:yi,timeEnd:yi,timeLog:yi,trace:yi,warn:yi},Intl:{__proto__:null,[ii]:ui,Collator:Ai,DateTimeFormat:Ai,DisplayNames:Ai,ListFormat:Ai,Locale:Ai,NumberFormat:Ai,PluralRules:Ai,RelativeTimeFormat:Ai,Segmenter:Ai},setInterval:yi,setTimeout:yi,TextDecoder:yi,TextEncoder:yi,URL:{__proto__:null,[ii]:ui,prototype:pi,canParse:fi},URLSearchParams:yi,AbortController:yi,AbortSignal:yi,addEventListener:pi,alert:pi,AnalyserNode:yi,Animation:yi,AnimationEvent:yi,applicationCache:pi,ApplicationCache:yi,ApplicationCacheErrorEvent:yi,atob:pi,Attr:yi,Audio:yi,AudioBuffer:yi,AudioBufferSourceNode:yi,AudioContext:yi,AudioDestinationNode:yi,AudioListener:yi,AudioNode:yi,AudioParam:yi,AudioProcessingEvent:yi,AudioScheduledSourceNode:yi,AudioWorkletNode:yi,BarProp:yi,BaseAudioContext:yi,BatteryManager:yi,BeforeUnloadEvent:yi,BiquadFilterNode:yi,Blob:yi,BlobEvent:yi,blur:pi,BroadcastChannel:yi,btoa:pi,ByteLengthQueuingStrategy:yi,Cache:yi,caches:pi,CacheStorage:yi,cancelAnimationFrame:pi,cancelIdleCallback:pi,CanvasCaptureMediaStreamTrack:yi,CanvasGradient:yi,CanvasPattern:yi,CanvasRenderingContext2D:yi,ChannelMergerNode:yi,ChannelSplitterNode:yi,CharacterData:yi,clientInformation:pi,ClipboardEvent:yi,close:pi,closed:pi,CloseEvent:yi,Comment:yi,CompositionEvent:yi,confirm:pi,ConstantSourceNode:yi,ConvolverNode:yi,CountQueuingStrategy:yi,createImageBitmap:pi,Credential:yi,CredentialsContainer:yi,crypto:pi,Crypto:yi,CryptoKey:yi,CSS:yi,CSSConditionRule:yi,CSSFontFaceRule:yi,CSSGroupingRule:yi,CSSImportRule:yi,CSSKeyframeRule:yi,CSSKeyframesRule:yi,CSSMediaRule:yi,CSSNamespaceRule:yi,CSSPageRule:yi,CSSRule:yi,CSSRuleList:yi,CSSStyleDeclaration:yi,CSSStyleRule:yi,CSSStyleSheet:yi,CSSSupportsRule:yi,CustomElementRegistry:yi,customElements:pi,CustomEvent:{__proto__:null,[ii]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:ri,hasEffectsWhenCalled:oi},prototype:pi},DataTransfer:yi,DataTransferItem:yi,DataTransferItemList:yi,defaultstatus:pi,defaultStatus:pi,DelayNode:yi,DeviceMotionEvent:yi,DeviceOrientationEvent:yi,devicePixelRatio:pi,dispatchEvent:pi,document:pi,Document:yi,DocumentFragment:yi,DocumentType:yi,DOMError:yi,DOMException:yi,DOMImplementation:yi,DOMMatrix:yi,DOMMatrixReadOnly:yi,DOMParser:yi,DOMPoint:yi,DOMPointReadOnly:yi,DOMQuad:yi,DOMRect:yi,DOMRectReadOnly:yi,DOMStringList:yi,DOMStringMap:yi,DOMTokenList:yi,DragEvent:yi,DynamicsCompressorNode:yi,Element:yi,ErrorEvent:yi,Event:yi,EventSource:yi,EventTarget:yi,external:pi,fetch:pi,File:yi,FileList:yi,FileReader:yi,find:pi,focus:pi,FocusEvent:yi,FontFace:yi,FontFaceSetLoadEvent:yi,FormData:yi,frames:pi,GainNode:yi,Gamepad:yi,GamepadButton:yi,GamepadEvent:yi,getComputedStyle:pi,getSelection:pi,HashChangeEvent:yi,Headers:yi,history:pi,History:yi,HTMLAllCollection:yi,HTMLAnchorElement:yi,HTMLAreaElement:yi,HTMLAudioElement:yi,HTMLBaseElement:yi,HTMLBodyElement:yi,HTMLBRElement:yi,HTMLButtonElement:yi,HTMLCanvasElement:yi,HTMLCollection:yi,HTMLContentElement:yi,HTMLDataElement:yi,HTMLDataListElement:yi,HTMLDetailsElement:yi,HTMLDialogElement:yi,HTMLDirectoryElement:yi,HTMLDivElement:yi,HTMLDListElement:yi,HTMLDocument:yi,HTMLElement:yi,HTMLEmbedElement:yi,HTMLFieldSetElement:yi,HTMLFontElement:yi,HTMLFormControlsCollection:yi,HTMLFormElement:yi,HTMLFrameElement:yi,HTMLFrameSetElement:yi,HTMLHeadElement:yi,HTMLHeadingElement:yi,HTMLHRElement:yi,HTMLHtmlElement:yi,HTMLIFrameElement:yi,HTMLImageElement:yi,HTMLInputElement:yi,HTMLLabelElement:yi,HTMLLegendElement:yi,HTMLLIElement:yi,HTMLLinkElement:yi,HTMLMapElement:yi,HTMLMarqueeElement:yi,HTMLMediaElement:yi,HTMLMenuElement:yi,HTMLMetaElement:yi,HTMLMeterElement:yi,HTMLModElement:yi,HTMLObjectElement:yi,HTMLOListElement:yi,HTMLOptGroupElement:yi,HTMLOptionElement:yi,HTMLOptionsCollection:yi,HTMLOutputElement:yi,HTMLParagraphElement:yi,HTMLParamElement:yi,HTMLPictureElement:yi,HTMLPreElement:yi,HTMLProgressElement:yi,HTMLQuoteElement:yi,HTMLScriptElement:yi,HTMLSelectElement:yi,HTMLShadowElement:yi,HTMLSlotElement:yi,HTMLSourceElement:yi,HTMLSpanElement:yi,HTMLStyleElement:yi,HTMLTableCaptionElement:yi,HTMLTableCellElement:yi,HTMLTableColElement:yi,HTMLTableElement:yi,HTMLTableRowElement:yi,HTMLTableSectionElement:yi,HTMLTemplateElement:yi,HTMLTextAreaElement:yi,HTMLTimeElement:yi,HTMLTitleElement:yi,HTMLTrackElement:yi,HTMLUListElement:yi,HTMLUnknownElement:yi,HTMLVideoElement:yi,IDBCursor:yi,IDBCursorWithValue:yi,IDBDatabase:yi,IDBFactory:yi,IDBIndex:yi,IDBKeyRange:yi,IDBObjectStore:yi,IDBOpenDBRequest:yi,IDBRequest:yi,IDBTransaction:yi,IDBVersionChangeEvent:yi,IdleDeadline:yi,IIRFilterNode:yi,Image:yi,ImageBitmap:yi,ImageBitmapRenderingContext:yi,ImageCapture:yi,ImageData:yi,indexedDB:pi,innerHeight:pi,innerWidth:pi,InputEvent:yi,IntersectionObserver:yi,IntersectionObserverEntry:yi,isSecureContext:pi,KeyboardEvent:yi,KeyframeEffect:yi,length:pi,localStorage:pi,location:pi,Location:yi,locationbar:pi,matchMedia:pi,MediaDeviceInfo:yi,MediaDevices:yi,MediaElementAudioSourceNode:yi,MediaEncryptedEvent:yi,MediaError:yi,MediaKeyMessageEvent:yi,MediaKeySession:yi,MediaKeyStatusMap:yi,MediaKeySystemAccess:yi,MediaList:yi,MediaQueryList:yi,MediaQueryListEvent:yi,MediaRecorder:yi,MediaSettingsRange:yi,MediaSource:yi,MediaStream:yi,MediaStreamAudioDestinationNode:yi,MediaStreamAudioSourceNode:yi,MediaStreamEvent:yi,MediaStreamTrack:yi,MediaStreamTrackEvent:yi,menubar:pi,MessageChannel:yi,MessageEvent:yi,MessagePort:yi,MIDIAccess:yi,MIDIConnectionEvent:yi,MIDIInput:yi,MIDIInputMap:yi,MIDIMessageEvent:yi,MIDIOutput:yi,MIDIOutputMap:yi,MIDIPort:yi,MimeType:yi,MimeTypeArray:yi,MouseEvent:yi,moveBy:pi,moveTo:pi,MutationEvent:yi,MutationObserver:yi,MutationRecord:yi,name:pi,NamedNodeMap:yi,NavigationPreloadManager:yi,navigator:pi,Navigator:yi,NetworkInformation:yi,Node:yi,NodeFilter:pi,NodeIterator:yi,NodeList:yi,Notification:yi,OfflineAudioCompletionEvent:yi,OfflineAudioContext:yi,offscreenBuffering:pi,OffscreenCanvas:yi,open:pi,openDatabase:pi,Option:yi,origin:pi,OscillatorNode:yi,outerHeight:pi,outerWidth:pi,PageTransitionEvent:yi,pageXOffset:pi,pageYOffset:pi,PannerNode:yi,parent:pi,Path2D:yi,PaymentAddress:yi,PaymentRequest:yi,PaymentRequestUpdateEvent:yi,PaymentResponse:yi,performance:pi,Performance:yi,PerformanceEntry:yi,PerformanceLongTaskTiming:yi,PerformanceMark:yi,PerformanceMeasure:yi,PerformanceNavigation:yi,PerformanceNavigationTiming:yi,PerformanceObserver:yi,PerformanceObserverEntryList:yi,PerformancePaintTiming:yi,PerformanceResourceTiming:yi,PerformanceTiming:yi,PeriodicWave:yi,Permissions:yi,PermissionStatus:yi,personalbar:pi,PhotoCapabilities:yi,Plugin:yi,PluginArray:yi,PointerEvent:yi,PopStateEvent:yi,postMessage:pi,Presentation:yi,PresentationAvailability:yi,PresentationConnection:yi,PresentationConnectionAvailableEvent:yi,PresentationConnectionCloseEvent:yi,PresentationConnectionList:yi,PresentationReceiver:yi,PresentationRequest:yi,print:pi,ProcessingInstruction:yi,ProgressEvent:yi,PromiseRejectionEvent:yi,prompt:pi,PushManager:yi,PushSubscription:yi,PushSubscriptionOptions:yi,queueMicrotask:pi,RadioNodeList:yi,Range:yi,ReadableStream:yi,RemotePlayback:yi,removeEventListener:pi,Request:yi,requestAnimationFrame:pi,requestIdleCallback:pi,resizeBy:pi,ResizeObserver:yi,ResizeObserverEntry:yi,resizeTo:pi,Response:yi,RTCCertificate:yi,RTCDataChannel:yi,RTCDataChannelEvent:yi,RTCDtlsTransport:yi,RTCIceCandidate:yi,RTCIceTransport:yi,RTCPeerConnection:yi,RTCPeerConnectionIceEvent:yi,RTCRtpReceiver:yi,RTCRtpSender:yi,RTCSctpTransport:yi,RTCSessionDescription:yi,RTCStatsReport:yi,RTCTrackEvent:yi,screen:pi,Screen:yi,screenLeft:pi,ScreenOrientation:yi,screenTop:pi,screenX:pi,screenY:pi,ScriptProcessorNode:yi,scroll:pi,scrollbars:pi,scrollBy:pi,scrollTo:pi,scrollX:pi,scrollY:pi,SecurityPolicyViolationEvent:yi,Selection:yi,ServiceWorker:yi,ServiceWorkerContainer:yi,ServiceWorkerRegistration:yi,sessionStorage:pi,ShadowRoot:yi,SharedWorker:yi,SourceBuffer:yi,SourceBufferList:yi,speechSynthesis:pi,SpeechSynthesisEvent:yi,SpeechSynthesisUtterance:yi,StaticRange:yi,status:pi,statusbar:pi,StereoPannerNode:yi,stop:pi,Storage:yi,StorageEvent:yi,StorageManager:yi,styleMedia:pi,StyleSheet:yi,StyleSheetList:yi,SubtleCrypto:yi,SVGAElement:yi,SVGAngle:yi,SVGAnimatedAngle:yi,SVGAnimatedBoolean:yi,SVGAnimatedEnumeration:yi,SVGAnimatedInteger:yi,SVGAnimatedLength:yi,SVGAnimatedLengthList:yi,SVGAnimatedNumber:yi,SVGAnimatedNumberList:yi,SVGAnimatedPreserveAspectRatio:yi,SVGAnimatedRect:yi,SVGAnimatedString:yi,SVGAnimatedTransformList:yi,SVGAnimateElement:yi,SVGAnimateMotionElement:yi,SVGAnimateTransformElement:yi,SVGAnimationElement:yi,SVGCircleElement:yi,SVGClipPathElement:yi,SVGComponentTransferFunctionElement:yi,SVGDefsElement:yi,SVGDescElement:yi,SVGDiscardElement:yi,SVGElement:yi,SVGEllipseElement:yi,SVGFEBlendElement:yi,SVGFEColorMatrixElement:yi,SVGFEComponentTransferElement:yi,SVGFECompositeElement:yi,SVGFEConvolveMatrixElement:yi,SVGFEDiffuseLightingElement:yi,SVGFEDisplacementMapElement:yi,SVGFEDistantLightElement:yi,SVGFEDropShadowElement:yi,SVGFEFloodElement:yi,SVGFEFuncAElement:yi,SVGFEFuncBElement:yi,SVGFEFuncGElement:yi,SVGFEFuncRElement:yi,SVGFEGaussianBlurElement:yi,SVGFEImageElement:yi,SVGFEMergeElement:yi,SVGFEMergeNodeElement:yi,SVGFEMorphologyElement:yi,SVGFEOffsetElement:yi,SVGFEPointLightElement:yi,SVGFESpecularLightingElement:yi,SVGFESpotLightElement:yi,SVGFETileElement:yi,SVGFETurbulenceElement:yi,SVGFilterElement:yi,SVGForeignObjectElement:yi,SVGGElement:yi,SVGGeometryElement:yi,SVGGradientElement:yi,SVGGraphicsElement:yi,SVGImageElement:yi,SVGLength:yi,SVGLengthList:yi,SVGLinearGradientElement:yi,SVGLineElement:yi,SVGMarkerElement:yi,SVGMaskElement:yi,SVGMatrix:yi,SVGMetadataElement:yi,SVGMPathElement:yi,SVGNumber:yi,SVGNumberList:yi,SVGPathElement:yi,SVGPatternElement:yi,SVGPoint:yi,SVGPointList:yi,SVGPolygonElement:yi,SVGPolylineElement:yi,SVGPreserveAspectRatio:yi,SVGRadialGradientElement:yi,SVGRect:yi,SVGRectElement:yi,SVGScriptElement:yi,SVGSetElement:yi,SVGStopElement:yi,SVGStringList:yi,SVGStyleElement:yi,SVGSVGElement:yi,SVGSwitchElement:yi,SVGSymbolElement:yi,SVGTextContentElement:yi,SVGTextElement:yi,SVGTextPathElement:yi,SVGTextPositioningElement:yi,SVGTitleElement:yi,SVGTransform:yi,SVGTransformList:yi,SVGTSpanElement:yi,SVGUnitTypes:yi,SVGUseElement:yi,SVGViewElement:yi,TaskAttributionTiming:yi,Text:yi,TextEvent:yi,TextMetrics:yi,TextTrack:yi,TextTrackCue:yi,TextTrackCueList:yi,TextTrackList:yi,TimeRanges:yi,toolbar:pi,top:pi,Touch:yi,TouchEvent:yi,TouchList:yi,TrackEvent:yi,TransitionEvent:yi,TreeWalker:yi,UIEvent:yi,ValidityState:yi,visualViewport:pi,VisualViewport:yi,VTTCue:yi,WaveShaperNode:yi,WebAssembly:pi,WebGL2RenderingContext:yi,WebGLActiveInfo:yi,WebGLBuffer:yi,WebGLContextEvent:yi,WebGLFramebuffer:yi,WebGLProgram:yi,WebGLQuery:yi,WebGLRenderbuffer:yi,WebGLRenderingContext:yi,WebGLSampler:yi,WebGLShader:yi,WebGLShaderPrecisionFormat:yi,WebGLSync:yi,WebGLTexture:yi,WebGLTransformFeedback:yi,WebGLUniformLocation:yi,WebGLVertexArrayObject:yi,WebSocket:yi,WheelEvent:yi,Window:yi,Worker:yi,WritableStream:yi,XMLDocument:yi,XMLHttpRequest:yi,XMLHttpRequestEventTarget:yi,XMLHttpRequestUpload:yi,XMLSerializer:yi,XPathEvaluator:yi,XPathExpression:yi,XPathResult:yi,XSLTProcessor:yi};for(const e of["window","global","self","globalThis"])$i[e]=$i;function vi(e){let t=$i;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return"Symbol"===e[0]&&2===e.length?Si:null}return t[ii]}class Pi extends Ln{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(vi([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=vi([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=vi([this.name,...e]);return s?s.getLiteralValue():We}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!vi([this.name]):!vi([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=vi([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}const Ii=(e,t)=>{const{length:n}=e,{length:s}=t;return 0===n?t:0===s?e:n+s>6?[...e,...t.slice(0,5-e.length),"UnknownKey"]:[...e,...t]};class wi extends Ln{constructor(e,t,n,s,i,r){super(e),this.init=n,this.initPath=s,this.kind=r,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.includedPathTracker=new Be,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=i.deoptimizationTracker,this.module=i.module}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers)for(const e of this.additionalInitializers)e.deoptimizePath(ke)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned||t.length+this.initPath.length>6?Ze(e):n.withTrackedEntityAtPath(t,this.init,()=>{this.init.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],n)},void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){this.markReassigned();const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=de;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath([...this.initPath,ge])}else this.init.deoptimizePath(Ii(this.initPath,e))}getLiteralValueAtPath(e,t,n){return this.isReassigned||e.length+this.initPath.length>6?We:t.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath([...this.initPath,...e],t,n)),We)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned||e.length+this.initPath.length>6?Ye:n.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],t,n,s)),Ye)}hasEffectsOnInteractionAtPath(e,t,n){if(e.length+this.initPath.length>6)return!0;switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}}includePath(e,t){if(!this.includedPathTracker.includePathAndGetIfIncluded(e)){this.module.scope.context.requestTreeshakingPass(),this.included||this.module.scope.context.newlyIncludedVariableInits.add(this.init),super.includePath(e,t);for(const e of this.declarations){e.included||e.include(t,!1);let n=e.parent;for(;!n.included&&(n.includeNode(t),n.type!==ct);)n=n.parent}e.length>0&&(this.init.includePath(Ii(this.initPath,e),t),this.additionalInitializers?.forEach(e=>e.includePath(ke,t)))}}includeCallArguments(e,t){this.isReassigned||t.includedCallArguments.has(this.init)||this.initPath.length>0?Qe(e,t):(t.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),t.includedCallArguments.delete(this.init))}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=Je,this.markReassigned()),this.additionalInitializers}}const Ni=new Set(["class","const","let","var","using","await using"]);class ki extends os{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return Ge(this.flags,4)?Ge(this.flags,8):null}set isTDZAccess(e){this.flags=He(this.flags,4,!0),this.flags=He(this.flags,8,e)}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 Pi&&!this.isPureFunction(Ne)&&this.variable.hasEffectsOnInteractionAtPath(Ne,tt,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(e,t){this.included||this.includeNode(e),t&&this.variable?.includePath(ke,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,Ne,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof wi&&this.variable.kind&&Ni.has(this.variable.kind)&&this.variable.module.hasTreeShakingPassStarted))return this.isTDZAccess=!1;let t;return this.variable.declarations&&1===this.variable.declarations.length&&(t=this.variable.declarations[0])&&this.start<t.start&&Ci(this)===Ci(t)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof wi&&(this.variable.module.isExecuted||Jn(this.variable.module),this.variable.consolidateInitializers(),this.scope.context.requestTreeshakingPass()),this.isVariableReference&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}disallowImportReassignment(){return this.scope.context.error(dn(this.name,this.scope.context.module.id),this.start)}getVariableRespectingTDZ(){return this.isPossibleTDZ()?Je:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[_n])return!0;t=t[n]}return t?.[_n]}}function Ci(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}class Ri extends Xe{constructor(e,t){super(),this.object=e,this.path=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[...this.path,...t],n)}deoptimizePath(e){this.object.deoptimizePath([...this.path,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([...this.path,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([...this.path,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([...this.path,...e],t,n)}}class Di extends ki{constructor(){super(...arguments),this.variable=null}get isDestructuringDeoptimized(){return Ge(this.flags,16777216)}set isDestructuringDeoptimized(e){this.flags=He(this.flags,16777216,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&Fe(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0)}declare(e,t,n){let s;const{treeshake:i}=this.scope.context.options;return"parameter"===e?s=this.scope.addParameterDeclaration(this,t):(s=this.scope.addDeclaration(this,this.scope.context,n,t,e),"var"===e&&i&&i.correctVarValueBeforeDeclaration&&s.markInitializersForDeoptimization()),[this.variable=s]}deoptimizeAssignment(e,t){this.deoptimizePath(Ne),t.deoptimizePath([...e,ge])}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,tt,e)}includeDestructuredIfNecessary(e,t,n){t.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,n.deoptimizeArgumentsOnInteractionAtPath({args:[new Ri(n,t.slice(0,-1))],type:0},t,_e));const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;let i=this.included;return(i||=t.length>0&&!e.brokenFlow&&s&&("always"===s||n.hasEffectsOnInteractionAtPath(t,tt,Ue())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,Ne,e),n.includePath(t,e)),!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=ce){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&&s===rt&&i&&e.appendRight(this.start,"0, ")}}}function Oi(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}function Mi(e,t,n){let s=e,i=1;for(;t.has(s)||Vn.has(s)||n?.has(s);)s=`${e}$${Oi(i++)}`;return t.add(s),s}class _i{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){if("var"===i&&"var"===o.kind)return o.addDeclaration(e,n),o;t.error(In(r),e.start)}const a=new wi(e.name,e,n,s,t,i);return this.variables.set(r,a),a}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 Li extends _i{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 Li&&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 Li&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Li&&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,Mi(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findGlobal(e){const t=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,t),t}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}}function Ti(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}class Bi extends os{constructor(){super(...arguments),this.accessedValue=null}get computed(){return Ge(this.flags,1024)}set computed(e){this.flags=He(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},Ne,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(Ne,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=Ye,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Ne,st,_e,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}Bi.prototype.includeNode=ls,Bi.prototype.applyDeoptimizations=cs;class zi extends Bi{hasEffects(e){return super.hasEffects(e)||Ti(this.decorators,e)}}class Vi extends Li{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o)return"var"===o.kind||"var"===i&&"parameter"===o.kind?(o.addDeclaration(e,n),o):t.error(In(r),e.start);const a=this.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class Fi extends os{createScope(e){this.scope=new Vi(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=Z(e.original.slice(this.start,this.end),"{")+1;se(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}function ji(e){return"StaticBlock"===e.type}Fi.prototype.includeNode=ls,Fi.prototype.applyDeoptimizations=cs;class Ui extends os{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Li(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)||Ti(this.decorators,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.included||this.includeNode(e),this.superClass?.include(e,t),this.body.include(e,t);for(const n of this.decorators)n.include(e,t);this.id&&(this.id.markDeclarationReached(),this.id.include(e,t))}initialise(){super.initialise(),this.id?.declare("class",Ne,this);for(const e of this.body.body)if(e instanceof zi&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)ji(e)||e.static||e instanceof zi&&"constructor"===e.kind||e.deoptimizePath(ke);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(ji(n))continue;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(Ne,_e,this);if("symbol"==typeof e){s.push({key:Pe(e)?e:ge,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof Di?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new zs(t,this.superClass?new Ri(this.superClass,["prototype"]):js)}),this.objectEntity=new zs(e,this.superClass||js)}}Ui.prototype.includeNode=as;class Gi extends Ui{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){return null!==e.id&&(this.id=new Di(this,this.scope.parent).parseNode(e.id)),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}${oe([o],t)};`);const l=o.getName(r);if(l!==a)return this.decorators.map(n=>n.render(e,t)),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 Hi extends wi{constructor(e){super("arguments",null,Je,Ne,e,"other")}addArgumentToBeDeoptimized(e){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=Wi}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}includePath(e,t){super.includePath(e,t);for(const e of this.deoptimizedArguments)e.deoptimizePath(ke);this.deoptimizedArguments.length=0}}function Wi(e){this.included?e.deoptimizePath(ke):this.deoptimizedArguments?.push(e)}const qi=de,Ki=new Set([ge]),Xi=new Me,Ji=new Set([Je]);class Yi extends wi{constructor(e,t,n,s){super(e,t,Je,n,s,"parameter"),this.includedPathTracker=new Ve,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new Me,this.deoptimizedFields=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=We}addArgumentForDeoptimization(e){if(this.updateKnownValue(e),e===Je){if(!this.argumentsToBeDeoptimized.has(Je)){this.argumentsToBeDeoptimized.add(Je);for(const{interaction:e}of this.deoptimizationInteractions)Ze(e);this.deoptimizationInteractions=qi}}else if(this.deoptimizedFields.has(ge))e.deoptimizePath([...this.initPath,ge]);else if(!this.argumentsToBeDeoptimized.has(e)){this.argumentsToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([...this.initPath,t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,[...this.initPath,...n],_e)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsDependingOnKnownValue)e.deoptimizeCache();this.expressionsDependingOnKnownValue=de}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(this.initPath,_e,this));if(this.knownValue===e||this.knownValue instanceof Di&&e instanceof Di&&this.knownValue.variable===e.variable)return;const{knownValueLiteral:t}=this;"symbol"!=typeof t&&e.getLiteralValueAtPath(this.initPath,_e,this)===t||this.markReassigned()}getKnownValue(){return this.knownValue||Je}getLiteralValueAtPath(e,t,n){if(this.isReassigned||e.length+this.initPath.length>6)return We;const s=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(n),t.withTrackedEntityAtPath(e,s,()=>s.getLiteralValueAtPath([...this.initPath,...e],t,n),We)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;return this.isReassigned||1===s||e.length+this.initPath.length>6?super.hasEffectsOnInteractionAtPath(e,t,n):!(2===s?(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this):n.accessed.trackEntityAtPathAndGetIfTracked(e,this))&&this.getKnownValue().hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.argumentsToBeDeoptimized.has(Je)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(ge)||2===e.type&&this.deoptimizedFields.has(t[0]))||this.initPath.length+t.length>6)Ze(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.argumentsToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],_e);this.argumentsToBeDeoptimized.has(Je)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(ge))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.argumentsToBeDeoptimized)e.deoptimizePath([...this.initPath,t]);t===ge&&(this.deoptimizationInteractions=qi,this.deoptimizations=Xi,this.deoptimizedFields=Ki,this.argumentsToBeDeoptimized=Ji)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(ke):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),Ye}includeArgumentPaths(e,t){this.includedPathTracker.includeAllPaths(e,t,this.initPath)}}class Zi extends Yi{constructor(e){super("this",null,Ne,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||Je).hasEffectsOnInteractionAtPath(e,t,n)}}class Qi extends Li{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const a=o.kind;if("parameter"===a&&"CatchClause"===o.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,ys,s,i);return o.renderLikeHoisted(n),this.addHoistedVariable(r,n),n}return"var"===a?(o.addDeclaration(e,n),o):t.error(In(r),e.start)}const a=this.parent.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class er extends Li{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const s=o.kind;if(!("var"!==i&&"function"!==i||"var"!==s&&"function"!==s&&"parameter"!==s))return o.addDeclaration(e,n),o;t.error(In(r),e.start)}const a=new wi(e.name,e,n,s,t,i);return this.variables.set(r,a),a}}class tr extends Li{constructor(e,t){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=t?new Qi(this):new er(this)}addParameterDeclaration(e,t){const{name:n,start:s}=e;if(this.variables.get(n))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(n),s);const i=new Yi(n,e,t,this.context);return this.variables.set(n,i),this.bodyScope.addHoistedVariable(n,i),i}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments({args:e},t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];let r=e.length-1;for(let n=1;n<e.length;n++){const i=e[n];i instanceof ni&&!s&&(s=!0,r=n-1),s&&(i.includePath(ke,t),i.include(t,!1))}for(let o=r;o>=1;o--){const r=this.parameters[o-1]||i,a=e[o];if(r)if(n=!1,0===r.length)s=!0;else for(const e of r)e.calledFromTryStatement&&(n=!0),e.included&&(s=!0,n?a.include(t,!0):(e.includeArgumentPaths(a,t),a.include(t,!1)));(s||a.shouldBeIncluded(t))&&(s=!0,a.include(t,n))}}}class nr extends tr{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}deoptimizeArgumentsOnCall({args:e}){const{parameters:t}=this;let n=0;for(;n<e.length-1;n++){const s=e[n+1];if(s instanceof ni){for(;n<t.length;n++){e[n+1]?.deoptimizePath(ke);for(const e of t[n])e.markReassigned()}break}if(this.hasRest&&n>=t.length-1)s.deoptimizePath(ke);else{const e=t[n];if(e)for(const t of e)t.addArgumentForDeoptimization(s);this.addArgumentToBeDeoptimized(s)}}const s=this.hasRest?t.length-1:t.length;for(;n<s;n++)for(const e of t[n])e.addArgumentForDeoptimization(ys)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}deoptimizeAllParameters(){for(const e of this.parameters)for(const t of e)t.deoptimizePath(ke),t.markReassigned()}reassignAllParameters(){for(const e of this.parameters)for(const t of e)t.markReassigned()}addArgumentToBeDeoptimized(e){}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=Je;for(const e of this.returnExpressions)e.deoptimizePath(ke)}}}class sr extends nr{constructor(e,t){super(e,!1),this.functionNode=t;const{context:n}=e;this.variables.set("arguments",this.argumentsVariable=new Hi(n)),this.variables.set("this",this.thisVariable=new Zi(n))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included){const{args:n}=e;for(let e=1;e<n.length;e++){const s=n[e];s&&(s.includePath(ke,t),s.include(t,!1))}}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class ir extends os{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===ct&&this.scope.context.log(yt,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${$t(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!==ct:super.shouldBeIncluded(e)}}ir.prototype.includeNode=ls,ir.prototype.applyDeoptimizations=cs;class rr extends os{get deoptimizeBody(){return Ge(this.flags,32768)}set deoptimizeBody(e){this.flags=He(this.flags,32768,e)}get directlyIncluded(){return Ge(this.flags,16384)}set directlyIncluded(e){this.flags=He(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(Je)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new Vi(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(){super.initialise(),this.scope.context.magicString.addSourcemapLocation(this.end-1);const e=this.body[0];this.deoptimizeBody=e instanceof ir&&"use asm"===e.directive}render(e,t){this.body.length>0?se(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}rr.prototype.includeNode=ls,rr.prototype.applyDeoptimizations=cs;class or extends os{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t,n){return this.declarationInit=n,this.argument.declare(e,ar(t),n)}deoptimizeAssignment(e,t){this.argument.deoptimizeAssignment(ar(e),t)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Ne)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Ne,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.argument.hasEffectsWhenDestructuring(e,ar(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.argument.includeDestructuredIfNecessary(e,ar(t),n);return!this.included&&s&&this.includeNode(e),this.included}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([ge,ge]),this.scope.context.requestTreeshakingPass())}}or.prototype.includeNode=as;const ar=e=>e.at(-1)===ge?e:[...e,ge];class lr extends os{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1,this.includeCallArguments=this.scope.includeCallArguments.bind(this.scope)}get async(){return Ge(this.flags,256)}set async(e){this.flags=He(this.flags,256,e)}get deoptimizedReturn(){return Ge(this.flags,512)}set deoptimizedReturn(e){this.flags=He(this.flags,512,e)}get generator(){return Ge(this.flags,4194304)}set generator(e){this.flags=He(this.flags,4194304,e)}get hasCachedEffects(){return Ge(this.flags,67108864)}set hasCachedEffects(e){this.flags=He(this.flags,67108864,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){2===e.type&&0===t.length?this.scope.deoptimizeArgumentsOnCall(e):this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===ge&&(this.scope.getReturnExpression().deoptimizePath(ke),this.scope.deoptimizeAllParameters())}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(ke),this.scope.context.requestTreeshakingPass()),Ye):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.hasCachedEffects)return!0;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],st,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],tt,n)))return this.hasCachedEffects=!0,!0}const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;for(let e=0;e<this.params.length;e++){const i=this.params[e];if(i.hasEffects(n)||s&&i.hasEffectsWhenDestructuring(n,Ne,t.args[e+1]||ys))return this.hasCachedEffects=!0,!0}return!1}onlyFunctionCallUsed(){let e=null;return"VariableDeclarator"===this.parent.type&&(e=this.parent.id.variable??null),this.parent.type===ot&&(e=this.parent.variable),e?.getOnlyFunctionCallUsed()??!1}include(e,t){this.included||this.includeNode(e),this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.scope.reassignAllParameters());const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}initialise(){super.initialise(),this.body instanceof rr?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationNoSideEffects=this.annotations.some(e=>"noSideEffects"===e.type))}parseNode(e){const{body:t,params:n}=e,{scope:s}=this,{bodyScope:i,context:r}=s,o=this.params=n.map(e=>new(r.getNodeConstructor(e.type))(this,s).parseNode(e));return s.addParameterVariables(o.map(e=>e.declare("parameter",Ne,Je)),o[o.length-1]instanceof or),this.body=new(r.getNodeConstructor(t.type))(this,i).parseNode(t),super.parseNode(e)}}lr.prototype.preventChildBlockScope=!0,lr.prototype.includeNode=ls,lr.prototype.applyDeoptimizations=cs;class cr extends lr{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new sr(e,this),this.constructedEntity=new zs(new Map,js),this.scope.thisVariable.addArgumentForDeoptimization(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addArgumentForDeoptimization(e.args[0])}hasEffects(e){return!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(0===e.length&&2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:Je);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 this.hasCachedEffects=!0,!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(e,t);const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof Di&&!n||s.include(e,t)}includeNode(e){this.included=!0;const t=this.scope.argumentsVariable.included;for(const n of this.params)n instanceof Di&&!t||n.includePath(ke,e)}initialise(){super.initialise(),this.id?.declare("function",Ne,this)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new zs([{key:"prototype",kind:"init",property:new zs([],js)}],js)}}class ur extends cr{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}onlyFunctionCallUsed(){return this.id?.variable.getOnlyFunctionCallUsed()??super.onlyFunctionCallUsed()}parseNode(e){return null!==e.id&&(this.id=new Di(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class dr extends os{bind(){super.bind();const e=this.declarationName||this.scope.context.getModuleName();this.variable.name=this.scope.variables.get(e)?`${e}_default`:e}include(e,t){this.included=!0,this.declaration.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable,ke,e)}includePath(e,t){this.included=!0,this.declaration.includePath(e,t)}initialise(){super.initialise();const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(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 ee(e,Z(e,"default",t)+7)}(e.original,this.start);let o=!1;if(this.declaration instanceof ur)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=Z(e,"function",t)+8;e=e.slice(n,Z(e,"(",n));const s=Z(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof Gi)this.renderNamedDeclaration(e,r,null===this.declaration.id?Z(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void J(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:at}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));o=this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t),o&&e.appendLeft(this.end,";")}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 Gi&&i.has(this.variable)&&e.appendLeft(this.end,` ${oe([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);return 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?"":";")),!1):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),!o)}}dr.prototype.needsBoundaries=!0,dr.prototype.includeNode=ls,dr.prototype.applyDeoptimizations=cs;const hr=/[\n\r'\\\u2028\u2029]/,pr=/([\n\r'\u2028\u2029])/g,fr=/\\/g;function mr(e){return hr.test(e)?e.replace(fr,"\\\\").replace(pr,"\\$1"):e}const gr="_interopDefault",yr="_interopDefaultCompat",br="_interopNamespace",Er="_interopNamespaceCompat",xr="_interopNamespaceDefault",Ar="_interopNamespaceDefaultOnly",Sr="_mergeNamespaces",$r="_documentCurrentScript",vr={auto:gr,compat:yr,default:null,defaultOnly:null,esModule:null},Pr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),Ir={auto:br,compat:Er,default:xr,defaultOnly:Ar,esModule:null},wr=(e,t)=>"esModule"!==e&&Pr(e,t),Nr=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of jr)t.has(e)&&a.add(e);return jr.map(e=>a.has(e)?kr[e](n,s,i,r,o,a):"").join("")},kr={[$r]:(e,{_:t,n:n})=>`var ${$r}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[yr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:yr});return`${o}${Dr(t)}${s}?${s}${n?Cr(t):Rr(t)}${a}${r}${r}`},[gr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:gr});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?Cr(t):Rr(t)}${a}${r}${r}`},[Er](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(xr)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Er});return`${e}${Dr(t)}${o}?${o}e${o}:${o}${xr}(e)${n}${l}${l}`}return`function ${Er}(e)${o}{${l}${e}if${o}(${Dr(t)})${o}return e;${l}`+Or(e,e,t,n,s,i)+`}${l}${l}`},[Ar](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,u]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ar});return`${c}${Vr(s,Fr(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[xr](e,t,n,s,i){const{_:r,n:o}=t;return`function ${xr}(e)${r}{${o}`+Or(e,e,t,n,s,i)+`}${o}${o}`},[br](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(xr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:br});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${xr}(e)${t}${l}${l}`}return`function ${br}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+Or(e,e,t,n,s,i)+`}${l}${l}`},[Sr](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${Sr}(n, m)${r}{${a}${e}${_r(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?Tr:Br:zr)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Vr(s,Fr(i,"n",t))};${a}}${a}${a}`}},Cr=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Rr=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Dr=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,Or=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}=n,h=`{${u}`+(s?Lr:zr)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Ur(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${Mr(h,!s,n)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${Vr(i,"n")}${d}${u}`},Mr=(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}`,_r=(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}}`},Lr=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+Tr(e,t+e,n)+`${t}}${i}`},Tr=(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}`},Br=(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}`},zr=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,Vr=(e,t)=>e?`Object.freeze(${t})`:t,Fr=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${Ur(s)})`:t,jr=Object.keys(kr);function Ur(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class Gr extends os{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)?We:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Ye:Ds(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||Rs(this.members,e[0],t,n))}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return ks;switch(typeof e){case"boolean":return ws;case"number":return Ns;case"string":return Cs}return Object.create(null)}(this.value)}parseNode(e){return 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 Hr(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(Ne,_e,i);if(n===rs||e.optional&&null==n)return rs}else if(e.optional&&null==t.getLiteralValueAtPath(Ne,_e,i))return rs;return e.getLiteralValueAtPath(n,s,i)}function Wr(e){return e.computed?function(e){if(e instanceof Gr)return String(e.value);return null}(e.property):e.property.name}function qr(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof Di)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof Kr){const s=qr(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}Gr.prototype.includeNode=as;class Kr extends os{constructor(){super(...arguments),this.promiseHandler=null,this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return Ge(this.flags,1024)}set computed(e){this.flags=He(this.flags,1024,e)}get optional(){return Ge(this.flags,128)}set optional(e){this.flags=He(this.flags,128,e)}get assignmentDeoptimized(){return Ge(this.flags,16)}set assignmentDeoptimized(e){this.flags=He(this.flags,16,e)}get bound(){return Ge(this.flags,32)}set bound(e){this.flags=He(this.flags,32,e)}get isUndefined(){return Ge(this.flags,64)}set isUndefined(e){this.flags=He(this.flags,64,e)}bind(){this.bound=!0;const e=qr(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=Xr(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.promiseHandler?this.promiseHandler.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.isUndefined||(t.length<6?this.object.deoptimizeArgumentsOnInteractionAtPath(e,this.propertyKey===ge?ke:[this.propertyKey,...t],n):Ze(e))}deoptimizeAssignment(e,t){this.deoptimizePath(Ne),t.deoptimizePath([...e,ge])}deoptimizeCache(){if(this.propertyKey===this.dynamicPropertyKey)return;const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=de,this.dynamicPropertyKey=this.propertyKey,t.deoptimizePath(ke),this.included&&t.includePath(ke,je());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){const{propertyKey:t}=this;this.object.deoptimizePath([t===ge?ye:t,...e.length<6?e:[...e.slice(0,6),ge]])}}getLiteralValueAtPath(e,t,n){if(this.variable)return this.variable.getLiteralValueAtPath(e,t,n);if(this.isUndefined)return;const s=this.getDynamicPropertyKey();return s!==ge&&e.length<6?(s!==this.propertyKey&&this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([s,...e],t,n)):We}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:Hr(this,this.object,e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(this.variable)return this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s);if(this.isUndefined)return[ys,!1];const i=this.getDynamicPropertyKey();return i!==ge&&e.length<6?(i!==this.propertyKey&&this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([i,...e],t,n,s)):Ye}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsChainElement(e){if(this.variable||this.isUndefined)return this.hasEffects(e);const t="hasEffectsAsChainElement"in this.object?this.object.hasEffectsAsChainElement(e):this.object.hasEffects(e);return t===rs?rs:this.optional&&null==this.object.getLiteralValueAtPath(Ne,_e,this)?t||rs:(this.deoptimized||this.applyDeoptimizations(),t||this.property.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(Ne,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||(!(e.length<6)||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey(),...e],t,n))}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,tt,e)}include(e,t){this.included||this.includeNode(e),this.object.include(e,t),this.property.include(e,t),t&&this.variable?.includePath(ke,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable?this.scope.context.includeVariableInModule(this.variable,Ne,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includeNodeAsAssignmentTarget(e){this.included=!0,this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.variable?this.scope.context.includeVariableInModule(this.variable,Ne,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includePath(e,t){this.included||this.includeNode(t),this.variable?this.variable?.includePath(e,t):this.isUndefined||this.object.includePath([this.propertyKey,...e.length<6?e:[...e.slice(0,6),ge]],t)}includeAsAssignmentTarget(e,t,n){this.included||this.includeNodeAsAssignmentTarget(e),n&&!this.deoptimized&&this.applyDeoptimizations(),this.object.include(e,t),this.property.include(e,t)}includeCallArguments(e,t){this.promiseHandler?this.promiseHandler.includeCallArguments(e,t):this.variable?this.variable.includeCallArguments(e,t):Qe(e,t)}includeDestructuredIfNecessary(){this.scope.context.error({message:"includeDestructuredIfNecessary is currently not supported for MemberExpressions"},this.start)}initialise(){super.initialise(),this.dynamicPropertyKey=Wr(this),this.propertyKey=null===this.dynamicPropertyKey?ge:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=ce){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;this.bound&&e&&!(this.variable||this.isUndefined||this.promiseHandler)&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[this.propertyKey],_e),this.scope.context.requestTreeshakingPass()),this.variable&&(this.variable.addUsedPlace(this),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.propertyKey],_e),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){if(this.object instanceof Di){this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable,ke,je()),this.scope.context.log(yt,dn(this.object.name,this.scope.context.module.id),this.start))}}getDynamicPropertyKey(){if(null===this.dynamicPropertyKey){this.dynamicPropertyKey=this.propertyKey;const e=this.property.getLiteralValueAtPath(Ne,_e,this);return this.dynamicPropertyKey="symbol"==typeof e?ve.has(e)?e:ge:String(e)}return this.dynamicPropertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey()],this.accessInteraction,e))}}function Xr(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof Bn)return null;const s=t[0].key,[i,r]=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(yt,An(s,n.module.id,i,!!r?.missingButExportExists),t[0].pos),"undefined"}return null}return Xr(i,t.slice(1),n)}const Jr="ROLLUP_FILE_URL_",Yr="ROLLUP_FILE_URL_OBJ_",Zr="import";class Qr extends os{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;if(t===Zr){if(n?.startsWith(Yr))return e.getFileName(n.slice(20));if(n?.startsWith(Jr))return e.getFileName(n.slice(16))}return null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){this.included||this.includeNode()}includeNode(){if(this.included=!0,this.meta.name===Zr){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Kr&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(Yr)?this.referenceId=t.slice(20):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:u,start:d,end:h}=this,{id:p,info:{attributes:f}}=r;if(o!==Zr)return;const m=c;if(u){const t=s.getFileName(u),i=U(K(H(m),t)),r=!!a?.startsWith(Yr),o=s.hookFirstSync("resolveFileUrl",[{attributes:f,chunkId:m,fileName:t,format:n,moduleId:p,referenceId:u,relativePath:i}])||co[n](i,r);return void e.overwrite(l.start,l.end,o,{contentOnly:!0})}let g=s.hookFirstSync("resolveImportMeta",[a,{attributes:f,chunkId:m,format:n,moduleId:p}]);g||(g=uo[n]?.(a,{chunkId:m,snippets:i}),t.accessedDocumentCurrentScript||=eo.includes(n)&&"undefined"!==g),"string"==typeof g&&(l instanceof Kr?e.overwrite(l.start,l.end,g,{contentOnly:!0}):e.overwrite(d,h,g,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(Jr)||this.metaProperty?.startsWith(Yr)?no:to)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}}const eo=["cjs","iife","umd"],to={amd:["document","module","URL"],cjs:["document","require","URL",$r],es:[],iife:["document","URL",$r],system:["module"],umd:["document","require","URL",$r]},no={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},so=(e,t,n="URL")=>`new ${n}(${e})${t?"":".href"}`,io=(e,t,n=!1)=>so(`'${mr(e)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,t),ro=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},oo=(e,t)=>`require('u' + 'rl').pathToFileURL(${e})${t?"":".href"}`,ao=(e,t)=>oo(`__dirname + '/${mr(e)}'`,t),lo=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${$r} && ${$r}.tagName.toUpperCase() === 'SCRIPT' && ${$r}.src || new URL('${mr(e)}', document.baseURI).href)`,co={amd:(e,t)=>("."!==e[0]&&(e="./"+e),so(`require.toUrl('${mr(e)}'), document.baseURI`,t)),cjs:(e,t)=>`(typeof document === 'undefined' ? ${ao(e,t)} : ${io(e,t)})`,es:(e,t)=>so(`'${mr(e)}', import.meta.url`,t),iife:(e,t)=>io(e,t),system:(e,t)=>so(`'${mr(e)}', module.meta.url`,t),umd:(e,t)=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${ao(e,t)} : ${io(e,t,!0)})`},uo={amd:ro(()=>so("module.uri, document.baseURI",!1)),cjs:ro(e=>`(typeof document === 'undefined' ? ${oo("__filename",!1)} : ${lo(e)})`),iife:ro(e=>lo(e)),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:ro(e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${oo("__filename",!1)} : ${lo(e,!0)})`)};class ho extends Ln{constructor(){super("undefined")}getLiteralValueAtPath(){}}class po extends wi{constructor(e,t){super("default",e,e.declaration,Ne,t,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const n=e.declaration;(n instanceof ur||n instanceof Gi)&&n.id?(this.hasId=!0,this.originalId=n.id):n instanceof Di&&(this.originalId=n)}addReference(e){this.hasId||(this.name=e.name)}addUsedPlace(e){const t=this.getOriginalVariable();t===this?super.addUsedPlace(e):t.addUsedPlace(e)}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 ho||"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 po&&!n.has(t));return this.originalVariable=t||e}}class fo extends Ln{constructor(e){super(e.getModuleName()),this.areAllMembersDeoptimized=!1,this.mergedNamespaces=[],this.nonExplicitNamespacesIncluded=!1,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.module.getExportedVariablesByName().get(s)?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):Ze(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];if("string"==typeof t)this.module.getExportedVariablesByName().get(t)?.deoptimizePath(e.slice(1));else if(!this.areAllMembersDeoptimized){this.areAllMembersDeoptimized=!0;for(const e of this.module.getExportedVariablesByName().values())e.deoptimizePath(ke)}}}getLiteralValueAtPath(e){return e[0]===xe?"Module":We}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.module.getExportedVariablesByName().get(i);return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,n)}includePath(e,t){super.includePath(e,t),this.includeMemberPath(e,t)}includeMemberPath(e,t){if(e.length>0){const[n,...s]=e;if("string"==typeof n){const e=this.module.getExportedVariablesByName().get(n);e?this.context.includeVariableInModule(e,s,t):this.includeNonExplicitNamespaces()}else n&&(this.module.includeAllExports(),this.includeNonExplicitNamespaces())}}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([Sr],e)}renderBlock(e){const{exportNamesByVariable:t,format:n,freeze:s,indent:i,symbols:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}}=e,h=[...this.module.getExportedVariablesByName().entries()].filter(([e,t])=>!e.startsWith("*")&&t.included).map(([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${qn(e)}${o}()${o}{${o}return ${t.getName(c)}${d}${o}}`]:[e,t.getName(c)]);h.unshift([null,`__proto__:${o}null`]);let p=l(h,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map(e=>e.getName(c));p=`/*#__PURE__*/${Sr}(${p},${o}[${e.join(`,${o}`)}])`}else r&&(p=`/*#__PURE__*/Object.defineProperty(${p},${o}Symbol.toStringTag,${o}${Ur(l)})`),s&&(p=`/*#__PURE__*/Object.freeze(${p})`);return p=`${a} ${this.getName(c)}${o}=${o}${p};`,"system"===n&&t.has(this)&&(p+=`${u}${oe([this],e)};`),p}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}}}includeNonExplicitNamespaces(){this.nonExplicitNamespacesIncluded||(this.nonExplicitNamespacesIncluded=!0,this.setMergedNamespaces(this.module.includeAndGetAdditionalMergedNamespaces()))}}fo.prototype.isNamespace=!0;const mo=e=>Object.create(e,{includePath:{value(t,n){e.includeMemberPath(t,n)}}});class go extends Ln{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 po||e instanceof go;){if(e instanceof po){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof go&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}includePath(e,t){super.includePath(e,t),this.context.includeVariableInModule(this.syntheticNamespace,[this.name,...e],t)}setRenderNames(e,t){super.setRenderNames(e,t)}}class yo{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}get moduleSideEffects(){return this.moduleInfo.moduleSideEffects}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?U(K(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=bo(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return mr(this.renormalizeRenderPath?It(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function bo(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map(([e,t])=>[e,`'${t}'`]);return n.length>0?t(n,{lineBreakIndent:null}):null}function Eo(e){return e.endsWith(".js")?e.slice(0,-3):e}function xo(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Eo(t)}`:e.id??""}function Ao(e,t,n,s,i,r,o,a,l="return "){const{_:c,getDirectReturnFunction:u,getFunctionIntro:d,getPropertyAccess:h,n:p,s:f}=i;if(!n)return`${p}${p}${l}${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:u}of t)if(u)return So(a,u[0].imported,l,o,e,c,n,r,s,i)}(e,t,s,o,h)};`;let m="";if(n)for(const{defaultVariableName:e,importPath:n,isChunk:i,name:a,namedExportsMode:l,namespaceVariableName:d,reexports:f}of t)if(f)for(const t of f)if("*"!==t.reexported){const f=So(a,t.imported,l,i,e,d,s,n,o,h);if(m&&(m+=p),"*"!==t.imported&&t.needsLiveBinding){const[e,n]=u([],{functionReturn:!0,lineBreakIndent:null,name:null});m+=`Object.defineProperty(exports,${c}${JSON.stringify(t.reexported)},${c}{${p}${r}enumerable:${c}true,${p}${r}get:${c}${e}${f}${n}${p}});`}else"__proto__"===t.reexported?m+=`Object.defineProperty(exports,${c}"__proto__",${c}{${p}${r}enumerable:${c}true,${p}${r}value:${c}${f}${p}});`:m+=`exports${h(t.reexported)}${c}=${c}${f};`}for(const{exported:t,local:n}of e){const e=`exports${h(t)}`;e!==n&&(m&&(m+=p),m+="__proto__"===t?`Object.defineProperty(exports,${c}"__proto__",${c}{${p}${r}enumerable:${c}true,${p}${r}value:${c}${n}${p}});`:`${e}${c}=${c}${n};`)}if(n)for(const{name:e,reexports:n}of t)if(n)for(const t of n)if("*"===t.reexported){if(m&&(m+=p),!t.needsLiveBinding&&a){const t="'__proto__'";m+=`Object.prototype.hasOwnProperty.call(${e},${c}${t})${c}&&${p}${r}!Object.prototype.hasOwnProperty.call(exports,${c}${t})${c}&&${p}${r}Object.defineProperty(exports,${c}${t},${c}{${p}${r}${r}enumerable:${c}true,${p}${r}${r}value:${c}${e}[${t}]${p}${r}});${p}${p}`}const n=`{${p}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!Object.prototype.hasOwnProperty.call(exports,${c}k))${c}${Po(e,t.needsLiveBinding,r,i)}${f}${p}}`;m+=`Object.keys(${e}).forEach(${d(["k"],{isAsync:!1,name:null})}${n});`}return m?`${p}${p}${m}`:""}function So(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=vr[t]?i:e;return Pr(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:Ir[o(a)])?r:e:`${e}${c(t)}`}function $o(e){return e([["value","true"]],{lineBreakIndent:null})}function vo(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",$o(i)],[null,`[Symbol.toStringTag]:${s}${Ur(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${$o(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${Ur(i)});`}return""}const Po=(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`exports[k]${s}=${s}${e}[k]`};function Io(e,t,n,s,i,r,o,a){const{_:l,cnst:c,n:u}=a,d=new Set,h=[],p=(e,t,n)=>{d.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,Ar,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=vr[e])):"*"!==t||"*"===i||a||(a=!0,s=Ir[e],c=l),s&&p(c,s,o)}}return`${Nr(d,r,o,a,n,s,i)}${h.length>0?`${h.join(u)}${u}${u}`:""}`}function wo(e,t,n){const s=n.find(e=>e.sourcePhaseImport);s&&Ft(function(e,t,n){return{code:"SOURCE_PHASE_FORMAT_UNSUPPORTED",message:`Source phase imports are not supported for the "${e}" output format, importing "${n}" in "${t}". Use the "es" output format to support source phase imports.`,url:wt(zt)}}(e,t,s.importPath))}function No(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":Eo(e);var n}const ko=new Set(["node:assert","assert","node:assert/strict","assert/strict","node:async_hooks","async_hooks","node:buffer","buffer","node:child_process","child_process","node:cluster","cluster","node:console","console","node:constants","constants","node:crypto","crypto","node:dgram","dgram","node:diagnostics_channel","diagnostics_channel","node:dns","dns","node:dns/promises","dns/promises","node:domain","domain","node:events","events","node:ffi","node:fs","fs","node:fs/promises","fs/promises","node:http","http","node:http2","http2","node:https","https","node:inspector","inspector","node:inspector/promises","inspector/promises","node:module","module","node:net","net","node:os","os","node:path","path","node:path/posix","path/posix","node:path/win32","path/win32","node:perf_hooks","perf_hooks","node:process","process","node:querystring","querystring","node:quic","node:readline","readline","node:readline/promises","readline/promises","node:repl","repl","node:sea","node:sqlite","node:stream","stream","node:stream/consumers","stream/consumers","node:stream/iter","stream/iter","node:stream/promises","stream/promises","node:stream/web","stream/web","node:string_decoder","string_decoder","node:test","node:test/reporters","node:timers","timers","node:timers/promises","timers/promises","node:tls","tls","node:trace_events","trace_events","node:tty","tty","node:url","url","node:util","util","node:util/types","util/types","node:v8","v8","node:vfs","node:vm","vm","node:wasi","wasi","node:worker_threads","worker_threads","node:zlib","zlib","node:zlib/iter","zlib/iter"]);function Co(e,t){const n=t.map(({importPath:e})=>e).filter(e=>ko.has(e)||e.startsWith("node:"));0!==n.length&&e(yt,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${At(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const Ro=(e,t)=>e.split(".").map(t).join("");function Do(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(yt,wn(a[0])),a[0]=("function"==typeof n?n(a[0]):l?a[0]:n[a[0]])||a[0];const c=a.pop();let u=t,d=[...a.map(e=>(u+=r(e),`${u}${i}=${i}${u}${i}||${i}{}`)),`${u}${r(c)}`].join(`,${i}`)+`${i}=${i}${s}`;return a.length>0&&(d=`(${d})`),d}function Oo(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 Mo="_missingExportShim";const _o=({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},Lo=(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""},To=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",Bo=(e,t,n)=>zo(e.filter(e=>e.hoisted).map(e=>({name:e.exported,value:e.local})),t,n);function zo(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}${qn(e)}:${n}${s}`).join(`,${s}`)+`${s}});${s}${s}`}const Vo=(e,t,n)=>zo(e.filter(e=>e.expression).map(e=>({name:e.exported,value:e.local})),t,n),Fo=(e,t,n)=>zo(e.filter(e=>e.local===Mo).map(e=>({name:e.exported,value:Mo})),t,n);function jo(e,t,n){return e?`${t}${Ro(e,n)}`:"null"}var Uo={amd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,log:h,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:b,generatedCode:{symbols:E},interop:x,reexportProtoFromExternal:A,strict:S}){Co(h,n),wo("amd",o,n);const $=n.map(e=>`'${No(e.importPath,m.forceJsExtensionForImports)}'`),v=n.map(e=>e.name),{n:P,getNonArrowFunctionIntro:I,_:w}=f;r&&(d||"exports.default"===s[0]?.local)&&(v.unshift("exports"),$.unshift("'exports'")),t.has("require")&&(v.unshift("require"),$.unshift("'require'")),t.has("module")&&(v.unshift("module"),$.unshift("'module'"));const N=xo(m,o),k=(N?`'${N}',${w}`:"")+($.length>0?`[${$.join(`,${w}`)}],${w}`:""),C=S?`${w}'use strict';`:"";e.prepend(`${l}${Io(n,x,y,b,E,t,a,f)}`);const R=Ao(s,n,d,x,f,a,y,A);let D=vo(d&&r,c&&(!0===g||"if-default-prop"===g&&i),u&&E,f);D&&(D=P+P+D),e.append(`${R}${D}${p}`).indent(a).prepend(`${m.define}(${k}(${I(v,{isAsync:!1,name:null})}{${C}${P}${P}`).append(`${P}${P}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,outro:h,snippets:p},{compact:f,esModule:m,externalLiveBindings:g,freeze:y,interop:b,generatedCode:{symbols:E},reexportProtoFromExternal:x,strict:A}){wo("cjs",o,n);const{_:S,n:$}=p,v=A?`'use strict';${$}${$}`:"";let P=vo(d&&r,c&&(!0===m||"if-default-prop"===m&&i),u&&E,p);P&&(P+=$+$);const I=function(e,{_:t,cnst:n,n:s},i){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:u}of e)c||u?(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,p,f),w=Io(n,b,g,y,E,t,a,p);e.prepend(`${v}${l}${P}${I}${w}`);const N=Ao(s,n,d,b,p,a,g,x,`module.exports${S}=${S}`);e.append(`${N}${h}`)},es:function(e,{accessedGlobals:t,indent:n,intro:s,outro:i,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:u},importAttributesKey:d}){const{n:h}=a,p=function(e,t,{_:n}){const s=[];for(const{importPath:i,reexports:r,imports:o,name:a,attributes:l,sourcePhaseImport:c}of e){const e=`'${i}'${l?`${n}${t}${n}${l}`:""};`;if(c&&s.push(`import source ${c} from${n}${e}`),r||o){if(o){let t=null,i=null;const r=[];for(const e of o)"default"===e.imported?t=e:"*"===e.imported?i=e:r.push(e);i&&s.push(`import${n}*${n}as ${i.local} from${n}${e}`),t&&0===r.length?s.push(`import ${t.local} from${n}${e}`):r.length>0&&s.push(`import ${t?`${t.local},${n}`:""}{${n}${r.map(e=>e.imported===e.local?e.imported:`${Kn(e.imported)} as ${e.local}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}if(r){let t=null;const i=[],l=[];for(const e of r)"*"===e.reexported?t=e:"*"===e.imported?i.push(e):l.push(e);if(t&&s.push(`export${n}*${n}from${n}${e}`),i.length>0){o&&o.some(e=>"*"===e.imported&&e.local===a)||s.push(`import${n}*${n}as ${a} from${n}${e}`);for(const e of i)s.push(`export${n}{${n}${a===e.reexported?a:`${a} as ${Kn(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map(e=>e.imported===e.reexported?Kn(e.imported):`${Kn(e.imported)} as ${Kn(e.reexported)}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}}else c||s.push(`import${n}${e}`)}return s}(r,d,a);p.length>0&&(s+=p.join(h)+h+h),(s+=Nr(null,t,n,a,l,c,u))&&e.prepend(s);const f=function(e,{_:t,cnst:n}){const s=[],i=new Array(e.length);let r=0;for(const o of e)o.expression&&s.push(`${n} ${o.local}${t}=${t}${o.expression};`),i[r++]=o.exported===o.local?o.local:`${o.local} as ${Kn(o.exported)}`;i.length>0&&s.push(`export${t}{${t}${i.join(`,${t}`)}${t}};`);return s}(o,a);f.length>0&&e.append(h+h+f.join(h).trim()),i&&e.append(i),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:h},{compact:p,esModule:f,extend:m,freeze:g,externalLiveBindings:y,reexportProtoFromExternal:b,globals:E,interop:x,name:A,generatedCode:{symbols:S},strict:$}){wo("iife",o,n);const{_:v,getNonArrowFunctionIntro:P,getPropertyAccess:I,n:w}=h,N=A&&A.includes("."),k=!m&&!N;if(A&&k&&(Un(C=A)||jn.test(C)))return Ft(function(e){return{code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:wt("configuration-options/#output-extend")}}(A));var C;Co(u,n);const R=Oo(n),D=R.map(e=>e.globalName||"null"),O=R.map(e=>e.name);r&&!A&&u(yt,{code:Yt,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:wt(Tt)}),r&&(c||"exports.default"===s[0]?.local)&&(m?(D.unshift(`this${Ro(A,I)}${v}=${v}this${Ro(A,I)}${v}||${v}{}`),O.unshift("exports")):(D.unshift("{}"),O.unshift("exports")));const M=$?`${a}'use strict';${w}`:"",_=Io(n,x,y,g,S,t,a,h);e.prepend(`${l}${_}`);let L=`(${P(O,{isAsync:!1,name:null})}{${w}${M}${w}`;r&&(!A||m&&c||(L=(k?`var ${A}`:`this${Ro(A,I)}`)+`${v}=${v}${L}`),N&&(L=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o,a){const l=e.split("."),c=l[0]in Object.prototype;a&&c&&a(yt,wn(l[0])),l[0]=("function"==typeof n?n(l[0]):c?l[0]:n[l[0]])||l[0],l.pop();let u=t;return l.map(e=>(u+=i(e),`${u}${s}=${s}${u}${s}||${s}{}${r}`)).join(o?",":"\n")+(o&&l.length>0?";":"\n")}(A,"this",E,h,p,u)+L));let T=`${w}${w}})(${D.join(`,${v}`)});`;r&&!m&&c&&(T=`${w}${w}${a}return exports;${T}`);const B=Ao(s,n,c,x,h,a,y,b);let z=vo(c&&r,!0===f||"if-default-prop"===f&&i,S,h);z&&(z=w+w+z),e.append(`${B}${z}${d}`).indent(a).prepend(L).append(T)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,id:r,indent:o,intro:a,snippets:l,outro:c,usesTopLevelAwait:u},{externalLiveBindings:d,freeze:h,name:p,generatedCode:{symbols:f},strict:m,systemNullSetters:g}){wo("system",r,n);const{_:y,getFunctionIntro:b,getNonArrowFunctionIntro:E,n:x,s:A}=l,{importBindings:S,setters:$,starExcludes:v}=function(e,t,n,{_:s,cnst:i,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let u=null;for(const{imports:d,reexports:h}of e){const p=[];if(d)for(const e of d)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){u||(u=_o({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:u}}(n,s,o,l),P=p?`'${p}',${y}`:"",I=t.has("module")?["exports","module"]:i?["exports"]:[];let w=`System.register(${P}[`+n.map(({importPath:e})=>`'${e}'`).join(`,${y}`)+`],${y}(${E(I,{isAsync:!1,name:null})}{${x}${o}${m?"'use strict';":""}`+Lo(v,o,l)+To(S,o,l)+`${x}${o}return${y}{${$.length>0?`${x}${o}${o}setters:${y}[${$.map(e=>e?`${b(["module"],{isAsync:!1,name:null})}{${x}${o}${o}${o}${e}${x}${o}${o}}`:g?"null":`${b([],{isAsync:!1,name:null})}{}`).join(`,${y}`)}],`:""}${x}`;w+=`${o}${o}execute:${y}(${E([],{isAsync:u,name:null})}{${x}${x}`;const N=`${o}${o}})${x}${o}}${A}${x}}));`;e.prepend(a+Nr(null,t,o,l,d,h,f)+Bo(s,o,l)).append(`${c}${x}${x}`+Vo(s,o,l)+Fo(s,o,l)).indent(`${o}${o}${o}`).append(N).prepend(w)},umd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:h},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:b,interop:E,name:x,generatedCode:{symbols:A},globals:S,noConflict:$,reexportProtoFromExternal:v,strict:P}){const{_:I,cnst:w,getFunctionIntro:N,getNonArrowFunctionIntro:k,getPropertyAccess:C,n:R,s:D}=h,O=f?"f":"factory",M=f?"g":"global";if(r&&!x)return Ft({code:Yt,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:wt(Tt)});wo("umd",o,n),Co(u,n);const _=n.map(e=>`'${No(e.importPath,p.forceJsExtensionForImports)}'`),L=n.map(e=>`require('${e.importPath}')`),T=Oo(n),B=T.map(e=>jo(e.globalName,M,C)),z=T.map(e=>e.name);(r||$)&&(c||r&&"exports.default"===s[0]?.local)&&(_.unshift("'exports'"),L.unshift("exports"),B.unshift(Do(x,M,S,(g?`${jo(x,M,C)}${I}||${I}`:"")+"{}",h,u)),z.unshift("exports"));const V=xo(p,o),F=(V?`'${V}',${I}`:"")+(_.length>0?`[${_.join(`,${I}`)}],${I}`:""),j=p.define,U=!c&&r?`module.exports${I}=${I}`:"",G=P?`${I}'use strict';${R}`:"";let H;if($){const e=f?"e":"exports";let t;if(!c&&r)t=`${w} ${e}${I}=${I}${Do(x,M,S,`${O}(${B.join(`,${I}`)})`,h,u)};`;else{t=`${w} ${e}${I}=${I}${B.shift()};${R}${a}${a}${O}(${[e,...B].join(`,${I}`)});`}H=`(${N([],{isAsync:!1,name:null})}{${R}${a}${a}${w} current${I}=${I}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map(e=>i+=s(e)).join(`${n}&&${n}`)}(x,M,h)};${R}${a}${a}${t}${R}${a}${a}${e}.noConflict${I}=${I}${N([],{isAsync:!1,name:null})}{${I}${jo(x,M,C)}${I}=${I}current;${I}return ${e}${D}${I}};${R}${a}})()`}else H=`${O}(${B.join(`,${I}`)})`,!c&&r&&(H=Do(x,M,S,H,h,u));const W=r||$&&c||B.length>0,q=[O];W&&q.unshift(M);const K=W?`this,${I}`:"",X=W?`(${M}${I}=${I}typeof globalThis${I}!==${I}'undefined'${I}?${I}globalThis${I}:${I}${M}${I}||${I}self,${I}`:"",J=W?")":"",Y=W?`${a}typeof exports${I}===${I}'object'${I}&&${I}typeof module${I}!==${I}'undefined'${I}?${I}${U}${O}(${L.join(`,${I}`)})${I}:${R}`:"",Z=`(${k(q,{isAsync:!1,name:null})}{${R}`+Y+`${a}typeof ${j}${I}===${I}'function'${I}&&${I}${j}.amd${I}?${I}${j}(${F}${O})${I}:${R}`+`${a}${X}${H}${J};${R}`+`})(${K}(${k(z,{isAsync:!1,name:null})}{${G}${R}`,Q=R+R+"}));";e.prepend(`${l}${Io(n,E,y,b,A,t,a,h)}`);const ee=Ao(s,n,c,E,h,a,y,v);let te=vo(c&&r,!0===m||"if-default-prop"===m&&i,A,h);te&&(te=R+R+te),e.append(`${ee}${te}${d}`).trim().indent(a).append(Q).prepend(Z)}};function Go(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ho,Wo,qo,Ko,Xo,Jo,Yo,Zo,Qo,ea,ta,na={};function sa(){if(Wo)return Ho;Wo=1;const e="\\\\/",t=`[^${e}]`,n="\\.",s="\\/",i="[^/]",r=`(?:${s}|$)`,o=`(?:^|${s})`,a=`${n}{1,2}${r}`,l={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:r,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${o}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${r})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:o,SEP:"/"},c={...l,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return Ho={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?c:l},Ho}function ia(){return qo||(qo=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=sa();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,s)=>{const i=t.lastIndexOf(n,s);return-1===i?t:"\\"===t[i-1]?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let s=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),s=n[n.length-1];return""===s?n[n.length-2]:s}}(na)),na}function ra(){if(Xo)return Ko;Xo=1;const e=ia(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:i,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:p,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:m}=sa(),g=e=>e===a||e===s,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Ko=(b,E)=>{const x=E||{},A=b.length-1,S=!0===x.parts||!0===x.tokens||!0===x.scanToEnd,$=[],v=[],P=[];let I,w,N=b,k=-1,C=0,R=0,D=!1,O=!1,M=!1,_=!1,L=!1,T=!1,B=!1,z=!1,V=!1,F=!1,j=0,U={value:"",depth:0,isGlob:!1};const G=()=>k>=A,H=()=>N.charCodeAt(k+1),W=()=>(I=w,N.charCodeAt(++k));for(;k<A;){let e;if(w=W(),w!==s){if(!0===T||w===l){for(j++;!0!==G()&&(w=W());)if(w!==s)if(w!==l){if(!0!==T&&w===r&&(w=W())===r){if(D=U.isBrace=!0,M=U.isGlob=!0,F=!0,!0===S)continue;break}if(!0!==T&&w===i){if(D=U.isBrace=!0,M=U.isGlob=!0,F=!0,!0===S)continue;break}if(w===p&&(j--,0===j)){T=!1,D=U.isBrace=!0,F=!0;break}}else j++;else B=U.backslashes=!0,W();if(!0===S)continue;break}if(w!==a){if(!0!==x.noext){if(!0===(w===d||w===n||w===t||w===h||w===o)&&H()===c){if(M=U.isGlob=!0,_=U.isExtglob=!0,F=!0,w===o&&k===C&&(V=!0),!0===S){let e=0;for(;!0!==G()&&(w=W());)if(w!==s)if(w!==c){if(w===f&&0===--e){F=!0;break}}else e++;else B=U.backslashes=!0,W();continue}break}}if(w===t){if(I===t&&(L=U.isGlobstar=!0),M=U.isGlob=!0,F=!0,!0===S)continue;break}if(w===h){if(M=U.isGlob=!0,F=!0,!0===S)continue;break}if(w===u){for(;!0!==G()&&(e=W());)if(e!==s){if(e===m){O=U.isBracket=!0,M=U.isGlob=!0,F=!0;break}}else B=U.backslashes=!0,W();if(!0===S)continue;break}if(!0===x.nonegate||w!==o||k!==C){if(!0!==x.noparen&&w===c){if(M=U.isGlob=!0,!0===S){let e=1;for(;!0!==G()&&(w=W());)if(w!==s)if(w!==c){if(w===f&&0===--e){F=!0;break}}else e++;else B=U.backslashes=!0,W();continue}break}if(!0===M){if(F=!0,!0===S)continue;break}}else z=U.negated=!0,C++}else{if($.push(k),v.push(U),U={value:"",depth:0,isGlob:!1},!0===F)continue;if(I===r&&k===C+1){C+=2;continue}R=k+1}}else B=U.backslashes=!0,w=W(),w===l&&(T=!0)}!0===x.noext&&(_=!1,M=!1);let q=N,K="",X="";C>0&&(K=N.slice(0,C),N=N.slice(C),R-=C),q&&!0===M&&R>0?(q=N.slice(0,R),X=N.slice(R)):!0===M?(q="",X=N):q=N,q&&""!==q&&"/"!==q&&q!==N&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===x.unescape&&(X&&(X=e.removeBackslashes(X)),q&&!0===B&&(q=e.removeBackslashes(q)));const J={prefix:K,input:b,start:C,base:q,glob:X,isBrace:D,isBracket:O,isGlob:M,isExtglob:_,isGlobstar:L,negated:z,negatedExtglob:V};if(!0===x.tokens&&(J.maxDepth=0,g(w)||v.push(U),J.tokens=v),!0===x.parts||!0===x.tokens){let e;for(let t=0;t<$.length;t++){const n=void 0!==e?e+1:C,s=$[t],i=b.slice(n,s);x.tokens&&(0===t&&0!==C?(v[t].isPrefix=!0,v[t].value=K):v[t].value=i,y(v[t]),J.maxDepth+=v[t].depth),s>=C&&(P.push(i),e=s)}const t=void 0!==e?e+1:C,n=b.slice(t);P.push(n),x.tokens&&e&&e+1<b.length&&(v[v.length-1].value=n,y(v[v.length-1]),J.maxDepth+=v[v.length-1].depth),J.slashes=$,J.parts=P}return J},Ko}function oa(){if(Yo)return Jo;Yo=1;const e=sa(),t=ia(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:o}=e,a=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();return`[${e.join("-")}]`},l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,c=e=>{const t=[];let n=0,s=0,i=0,r="",o=!1;for(const a of e)if(!0!==o)if("\\"!==a)if('"'!==a){if(0===i)if("["===a)n++;else if("]"===a&&n>0)n--;else if(0===n)if("("===a)s++;else if(")"===a&&s>0)s--;else if("|"===a&&0===s){t.push(r),r="";continue}r+=a}else i=1===i?0:1,r+=a;else r+=a,o=!0;else r+=a,o=!1;return t.push(r),t},u=e=>{let t=e.trim(),n=!0;for(;!0===n;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if((e=>{let t=!1;for(const n of e)if(!0!==t)if("\\"!==n){if(/[?*+@!()[\]{}]/.test(n))return!1}else t=!0;else t=!1;return!0})(t))return t.replace(/\\(.)/g,"$1")},d=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let n=0,s=0,i=0,r=!1;for(let o=1;o<e.length;o++){const a=e[o];if(!0!==r)if("\\"!==a)if('"'!==a){if(1!==i)if("["!==a){if("]"===a&&n>0)n--;else if(!(n>0))if("("!==a){if(")"===a&&(s--,0===s)){if(!0===t&&o!==e.length-1)return;return{type:e[0],body:e.slice(2,o),end:o}}}else s++}else n++}else i=1===i?0:1;else r=!0;else r=!1}},h=e=>`${1===e.length?t.escapeRegex(e[0]):`[${e.map(e=>t.escapeRegex(e)).join("")}]`}*`,p=e=>{let t=0;const n=[];for(;t<e.length;){const s=d(e.slice(t),!1);if(!s||"*"!==s.type)return;const i=c(s.body).map(e=>e.trim());if(1!==i.length)return;const r=u(i[0]);if(!r||1!==r.length)return;n.push(r),t+=s.end+1}if(!(n.length<1))return n},f=e=>{let t=0,n=e.trim(),s=d(n);for(;s;)t++,n=s.body.trim(),s=d(n);return t},m=(t,n)=>{if(!1===n.maxExtglobRecursion)return{risky:!1};const s="number"==typeof n.maxExtglobRecursion?n.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,i=c(t).map(e=>e.trim());if(i.length>1&&(i.some(e=>""===e)||i.some(e=>/^[*?]+$/.test(e))||(e=>{const t=e.map(u).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){const s=t[e],i=t[n],r=s[0];if(r&&s===r.repeat(s.length)&&i===r.repeat(i.length)&&(s===i||s.startsWith(i)||i.startsWith(s)))return!0}return!1})(i)))return{risky:!0};const r=[];let o=!1,a=!0;for(const e of i){const t=p(e);if(t){o=!0,r.push(...t);continue}const n=u(e);if(n&&1===n.length)r.push(n);else if(a=!1,f(e)>s)return{risky:!0}}return o?a?{risky:!0,safeOutput:h([...new Set(r)])}:{risky:!0}:{risky:!1}},g=(c,u)=>{if("string"!=typeof c)throw new TypeError("Expected a string");c=o[c]||c;const d={...u},h="number"==typeof d.maxLength?Math.min(n,d.maxLength):n;let p=c.length;if(p>h)throw new SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${h}`);const f={type:"bos",value:"",output:d.prepend||""},y=[f],b=d.capture?"":"?:",E=e.globChars(d.windows),x=e.extglobChars(E),{DOT_LITERAL:A,PLUS_LITERAL:S,SLASH_LITERAL:$,ONE_CHAR:v,DOTS_SLASH:P,NO_DOT:I,NO_DOT_SLASH:w,NO_DOTS_SLASH:N,QMARK:k,QMARK_NO_DOT:C,STAR:R,START_ANCHOR:D}=E,O=e=>`(${b}(?:(?!${D}${e.dot?P:A}).)*?)`,M=d.dot?"":I,_=d.dot?k:C;let L=!0===d.bash?O(d):R;d.capture&&(L=`(${L})`),"boolean"==typeof d.noext&&(d.noextglob=d.noext);const T={input:c,index:-1,start:0,dot:!0===d.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};c=t.removePrefix(c,T),p=c.length;const B=[],z=[],V=[];let F,j=f;const U=()=>T.index===p-1,G=T.peek=(e=1)=>c[T.index+e],H=T.advance=()=>c[++T.index]||"",W=()=>c.slice(T.index+1),q=(e="",t=0)=>{T.consumed+=e,T.index+=t},K=e=>{T.output+=null!=e.output?e.output:e.value,q(e.value)},X=()=>{let e=1;for(;"!"===G()&&("("!==G(2)||"?"===G(3));)H(),T.start++,e++;return e%2!=0&&(T.negated=!0,T.start++,!0)},J=e=>{T[e]++,V.push(e)},Y=e=>{T[e]--,V.pop()},Z=e=>{if("globstar"===j.type){const t=T.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||B.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(T.output=T.output.slice(0,-j.output.length),j.type="star",j.value="*",j.output=L,T.output+=j.output)}if(B.length&&"paren"!==e.type&&(B[B.length-1].inner+=e.value),(e.value||e.output)&&K(e),j&&"text"===j.type&&"text"===e.type)return j.output=(j.output||j.value)+e.value,void(j.value+=e.value);e.prev=j,y.push(e),j=e},Q=(e,t)=>{const n={...x[t],conditions:1,inner:""};n.prev=j,n.parens=T.parens,n.output=T.output,n.startIndex=T.index,n.tokensIndex=y.length;const s=(d.capture?"(":"")+n.open;J("parens"),Z({type:e,value:t,output:T.output?"":v}),Z({type:"paren",extglob:!0,value:H(),output:s}),B.push(n)},ee=e=>{const n=c.slice(e.startIndex,T.index+1),s=c.slice(e.startIndex+2,T.index),i=m(s,d);if(("plus"===e.type||"star"===e.type)&&i.risky){const s=i.safeOutput?(e.output?"":v)+(d.capture?`(${i.safeOutput})`:i.safeOutput):void 0,r=y[e.tokensIndex];r.type="text",r.value=n,r.output=s||t.escapeRegex(n);for(let t=e.tokensIndex+1;t<y.length;t++)y[t].value="",y[t].output="",delete y[t].suffix;return T.output=e.output+r.output,T.backtrack=!0,Z({type:"paren",extglob:!0,value:F,output:""}),void Y("parens")}let r,o=e.close+(d.capture?")":"");if("negate"===e.type){let t=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(t=O(d)),(t!==L||U()||/^\)+$/.test(W()))&&(o=e.close=`)$))${t}`),e.inner.includes("*")&&(r=W())&&/^\.[^\\/.]+$/.test(r)){const n=g(r,{...u,fastpaths:!1}).output;o=e.close=`)${n})${t})`}"bos"===e.prev.type&&(T.negatedExtglob=!0)}Z({type:"paren",extglob:!0,value:F,output:o}),Y("parens")};if(!1!==d.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(c)){let e=!1,n=c.replace(r,(t,n,s,i,r,o)=>"\\"===i?(e=!0,t):"?"===i?n?n+i+(r?k.repeat(r.length):""):0===o?_+(r?k.repeat(r.length):""):k.repeat(s.length):"."===i?A.repeat(s.length):"*"===i?n?n+i+(r?L:""):L:n?t:`\\${t}`);return!0===e&&(n=!0===d.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===c&&!0===d.contains?(T.output=c,T):(T.output=t.wrapOutput(n,T,u),T)}for(;!U();){if(F=H(),"\0"===F)continue;if("\\"===F){const e=G();if("/"===e&&!0!==d.bash)continue;if("."===e||";"===e)continue;if(!e){F+="\\",Z({type:"text",value:F});continue}const t=/^\\+/.exec(W());let n=0;if(t&&t[0].length>2&&(n=t[0].length,T.index+=n,n%2!=0&&(F+="\\")),!0===d.unescape?F=H():F+=H(),0===T.brackets){Z({type:"text",value:F});continue}}if(T.brackets>0&&("]"!==F||"["===j.value||"[^"===j.value)){if(!1!==d.posix&&":"===F){const e=j.value.slice(1);if(e.includes("[")&&(j.posix=!0,e.includes(":"))){const e=j.value.lastIndexOf("["),t=j.value.slice(0,e),n=j.value.slice(e+2),i=s[n];if(i){j.value=t+i,T.backtrack=!0,H(),f.output||1!==y.indexOf(j)||(f.output=v);continue}}}("["===F&&":"!==G()||"-"===F&&"]"===G())&&(F=`\\${F}`),"]"!==F||"["!==j.value&&"[^"!==j.value||(F=`\\${F}`),!0===d.posix&&"!"===F&&"["===j.value&&(F="^"),j.value+=F,K({value:F});continue}if(1===T.quotes&&'"'!==F){F=t.escapeRegex(F),j.value+=F,K({value:F});continue}if('"'===F){T.quotes=1===T.quotes?0:1,!0===d.keepQuotes&&Z({type:"text",value:F});continue}if("("===F){J("parens"),Z({type:"paren",value:F});continue}if(")"===F){if(0===T.parens&&!0===d.strictBrackets)throw new SyntaxError(l("opening","("));const e=B[B.length-1];if(e&&T.parens===e.parens+1){ee(B.pop());continue}Z({type:"paren",value:F,output:T.parens?")":"\\)"}),Y("parens");continue}if("["===F){if(!0!==d.nobracket&&W().includes("]"))J("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw new SyntaxError(l("closing","]"));F=`\\${F}`}Z({type:"bracket",value:F});continue}if("]"===F){if(!0===d.nobracket||j&&"bracket"===j.type&&1===j.value.length){Z({type:"text",value:F,output:`\\${F}`});continue}if(0===T.brackets){if(!0===d.strictBrackets)throw new SyntaxError(l("opening","["));Z({type:"text",value:F,output:`\\${F}`});continue}Y("brackets");const e=j.value.slice(1);if(!0===j.posix||"^"!==e[0]||e.includes("/")||(F=`/${F}`),j.value+=F,K({value:F}),!1===d.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(j.value);if(T.output=T.output.slice(0,-j.value.length),!0===d.literalBrackets){T.output+=n,j.value=n;continue}j.value=`(${b}${n}|${j.value})`,T.output+=j.value;continue}if("{"===F&&!0!==d.nobrace){J("braces");const e={type:"brace",value:F,output:"(",outputIndex:T.output.length,tokensIndex:T.tokens.length};z.push(e),Z(e);continue}if("}"===F){const e=z[z.length-1];if(!0===d.nobrace||!e){Z({type:"text",value:F,output:F});continue}let t=")";if(!0===e.dots){const e=y.slice(),n=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,d),T.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=T.output.slice(0,e.outputIndex),s=T.tokens.slice(e.tokensIndex);e.value=e.output="\\{",F=t="\\}",T.output=n;for(const e of s)T.output+=e.output||e.value}Z({type:"brace",value:F,output:t}),Y("braces"),z.pop();continue}if("|"===F){B.length>0&&B[B.length-1].conditions++,Z({type:"text",value:F});continue}if(","===F){let e=F;const t=z[z.length-1];t&&"braces"===V[V.length-1]&&(t.comma=!0,e="|"),Z({type:"comma",value:F,output:e});continue}if("/"===F){if("dot"===j.type&&T.index===T.start+1){T.start=T.index+1,T.consumed="",T.output="",y.pop(),j=f;continue}Z({type:"slash",value:F,output:$});continue}if("."===F){if(T.braces>0&&"dot"===j.type){"."===j.value&&(j.output=A);const e=z[z.length-1];j.type="dots",j.output+=F,j.value+=F,e.dots=!0;continue}if(T.braces+T.parens===0&&"bos"!==j.type&&"slash"!==j.type){Z({type:"text",value:F,output:A});continue}Z({type:"dot",value:F,output:A});continue}if("?"===F){if(!(j&&"("===j.value)&&!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Q("qmark",F);continue}if(j&&"paren"===j.type){const e=G();let t=F;("("===j.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(W()))&&(t=`\\${F}`),Z({type:"text",value:F,output:t});continue}if(!0!==d.dot&&("slash"===j.type||"bos"===j.type)){Z({type:"qmark",value:F,output:C});continue}Z({type:"qmark",value:F,output:k});continue}if("!"===F){if(!0!==d.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){Q("negate",F);continue}if(!0!==d.nonegate&&0===T.index){X();continue}}if("+"===F){if(!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Q("plus",F);continue}if(j&&"("===j.value||!1===d.regex){Z({type:"plus",value:F,output:S});continue}if(j&&("bracket"===j.type||"paren"===j.type||"brace"===j.type)||T.parens>0){Z({type:"plus",value:F});continue}Z({type:"plus",value:S});continue}if("@"===F){if(!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Z({type:"at",extglob:!0,value:F,output:""});continue}Z({type:"text",value:F});continue}if("*"!==F){"$"!==F&&"^"!==F||(F=`\\${F}`);const e=i.exec(W());e&&(F+=e[0],T.index+=e[0].length),Z({type:"text",value:F});continue}if(j&&("globstar"===j.type||!0===j.star)){j.type="star",j.star=!0,j.value+=F,j.output=L,T.backtrack=!0,T.globstar=!0,q(F);continue}let e=W();if(!0!==d.noextglob&&/^\([^?]/.test(e)){Q("star",F);continue}if("star"===j.type){if(!0===d.noglobstar){q(F);continue}const t=j.prev,n=t.prev,s="slash"===t.type||"bos"===t.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===d.bash&&(!s||e[0]&&"/"!==e[0])){Z({type:"star",value:F,output:""});continue}const r=T.braces>0&&("comma"===t.type||"brace"===t.type),o=B.length&&("pipe"===t.type||"paren"===t.type);if(!s&&"paren"!==t.type&&!r&&!o){Z({type:"star",value:F,output:""});continue}for(;"/**"===e.slice(0,3);){const t=c[T.index+4];if(t&&"/"!==t)break;e=e.slice(3),q("/**",3)}const a=U()||T.parens>0&&e===")".repeat(T.parens)&&!B.some(e=>"negate"===e.type);if("bos"===t.type&&U()){j.type="globstar",j.value+=F,j.output=O(d),T.output=j.output,T.globstar=!0,q(F);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!i&&a){T.output=T.output.slice(0,-(t.output+j.output).length),t.output=`(?:${t.output}`,j.type="globstar",j.output=O(d)+(d.strictSlashes?")":"|$)"),j.value+=F,T.globstar=!0,T.output+=t.output+j.output,q(F);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";T.output=T.output.slice(0,-(t.output+j.output).length),t.output=`(?:${t.output}`,j.type="globstar",j.output=`${O(d)}${$}|${$}${n})`,j.value+=F,T.output+=t.output+j.output,T.globstar=!0,q(F+H()),Z({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){j.type="globstar",j.value+=F,j.output=`(?:^|${$}|${O(d)}${$})`,T.output=j.output,T.globstar=!0,q(F+H()),Z({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-j.output.length),j.type="globstar",j.output=O(d),j.value+=F,T.output+=j.output,T.globstar=!0,q(F);continue}const n={type:"star",value:F,output:L};!0!==d.bash?!j||"bracket"!==j.type&&"paren"!==j.type||!0!==d.regex?(T.index!==T.start&&"slash"!==j.type&&"dot"!==j.type||("dot"===j.type?(T.output+=w,j.output+=w):!0===d.dot?(T.output+=N,j.output+=N):(T.output+=M,j.output+=M),"*"!==G()&&(T.output+=v,j.output+=v)),Z(n)):(n.output=F,Z(n)):(n.output=".*?","bos"!==j.type&&"slash"!==j.type||(n.output=M+n.output),Z(n))}for(;T.brackets>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing","]"));T.output=t.escapeLast(T.output,"["),Y("brackets")}for(;T.parens>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing",")"));T.output=t.escapeLast(T.output,"("),Y("parens")}for(;T.braces>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing","}"));T.output=t.escapeLast(T.output,"{"),Y("braces")}if(!0===d.strictSlashes||"star"!==j.type&&"bracket"!==j.type||Z({type:"maybe_slash",value:"",output:`${$}?`}),!0===T.backtrack){T.output="";for(const e of T.tokens)T.output+=null!=e.output?e.output:e.value,e.suffix&&(T.output+=e.suffix)}return T};return g.fastpaths=(s,i)=>{const r={...i},a="number"==typeof r.maxLength?Math.min(n,r.maxLength):n,l=s.length;if(l>a)throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${a}`);s=o[s]||s;const{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:p,NO_DOTS:f,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(r.windows),b=r.dot?f:p,E=r.dot?m:p,x=r.capture?"":"?:";let A=!0===r.bash?".*?":g;r.capture&&(A=`(${A})`);const S=e=>!0===e.noglobstar?A:`(${x}(?:(?!${y}${e.dot?h:c}).)*?)`,$=e=>{switch(e){case"*":return`${b}${d}${A}`;case".*":return`${c}${d}${A}`;case"*.*":return`${b}${A}${c}${d}${A}`;case"*/*":return`${b}${A}${u}${d}${E}${A}`;case"**":return b+S(r);case"**/*":return`(?:${b}${S(r)}${u})?${E}${d}${A}`;case"**/*.*":return`(?:${b}${S(r)}${u})?${E}${A}${c}${d}${A}`;case"**/.*":return`(?:${b}${S(r)}${u})?${c}${d}${A}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=$(t[1]);if(!n)return;return n+c+t[2]}}},v=t.removePrefix(s,{negated:!1,prefix:""});let P=$(v);return P&&!0!==r.strictSlashes&&(P+=`${u}?`),P},Jo=g}function aa(){if(Qo)return Zo;Qo=1;const e=ra(),t=oa(),n=ia(),s=sa(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const s=e.map(e=>i(e,t,n)),r=e=>{for(const t of s){const n=t(e);if(n)return n}return!1};return r}const s=(r=e)&&"object"==typeof r&&!Array.isArray(r)&&e.tokens&&e.input;var r;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},a=o.windows,l=s?i.compileRe(e,t):i.makeRe(e,t,!1,!0),c=l.state;delete l.state;let u=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};u=i(o.ignore,e,n)}const d=(n,s=!1)=>{const{isMatch:r,match:d,output:h}=i.test(n,l,t,{glob:e,posix:a}),p={glob:e,state:c,regex:l,posix:a,input:n,output:h,match:d,isMatch:r};return"function"==typeof o.onResult&&o.onResult(p),!1===r?(p.isMatch=!1,!!s&&p):u(n)?("function"==typeof o.onIgnore&&o.onIgnore(p),p.isMatch=!1,!!s&&p):("function"==typeof o.onMatch&&o.onMatch(p),!s||p)};return n&&(d.state=c),d};return i.test=(e,t,s,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=s||{},l=a.format||(o?n.toPosixSlashes:null);let c=e===r,u=c&&l?l(e):e;return!1===c&&(u=l?l(e):e,c=u===r),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,s,o):t.exec(u)),{isMatch:Boolean(c),match:c,output:u}},i.matchBase=(e,t,s,r=s&&s.windows)=>(t instanceof RegExp?t:i.makeRe(t,s)).test(n.basename(e,{windows:r})),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,n)=>Array.isArray(e)?e.map(e=>i.parse(e,n)):t(e,{...n,fastpaths:!1}),i.scan=(t,n)=>e(t,n),i.compileRe=(e,t,n=!1,s=!1)=>{if(!0===n)return e.output;const r=t||{},o=r.contains?"":"^",a=r.contains?"":"$";let l=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);const c=i.toRegex(l,t);return!0===s&&(c.state=e),c},i.makeRe=(e,n={},s=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=t.fastpaths(e,n)),o.output||(o=t(e,n)),i.compileRe(o,n,s,r)},i.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=s,Zo=i}function la(){if(ta)return ea;ta=1;const e=aa(),t=ia();function n(n,s,i=!1){return!s||null!==s.windows&&void 0!==s.windows||(s={...s,windows:t.isWindows()}),e(n,s,i)}return Object.assign(n,e),ea=n}var ca=Go(la());const ua={ArrayPattern(e,t){for(const n of t.elements)n&&ua[n.type](e,n)},AssignmentPattern(e,t){ua[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?ua.RestElement(e,n):ua[n.value.type](e,n.value)},RestElement(e,t){ua[t.argument.type](e,t.argument)}},da=function(e){const t=[];return ua[e.type](t,e),t};function ha(e,t,n){try{const o=ka.__wbindgen_add_to_stack_pointer(-16),a=va(e,ka.__wbindgen_export2,ka.__wbindgen_export3),l=Ca;ka.parse(o,a,l,t,n);var s=ya().getInt32(o+0,!0),i=ya().getInt32(o+4,!0),r=ma(s,i).slice();return ka.__wbindgen_export(s,1*i,1),r}finally{ka.__wbindgen_add_to_stack_pointer(16)}}function pa(){return{__proto__:null,"./bindings_wasm_bg.js":{__proto__:null,__wbg___wbindgen_throw_5d9e815e6fdf150f:function(e,t){throw new Error(ba(e,t))},__wbg_error_757e9472f8410341:function(e,t){let n,s;try{n=e,s=t,console.error(ba(e,t))}finally{ka.__wbindgen_export(n,s,1)}},__wbg_length_31bdaf014f5fbde2:function(e){return Aa(e).length},__wbg_new_227d7c05414eb861:function(){return fa(new Error)},__wbg_prototypesetcall_ae9f5e7459250748:function(e,t,n){Uint8Array.prototype.set.call(ma(e,t),Aa(n))},__wbg_stack_3b0d974bbf31e44f:function(e,t){const n=va(Aa(t).stack,ka.__wbindgen_export2,ka.__wbindgen_export3),s=Ca;ya().setInt32(e+4,s,!0),ya().setInt32(e+0,n,!0)},__wbindgen_object_drop_ref:function(e){!function(e){const t=Aa(e);(function(e){if(e<1028)return;Sa[e]=$a,$a=e})(e)}(e)}}}}function fa(e){$a===Sa.length&&Sa.push(Sa.length+1);const t=$a;return $a=Sa[t],Sa[t]=e,t}function ma(e,t){return e>>>=0,xa().subarray(e/1,e/1+t)}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("");let ga=null;function ya(){return(null===ga||!0===ga.buffer.detached||void 0===ga.buffer.detached&&ga.buffer!==ka.memory.buffer)&&(ga=new DataView(ka.memory.buffer)),ga}function ba(e,t){return function(e,t){wa+=t,wa>=Ia&&(Pa=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Pa.decode(),wa=t);return Pa.decode(xa().subarray(e,e+t))}(e>>>0,t)}let Ea=null;function xa(){return null!==Ea&&0!==Ea.byteLength||(Ea=new Uint8Array(ka.memory.buffer)),Ea}function Aa(e){return Sa[e]}let Sa=new Array(1024).fill(void 0);Sa.push(void 0,null,!0,!1);let $a=Sa.length;function va(e,t,n){if(void 0===n){const n=Na.encode(e),s=t(n.length,1)>>>0;return xa().subarray(s,s+n.length).set(n),Ca=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=xa();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=xa().subarray(i+o,i+s);o+=Na.encodeInto(e,t).written,i=n(i,s,o,1)>>>0}return Ca=o,i}let Pa=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Pa.decode();const Ia=2146435072;let wa=0;const Na=new TextEncoder;"encodeInto"in Na||(Na.encodeInto=function(e,t){const n=Na.encode(e);return t.set(n),{read:e.length,written:n.length}});let ka,Ca=0;async function Ra(e){if(void 0!==ka)return ka;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===e&&(e=new URL("bindings_wasm_bg.wasm",import.meta.url));const t=pa();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:n}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if(!e.ok)throw new Error(`failed to fetch Wasm: ${e.status} ${e.statusText} fetching '${e.url}'`);if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!function(e){switch(e){case"basic":case"cors":case"default":return!0}return!1}(e.type)||"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,t);return function(e){return ka=e.exports,ga=null,Ea=null,ka}(n)}const Da=[function(e,t){return{type:"PanicError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ParseError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ArrayExpression",start:t[e],end:t[e+1],elements:Ma(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:Ma(t[e+2],t)}},function(e,t){const n=t[e+2],s=ts(t[e+3],t);return{type:"ArrowFunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),expression:!(2&~n),generator:!(4&~n),...s.length>0?{[Qn]:s}:{},params:Ma(t[e+4],t),body:Oa(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:Zn[t[e+2]],left:Oa(t[e+3],t),right:Oa(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:Oa(t[e+2],t),right:Oa(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:Oa(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:Zn[t[e+2]],left:Oa(t[e+3],t),right:Oa(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:Ma(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"BreakStatement",start:t[e],end:t[e+1],label:0===n?null:Oa(n,t)}},function(e,t){const n=t[e+2],s=ts(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{[Qn]:s}:{},callee:Oa(t[e+4],t),arguments:Ma(t[e+5],t)}},function(e,t){const n=t[e+2];return{type:"CatchClause",start:t[e],end:t[e+1],param:0===n?null:Oa(n,t),body:Oa(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:Oa(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:Ma(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassDeclaration",start:t[e],end:t[e+1],decorators:Ma(t[e+2],t),id:0===n?null:Oa(n,t),superClass:0===s?null:Oa(s,t),body:Oa(t[e+5],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassExpression",start:t[e],end:t[e+1],decorators:Ma(t[e+2],t),id:0===n?null:Oa(n,t),superClass:0===s?null:Oa(s,t),body:Oa(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:Oa(t[e+2],t),consequent:Oa(t[e+3],t),alternate:Oa(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ContinueStatement",start:t[e],end:t[e+1],label:0===n?null:Oa(n,t)}},function(e,t){return{type:"DebuggerStatement",start:t[e],end:t[e+1]}},function(e,t){return{type:"Decorator",start:t[e],end:t[e+1],expression:Oa(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:Oa(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:Oa(t[e+2],t),test:Oa(t[e+3],t)}},function(e,t){return{type:"EmptyStatement",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"ExportAllDeclaration",start:t[e],end:t[e+1],exported:0===n?null:Oa(n,t),source:Oa(t[e+3],t),attributes:Ma(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:Oa(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+5];return{type:"ExportNamedDeclaration",start:t[e],end:t[e+1],specifiers:Ma(t[e+2],t),source:0===n?null:Oa(n,t),attributes:Ma(t[e+4],t),declaration:0===s?null:Oa(s,t)}},function(e,t){const n=Oa(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:Oa(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:Oa(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:Oa(t[e+2],t),right:Oa(t[e+3],t),body:Oa(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ForOfStatement",start:t[e],end:t[e+1],await:!(1&~n),left:Oa(t[e+3],t),right:Oa(t[e+4],t),body:Oa(t[e+5],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=t[e+4];return{type:"ForStatement",start:t[e],end:t[e+1],init:0===n?null:Oa(n,t),test:0===s?null:Oa(s,t),update:0===i?null:Oa(i,t),body:Oa(t[e+5],t)}},function(e,t){const n=t[e+2],s=ts(t[e+3],t),i=t[e+4];return{type:"FunctionDeclaration",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[Qn]:s}:{},id:0===i?null:Oa(i,t),params:Ma(t[e+5],t),body:Oa(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=ts(t[e+3],t),i=t[e+4];return{type:"FunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[Qn]:s}:{},id:0===i?null:Oa(i,t),params:Ma(t[e+5],t),body:Oa(t[e+6],t),expression:!1}},function(e,t){return{type:"Identifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=t[e+4];return{type:"IfStatement",start:t[e],end:t[e+1],test:Oa(t[e+2],t),consequent:Oa(t[e+3],t),alternate:0===n?null:Oa(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:Oa(t[e+2],t),value:Oa(t[e+3],t)}},function(e,t){const n=t[e+5];return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:Ma(t[e+2],t),source:Oa(t[e+3],t),attributes:Ma(t[e+4],t),...0===n?{}:{phase:Zn[n]}}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:Oa(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ImportExpression",start:t[e],end:t[e+1],source:Oa(t[e+2],t),options:0===n?null:Oa(n,t),...0===s?{}:{phase:Zn[s]}}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:Oa(t[e+2],t)}},function(e,t){const n=t[e+2],s=Oa(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:Oa(n,t),local:s}},function(e,t){const n=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:Oa(t[e+2],t),value:0===n?null:Oa(n,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:Oa(t[e+2],t)}},function(e,t){return{type:"JSXClosingFragment",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+4];return{type:"JSXElement",start:t[e],end:t[e+1],openingElement:Oa(t[e+2],t),children:Ma(t[e+3],t),closingElement:0===n?null:Oa(n,t)}},function(e,t){return{type:"JSXEmptyExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"JSXExpressionContainer",start:t[e],end:t[e+1],expression:Oa(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:Oa(t[e+2],t),children:Ma(t[e+3],t),closingFragment:Oa(t[e+4],t)}},function(e,t){return{type:"JSXIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){return{type:"JSXMemberExpression",start:t[e],end:t[e+1],object:Oa(t[e+2],t),property:Oa(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:Oa(t[e+2],t),name:Oa(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"JSXOpeningElement",start:t[e],end:t[e+1],selfClosing:!(1&~n),name:Oa(t[e+3],t),attributes:Ma(t[e+4],t)}},function(e,t){return{type:"JSXOpeningFragment",start:t[e],end:t[e+1],attributes:[],selfClosing:!1}},function(e,t){return{type:"JSXSpreadAttribute",start:t[e],end:t[e+1],argument:Oa(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:Oa(t[e+2],t)}},function(e,t){return{type:"JSXText",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:t.convertString(t[e+3])}},function(e,t){return{type:"LabeledStatement",start:t[e],end:t[e+1],label:Oa(t[e+2],t),body:Oa(t[e+3],t)}},function(e,t){const n=t.convertString(t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],bigint:n,raw:t.convertString(t[e+3]),value:BigInt(n)}},function(e,t){const n=!(1&~t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],value:n,raw:n?"true":"false"}},function(e,t){return{type:"Literal",start:t[e],end:t[e+1],raw:"null",value:null}},function(e,t){const n=t[e+2];return{type:"Literal",start:t[e],end:t[e+1],raw:0===n?void 0:t.convertString(n),value:new DataView(t.buffer).getFloat64(e+3<<2,!0)}},function(e,t){const n=t.convertString(t[e+2]),s=t.convertString(t[e+3]);return{type:"Literal",start:t[e],end:t[e+1],raw:`/${s}/${n}`,regex:{flags:n,pattern:s},value:new RegExp(s,n)}},function(e,t){const n=t[e+3];return{type:"Literal",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:0===n?void 0:t.convertString(n)}},function(e,t){return{type:"LogicalExpression",start:t[e],end:t[e+1],operator:Zn[t[e+2]],left:Oa(t[e+3],t),right:Oa(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"MemberExpression",start:t[e],end:t[e+1],computed:!(1&~n),optional:!(2&~n),object:Oa(t[e+3],t),property:Oa(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:Oa(t[e+2],t),property:Oa(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"MethodDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:Ma(t[e+3],t),key:Oa(t[e+4],t),value:Oa(t[e+5],t),kind:Zn[t[e+6]]}},function(e,t){const n=ts(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{[Qn]:n}:{},callee:Oa(t[e+3],t),arguments:Ma(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:Ma(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:Ma(t[e+2],t)}},function(e,t){return{type:"PrivateIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=ts(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:Ma(t[e+2],t),...n.length>0?{[es]:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=Oa(t[e+4],t);return{type:"Property",start:t[e],end:t[e+1],method:!(1&~n),shorthand:!(2&~n),computed:!(4&~n),key:0===s?{...i}:Oa(s,t),value:i,kind:Zn[t[e+5]]}},function(e,t){const n=t[e+2],s=t[e+5];return{type:"PropertyDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:Ma(t[e+3],t),key:Oa(t[e+4],t),value:0===s?null:Oa(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:Oa(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"ReturnStatement",start:t[e],end:t[e+1],argument:0===n?null:Oa(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:Ma(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:Oa(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:Ma(t[e+2],t)}},function(e,t){return{type:"Super",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"SwitchCase",start:t[e],end:t[e+1],test:0===n?null:Oa(n,t),consequent:Ma(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:Oa(t[e+2],t),cases:Ma(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:Oa(t[e+2],t),quasi:Oa(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=0===s?null:t.convertString(s),r=t.convertString(t[e+4]);return{type:"TemplateElement",start:t[e],end:t[e+1],tail:!(1&~n),value:{cooked:i,raw:r}}},function(e,t){return{type:"TemplateLiteral",start:t[e],end:t[e+1],quasis:Ma(t[e+2],t),expressions:Ma(t[e+3],t)}},function(e,t){return{type:"ThisExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"ThrowStatement",start:t[e],end:t[e+1],argument:Oa(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"TryStatement",start:t[e],end:t[e+1],block:Oa(t[e+2],t),handler:0===n?null:Oa(n,t),finalizer:0===s?null:Oa(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:Zn[t[e+2]],argument:Oa(t[e+3],t),prefix:!0}},function(e,t){const n=t[e+2];return{type:"UpdateExpression",start:t[e],end:t[e+1],prefix:!(1&~n),operator:Zn[t[e+3]],argument:Oa(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:Zn[t[e+2]],declarations:Ma(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:Oa(t[e+2],t),init:0===n?null:Oa(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:Oa(t[e+2],t),body:Oa(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3];return{type:"YieldExpression",start:t[e],end:t[e+1],delegate:!(1&~n),argument:0===s?null:Oa(s,t)}}];function Oa(e,t){const n=t[e],s=Da[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function Ma(e,t){if(0===e)return de;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++){const n=t[e++];s[i]=n?Oa(n,t):null}return s}function _a(e){const t=new Uint32Array(e.buffer);let n;if("undefined"!=typeof Buffer&&e instanceof Buffer)n=n=>{const s=t[n++],i=n<<2;return e.toString("utf8",i,i+s)};else{const s=new TextDecoder;n=n=>{const i=t[n++],r=n<<2;return s.decode(e.subarray(r,r+i))}}return Object.assign(t,{convertString:n})}class La extends os{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e,t,n){const s=[],i=Ta(t);for(const t of this.elements)null!==t&&s.push(...t.declare(e,i,n));return s}deoptimizeAssignment(e,t){const n=Ta(e);for(const e of this.elements)e?.deoptimizeAssignment(n,t)}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(Ne)}hasEffectsWhenDestructuring(e,t,n){const s=Ta(t);for(const t of this.elements)if(t?.hasEffectsWhenDestructuring(e,s,n))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(Ne,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){let s=!1;const i=Ta(t);for(const t of[...this.elements].reverse())t&&(s&&!t.included&&t.includeNode(e),s=t.includeDestructuredIfNecessary(e,i,n)||s);return!this.included&&s&&this.includeNode(e),this.included}render(e,t){let n=this.start+1;for(const s of this.elements)if(s){if(!s.included){e.remove(n,this.end-1);break}s.render(e,t),n=s.end}}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}La.prototype.includeNode=as;const Ta=e=>e.at(-1)===ge?e:[...e,be];class Ba extends lr{constructor(){super(...arguments),this.objectEntity=null}get expression(){return Ge(this.flags,8388608)}set expression(e){this.flags=He(this.flags,8388608,e)}createScope(e){this.scope=new nr(e,!1)}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;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}onlyFunctionCallUsed(){return this.parent.type===rt&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,t){super.include(e,t);for(const n of this.params)n instanceof Di||n.include(e,t)}includeNode(e){this.included=!0,this.body.includePath(ke,e);for(const t of this.params)t instanceof Di||t.includePath(ke,e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new zs([],js)}}class za extends os{addExportedVariables(e,t){for(const n of this.properties)n.type===ut?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t,n){const s=[];for(const i of this.properties)s.push(...i.declare(e,t,n));return s}deoptimizeAssignment(e,t){for(const n of this.properties)n.deoptimizeAssignment(e,t)}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(Ne,t,n))return!0;return!1}hasEffectsWhenDestructuring(e,t,n){for(const s of this.properties)if(s.hasEffectsWhenDestructuring(e,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){if(!this.properties.length)return this.included;const s=this.properties.at(-1);let i=s.includeDestructuredIfNecessary(e,t,n);const r="RestElement"===s.type;for(const s of this.properties.slice(0,-1))r&&i&&!s.included&&s.includeNode(e),i=s.includeDestructuredIfNecessary(e,t,n)||i;return!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}render(e,t){if(this.properties.length>0){const n=ie(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):J(i,e,o,a);s&&e.remove(s,this.end-1)}}}za.prototype.includeNode=ls,za.prototype.applyDeoptimizations=cs;class Va extends os{constructor(){super(...arguments),this.isConstReassignment=!1}hasEffects(e){const{deoptimized:t,isConstReassignment:n,left:s,operator:i,right:r}=this;return t||this.applyDeoptimizations(),n||r.hasEffects(e)||s.hasEffectsAsAssignmentTarget(e,"="!==i)||this.left.hasEffectsWhenDestructuring?.(e,Ne,r)}hasEffectsOnInteractionAtPath(e,t,n){return 1===t.type&&this.left.included||this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,isConstReassignment:s,left:i,right:r,operator:o}=this;n||this.applyDeoptimizations(),this.included||this.includeNode(e);const a=Ue();(t||s||"="!==o||i.included||i.hasEffectsAsAssignmentTarget(a,!1)||i.hasEffectsWhenDestructuring?.(a,Ne,r))&&i.includeAsAssignmentTarget(e,t,"="!==o),r.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ke,e)}initialise(){if(super.initialise(),this.left instanceof Di){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&(this.isConstReassignment=!0,this.scope.context.log(yt,{code:"CONST_REASSIGN",message:"Cannot reassign a variable declared with `const`"},this.left.start))}this.left.setAssignedValue(this.right)}render(e,t,{preventASI:n,renderedParentType:s,renderedSurroundingElement:i}=ce){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=ee(e.original,Z(e.original,"=",r.end)+1);e.remove(a,l),n&&re(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof Di){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?ae(n,a,l,e,t):le(n,a,l,c.type!==at,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"],`${oe(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===at,e,t)}r.included&&r instanceof za&&(i===at||i===it)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(Ne,this.right),this.scope.context.requestTreeshakingPass()}}class Fa extends os{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t,n){return this.left.declare(e,t,n)}deoptimizeAssignment(e,t){this.left.deoptimizeAssignment(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(Ne,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.left.hasEffectsWhenDestructuring(e,t,n)}includeDestructuredIfNecessary(e,t,n){let s=this.left.includeDestructuredIfNecessary(e,t,n)||this.included;return(s||=this.right.shouldBeIncluded(e))&&(this.right.include(e,!1),this.left.included||(this.left.includeNode(e),this.left.includeDestructuredIfNecessary(e,t,n))),!this.included&&s&&this.includeNode(e),this.included}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ke,e)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=ce){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Ne),this.right.deoptimizePath(ke),this.scope.context.requestTreeshakingPass()}}class ja extends os{deoptimizePath(e){this.argument.deoptimizePath(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}initialise(){super.initialise();let e=this.parent;do{if(e instanceof cr||e instanceof Ba)return}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(Ua,e)}includePath(e,t){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(t),this.argument.includePath(e,t)}}const Ua=["then"];function Ga(e){return void 0===e?"void 0":"boolean"==typeof e?String(e):"string"==typeof e?JSON.stringify(e):"number"==typeof e?function(e){if(Object.is(-0,e))return"-0";const t=e.toExponential(),[n,s]=t.split("e"),i=n.split(".")[1]?.length||0,r=`${n.replace(".","")}e${parseInt(s)-i}`,o=String(e).replace("+","");return r.length<o.length?r:o}(e):We}const Ha={"!=":(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},Wa=Symbol("Unassigned");class qa extends os{constructor(){super(...arguments),this.renderedLiteralValue=Wa}deoptimizeCache(){this.renderedLiteralValue=We}getLiteralValueAtPath(e,t,n){if(e.length>0)return We;const s=this.left.getLiteralValueAtPath(Ne,t,n);if("symbol"==typeof s)return We;if("in"===this.operator&&this.right.variable instanceof fo){const[e]=this.right.variable.context.traceExport(String(s));return e instanceof Bn||e instanceof go?We:!!e}const i=this.right.getLiteralValueAtPath(Ne,t,n);if("symbol"==typeof i)return We;const r=Ha[this.operator];return r?r(s,i):We}getRenderedLiteralValue(){return"in"===this.operator&&this.right.variable instanceof fo?this.renderedLiteralValue!==Wa?this.renderedLiteralValue:this.renderedLiteralValue=Ga(this.getLiteralValueAtPath(Ne,_e,this)):We}hasEffects(e){return"+"===this.operator&&this.parent instanceof ir&&""===this.left.getLiteralValueAtPath(Ne,_e,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(e,t,n){this.included||this.includeNode(e),"symbol"==typeof this.getRenderedLiteralValue()&&(this.left.include(e,t,n),this.right.include(e,t,n),"instanceof"===this.operator&&this.right.includePath(De,e))}includeNode(e){this.included=!0,"in"===this.operator&&"symbol"==typeof this.getRenderedLiteralValue()&&this.right.includePath(ke,e)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=ce){const s=this.getRenderedLiteralValue();"symbol"!=typeof s?e.overwrite(this.start,this.end,s):(this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t))}}qa.prototype.applyDeoptimizations=cs;class Ka extends os{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,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}}function Xa(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(Z(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(Z(e.original,"(",n.callee.end)+1,n.end-1)}}Ka.prototype.includeNode=ls,Ka.prototype.applyDeoptimizations=cs;class Ja extends os{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!==Je);if(0!==o.length)if(i===Je)for(const e of o)e.deoptimizePath(ke);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]!==Je){this.returnExpression=Ye;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=he,this.deoptimizableDependentExpressions=de;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(ke)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==Je&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===Je?We:t.withTrackedEntityAtPath(e,s,()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n)),We)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===Je?i:n.withTrackedEntityAtPath(e,i,()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]},Ye)}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 Ya extends Ja{get hasCheckedForWarnings(){return Ge(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=He(this.flags,134217728,e)}get optional(){return Ge(this.flags,128)}set optional(e){this.flags=He(this.flags,128,e)}bind(){super.bind(),this.interaction={args:[this.callee instanceof Kr&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return Hr(this,this.callee,e,t,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Ne,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===rs)return rs;if(this.optional&&null==this.callee.getLiteralValueAtPath(Ne,_e,this))return!this.annotationPure&&t||rs;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(Ne,this.interaction,e))}include(e,t){this.included||this.includeNode(e),t?(super.include(e,!0),t===is&&this.callee instanceof Di&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.callee.include(e,!1),this.callee.includeCallArguments(this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations()}initialise(){super.initialise(),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t,{renderedSurroundingElement:n}=ce){if(this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),Xa(e,t,this),this.callee instanceof Di&&!this.hasCheckedForWarnings){this.hasCheckedForWarnings=!0;this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(yt,rn(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(yt,{code:"EVAL",id:s=this.scope.context.module.id,message:`Use of eval in "${$t(s)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:wt("troubleshooting/#avoiding-eval")},this.start)}var s}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ne,_e),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=_e){return null===this.returnExpression?(this.returnExpression=Ye,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Ne,this.interaction,e,this)):this.returnExpression}}class Za extends os{createScope(e){this.scope=new tr(e,!0)}parseNode(e){const{body:t,param:n,type:s}=e;return this.type=s,n&&(this.param=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n),this.param.declare("parameter",Ne,Je)),this.body=new rr(this,this.scope.bodyScope).parseNode(t),super.parseNode(e)}}Za.prototype.preventChildBlockScope=!0,Za.prototype.includeNode=as;class Qa extends os{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===rs?void 0:s}hasEffects(e){return!0===this.expression.hasEffectsAsChainElement(e)}includePath(e,t){this.included=!0,this.expression.includePath(e,t)}removeAnnotations(e){this.expression.removeAnnotations(e)}}Qa.prototype.includeNode=ls,Qa.prototype.applyDeoptimizations=cs;class el extends Li{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new wi("this",null,t,Ne,n,"other")),this.instanceScope=new Li(this,n),this.instanceScope.variables.set("this",new Zi(n))}findLexicalBoundary(){return this}}class tl extends os{createScope(e){this.scope=new el(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,ke,e);for(const n of this.body)n.include(e,t)}parseNode(e){const t=this.body=new Array(e.body.length);let n=0;for(const s of e.body)t[n++]=new(this.scope.context.getNodeConstructor(s.type))(this,s.static?this.scope:this.scope.instanceScope).parseNode(s);return super.parseNode(e)}}tl.prototype.includeNode=ls,tl.prototype.applyDeoptimizations=cs;class nl extends Ui{render(e,t,{renderedSurroundingElement:n}=ce){super.render(e,t),n===at&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}function sl(e){return"symbol"==typeof e?e!==Ke&&(e===qe||We):!!e}class il extends Xe{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new il(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}}class rl extends os{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Ge(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=He(this.flags,65536,e)}get hasDeoptimizedCache(){return Ge(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=He(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(!this.hasDeoptimizedCache&&(this.hasDeoptimizedCache=!0,null!==this.usedBranch)){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(ke),this.included&&e.includePath(ke,je());const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=de;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();if(!s){if(this.hasDeoptimizedCache)return We;const s=this.consequent.getLiteralValueAtPath(e,t,n),i=sl(s);if(i===We)return We;const r=this.alternate.getLiteralValueAtPath(e,t,n);return i!==sl(r)?We:(this.expressionsToBeDeoptimized.push(n),s!==r?i?qe:Ke:s)}return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new il([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();null===n||t||this.test.shouldBeIncluded(e)?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();null===n||this.test.shouldBeIncluded(t)?(this.consequent.includePath(e,t),this.alternate.includePath(e,t)):n.includePath(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}=ce){if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const o=this.getUsedBranch(),a=Z(e.original,":",this.consequent.end),l=ee(e.original,(this.consequent.included?Z(e.original,"?",this.test.end):a)+1);s&&re(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=sl(this.test.getLiteralValueAtPath(Ne,_e,this));return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}rl.prototype.includeNode=ls,rl.prototype.applyDeoptimizations=cs;class ol extends os{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,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}}ol.prototype.includeNode=ls,ol.prototype.applyDeoptimizations=cs;class al extends os{hasEffects(){return!0}}al.prototype.includeNode=as;class ll extends os{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(Ne,st,e)}}function cl(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 ul(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}ll.prototype.includeNode=as;class dl extends os{hasEffects(e){return!!this.test.hasEffects(e)||cl(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),ul(e,this.body,t)}}dl.prototype.includeNode=ls,dl.prototype.applyDeoptimizations=cs;class hl extends os{hasEffects(){return!1}}hl.prototype.includeNode=as;class pl extends os{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}}pl.prototype.needsBoundaries=!0,pl.prototype.includeNode=ls,pl.prototype.applyDeoptimizations=cs;class fl extends os{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){super.initialise(),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration?.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n;if(null===this.declaration)e.remove(s,i);else{let n=this.declaration.start;if(this.declaration instanceof Gi){const e=this.declaration.decorators;for(const t of e)n=Math.min(n,t.start);n<=this.start&&(n=this.declaration.start)}e.remove(this.start,n),this.declaration.render(e,t,{end:i,start:s})}}}fl.prototype.needsBoundaries=!0,fl.prototype.includeNode=ls,fl.prototype.applyDeoptimizations=cs;class ml extends os{}ml.prototype.includeNode=ls,ml.prototype.applyDeoptimizations=cs;class gl extends os{createScope(e){this.scope=new Vi(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||cl(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),ul(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ke,e)}initialise(){super.initialise(),this.left.setAssignedValue(Je)}render(e,t){this.left.render(e,t,Y),this.right.render(e,t,Y),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(Ne),this.scope.context.requestTreeshakingPass()}}class yl extends os{get await(){return Ge(this.flags,131072)}set await(e){this.flags=He(this.flags,131072,e)}createScope(e){this.scope=new Vi(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||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),ul(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ke,e)}initialise(){super.initialise(),this.left.setAssignedValue(Je)}render(e,t){this.left.render(e,t,Y),this.right.render(e,t,Y),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(Ne),this.right.deoptimizePath(ke),this.scope.context.requestTreeshakingPass()}}class bl extends os{createScope(e){this.scope=new Vi(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||cl(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),ul(e,this.body,t)}render(e,t){this.init?.render(e,t,Y),this.test?.render(e,t,Y),this.update?.render(e,t,Y),this.body.render(e,t)}}bl.prototype.includeNode=ls,bl.prototype.applyDeoptimizations=cs;class El extends cr{createScope(e){super.createScope(this.idScope=new Li(e,e.context))}parseNode(e){return null!==e.id&&(this.id=new Di(this,this.idScope).parseNode(e.id)),super.parseNode(e)}onlyFunctionCallUsed(){return this.parent.type===rt&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=ce){super.render(e,t),n===at&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class xl extends Vi{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s,i)}}const Al=Symbol("unset");class Sl extends os{constructor(){super(...arguments),this.testValue=Al}deoptimizeCache(){this.testValue=We}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){return this.consequent=new(this.scope.context.getNodeConstructor(e.consequent.type))(this,this.consequentScope=new xl(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new xl(this.scope)).parseNode(e.alternate)),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)}getTestValue(){return this.testValue===Al?this.testValue=sl(this.test.getLiteralValueAtPath(Ne,_e,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!==ct&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof Sl&&e.alternate)return!0;if(e instanceof rr)return!1;e=e.parent}while(e);return!1}}Sl.prototype.includeNode=ls,Sl.prototype.applyDeoptimizations=cs;class $l extends os{}class vl extends os{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}}vl.prototype.needsBoundaries=!0,vl.prototype.includeNode=ls,vl.prototype.applyDeoptimizations=cs;class Pl extends os{}Pl.prototype.includeNode=ls,Pl.prototype.applyDeoptimizations=cs;class Il{constructor(e){this.interaction={args:[null,e],type:2,withNew:!1}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){Ze(e),2===e.type&&0===t.length&&(ds(e.args[1])||us(e.args[1]))&&e.args[1].deoptimizeArgumentsOnInteractionAtPath(this.interaction,[],n)}includeCallArguments(e,t){et(e,t),2===e.type&&(ds(e.args[1])||us(e.args[1]))&&e.args[1].includeCallArguments(this.interaction,t)}}class wl{deoptimizeArgumentsOnInteractionAtPath(e){Ze(e)}includeCallArguments(e,t){et(e,t)}}function Nl(e){return{fileName:e.getFileName(),...e.getPreRenderedChunkInfo()}}class kl extends os{constructor(){super(...arguments),this.inlineNamespace=null,this.resolution=null,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.localResolution=null,this.resolutionString=null}get shouldIncludeDynamicAttributes(){return Ge(this.flags,268435456)}set shouldIncludeDynamicAttributes(e){this.flags=He(this.flags,268435456,e)}bind(){const{options:e,parent:t,resolution:n,source:s}=this;if(s.bind(),e?.bind(),"object"!=typeof n||!n||!("namespace"in n))return;if(ms(t)||(i=t)instanceof os&&"AwaitExpression"===i.type)return void(this.localResolution={resolution:n,tracked:!0});var i;if(!ps(t))return void(this.localResolution={resolution:n,tracked:!1});let r=t,o=this;for(;!r.computed&&r.object===o&&fs(r.property)&&hs(r.parent);){const e=r.property.name;if(o=r.parent,"then"===e){const e=o.arguments[0];if(void 0===e||ds(e)||us(e))return r.promiseHandler=new Il(mo(n.namespace)),void(this.localResolution={resolution:n,tracked:!0})}else if("catch"===e||"finally"===e){if(ps(o.parent)){r.promiseHandler=new wl,r=o.parent;continue}if(ms(o.parent))return r.promiseHandler=new wl,void(this.localResolution={resolution:n,tracked:!0})}break}this.localResolution={resolution:n,tracked:!1}}deoptimizePath(e){this.localResolution?.resolution?.namespace.deoptimizePath(e)}hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.source.include(e,t),this.shouldIncludeDynamicAttributes&&this.options?.include(e,t),t&&this.localResolution?.resolution.includeAllExports()}includeNode(e){this.included=!0;const{localResolution:t,scope:n,shouldIncludeDynamicAttributes:s}=this;s&&this.options?.includePath(ke,e),n.context.includeDynamicImport(this),n.addAccessedDynamicImport(this),t&&(t.tracked?t.resolution.includeModuleInExecution():t.resolution.includeAllExports())}includePath(e,t){this.included||this.includeNode(t),this.localResolution?.resolution?.namespace.includeMemberPath(e,t)}initialise(){super.initialise(),this.scope.context.addDynamicImport(this)}parseNode(e){return this.sourceAstNode=e.source,super.parseNode(e)}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r},importAttributesKey:o}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});return void e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}if(this.mechanism&&(e.overwrite(this.start,Z(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([[o,this.attributes]],{lineBreakIndent:null})}`))}setExternalResolution(e,t,n,s,i,r,o,a,l,c){const{format:u}=t;this.inlineNamespace=null,this.resolutionString=r,this.namespaceExportName=o,this.attributes=a;const d=[...Rl[u]||[]];let h;({helper:h,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(e,t,n,s,l,c)),h&&d.push(h),d.length>0&&this.scope.addAccessedGlobals(d,i)}setInternalResolution(e){this.inlineNamespace=e}getDynamicImportMechanismAndHelper(e,{compact:t,dynamicImportInCjs:n,format:s,generatedCode:{arrowFunctions:i},interop:r},{_:o,getDirectReturnFunction:a,getDirectReturnIifeLeft:l},c,u,d){const{resolution:h,scope:p}=this,f=c.hookFirstSync("renderDynamicImport",[{chunk:Nl(u),customResolution:"string"==typeof h?h:null,format:s,getTargetChunkImports(){if(null===d)return null;const e=[],t=u.getFileName();for(const n of d.dependencies){const s=`'${n.getImportPath(t)}'`;n instanceof yo?e.push({fileName:n.getFileName(),resolvedImportPath:s,type:"external"}):e.push({chunk:n.getPreRenderedChunkInfo(),fileName:n.getFileName(),resolvedImportPath:s,type:"internal"})}return e},moduleId:p.context.module.id,targetChunk:d?Nl(d):null,targetModuleAttributes:h&&"string"!=typeof h?h.info.attributes:{},targetModuleId:h&&"string"!=typeof h?h.id:null}]);if(f)return{helper:null,mechanism:f};const m=!h||"string"==typeof h;switch(s){case"cjs":{if(n&&(!h||"string"==typeof h||h instanceof Xn))return{helper:null,mechanism:null};const t=Cl(h,e,r);let s="require(",o=")";t&&(s=`/*#__PURE__*/${t}(${s}`,o+=")");const[c,u]=a([],{functionReturn:!0,lineBreakIndent:null,name:null});return s=`Promise.resolve().then(${c}${s}`,o+=`${u})`,!i&&m&&(s=l(["t"],`${s}t${o}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),o=")"),{helper:t,mechanism:{left:s,right:o}}}case"amd":{const n=t?"c":"resolve",s=t?"e":"reject",c=Cl(h,e,r),[u,d]=a(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),p=c?`${u}${n}(/*#__PURE__*/${c}(m))${d}`:n,[f,g]=a([n,s],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${f}require([`,b=`],${o}${p},${o}${s})${g})`;return!i&&m&&(y=l(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:c,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function Cl(e,t,n){return"external"===t?Ir[n(e instanceof Xn?e.id:null)]:"default"===t?Ar:null}kl.prototype.applyDeoptimizations=cs;const Rl={amd:["require"],cjs:["require"],system:["module"]};class Dl extends os{}Dl.prototype.includeNode=ls,Dl.prototype.applyDeoptimizations=cs;class Ol extends os{}Ol.prototype.includeNode=ls,Ol.prototype.applyDeoptimizations=cs;class Ml extends ki{constructor(){super(...arguments),this.isNativeElement=!1}bind(){const e=this.getType();0===e?(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)):1===e&&(this.isNativeElement=!0)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,Ne,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n}){if(this.variable){const s=this.variable.getName(t,n);s!==this.name&&e.overwrite(this.start,this.end,s,{contentOnly:!0,storeName:!0})}else this.isNativeElement&&"preserve"!==this.scope.context.options.jsx.mode&&e.update(this.start,this.end,JSON.stringify(this.name))}getType(){switch(this.parent.type){case"JSXOpeningElement":case"JSXClosingElement":return this.name.startsWith(this.name.charAt(0).toUpperCase())?0:1;case"JSXMemberExpression":return this.parent.object===this?0:2;case"JSXAttribute":case"JSXNamespacedName":return 2;default:throw new Error(`Unexpected parent node type for JSXIdentifier: ${this.parent.type}`)}}}class _l extends os{render(e,t,{jsxMode:n}=ce){if(super.render(e,t),["classic","automatic"].includes(n)){const{name:t,value:s}=this,i=t instanceof Ml?t.name:`${t.namespace.name}:${t.name.name}`;if("automatic"!==n||"key"!==i){const n=qn(i);i!==n&&e.overwrite(t.start,t.end,n,{contentOnly:!0}),s?(e.overwrite(t.end,s.start,": ",{contentOnly:!0}),s instanceof Gr&&"string"==typeof s.value&&s.value.includes("\n")&&e.overwrite(s.start,s.end,JSON.stringify(s.value),{contentOnly:!0})):e.appendLeft(t.end,": true")}}}}_l.prototype.includeNode=as;class Ll extends os{render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n?e.overwrite(this.start,this.end,")",{contentOnly:!0}):super.render(e,t)}}Ll.prototype.includeNode=as;class Tl extends Ll{}class Bl extends Ll{}class zl extends os{render(e,t){this.argument.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.argument.start,"",{contentOnly:!0}),e.overwrite(this.argument.end,this.end,"",{contentOnly:!0}))}}class Vl extends os{}Vl.prototype.includeNode=as;class Fl extends os{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.expression.includePath(ke,e)}render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.remove(this.start,this.expression.start),e.remove(this.expression.end,this.end)),this.expression.render(e,t)}}const jl=/^[ \t]*\r?\n[ \t\r\n]*|[ \t]*\r?\n[ \t\r\n]*$/g,Ul=/[ \t]*\r?\n[ \t\r\n]*/g;class Gl extends os{shouldRender(){return!!this.getRenderedText()}render(e){const{mode:t}=this.scope.context.options.jsx;"preserve"!==t&&e.overwrite(this.start,this.end,JSON.stringify(this.getRenderedText()),{contentOnly:!0})}getRenderedText(){return void 0===this.renderedText&&(this.renderedText=this.value.replace(jl,"").replace(Ul," ")),this.renderedText}}function Hl(e){let t=0;for(const n of e)n instanceof Fl&&n.expression instanceof Vl||n instanceof Gl&&!n.shouldRender()||t++;return t}function Wl(e,t,n,s,i){const[r,o]=e.split(".");let a;if(n){if(a=s.scope.context.getImportedJsxFactoryVariable(o?"default":r,s.start,n),t){s.scope.findGlobal(r).includePath(ke,i),a.globalName=r}}else a=s.scope.findGlobal(r);return s.scope.context.includeVariableInModule(a,ke,i),a instanceof wi&&(a.consolidateInitializers(),a.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),a}Gl.prototype.includeNode=as;class ql extends os{constructor(){super(...arguments),this.factoryVariable=null,this.factory=null}initialise(){super.initialise();const{importSource:e}=this.jsxMode=this.getRenderingMode();e&&this.scope.context.addImportSource(e)}include(e,t){this.included||this.includeNode(e);for(const n of this.children)n.include(e,t)}includeNode(e){this.included=!0;const{factory:t,importSource:n,mode:s}=this.jsxMode;t&&(this.factory=t,this.factoryVariable=Wl(t,"preserve"===s,n,this,e))}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;return"automatic"===t?{factory:Hl(this.children)>1?"jsxs":"jsx",importSource:e.jsxImportSource,mode:t}:{factory:n,importSource:s,mode:t}}renderChildren(e,t,n){const{children:s}=this;let i=!1,r=n,o=null;for(const n of s)n instanceof Fl&&n.expression instanceof Vl||n instanceof Gl&&!n.shouldRender()?e.remove(r,n.end):(e.appendLeft(r,", "),n.render(e,t),o?i=!0:o=n),r=n.end;return{childrenEnd:r,firstChild:o,hasMultipleChildren:i}}}ql.prototype.applyDeoptimizations=cs;class Kl extends ql{include(e,t){super.include(e,t),this.openingElement.include(e,t),this.closingElement?.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;if("automatic"===t){let e=!1;for(const t of this.openingElement.attributes)if(t instanceof zl)e=!0;else if(e&&"key"===t.name.name)return{factory:n,importSource:s,mode:"classic"}}return super.getRenderingMode()}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factory:o,factoryVariable:a,openingElement:{end:l,selfClosing:c}}=this,[,...u]=o.split("."),{firstAttribute:d,hasAttributes:h,hasSpread:p,inObject:f,previousEnd:m}=this.renderAttributes(e,t,[a.getName(n,s),...u].join("."),!1);this.wrapAttributes(e,f,h,p,d,"null",m),this.renderChildren(e,t,l),c?e.appendLeft(r,")"):i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factoryVariable:o,openingElement:{end:a,selfClosing:l}}=this;let{firstAttribute:c,hasAttributes:u,hasSpread:d,inObject:h,keyAttribute:p,previousEnd:f}=this.renderAttributes(e,t,o.getName(n,s),!0);const{firstChild:m,hasMultipleChildren:g,childrenEnd:y}=this.renderChildren(e,t,a);m&&(e.prependRight(m.start,"children: "+(g?"[":"")),h||(e.prependRight(m.start,"{ "),h=!0),f=i.start,g&&e.appendLeft(f,"]"));const b=m?y:f;if(this.wrapAttributes(e,h,u||!!m,d,c||m,"{}",b),p){const{value:t}=p;e.appendLeft(b,", "),t?e.move(t.start,t.end,b):e.appendLeft(b,"true")}l?e.appendLeft(p?.value?.end||r,")"):i.render(e,t)}renderAttributes(e,t,n,s){const{jsxMode:{mode:i},openingElement:r}=this,{attributes:o,end:a,start:l,name:{start:c,end:u}}=r;e.update(l,c,`/*#__PURE__*/${n}(`),r.render(e,t,{jsxMode:i});let d=null,h=!1,p=!1,f=u,m=!1,g=null;for(const t of o){if(t instanceof _l){if(s&&"key"===t.name.name){d=t,e.remove(f,t.value?.start||t.end);continue}e.appendLeft(f,","),p||(e.prependRight(t.start,"{ "),p=!0),m=!0}else p?(m&&e.appendLeft(f," "),e.appendLeft(f,"},"),p=!1):e.appendLeft(f,","),h=!0;f=t.end,g??=t}return e.remove(o.at(-1)?.end||f,a),{firstAttribute:g,hasAttributes:m,hasSpread:h,inObject:p,keyAttribute:d,previousEnd:f}}wrapAttributes(e,t,n,s,i,r,o){if(t&&e.appendLeft(o," }"),s){if(n){const{start:t}=i;i instanceof zl&&e.prependRight(t,"{}, "),e.prependRight(t,"Object.assign("),e.appendLeft(o,")")}}else n||e.appendLeft(o,`, ${r}`)}}class Xl extends ql{include(e,t){super.include(e,t),this.openingFragment.include(e,t),this.closingFragment.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factory:r,factoryVariable:o,openingFragment:a,start:l}=this,[,...c]=r.split(".");a.render(e,t),e.prependRight(l,`/*#__PURE__*/${[o.getName(n,s),...c].join(".")}(`),e.appendLeft(a.end,", null"),this.renderChildren(e,t,a.end),i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factoryVariable:r,openingFragment:o,start:a}=this;o.render(e,t),e.prependRight(a,`/*#__PURE__*/${r.getName(n,s)}(`);const{firstChild:l,hasMultipleChildren:c,childrenEnd:u}=this.renderChildren(e,t,o.end);l?(e.prependRight(l.start,"{ children: "+(c?"[":"")),c&&e.appendLeft(i.start,"]"),e.appendLeft(u," }")):e.appendLeft(o.end,", {}"),i.render(e,t)}}class Jl extends os{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.object.includePath([this.property.name],e)}includePath(e,t){this.included||this.includeNode(t),this.object.includePath([this.property.name,...e],t)}}class Yl extends os{}Yl.prototype.includeNode=as;class Zl extends os{render(e,t,{jsxMode:n=this.scope.context.options.jsx.mode}={}){this.name.render(e,t);for(const s of this.attributes)s.render(e,t,{jsxMode:n})}}Zl.prototype.includeNode=as;class Ql extends os{constructor(){super(...arguments),this.fragment=null,this.fragmentVariable=null}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.jsx;if("automatic"===t.mode)this.fragment="Fragment",this.fragmentVariable=Wl("Fragment",!1,t.jsxImportSource,this,e);else{const{fragment:n,importSource:s,mode:i}=t;null!=n&&(this.fragment=n,this.fragmentVariable=Wl(n,"preserve"===i,s,this,e))}}render(e,t){const{mode:n}=this.scope.context.options.jsx;if("preserve"!==n){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,[,...i]=this.fragment.split("."),r=[this.fragmentVariable.getName(n,s),...i].join(".");e.update(this.start,this.end,r)}}}class ec extends os{render(e,t){super.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.expression.start,"...",{contentOnly:!0}),e.overwrite(this.expression.end,this.end,"",{contentOnly:!0}))}}class tc extends os{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||this.includeNode(e);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,t),e.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}includeNode(e){this.included=!0,this.body.includePath(ke,e)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,ee(e.original,Z(e.original,":",this.label.end)+1)),this.body.render(e,t)}}tc.prototype.applyDeoptimizations=cs;class nc extends os{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Ge(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=He(this.flags,65536,e)}get hasDeoptimizedCache(){return Ge(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=He(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.hasDeoptimizedCache)return;if(this.hasDeoptimizedCache=!0,this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(ke),this.included&&e.includePath(ke,je())}const{scope:{context:e},expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=de;for(const e of t)e.deoptimizeCache();e.requestTreeshakingPass()}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){if(n===this)return We;const s=this.getUsedBranch();if(s)return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n);if(!this.hasDeoptimizedCache&&!e.length){const s=sl(this.right.getLiteralValueAtPath(e,t,n));if("symbol"!=typeof s){if(!s&&"&&"===this.operator)return this.expressionsToBeDeoptimized.push(n),Ke;if(s&&"||"===this.operator)return this.expressionsToBeDeoptimized.push(n),qe}}return We}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new il([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||n===this.right&&this.left.shouldBeIncluded(e)?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();!n||n===this.right&&this.left.shouldBeIncluded(t)?(this.left.includePath(e,t),this.right.includePath(e,t)):n.includePath(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=ce){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=Z(e.original,this.operator,this.left.end);if(this.right.included){const t=ee(e.original,o+2);e.remove(this.start,t),s&&re(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!te.test(e[n-1]))return n;n--}}(e.original,this.left.end,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(Ne,_e,this),t=sl(e);if("symbol"==typeof t||"??"===this.operator&&"symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&t||"&&"===this.operator&&!t||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}}nc.prototype.includeNode=ls,nc.prototype.applyDeoptimizations=cs;class sc extends os{hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Ne,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.callee.include(e,!1),this.callee.includeCallArguments(this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(ke,e)}initialise(){super.initialise(),this.interaction={args:[null,...this.arguments],type:2,withNew:!0},this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t){this.callee.render(e,t),Xa(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ne,_e),this.scope.context.requestTreeshakingPass()}}class ic extends os{constructor(){super(...arguments),this.objectEntity=null,this.protoProp=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)}include(e,t){this.included||this.includeNode(e),this.getObjectEntity().include(e,t),this.protoProp?.include(e,t)}includeNode(e){this.included=!0,this.protoProp?.includePath(ke,e)}includePath(e,t){this.included||this.includeNode(t),this.getObjectEntity().includePath(e,t)}render(e,t,{renderedSurroundingElement:n}=ce){if(n!==at&&n!==it||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const n=ie(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):J(i,e,o,a);s&&e.remove(s,this.end-1)}}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=js;const t=[];for(const n of this.properties){if(n instanceof ni){t.push({key:ge,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(Ne,_e,this);if("symbol"==typeof e){t.push({key:Pe(e)?e:ge,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof Di?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){this.protoProp=n,e=n.value instanceof Gr&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new zs(t,e)}}ic.prototype.applyDeoptimizations=cs;class rc extends os{initialise(){const{id:e}=this.scope.context.module;return Ft(Nn(jt(Pn(this.message)),e))}}class oc extends os{initialise(){const e=this.start,{id:t}=this.scope.context.module,n=Nn(jt(Pn(this.message,e)),t);this.scope.context.error(n,e)}}class ac extends os{}ac.prototype.includeNode=as;class lc extends os{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(Ue()):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(bt,un(e,s.id,ht(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)}initialise(){if(super.initialise(),this.invalidAnnotations)for(const{start:e,end:t,type:n}of this.invalidAnnotations)this.scope.context.magicString.remove(e,t),"pure"!==n&&"noSideEffects"!==n||this.scope.context.log(yt,fn(this.scope.context.code.slice(e,t),this.scope.context.module.id,n),e)}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=ne(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}se(this.body,e,n,this.end,t)}else super.render(e,t)}}lc.prototype.includeNode=ls,lc.prototype.applyDeoptimizations=cs;class cc extends Bi{get method(){return Ge(this.flags,262144)}set method(e){this.flags=He(this.flags,262144,e)}get shorthand(){return Ge(this.flags,524288)}set shorthand(e){this.flags=He(this.flags,524288,e)}declare(e,t,n){return this.value.declare(e,this.getPathInProperty(t),n)}deoptimizeAssignment(e,t){this.value.deoptimizeAssignment?.(this.getPathInProperty(e),t)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenDestructuring(e,t,n){return this.value.hasEffectsWhenDestructuring?.(e,this.getPathInProperty(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.getPathInProperty(t);let i=this.value.includeDestructuredIfNecessary(e,s,n)||this.included;return(i||=this.key.hasEffects(Ue()))&&(this.key.include(e,!1),this.value.included||(this.value.includeNode(e),this.value.includeDestructuredIfNecessary(e,s,n))),!this.included&&i&&this.includeNode(e),this.included}include(e,t){this.included=!0,this.key.include(e,t),this.value.include(e,t)}includePath(e,t){this.included=!0,this.value.includePath(e,t)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}getPathInProperty(e){return e.at(-1)===ge?e:this.computed?[...e,ge]:this.key instanceof Di?[...e,this.key.name]:[...e,String(this.key.value)]}}cc.prototype.includeNode=ls,cc.prototype.applyDeoptimizations=cs;class uc extends os{get computed(){return Ge(this.flags,1024)}set computed(e){this.flags=He(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):We}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):Ye}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||Ti(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.value?.includePath(ke,e);for(const t of this.decorators)t.includePath(ke,e)}}uc.prototype.applyDeoptimizations=cs;class dc extends os{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included||this.includeNode(e),this.argument?.include(e,t),e.brokenFlow=!0}includeNode(e){this.included=!0,this.argument?.includePath(ke,e)}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||Je)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}dc.prototype.applyDeoptimizations=cs;class hc extends os{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 ir)||s.shouldBeIncluded(e))&&s.include(e,t)}includePath(e,t){this.included=!0,this.expressions[this.expressions.length-1].includePath(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=ce){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:u,end:d}of ie(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&re(e,u,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 J(l,e,u,d);o&&e.remove(o,this.end)}}hc.prototype.includeNode=ls,hc.prototype.applyDeoptimizations=cs;class pc extends os{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,Ne,e)}}class fc extends os{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.test&&(this.test.render(e,t),this.test.start===this.start+4&&e.prependLeft(this.test.start," ")),this.consequent.length>0){const s=this.test?this.test.end:Z(e.original,"default",this.start)+7,i=Z(e.original,":",s)+1;se(this.consequent,e,i,n.end,t)}}}fc.prototype.needsBoundaries=!0,fc.prototype.includeNode=ls,fc.prototype.applyDeoptimizations=cs;class mc extends os{createScope(e){this.parentScope=e,this.scope=new Vi(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=Ue();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(){super.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){return this.discriminant=new(this.scope.context.getNodeConstructor(e.discriminant.type))(this,this.parentScope).parseNode(e.discriminant),super.parseNode(e)}render(e,t){this.discriminant.render(e,t),this.cases.length>0&&se(this.cases,e,this.cases[0].start,this.end-1,t)}}mc.prototype.includeNode=ls,mc.prototype.applyDeoptimizations=cs;class gc extends Ja{get hasCheckedForWarnings(){return Ge(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=He(this.flags,134217728,e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(Ne,this.interaction,e)}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.quasi.include(e,!1),this.tag.include(e,!1),this.tag.includeCallArguments(this.interaction,e))}initialise(){super.initialise(),this.args=[Je,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Kr&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){if(this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t),!this.hasCheckedForWarnings&&this.tag.type===lt){this.hasCheckedForWarnings=!0;const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(yt,rn(e),this.start)}}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ne,_e),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=_e){return null===this.returnExpression?(this.returnExpression=Ye,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Ne,this.interaction,e,this)):this.returnExpression}}gc.prototype.includeNode=as;class yc extends os{get tail(){return Ge(this.flags,1048576)}set tail(e){this.flags=He(this.flags,1048576,e)}bind(){}hasEffects(){return!1}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}yc.prototype.includeNode=as;class bc extends os{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?We:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Ye:Ds(Cs,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Rs(Cs,e[0],t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.expressions)t.includePath(ke,e)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class Ec extends Li{constructor(e,t,n){super(e,t),this.importDescriptions=n,this.variables.set("this",new wi("this",null,ys,Ne,t,"other"))}addDeclaration(e,t,n,s,i){return this.importDescriptions.has(e.name)&&t.error(In(e.name),e.start),super.addDeclaration(e,t,n,s,i)}addExportDefaultDeclaration(e,t){const n=new po(e,t);return this.variables.set("default",n),n}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 Pi&&this.accessedOutsideVariables.set(e,n),n}}class xc extends os{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(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,Ne,e)}includePath(e,t){this.included?e.length>0&&this.variable.includePath(e,t):(this.included=!0,this.scope.context.includeVariableInModule(this.variable,e,t));const n=function(e,t){for(;!(e instanceof sr&&e.thisVariable===t);){if(!(e instanceof Li))return null;e=e.parent}return e}(this.scope,this.variable);n&&n.functionNode.parent instanceof cc&&n.functionNode.parent.parent instanceof ic&&n.functionNode.parent.parent.includePath(e,t)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof Ec?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(yt,{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:wt("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}}class Ac extends os{hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t),e.brokenFlow=!0}includeNode(e){this.included||(this.included=!0,this.argument.includePath(ke,e))}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class Sc extends os{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?is: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)}}Sc.prototype.includeNode=ls,Sc.prototype.applyDeoptimizations=cs;const $c={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>We,typeof:e=>typeof e,void:()=>{},"~":e=>~e},vc=Symbol("Unassigned");class Pc extends os{constructor(){super(...arguments),this.renderedLiteralValue=vc}get prefix(){return Ge(this.flags,2097152)}set prefix(e){this.flags=He(this.flags,2097152,e)}deoptimizeCache(){this.renderedLiteralValue=We}getLiteralValueAtPath(e,t,n){if(e.length>0)return We;const s=this.argument.getLiteralValueAtPath(Ne,t,n);if("symbol"==typeof s){if("void"===this.operator)return;if("!"===this.operator){if(s===Ke)return!0;if(s===qe)return!1}return We}return $c[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof Di)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Ne,nt,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(Ne),this.scope.context.requestTreeshakingPass())}getRenderedLiteralValue(e){return this.renderedLiteralValue!==vc?this.renderedLiteralValue:this.renderedLiteralValue=e?We:Ga(this.getLiteralValueAtPath(Ne,_e,this))}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const s=this.argument instanceof Di&&this.argument.variable?.included;("symbol"==typeof this.getRenderedLiteralValue(t)||this.argument.shouldBeIncluded(e)||s)&&(this.argument.include(e,t),this.renderedLiteralValue=We)}render(e,t){if("symbol"==typeof this.renderedLiteralValue)super.render(e,t);else{let t=this.renderedLiteralValue;Ic.test(e.original[this.start-1])||(t=` ${t}`),e.overwrite(this.start,this.end,t)}}}const Ic=/[\s([=%&*+-/<>^|,?:;]/;Pc.prototype.includeNode=as;class wc extends os{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.included||this.includeNode(e),this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(Je)}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?ae(s,this.start,this.end,e,t):le(s,this.start,this.end,this.parent.type!==at,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${oe([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==at,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(Ne),this.argument instanceof Di){this.scope.findVariable(this.argument.name).markReassigned()}this.scope.context.requestTreeshakingPass()}}function Nc(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}wc.prototype.includeNode=as;class kc extends os{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Ne)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=ce){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 za||i instanceof La)&&r.include(e,t)}}initialise(){super.initialise();for(const e of this.declarations)e.declareDeclarator(this.kind)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=ce){if(this.areAllDeclarationsIncludedAndNotExported(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)}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,` ${oe(r,o)};`)}renderReplacedDeclarations(e,t){const n=ie(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=ee(e.original,this.start+this.kind.length);let r=i-1;e.remove(this.start,r);let o,a,l=!1,c=!1,u="";const d=[],h=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof Di&&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,d);for(const{node:d,start:p,separator:f,contentEnd:m,end:g}of n)if(d.included){if(d.render(e,t),o="",a="",!d.id.included||d.id instanceof Di&&Nc(d.id.variable,t.exportNamesByVariable))c&&(u+=";"),l=!1;else{if(h&&h===d.id.variable){const n=Z(e.original,"=",d.id.end);ae(h,ee(e.original,n+1),null===f?m:f,e,t)}l?u+=",":(c&&(u+=";"),o+=`${this.kind} `,l=!0)}i===r+1?e.overwrite(r,i,u+o):(e.overwrite(r,r+1,u),e.appendLeft(i,o)),s=m,i=g,c=!0,r=f,u=""}else J(d,e,p,g);this.renderDeclarationEnd(e,u,r,s,i,d,t)}areAllDeclarationsIncludedAndNotExported(e){if("await using"===this.kind||"using"===this.kind)return!0;for(const t of this.declarations){if(!t.id.included)return!1;if(t.id.type===lt){if(e.has(t.id.variable))return!1}else{const n=[];if(t.id.addExportedVariables(n,e),n.length>0)return!1}}return!0}}kc.prototype.includeNode=ls,kc.prototype.applyDeoptimizations=cs;class Cc extends os{declareDeclarator(e){this.isUsingDeclaration="using"===e,this.isAsyncUsingDeclaration="await using"===e,this.id.declare(e,Ne,this.init||ys)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.isUsingDeclaration||this.isAsyncUsingDeclaration||this.id.hasEffects(e)||this.scope.context.options.treeshake.propertyReadSideEffects&&this.id.hasEffectsWhenDestructuring(e,Ne,this.init||ys)}include(e,t){const{id:n,init:s}=this;this.included||this.includeNode(e),s?.include(e,t),n.markDeclarationReached(),t?n.include(e,t):n.includeDestructuredIfNecessary(e,Ne,s||ys)}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||this.isUsingDeclaration||this.isAsyncUsingDeclaration;if(c)o.render(e,t);else{const t=Z(e.original,"=",o.end);e.remove(l,ee(e.original,t+1))}if(a){if(o instanceof Di&&a instanceof nl&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?ce:{renderedSurroundingElement:at})}else o instanceof Di&&Nc(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}includeNode(e){this.included=!0;const{id:t,init:n}=this;if(n&&(this.isUsingDeclaration?n.includePath(Rc,e):this.isAsyncUsingDeclaration&&n.includePath(Dc,e),t instanceof Di&&n instanceof nl&&!n.id)){const{name:e,variable:s}=t;for(const t of n.scope.accessedOutsideVariables.values())t!==s&&t.forbidName(e)}}}Cc.prototype.applyDeoptimizations=cs;const Rc=[Ae],Dc=[Se];class Oc extends os{hasEffects(e){return!!this.test.hasEffects(e)||cl(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),ul(e,this.body,t)}}Oc.prototype.includeNode=ls,Oc.prototype.applyDeoptimizations=cs;class Mc extends os{applyDeoptimizations(){this.deoptimized=!0,this.argument?.deoptimizePath(ke)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument?.includePath(ke,e)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}const _c=["PanicError","ParseError","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AssignmentExpression","AssignmentPattern","AwaitExpression","BinaryExpression","BlockStatement","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","Decorator","ExpressionStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","ImportAttribute","ImportDeclaration","ImportDefaultSpecifier","ImportExpression","ImportNamespaceSpecifier","ImportSpecifier","JSXAttribute","JSXClosingElement","JSXClosingFragment","JSXElement","JSXEmptyExpression","JSXExpressionContainer","JSXFragment","JSXIdentifier","JSXMemberExpression","JSXNamespacedName","JSXOpeningElement","JSXOpeningFragment","JSXSpreadAttribute","JSXSpreadChild","JSXText","LabeledStatement","Literal","Literal","Literal","Literal","Literal","Literal","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","YieldExpression"],Lc=[rc,oc,si,La,Ba,Va,Fa,ja,qa,rr,Ka,Ya,Za,Qa,tl,Gi,nl,rl,ol,al,ll,ir,dl,hl,pl,dr,fl,ml,ir,gl,yl,bl,ur,El,Di,Sl,$l,vl,Pl,kl,Dl,Ol,_l,Tl,Bl,Kl,Vl,Fl,Xl,Ml,Jl,Yl,Zl,Ql,zl,ec,Gl,tc,Gr,Gr,Gr,Gr,Gr,Gr,nc,Kr,Qr,zi,sc,ic,za,ac,lc,cc,uc,or,dc,hc,ni,Fi,pc,fc,mc,gc,yc,bc,xc,Ac,Sc,Pc,wc,kc,Cc,Oc,Mc],Tc=[function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.elements=zc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=zc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.expression=!(2&~i),e.generator=!(4&~i);const r=e.annotations=ts(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=e.params=zc(e,s,n[t+2],n);s.addParameterVariables(o.map(e=>e.declare("parameter",Ne,Je)),o[o.length-1]instanceof or),e.body=Bc(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=Zn[n[t]],e.left=Bc(e,s,n[t+1],n),e.right=Bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=Bc(e,s,n[t],n),e.right=Bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=Zn[n[t]],e.left=Bc(e,s,n[t+1],n),e.right=Bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=zc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:Bc(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=ts(n[t+1],n),e.callee=Bc(e,s,n[t+2],n),e.arguments=zc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:Bc(e,s,i,n);r?.declare("parameter",Ne,Je),e.body=Bc(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];if(i){const t=n[i],r=e.body=new Array(t);for(let o=0;o<t;o++){const t=n[i+1+o];r[o]=Bc(e,79===n[t]||1&n[t+3]?s:s.instanceScope,t,n)}}else e.body=[]},function(e,t,n){const{scope:s}=e;e.decorators=zc(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:Bc(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:Bc(e,s,r,n),e.body=Bc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=zc(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:Bc(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:Bc(e,s,r,n),e.body=Bc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=Bc(e,s,n[t],n),e.consequent=Bc(e,s,n[t+1],n),e.alternate=Bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:Bc(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=Bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=Bc(e,s,n[t],n),e.test=Bc(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:Bc(e,s,i,n),e.source=Bc(e,s,n[t+1],n),e.attributes=zc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=zc(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:Bc(e,s,i,n),e.attributes=zc(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:Bc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=Bc(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:Bc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=Bc(e,s,n[t],n),e.right=Bc(e,s,n[t+1],n),e.body=Bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=Bc(e,s,n[t+1],n),e.right=Bc(e,s,n[t+2],n),e.body=Bc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:Bc(e,s,i,n);const r=n[t+1];e.test=0===r?null:Bc(e,s,r,n);const o=n[t+2];e.update=0===o?null:Bc(e,s,o,n),e.body=Bc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=ts(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:Bc(e,s.parent,o,n);const a=e.params=zc(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",Ne,Je)),a[a.length-1]instanceof or),e.body=Bc(e,s.bodyScope,n[t+4],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=ts(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:Bc(e,e.idScope,o,n);const a=e.params=zc(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",Ne,Je)),a[a.length-1]instanceof or),e.body=Bc(e,s.bodyScope,n[t+4],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.test=Bc(e,s,n[t],n),e.consequent=Bc(e,e.consequentScope=new xl(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:Bc(e,e.alternateScope=new xl(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=Bc(e,s,n[t],n),e.value=Bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=zc(e,s,n[t],n),e.source=Bc(e,s,n[t+1],n),e.attributes=zc(e,s,n[t+2],n);const i=n[t+3];e.phase=0===i?void 0:Zn[i]},function(e,t,n){const{scope:s}=e;e.local=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=Bc(e,s,n[t],n),e.sourceAstNode=Oa(n[t],n);const i=n[t+1];e.options=0===i?null:Bc(e,s,i,n);const r=n[t+2];e.phase=0===r?void 0:Zn[r]},function(e,t,n){const{scope:s}=e;e.local=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=Bc(e,s,n[t+1],n),e.imported=0===i?e.local:Bc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=Bc(e,s,n[t],n);const i=n[t+1];e.value=0===i?null:Bc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=Bc(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e;e.openingElement=Bc(e,s,n[t],n),e.children=zc(e,s,n[t+1],n);const i=n[t+2];e.closingElement=0===i?null:Bc(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.openingFragment=Bc(e,s,n[t],n),e.children=zc(e,s,n[t+1],n),e.closingFragment=Bc(e,s,n[t+2],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.object=Bc(e,s,n[t],n),e.property=Bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.namespace=Bc(e,s,n[t],n),e.name=Bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.selfClosing=!(1&~i),e.name=Bc(e,s,n[t+1],n),e.attributes=zc(e,s,n[t+2],n)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,n){const{scope:s}=e;e.argument=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.expression=Bc(e,s,n[t],n)},function(e,t,n){e.value=n.convertString(n[t]),e.raw=n.convertString(n[t+1])},function(e,t,n){const{scope:s}=e;e.label=Bc(e,s,n[t],n),e.body=Bc(e,s,n[t+1],n)},function(e,t,n){const s=e.bigint=n.convertString(n[t]);e.raw=n.convertString(n[t+1]),e.value=BigInt(s)},function(e,t,n){const s=n[t],i=e.value=!(1&~s);e.raw=i?"true":"false"},function(e){e.value=null},function(e,t,n){const s=n[t];e.raw=0===s?void 0:n.convertString(s),e.value=new DataView(n.buffer).getFloat64(t+1<<2,!0)},function(e,t,n){const s=n.convertString(n[t]),i=n.convertString(n[t+1]);e.raw=`/${i}/${s}`,e.regex={flags:s,pattern:i},e.value=new RegExp(i,s)},function(e,t,n){e.value=n.convertString(n[t]);const s=n[t+1];e.raw=0===s?void 0:n.convertString(s)},function(e,t,n){const{scope:s}=e;e.operator=Zn[n[t]],e.left=Bc(e,s,n[t+1],n),e.right=Bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.computed=!(1&~i),e.optional=!(2&~i),e.object=Bc(e,s,n[t+1],n),e.property=Bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=Bc(e,s,n[t],n),e.property=Bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=zc(e,s,n[t+1],n),e.key=Bc(e,s,n[t+2],n),e.value=Bc(e,s,n[t+3],n),e.kind=Zn[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=ts(n[t],n),e.callee=Bc(e,s,n[t+1],n),e.arguments=zc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=zc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=zc(e,s,n[t],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.body=zc(e,s,n[t],n),e.invalidAnnotations=ts(n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.method=!(1&~i),e.shorthand=!(2&~i),e.computed=!(4&~i);const r=n[t+1];e.value=Bc(e,s,n[t+2],n),e.kind=Zn[n[t+3]],e.key=0===r?e.value:Bc(e,s,r,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=zc(e,s,n[t+1],n),e.key=Bc(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:Bc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:Bc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=zc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=zc(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:Bc(e,s,i,n),e.consequent=zc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=Bc(e,e.parentScope,n[t],n),e.cases=zc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=Bc(e,s,n[t],n),e.quasi=Bc(e,s,n[t+1],n)},function(e,t,n){const s=n[t];e.tail=!(1&~s);const i=n[t+1],r=0===i?null:n.convertString(i),o=n.convertString(n[t+2]);e.value={cooked:r,raw:o}},function(e,t,n){const{scope:s}=e;e.quasis=zc(e,s,n[t],n),e.expressions=zc(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=Bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=Bc(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:Bc(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:Bc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=Zn[n[t]],e.argument=Bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=Zn[n[t+1]],e.argument=Bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=Zn[n[t]],e.declarations=zc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=Bc(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:Bc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=Bc(e,s,n[t],n),e.body=Bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.delegate=!(1&~i);const r=n[t+1];e.argument=0===r?null:Bc(e,s,r,n)}];function Bc(e,t,n,s){const i=s[n],r=Lc[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=_c[i],o.start=s[n+1],o.end=s[n+2],Tc[i](o,n+3,s),o.initialise(),o}function zc(e,t,n,s){if(0===n)return de;const i=s[n++],r=new Array(i);for(let o=0;o<i;o++){const i=s[n++];r[o]=i?Bc(e,t,i,s):null}return r}const Vc={ArrayExpression:si,ArrayPattern:La,ArrowFunctionExpression:Ba,AssignmentExpression:Va,AssignmentPattern:Fa,AwaitExpression:ja,BinaryExpression:qa,BlockStatement:rr,BreakStatement:Ka,CallExpression:Ya,CatchClause:Za,ChainExpression:Qa,ClassBody:tl,ClassDeclaration:Gi,ClassExpression:nl,ConditionalExpression:rl,ContinueStatement:ol,DebuggerStatement:al,Decorator:ll,DoWhileStatement:dl,EmptyStatement:hl,ExportAllDeclaration:pl,ExportDefaultDeclaration:dr,ExportNamedDeclaration:fl,ExportSpecifier:ml,ExpressionStatement:ir,ForInStatement:gl,ForOfStatement:yl,ForStatement:bl,FunctionDeclaration:ur,FunctionExpression:El,Identifier:Di,IfStatement:Sl,ImportAttribute:$l,ImportDeclaration:vl,ImportDefaultSpecifier:Pl,ImportExpression:kl,ImportNamespaceSpecifier:Dl,ImportSpecifier:Ol,JSXAttribute:_l,JSXClosingElement:Tl,JSXClosingFragment:Bl,JSXElement:Kl,JSXEmptyExpression:Vl,JSXExpressionContainer:Fl,JSXFragment:Xl,JSXIdentifier:Ml,JSXMemberExpression:Jl,JSXNamespacedName:Yl,JSXOpeningElement:Zl,JSXOpeningFragment:Ql,JSXSpreadAttribute:zl,JSXSpreadChild:ec,JSXText:Gl,LabeledStatement:tc,Literal:Gr,LogicalExpression:nc,MemberExpression:Kr,MetaProperty:Qr,MethodDefinition:zi,NewExpression:sc,ObjectExpression:ic,ObjectPattern:za,PanicError:rc,ParseError:oc,PrivateIdentifier:ac,Program:lc,Property:cc,PropertyDefinition:uc,RestElement:or,ReturnStatement:dc,SequenceExpression:hc,SpreadElement:ni,StaticBlock:Fi,Super:pc,SwitchCase:fc,SwitchStatement:mc,TaggedTemplateExpression:gc,TemplateElement:yc,TemplateLiteral:bc,ThisExpression:xc,ThrowStatement:Ac,TryStatement:Sc,UnaryExpression:Pc,UnknownNode:class extends os{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:wc,VariableDeclaration:kc,VariableDeclarator:Cc,WhileStatement:Oc,YieldExpression:Mc};class Fc extends Ln{constructor(e){super(Mo),this.module=e}includePath(e,t){super.includePath(e,t),this.module.needsExportShim=!0}}var jc;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(jc||(jc={}));const Uc=new WeakMap;function Gc(e,t){if(e){const t=Uc.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=g(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||Gc(e)}function Hc(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?function(e){const{length:t}=e,n=new p(e),s=[];let i=0,r=0,l=0,c=0,d=0;do{const e=n.indexOf(";"),t=[];let h=!0,p=0;for(i=0;n.pos<e;){let s;i+=a(o(n)),i<p&&(h=!1),p=i,u(n,e)?(r+=a(o(n)),l+=a(o(n)),c+=a(o(n)),u(n,e)?(d+=a(o(n)),s=[i,r,l,c,d]):s=[i,r,l,c]):s=[i],t.push(s),n.pos++}h||f(t),s.push(t),n.pos=e+1}while(n.pos<=t);return s}(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return Uc.set(i,s),i}function Wc(e){return e.id}const qc=(e,{allowReturnOutsideFunction:t=!1,jsx:n=!1}={})=>function(e){const t=Oa(0,e);switch(t.type){case"PanicError":return Ft(jt(Pn(t.message)));case"ParseError":return Ft(jt(Pn(t.message,t.start)));default:return t}}(_a(ha(e,t,n))),Kc=new Set(["assert","with"]);function Xc(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof ic))return n&&t.module.log(yt,bn(t.module.id),s),ue;const i=n.properties.find(e=>Kc.has(Jc(e)))?.value;if(!i)return ue;if(!(i instanceof ic))return t.module.log(yt,(r=t.module.id,{code:qt,message:`Rollup could not statically analyze the options argument of a dynamic import in "${$t(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),ue;var r;const o=i.properties.map(e=>{const n=Jc(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(yt,bn(t.module.id),e.start),null)}).filter(e=>!!e);return o.length>0?Object.fromEntries(o):ue}const Jc=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function Yc(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some(n=>e[n]!==t[n])}var Zc="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},Qc={memoryUsage:()=>({heapUsed:0})};let eu=new Map;function tu(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function nu(e,t=3){e=tu(e,t);const n=Qc.memoryUsage().heapUsed,s=Zc.now(),i=eu.get(e);void 0===i?eu.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function su(e,t=3){e=tu(e,t);const n=eu.get(e);if(void 0!==n){const e=Qc.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=Zc.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function iu(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of eu)e[t]=[s,n,i];return e}let ru=Yn,ou=Yn;const au=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function lu(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of au)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){ru(s,4);const t=r.apply(this,e);return ou(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}const cu={identifier:null,localName:Mo};function uu(e,t,n,s,i=new Map,r,o,a){const l=i.get(t);if(l){if(l.has(e))return s?[null]:Ft((c=t,{code:"CIRCULAR_REEXPORT",exporter:u=e.id,message:`"${c}" cannot be exported from "${$t(u)}" as it is a reexport that references itself.`}));l.add(e)}else i.set(t,new Set([e]));var c,u;return e.getVariableForExportName(t,{exportOrReexportModules:a,importChain:r,importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i,sideEffectModules:o})}function du(e,t){const n=pe(t.sideEffectDependenciesByVariable,e,fe);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof po?s.getDirectOriginalVariable():s instanceof go?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 hu{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.hasTreeShakingPassStarted=!1,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedTopLevelAwaitingDynamicImporters=new Set,this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcePhaseSources=new Set,this.sourcesWithAttributes=new Map,this.allExportsIncluded=!1,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportDescriptions=new Map,this.exportedVariablesByName=null,this.exportNamesByVariable=null,this.exportShimVariable=new Fc(this),this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.excludeFromSourcemap=/\0/.test(t),this.context=n.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:u,exportAllSources:d,exportDescriptions: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 u.sort()},get exportedBindings(){const e={".":[...h.keys()]};for(const[t,{source:n}]of g)(e[n]??=[]).push(t);for(const t of d)(e[t]??=[]).push("*");return e},get exports(){return[...h.keys(),...g.keys(),...[...d].map(()=>"*")]},get hasDefaultExport(){return l.ast?l.exportDescriptions.has("default")||g.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,Wc).sort()},get implicitlyLoadedBefore(){return Array.from(f,Wc).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!==jc.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,safeVariableNames:null,syntheticNamedExports:r}}basename(){const e=G(this.id),t=W(this.id);return Gn(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){zn(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),Ft(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}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.getExportedVariablesByName().values())e.included&&n.add(e);for(let s of n){const n=this.sideEffectDependenciesByVariable.get(s);if(n)for(const e of n)t.add(e);s instanceof go?s=s.getBaseVariable():s instanceof po&&(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}getExportedVariablesByName(){if(this.exportedVariablesByName)return this.exportedVariablesByName;const e=this.exportedVariablesByName=new Map;for(const t of this.exportDescriptions.keys())if(t!==this.info.syntheticNamedExports){const[n]=this.getVariableForExportName(t);if(!n)return Ft(xn(t,this.id));e.set(t,n)}for(const t of this.reexportDescriptions.keys()){const[n]=this.getVariableForExportName(t);n&&e.set(t,n)}for(const t of this.exportAllModules)if(t instanceof Xn)e.set(`*${t.id}`,t.getVariableForExportName("*",{importChain:[this.id]})[0]);else for(const n of t.getExportedVariablesByName().keys())if("default"!==n&&!e.has(n)){const[t]=this.getVariableForExportName(n);t&&e.set(n,t)}return this.exportedVariablesByName=new Map([...e].sort(mu))}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const[t,n]of this.getExportedVariablesByName().entries()){const s=n instanceof po?n.getOriginalVariable():n;if(!n||!(n.included||n instanceof Bn))continue;const i=e.get(s);i?i.push(t):e.set(s,[t])}return this.exportNamesByVariable=e}getRenderedExports(){const e=[],t=[];for(const n of this.exportDescriptions.keys())(this.getExportedVariablesByName().get(n)?.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:Ft((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${$t(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,importChain:n=[],isExportAllSearch:s,onlyExplicit:i,searchedNamesAndModules:r,sideEffectModules:o,exportOrReexportModules:a}=ue){if("*"===e[0]){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*",{importChain:[...n,this.id]})}const l=this.reexportDescriptions.get(e);if(l){const[e,s]=uu(l.module,l.localName,t,!1,r,[...n,this.id],o,a);return e?(t&&(pu(e,t,this),this.info.moduleSideEffects&&pe(t.sideEffectDependenciesByVariable,e,fe).add(this)),this.info.moduleSideEffects&&o?.add(this),a?.add(this),[e]):this.error(An(l.localName,this.id,l.module.id,!!s?.missingButExportExists),l.start)}const c=this.exportDescriptions.get(e);if(c){if(c===cu)return[this.exportShimVariable];const e=c.localName,n=this.traceVariable(e,{exportOrReexportModules:a,importerForSideEffects:t,searchedNamesAndModules:r,sideEffectModules:o});return n?(t&&(pu(n,t,this),pe(t.sideEffectDependenciesByVariable,n,fe).add(this)),o?.add(this),a?.add(this),[n]):[null,{missingButExportExists:!0}]}if(i)return[null];if("default"!==e){const s=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,r,[...n,this.id]);if(this.namespaceReexportsByName.set(e,s),s[0]){const[e,n]=s;if(t){const{exportOrReexportModules:s,sideEffectModules:i}=n;for(const n of s)t.alternativeReexportModules.has(e)||pu(e,t,n);for(const n of i)pe(t.sideEffectDependenciesByVariable,e,fe).add(n)}return s}}return this.info.syntheticNamedExports?[pe(this.syntheticExports,e,()=>new go(this.astContext,e,this.getSyntheticNamespace()))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=je();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(){if(this.allExportsIncluded)return;this.allExportsIncluded=!0,this.includeModuleInExecution();const e=je();for(const t of this.getExportedVariablesByName().values())this.includeVariable(t,ke,e),t.deoptimizePath(ke),t instanceof Bn&&(t.module.reexported=!0)}includeAllInBundle(){this.ast.include(je(),!0),this.includeAllExports()}includeModuleInExecution(){this.isExecuted||(Jn(this),this.graph.needsTreeshakingPass=!0)}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 Xn?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?Ft((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,safeVariableNames:c,...u}){if(ru("generate ast",3),t.startsWith("#!")){const e=t.indexOf("\n");this.shebang=t.slice(2,e)}this.info.code=t,this.info.safeVariableNames=c,this.originalCode=s,this.originalSourcemap=Hc(i),this.sourcemapChain=o.map(e=>e.missing?e:Hc(e)),Gc(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(u),this.resolvedIds=r??Object.create(null);const d=this.id;this.magicString=new O(t,{filename:this.excludeFromSourcemap?null:d,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),addImportSource:this.addImportSource.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:d,getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>Vc[e]||Vc.UnknownNode,importDescriptions:this.importDescriptions,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,newlyIncludedVariableInits:this.graph.newlyIncludedVariableInits,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e),traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new Ec(this.graph.scope,this.astContext,this.importDescriptions),this.namespace=new fo(this.astContext);const h={context:this.astContext,type:"Module"};if(e)this.ast=new Vc[e.type](h,this.scope).parseNode(e),this.info.ast=e;else{ou("generate ast",3);const e=await async function(e,t,n){return ha(e,t,n)}(t,!1,!1!==this.options.jsx);ru("generate ast",3),this.ast=(p=e,f=h,m=this.scope,Bc(f,m,0,_a(p))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(d))return this.graph.astLru.get(d);{const e=this.tryParse();return!1!==this.options.cache?(Object.defineProperty(this.info,"ast",{value:e}),e):(this.graph.astLru.set(d,e),e)}}})}var p,f,m;ou("generate ast",3)}toJSON(){return{ast:this.info.ast,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,Wc),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,safeVariableNames:this.info.safeVariableNames,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:n,searchedNamesAndModules:s,sideEffectModules:i,exportOrReexportModules:r}=ue){const o=this.scope.variables.get(e);if(o)return o;const a=this.importDescriptions.get(e);if(a){const e=a.module;if(e instanceof hu&&"*"===a.name)return e.namespace;const[o,l]=uu(e,a.name,t||this,n,s,[this.id],i,r);return o||this.error(An(a.name,this.id,e.id,!!l?.missingButExportExists),a.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.sourceAstNode;"TemplateLiteral"===t.type?1===t.quasis.length&&"string"==typeof t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):"Literal"===t.type&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e})}assertUniqueExportName(e,t){(this.exportDescriptions.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 dr)this.assertUniqueExportName("default",e.start),this.exportDescriptions.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof pl){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof Gr?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 Gr){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=n instanceof Gr?n.value:n.name;this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:s instanceof Gr?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof kc)for(const e of t.declarations)for(const t of da(e.id))this.assertUniqueExportName(t,e.id.start),this.exportDescriptions.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.assertUniqueExportName(e,t.id.start),this.exportDescriptions.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:n}of e.specifiers){const e=t.name,s=n instanceof Di?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exportDescriptions.set(s,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const n of e.specifiers){const s=n.local.name;(this.scope.variables.has(s)||this.importDescriptions.has(s))&&this.error(In(s),n.local.start);const i="source"===e.phase?Tn:n instanceof Pl?"default":n instanceof Dl?"*":n.imported instanceof Di?n.imported.name:n.imported.value;this.importDescriptions.set(s,{module:null,name:i,phase:"source"===e.phase?"source":"instance",source:t,start:n.start})}}addImportSource(e){e&&!this.sourcesWithAttributes.has(e)&&this.sourcesWithAttributes.set(e,ue)}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=ht(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];let i=n[0];for(let e of n){if(e[0]>=t.column||e===s){e=e[0]!==t.column?i:e,t={column:e[3],line:e[2]+1};continue e}i=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(yt,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))}Ut(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 Xn||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=>[Jc(e),e.value.value])):ue);var s;const i=this.sourcesWithAttributes.get(e);i?Yc(i,n)&&this.log(yt,hn(i,n,e,this.id),t.start):this.sourcesWithAttributes.set(e,n),"source"===t.phase&&this.sourcePhaseSources.add(e)}getImportedJsxFactoryVariable(e,t,n){const{id:s}=this.resolvedIds[n],i=this.graph.modulesById.get(s),[r]=i.getVariableForExportName(e,{importChain:[this.id]});return r||this.error((o=e,a=s,l=this.id,{code:"MISSING_JSX_EXPORT",exporter:a,id:l,message:`Export "${o}" is not defined in module "${$t(a)}" even though it is needed in "${$t(l)}" to provide JSX syntax. Please check your "jsx" option.`,names:[o],url:wt(kt)}),t);var o,a,l}getVariableFromNamespaceReexports(e,t,n,s){let i=null;const r=new Map,o=new Set,a=new Set,l=new Set;for(const c of this.exportAllModules){if(c.info.syntheticNamedExports===e)continue;const[u,d]=uu(c,e,t,!0,fu(n),s,a,l);c instanceof Xn||d?.indirectExternal?o.add(u):u instanceof go?i||(i=u):u&&r.set(u,c)}if(r.size>0){const t=[...r],n=t[0][0];return 1===t.length?[n,{exportOrReexportModules:l,sideEffectModules:a}]:(this.options.onLog(yt,(c=e,u=this.id,d=t.map(([,e])=>e.id),{binding:c,code:"NAMESPACE_CONFLICT",ids:d,message:`Conflicting namespaces: "${$t(u)}" re-exports "${c}" from one of the modules ${At(d.map(e=>$t(e)))} (will be ignored).`,reexporter:u})),[null])}var c,u,d;if(o.size>0){const t=[...o],n=t[0];return t.length>1&&this.options.onLog(yt,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${$t(t)}" re-exports "${e}" from one of the external modules ${At(s.map(e=>$t(e)))}, guessing "${$t(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map(e=>e.module.id))),[n,{exportOrReexportModules:l,indirectExternal:!0,sideEffectModules:a}]}return i?[i,{exportOrReexportModules:l,sideEffectModules:a}]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof Xn){const[t]=n.getVariableForExportName("*",{importChain:[this.id]});t.includePath(ke,je()),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.includePath(ke,je()),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const{resolution:t}=e;t instanceof hu&&(t.includedDynamicImporters.includes(this)||(t.includedDynamicImporters.push(this),this.astContext.usesTopLevelAwait&&t.includedTopLevelAwaitingDynamicImporters.add(this)))}includeVariable(e,t,n){const{included:s,module:i}=e;if(e.includePath(t,n),s)i instanceof hu&&i!==this&&du(e,this);else if(this.graph.needsTreeshakingPass=!0,i instanceof hu&&(i.includeModuleInExecution(),i!==this)){const t=du(e,this);for(const e of t)e.includeModuleInExecution()}}includeVariableInModule(e,t,n){this.includeVariable(e,t,n);const s=e.module;s&&s!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(yt,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${$t(t)}".`})),this.exportDescriptions.set(e,cu)}tryParse(){try{return qc(this.info.code,{jsx:!1!==this.options.jsx})}catch(e){return this.error(Nn(e,this.id),e.pos)}}}function pu(e,t,n){if(e.module instanceof hu&&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 fu=e=>e&&new Map(Array.from(e,([e,t])=>[e,new Set(t)])),mu=([e],[t])=>e<t?-1:e>t?1:0,gu=(e,t)=>[e,t].filter(Boolean).join("\n"),yu=(e,t)=>[e,t].filter(Boolean).join("\n\n");const bu={amd:Au,cjs:Au,es:xu,iife:Au,system:xu,umd:Au};function Eu(e,t,n,s,i,r,o,a,l,c,u,d,h,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(s,i,d,h);!function(e,t,n){for(const s of t){s.info.safeVariableNames||={};for(const t of s.scope.variables.values())if(t.included&&!(t.renderBaseName||t instanceof po&&t.getOriginalVariable()!==t)){const n=Object.getOwnPropertyDescriptor(s.info.safeVariableNames,t.name)?.value;if(n&&!e.has(n)){e.add(n),t.setRenderNames(null,n);continue}t.setRenderNames(null,Mi(t.name,e,t.forbiddenNames)),s.info.safeVariableNames[t.name]=t.renderName}if(n.has(s)){const t=s.namespace;t.setRenderNames(null,Mi(t.name,e,t.forbiddenNames))}}}(s,f,p),bu[i](s,n,t,r,o,a,l,c,u);for(const e of f)e.scope.deconflict(i,d,h)}function xu(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof yo)&&(t.variableName=Mi(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof Xn)?n.setRenderNames(null,(t instanceof Xn?a.get(t):o.get(t)).variableName):t instanceof Xn&&n.isSourcePhase?n.setRenderNames(null,Mi(t.suggestedVariableName+"__source",e,n.forbiddenNames)):t instanceof Xn&&"default"===s?n.setRenderNames(null,Mi([...t.exportedVariables].some(([e,t])=>"*"===t&&e.included)?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,Mi(Gn(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,Mi(t.name,e,t.forbiddenNames))}function Au(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=Mi(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=Mi(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&wr(r(t.id),a)?t.namespaceVariableName:Mi(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof Xn){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=vr[s]?n.defaultVariableName:n.variableName;Pr(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,Ir[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 Su(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return Ft(yn("default",o,i))}else if("none"===t&&o.length>0)return Ft(yn("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(yt,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${$t(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:wt(Dt)}}(i,n)),t="named")),t}function $u(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 vu(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof Xn){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),vu(e,t,n,s,i,r)):t.push(o)}}const Pu="!~{",Iu="}~",wu=new RegExp(`${Pu}[0-9a-zA-Z_$]{1,16}${Iu}`,"g"),Nu=(e,t)=>e.replace(wu,e=>t.get(e)||e),ku=(e,t,n)=>e.replace(wu,e=>e===t?n:e),Cu=Symbol("bundleKeys"),Ru={type:"placeholder"};function Du(e,t,n){return vt(e)?Ft(On(`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 Ft(On(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return vt(r)?Ft(On(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r})}function Ou(e,{[Cu]:t}){if(!t.has(e.toLowerCase()))return e;const n=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),s=e.slice(0,n+1),i=e.slice(n+1),r=i.indexOf(".",1),o=s+(-1===r?i:i.slice(0,r)),a=-1===r?"":i.slice(r);let l,c=1;for(;t.has((l=o+ ++c+a).toLowerCase()););return l}const Mu=["Object","Promise","module","exports","require","__filename","__dirname",...jr],_u=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Lu(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(yt,(r=e.id,o=e.variableName,{code:"MISSING_GLOBAL_NAME",id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:wt("configuration-options/#output-globals")})),e.variableName):void 0);var r,o}class Tu{constructor(e,t,n,s,i,r,o,a,l,c,u,d,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=u,this.getPlaceholder=d,this.bundle=h,this.inputBase=p,this.snippets=f,this.dependencies=new Set,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.isManualChunk=!1,this.accessedGlobalsByScope=new Map,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.allowExtensionModules=new Set,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)if(!m.has(e)){this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace));break}t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=Gn(this.generateVariableName()),this.isManualChunk=null!==u}static generateFacade(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){const m=new Tu([],e,t,n,s,i,r,o,a,l,null,d,h,p,f);m.assignFacadeName(u,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof hu?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 go&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>Nu(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)}}for(const t of this.allowExtensionModules){const n=t.getExportNamesByVariable();for(const[t,s]of n){this.exportNamesByVariable.set(t,[...s]);for(const e of s)this.exportsByName.set(e,t);e.delete(t)}}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=Oi(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=Oi(s))}while(Vn.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=Su(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 s of t){if("allow-extension"===s.preserveSignature){if(this.canPreserveModuleExports(s)&&!s.chunkFileNames.size&&s.chunkNames.every(({isUserDefined:e})=>!e)){this.allowExtensionModules.add(s),this.facadeModule||(this.facadeModule=s,this.strictFacade=!1,this.assignFacadeName({},s,this.outputOptions.preserveModules)),this.facadeChunkByModule.set(s,this);continue}}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(Tu.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=Bu(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}canPreserveModuleExports(e){const t=e.getExportNamesByVariable();for(const[e,n]of t)for(const t of n){const n=this.exportsByName.get(t);if(n&&n!==e)return!1}for(const[e,n]of t)for(const t of n)this.exportsByName.set(t,e);return!0}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 mr(It(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=G(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=Du("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=Ou(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Ru),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;const{sourcemapFileNames:e,format:t}=this.outputOptions;if(!e)return null;let n=null;const[s,i]=[e,"output.sourcemapFileNames"];let r=Du("function"==typeof s?s(this.getPreRenderedChunkInfo()):s,i,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>t,hash:e=>n||(n=this.getPlaceholder(i,e||8)),name:()=>this.getChunkName()});return n||(r=Ou(r,this.bundle)),this.preliminarySourcemapFileName={fileName:r,hashPlaceholder:n}}getRenderedChunkInfo(){if(this.renderedChunkInfo)return this.renderedChunkInfo;const e=this.getRenderedDependencies();return this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(ju),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,ju),importedBindings:Vu(e,ju),imports:Array.from(e.keys(),ju),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=[];vu(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)}inlineTransitiveImports(){const{facadeModule:e,dependencies:t,outputOptions:n}=this,{hoistTransitiveImports:s,preserveModules:i}=n;if(s&&!i&&null!==e)for(const e of t)e instanceof Tu&&this.inlineChunkDependencies(e)}async render(){const{exportMode:e,facadeModule:t,inputOptions:{onLog:n},outputOptions:s,pluginDriver:i,snippets:r}=this,{format:o,preserveModules:a}=s,l=this.getPreliminaryFileName(),c=this.getPreliminarySourcemapFileName(),{accessedGlobals:u,indent:d,magicString:h,renderedSource:p,usedModules:f,usesTopLevelAwait:m}=this.renderModules(l.fileName),g=[...this.getRenderedDependencies().values()],y="none"===e?[]:this.getChunkExportDeclarations(o);let b=y.length>0,E=!1;for(const e of g){const{reexports:t}=e;t?.length&&(b=!0,!E&&t.some(e=>"default"===e.reexported)&&(E=!0),"es"===o&&(e.reexports=t.filter(({reexported:e})=>!y.find(({exported:t})=>t===e))))}if(!E)for(const{exported:e}of y)if("default"===e){E=!0;break}const{intro:x,outro:A,banner:S,footer:$}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],gu),t.hookReduceValue("footer",e.footer(n),[n],gu),t.hookReduceValue("intro",e.intro(n),[n],yu),t.hookReduceValue("outro",e.outro(n),[n],yu)]);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 Ft((s=e.message,{code:"ADDON_ERROR",message:`Could not retrieve "${e.hook}". Check configuration of plugin "${e.plugin}".\n\tError Message: ${s}`}))}var s}(s,i,this.getRenderedChunkInfo());if(Uo[o](p,{accessedGlobals:u,dependencies:g,exports:y,hasDefaultExport:E,hasExports:b,id:l.fileName,indent:d,intro:x,isEntryFacade:a||null!==t&&t.info.isEntry,isModuleFacade:null!==t,log:n,namedExportsMode:"default"!==e,outro:A,snippets:r,usesTopLevelAwait:m},s),S&&h.prepend(S),"es"===o||"cjs"===o){const e=null!==t&&t.info.isEntry&&t.shebang;e&&h.prepend(`#!${e}\n`)}return $&&h.append($),{chunk:this,magicString:h,preliminaryFileName:l,preliminarySourcemapFileName:c,usedModules:f}}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):Bu(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof hu){const s=this.chunkByModule.get(n);let i;do{if(i=t.alternativeReexportModules.get(e),i){this.chunkByModule.get(i)!==s&&this.inputOptions.onLog(yt,ln(n.getExportNamesByVariable().get(e)?.[0]||"*",n.id,i.id,t.id,this.outputOptions.preserveModules)),t=i}}while(i)}}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof go,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof fo&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof hu){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?Bu(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 go)){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 wi){for(const e of s.declarations)if(e.parent instanceof ur||e instanceof dr&&e.declaration instanceof ur){r=!0;break}}else s instanceof go&&(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 Xn){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?vr[n(o.id)]&&i.add(a):t.isNamespace&&Ir[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every(e=>"*"===e[0]))&&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 Tu||e instanceof yo))}getDynamicImportStringAndAttributes(e,t,n){const{externalImportAttributes:s}=this.outputOptions,i=["es","cjs"].includes(this.outputOptions.format)&&s;if(e instanceof Xn){const n=this.externalChunkByModule.get(e),s=n.getImportAttributes(this.snippets);return[`'${n.getImportPath(t)}'`,s||!!i||null]}let r=null;if(i){const e=Xc(n);r=e===ue||bo(e,this.snippets)}return[e||"",r]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?St(this.fileName):St(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;const o=s instanceof Xn&&n.isSourcePhase;if(s instanceof Xn){if(i=this.externalChunkByModule.get(s),r=n.name,!o&&"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return Ft(Rn(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);pe(t,i,me).push({imported:r,local:n.getName(this.snippets.getPropertyAccess),phase:o?"source":"instance"})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:n}of t.dynamicImports){if(!n.included)continue;const{resolution:t}=n;e.push(t instanceof hu?{chunk:this.chunkByModule.get(t),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(t),node:n,resolution:t}:t instanceof Xn?{chunk:null,externalChunk:this.externalChunkByModule.get(t),facadeChunk:null,node:n,resolution:t}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:t})}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=zu(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(U(e.id.split(Fu,1)[0])),r=s(this.inputBase),o=W(i),a=_u.has(o)?i.slice(0,-o.length):i;return F(a)?n&&X(a).startsWith(n)?a.slice(n.length).replace(/^[/\\]/,""):"/"===r&&"/"!==a[0]?K(r,a.replace(/^[a-zA-Z]:[/\\]/,"/")):K(r,a):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+G(a)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o;if("*"===s[0]){const n=s.slice(1);"defaultOnly"===t(n)&&this.inputOptions.onLog(yt,Dn(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof go)continue;const a=n.module;if(a instanceof hu){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 Ft(Rn(a.id,r,!0));o=e&&("default"!==r||Pr(t(a.id),!0))}}pe(n,i,me).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;if(null===r&&null===o&&i instanceof yo&&!i.moduleSideEffects&&!this.outputOptions.hoistTransitiveImports)continue;const a=i instanceof yo||"default"!==i.exportMode,l=i.getImportPath(s),c=r?.find(e=>"source"===e.phase),u=r?.filter(e=>"source"!==e.phase)??null;n.set(i,{attributes:i instanceof yo?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof yo&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&Lu(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:u&&u.length>0?u:null,isChunk:i instanceof Tu,name:i.variableName,namedExportsMode:a,namespaceVariableName:i.namespaceVariableName,reexports:o,sourcePhaseImport:c?.local})}return this.renderedDependencies=n}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof Tu&&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:u,snippets:d}=this,{compact:h,format:p,freeze:f,generatedCode:{symbols:m},importAttributesKey:g}=l,{_:y,cnst:b,n:E}=d;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const x=new _({separator:`${E}${E}`}),A=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=$u(t.originalCode);if(null!==e)return e}return"\t"}(a,l),S=[];let $="";const v=new Set,P={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,importAttributesKey:g,indent:A,pluginDriver:c,snippets:d,symbols:m,useOriginalName:null};let I=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render(P);!P.accessedDocumentCurrentScript&&eo.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete($r),P.accessedDocumentCurrentScript=!1,({source:n}=r),I||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),x.addSource(n),S.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(P);o.renderFirst()?$+=E+e:x.addSource(new O(e))}const a=t.get(e.scope);if(a)for(const e of a)v.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();u[e.id]={get code(){return n?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:s}}$&&x.prepend($+E+E),this.needsExportsShim&&x.prepend(`${E}${b} ${Mo}${y}=${y}void 0;${E}${E}`);const w=h?x:x.trim();var N;return o&&0===this.getExportNames().length&&0===n.size&&r(yt,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${N=this.getChunkName()}".`,names:[N]}),{accessedGlobals:v,indent:A,magicString:x,renderedSource:w,usedModules:S,usesTopLevelAwait:I}}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,n,i,s,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null,this,a||o)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e,o);o.setExternalResolution("external",n,i,s,t,l,!1,c,this,null)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:t},interop:n,preserveModules:s,externalLiveBindings:i}=this.outputOptions;for(const e of this.orderedModules)for(const t of e.scope.variables.values())t.setRenderNames(null,null);const 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 go?r.add(n):n.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(Mu);this.needsExportsShim&&o.add(Mo),t&&o.add("Symbol"),Eu(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))for(const n of e.getExportedVariablesByName().values())n.included&&t.add(n);for(let n of t){n instanceof po&&(n=n.getOriginalVariable()),n instanceof go&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof hu&&(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:{included:t,resolution:n}}of e.dynamicImports)t&&n instanceof hu&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function Bu(e){return zu(e)??St(e.id)}function zu(e){return e.chunkNames.find(({isUserDefined:e})=>e)?.name??e.chunkNames[0]?.name}function Vu(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 Fu=/[#?]/,ju=e=>e.getFileName();function*Uu(e){for(const t of e)yield*t}function Gu(e,t,n,s,i,r){const{chunkDefinitions:o,manualChunkModules:a,manualChunkModulesByModule:l}=function(e,t,n){const s=new Set(e.keys()),i=Object.create(null),r=[...e].sort(([e],[t])=>e.execIndex-t.execIndex);for(const[e,o]of r){const r=i[o]||=[];t&&n?r.push(e):Hu(e,r,s)}const o=Object.entries(i),a=new Array(o.length),l=new Array(o.length),c=new Map;let u=0;for(const[e,t]of o){l[u]={alias:e,modules:t},a[u]=t;for(const e of t)c.set(e,t);u++}return{chunkDefinitions:l,manualChunkModules:a,manualChunkModulesByModule:c}}(t,i,r),{entriesAndManualChunksCount:c,dependentEntriesByModule:u,dynamicallyDependentEntriesByDynamicEntry:d,dynamicImportsByEntry:h,dynamicallyDependentEntriesByAwaitedDynamicEntry:p,awaitedDynamicImportsByEntry:f}=function(e,t,n){const s=new Set,i=new Set,r=new Map,o=new Set(e),a=e.map(e=>[e]).concat(t),l=new Array(a.length),c=new Array(a.length);let u=0;for(const e of a){const t=new Set,d=new Set;l[u]=t,c[u]=d;const h=new Set(e),p=new Set;for(const e of h){pe(r,e,fe).add(u);const l=n.get(e);if(l&&!p.has(l)){p.add(l);for(const e of l)h.add(e)}for(const t of e.getDependenciesToBeIncluded())t instanceof Xn||h.add(t);for(const{node:{resolution:n}}of e.dynamicImports)if(n instanceof hu&&n.includedDynamicImporters.length>0&&!o.has(n)){s.add(n),o.add(n),a.push([n]),t.add(n);for(const e of n.includedTopLevelAwaitingDynamicImporters)if(h.has(e)){i.add(n),d.add(n);break}}for(const t of e.implicitlyLoadedBefore)o.has(t)||(s.add(t),o.add(t),a.push([t]))}u++}const{awaitedDynamicEntries:d,awaitedDynamicImportsByEntry:h,dynamicEntries:p,dynamicImportsByEntry:f}=function(e,t,n,s,i){const r=new Map,o=new Set,a=new Set;for(const[n,i]of e.entries())for(const e of i)r.set(e,n),t.has(e)&&o.add(n),s.has(e)&&a.add(n);const l=Wu(n,r),c=Wu(i,r);return{awaitedDynamicEntries:a,awaitedDynamicImportsByEntry:c,dynamicEntries:o,dynamicImportsByEntry:l}}(a,s,l,i,c);return{awaitedDynamicImportsByEntry:h,dependentEntriesByModule:r,dynamicallyDependentEntriesByAwaitedDynamicEntry:qu(r,d,a,e=>e.includedTopLevelAwaitingDynamicImporters),dynamicallyDependentEntriesByDynamicEntry:qu(r,p,a,e=>e.includedDynamicImporters),dynamicImportsByEntry:f,entriesAndManualChunksCount:a.length}}(e,a,l),m=function(e){const t=Object.create(null);for(const{dependentEntries:n,module: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,n){for(const[s,i]of e)if(!t.has(s)){if(s.cycles.size>0&&s.includedTopLevelAwaitingDynamicImporters.size>0){n.push({alias:null,modules:[s]});continue}yield{dependentEntries:i,module:s}}}(u,l,o)),g=function(e,t){const n=new Array(e).fill(0n);let s=1n;for(const{dependentEntries:e}of t){for(const t of e)n[t]|=s;s<<=1n}return n}(c,m),y=Ku(g,d,h,c);!function(e,t,n){let s=1n;for(const{dependentEntries:i}of e){for(const e of i)(t[e]&s)===s&&0n===(n[e]&s)&&i.delete(e);s<<=1n}}(m,y,Ku(g,p,f,c));const{chunks:b,sideEffectAtoms:E,sizeByAtom:x}=function(e,t,n,s){const i=Object.create(null),r=new Map,o=new Array(e.length);let a=0n,l=1n,c=0;for(const{dependentEntries:u,modules:d}of e){let e=0n,h=-1n;for(const s of u)e|=1n<<BigInt(s),h&=t[s]|n[s];const p=i[String(e)]||={containedAtoms:0n,correlatedAtoms:h,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(u),modules:[],pure:!0,size:0};let f=0,m=!0;for(const e of d)r.set(e,p),e.isIncluded()&&(m&&=!e.hasEffects(),f+=s>1?e.estimateSize():1);m||(a|=l),o[c++]=f,p.containedAtoms|=l,p.modules.push(...d),p.pure&&=m,p.size+=f,l<<=1n}const u=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 Xn){if(o.info.moduleSideEffects){const e=pe(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}(u,r,l),{chunks:u,sideEffectAtoms:a,sizeByAtom:o}}(m,g,y,n);return o.push(...function(e,t,n,s,i){ru("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(Xu),s.sort(Xu),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return ou("optimize chunks",3),e;t>1&&i("info",vn(e.length,r.small.size,"Initially"));(function(e,t,n,s){const{small:i}=e;for(const r of i){const o=Ju(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),Qu(o,t,e).delete(o),o.modules.push(...a),o.size+=c,o.pure&&=l;const{dependencies:u,dependentChunks:d,dependentEntries:h}=o;o.correlatedAtoms&=s,o.containedAtoms|=n;for(const e of r.dependentEntries)h.add(e);for(const e of r.dependencies)u.add(e),e.dependentChunks.delete(r),e.dependentChunks.add(o);for(const e of r.dependentChunks)d.add(e),e.dependencies.delete(r),e.dependencies.add(o);u.delete(o),d.delete(o),Qu(o,t,e).add(o)}}})(r,t,n,s),t>1&&i("info",vn(r.small.size+r.big.size,r.small.size,"After merging chunks"));return ou("optimize chunks",3),[...r.small,...r.big]}(b,n,E,x,s).map(({modules:e})=>({alias:null,modules:e}))),o}function Hu(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 Xn||n.has(t)||s.add(t)}}function Wu(e,t){const n=new Array(e.length);let s=0;for(const i of e){const e=new Set;for(const n of i)e.add(t.get(n));n[s++]=e}return n}function qu(e,t,n,s){const i=new Map;for(const r of t){const t=pe(i,r,fe),o=n[r];for(const n of o)for(const i of Uu([s(n),n.implicitlyLoadedAfter])){const n=e.get(i);if(n)for(const e of n)t.add(e)}}return i}function Ku(e,t,n,s){const i=Array.from({length:s},(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])pe(t,e,fe).add(s)}}return i}function Xu({size:e},{size:t}){return e-t}function Ju(e,{big:t,small:n},s,i,r){let o=null;for(const a of Uu([n,t])){if(e===a)continue;const t=Yu(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function Yu(e,t,n,s,i){const r=Zu(e,t,n,s,i);return r<n?r+Zu(t,e,n-r,s,i):1/0}function Zu(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 Qu(e,t,n){return e.size<t?n.small:n.big}const ed=(e,t)=>e.execIndex>t.execIndex?1:-1;function td(e){e.sort(ed)}function nd(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=(e,t)=>{r.has(e)?s.has(e)||n.push(function(e,t,n){const s=Symbol(e.id),i=[e.id];let r=t;e.cycles.add(s);for(;r!==e;)r.cycles.add(s),i.push(r.id),r=n.get(r);return i.push(i[0]),i.reverse(),i}(e,t,r)):(r.set(e,t),l(e))},l=e=>{if(e instanceof hu){for(const t of e.dependencies)a(t,e);for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{node:{resolution:t,scope:n}}of e.dynamicImports)t instanceof hu&&(n.context.usesTopLevelAwait?a(t,e):i.add(t));o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),l(t));for(const e of i)r.has(e)||(r.set(e,null),l(e));return{cyclePaths:n,orderedModules:o}}const sd=(e,t)=>t?`(${e})`:e;class id{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 rd{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:u,source:{content:d,filename:h}}=l;let p=t.get(h);if(void 0===p)p=e.length,e.push(h),t.set(h,p),n[p]=d;else if(null==n[p])n[p]=d;else if(null!=d&&n[p]!==d)return Ft(Cn(h));const f=[r[0],p,c,o];if(u){let e=i.get(u);void 0===e&&(e=s.length,s.push(u),i.set(u,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;let r=s.length-1;for(;i<=r;){const e=i+r>>1;let o=s[e];if(o[0]!==t&&i===r){o=s[s[i][0]>t?Math.max(0,i-1):i]}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 od(e){return function(t,n){return n.missing?(e(yt,(s=n.plugin,{code:Qt,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:wt("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new rd({mappings:[],names:[]},[t])):new rd(n,[t]);var s}}function ad(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=H(e)||".",o=n.sourceRoot||".",a=t.map((e,t)=>new id(X(i,o,e),s[t]));r=new rd(n,a)}else r=new id(e,t);return s.reduce(i,r)}let ld;const cd=e=>function(e){let t,n;try{const r=ka.__wbindgen_add_to_stack_pointer(-16);ka.xxhashBase64Url(r,fa(e));var s=ya().getInt32(r+0,!0),i=ya().getInt32(r+4,!0);return t=s,n=i,ba(s,i)}finally{ka.__wbindgen_add_to_stack_pointer(16),ka.__wbindgen_export(t,n,1)}}(dd(e)),ud={base36:e=>function(e){let t,n;try{const r=ka.__wbindgen_add_to_stack_pointer(-16);ka.xxhashBase36(r,fa(e));var s=ya().getInt32(r+0,!0),i=ya().getInt32(r+4,!0);return t=s,n=i,ba(s,i)}finally{ka.__wbindgen_add_to_stack_pointer(16),ka.__wbindgen_export(t,n,1)}}(dd(e)),base64:cd,hex:e=>function(e){let t,n;try{const r=ka.__wbindgen_add_to_stack_pointer(-16);ka.xxhashBase16(r,fa(e));var s=ya().getInt32(r+0,!0),i=ya().getInt32(r+4,!0);return t=s,n=i,ba(s,i)}finally{ka.__wbindgen_add_to_stack_pointer(16),ka.__wbindgen_export(t,n,1)}}(dd(e))};function dd(e){return"string"==typeof e?"undefined"==typeof Buffer?(ld??=new TextEncoder,ld.encode(e)):Buffer.from(e):e}let hd="sourceMa";async function pd(e,t,n,s,i){ru("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()));ou("render chunks",2),ru("transform chunks",2);const o=ud[s.hashCharacters],a=function(e){return Object.fromEntries(e.map(e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]}))}(e),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:u,placeholders:d,renderedChunksByPlaceholder:h}=await async function(e,t,n,s,i,r){const o=[],a=new Map,l=new Map,c=new Map,u=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&u.add(t);return await Promise.all(e.map(async({chunk:e,preliminaryFileName:{fileName:d,hashPlaceholder:h},preliminarySourcemapFileName:p,magicString:f,usedModules:m})=>{const g={chunk:e,fileName:d,sourcemapFileName:p?.fileName??null,...await fd(f,d,m,t,n,s,r)},{code:y,map:b}=g;if(h){const{containedPlaceholders:t,transformedCode:n}=((e,t)=>{const n=new Set,s=e.replace(wu,e=>t.has(e)?(n.add(e),`${Pu}${"0".repeat(e.length-5)}${Iu}`):e);return{containedPlaceholders:n,transformedCode:s}})(y,u);let r=n;const o=s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],(e,t)=>(t&&(e+=t),e));o&&(r+=o),a.set(h,g),l.set(h,{containedPlaceholders:t,contentHash:i(r)})}else o.push(g);const E=p?.hashPlaceholder;b&&E&&c.set(p.hashPlaceholder,i(b.toString()).slice(0,p.hashPlaceholder.length))})),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:o,placeholders:u,renderedChunksByPlaceholder:a}}(r,a,s,n,o,i),p=function(e,t,n,s,i,r){const o=new Map(n);for(const n of s){const{fileName:s}=e.get(n);let a="";const l=new Set([n]);for(const e of l){const{containedPlaceholders:n,contentHash:s}=t.get(e);a+=s;for(const e of n)l.add(e)}let c,u;do{u&&(a=u),u=r(a).slice(0,n.length),c=ku(s,n,u)}while(i[Cu].has(c.toLowerCase()));i[c]=Ru,o.set(n,u)}return o}(h,l,c,d,t,o);!function(e,t,n,s,i,r){for(const{chunk:s,code:o,fileName:a,sourcemapFileName:l,map:c}of e.values()){let e=Nu(o,t);const u=Nu(a,t);let d=null;c&&(r.sourcemapDebugIds&&(e+=gd(e,c)),d=l?Nu(l,t):`${u}.map`,c.file=Nu(c.file??"",t),e+=md(d,c,i,r)),n[u]=s.finalizeChunk(e,c,d,t)}for(const{chunk:e,code:o,fileName:a,sourcemapFileName:l,map:c}of s){let s=t.size>0?Nu(o,t):o,u=null;c&&(r.sourcemapDebugIds&&(s+=gd(s,c)),u=l?Nu(l,t):`${a}.map`,s+=md(u,c,i,r)),n[a]=e.finalizeChunk(s,c,u,t)}}(h,p,t,u,n,s),ou("transform chunks",2)}async function fd(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=Hc(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code});const{compact:u,dir:d,file:h,sourcemap:p,sourcemapExcludeSources:f,sourcemapFile:m,sourcemapPathTransform:g,sourcemapIgnoreList:y}=i;if(u||"\n"===c[c.length-1]||(c+="\n"),p){let s;ru("sourcemaps",3),s=h?X(m||h):d?X(d,t):X(t);a=function(e,t,n,s,i,r){const o=od(r),a=n.filter(e=>!e.excludeFromSourcemap).map(e=>ad(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o)),l=new rd(t,a),c=s.reduce(o,l);let{sources:u,sourcesContent:d,names:h,mappings:p}=c.traceMappings();if(e){const t=H(e);u=u.map(e=>K(t,e)),e=G(e)}for(const e of n)Gc(e.originalSourcemap,e.sourcemapChain);return new S({file:e,mappings:p,names:h,sources:u,sourcesContent:i?void 0:d})}(s,e.generateDecodedMap({}),n,l,f,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=y(t,n);"boolean"!=typeof i&&Ft(On("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)),g&&(t=g(t,n),"string"!=typeof t&&Ft(On("sourcemapPathTransform function must return a string."))),a.sources[e]=U(t)}ou("sourcemaps",3)}return{code:c,map:a}}function md(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=G(e);r=i?new URL(s,i).toString():s,n.emitFile({fileName:e,originalFileName:null,source:t.toString(),type:"asset"})}return"hidden"===s?"":`//# sourceMappingURL=${r}\n`}function gd(e,t){const n=ud.hex(e),s=[n.slice(0,8),n.slice(8,12),"4"+n.slice(12,15),(3&parseInt(n.slice(15,16),16)|8).toString(16)+n.slice(17,20),n.slice(20,32)].join("-");return t.debugId=s,"//# debugId="+s+"\n"}hd+="ppingURL";class yd{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){ru("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===Cu?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{ru("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),ou("initialize render",2),ru("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>21)return Ft(On(`Hashes cannot be longer than 21 characters, received ${n}. Check the "${t}" option.`));const s=`${Pu}${Oi(++e).padStart(n-5,"0")}${Iu}`;return s.length>n?Ft(On(`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 Ft(En("output.format",Ot,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return Ft(En("output.file",Rt,'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 Ft(En("output.sourcemapFile",Bt,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(yt,En("output.amd.id",Ct,'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(),e.inlineTransitiveImports();ou("generate chunks",2),await pd(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),ru("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),function(e){for(const[t,n]of Object.entries(e)){if(Ed(t))return Ft(cn(t));if("placeholder"!==n.type){const{fileName:e}=n;if(e!==t&&Ed(e))return Ft(cn(e))}}}(n),ou("generate bundle",2),ou("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)bd(e,n,t);return t}assignManualChunks(e){const t=new Map,n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof hu){const i=e(s.id,n);"string"==typeof i&&bd(i,s,t)}return t}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{qc(t.code,{jsx:!1!==this.inputOptions.jsx})}catch(e){this.inputOptions.onLog(yt,on(t,e))}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:n,inlineDynamicImports:s,manualChunks:i,preserveModules:r,onlyExplicitManualChunks:o}=this.outputOptions,a="object"==typeof i?await this.addManualChunks(i):this.assignManualChunks(i),l=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}`,u=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,d=(e,{functionReturn:n,lineBreakIndent:s,name:i})=>[`${u(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=>Hn.test(e):e=>!Vn.has(e)&&Hn.test(e);return{_:r,cnst:l,getDirectReturnFunction:d,getDirectReturnIifeLeft:(e,n,{needsArrowReturnParens:s,needsWrappedFunction:i})=>{const[r,o]=d(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${sd(`${r}${sd(n,t&&s)}${o}`,t||i)}(`},getFunctionIntro:u,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=qn(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),c=function(e){const t=[];for(const n of e.values())n instanceof hu&&(n.isIncluded()||n.info.isEntry||n.includedDynamicImporters.length>0)&&t.push(n);return t}(this.graph.modulesById),u=function(e){if(0===e.length)return"/";if(1===e.length)return H(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)&&F(s.id)&&n.push(s.id);return n}(c,r)),d=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof Xn&&s.set(i,new yo(i,t,n));return s}(this.graph.modulesById,this.outputOptions,u),h=s?[{alias:null,modules:c}]:r?c.map(e=>({alias:null,modules:[e]})):Gu(this.graph.entryModules,a,n,this.inputOptions.onLog,"function"==typeof i,o),p=new Array(h.length),f=new Map;let m=0;for(const{alias:n,modules:s}of h){td(s);const i=new Tu(s,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,f,d,this.facadeChunkByModule,this.includedNamespaces,n,t,e,u,l);p[m++]=i}for(const e of p)e.link();s||r||this.checkCircularChunks(p);const g=[];for(const e of p)g.push(...e.generateFacades());return[...p,...g]}checkCircularChunks(e){const t=new Set,n=new Map,s=(e,s)=>{if(n.has(e)){if(!t.has(e)){const t=[e.getChunkName()];let i=e.isManualChunk,r=s;for(;r!==e&&r;)t.push(r.getChunkName()),i&&=r.isManualChunk,r=n.get(r);t.push(t[0]),t.reverse(),this.inputOptions.onLog(yt,function(e,t){return{code:"CIRCULAR_CHUNK",ids:e,message:`Circular chunk: ${e.join(" -> ")}. ${t?"Please adjust the manual chunk logic for these chunks.":`Please consider disabling the "output.onlyExplicitManualChunks" option, as enabling it causes modules located between the modules included in the manual chunk "${e.at(-2)}" to be extracted into the separate chunk "${e.at(-1)}".`}`}}(t,i))}}else n.set(e,s),i(e)},i=e=>{for(const t of e.dependencies)t instanceof Tu&&s(t,e);t.add(e)};for(const t of e)n.has(t)||i(t)}}function bd(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return Ft((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${$t(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}function Ed(e){const t=function(...e){const t=e.join("/"),n=z.test(t[0]);return(n?"/":"")+(q(t.split(z),n)||(n?"":"."))}(e).replaceAll("\\","/");return".."===t||t.startsWith("../")||"."===t||F(t)}class xd extends _i{constructor(){super(),this.parent=null,this.variables.set("undefined",new ho)}findVariable(e){let t=this.variables.get(e);return t||(t=new Pi(e),this.variables.set(e,t)),t}}async function Ad(e,t,n,s,i,r,o,a,l,c,u){const d=await function(e,t,n,s,i,r,o,a,l){let c=null,u=null;if(i){c=new Set;for(const n of i)e===n.source&&t===n.importer&&c.add(n.plugin);u=(e,t)=>({...e,resolve:(e,n,{attributes:r,custom:o,isEntry:a,skipSelf:l,importerAttributes:c}=ce)=>(l??=!0,l&&-1!==i.findIndex(s=>s.plugin===t&&s.source===e&&s.importer===n)?Promise.resolve(null):s(e,n,o,a,r||ue,c,l?[...i,{importer:n,plugin:t,source:e}]:i))})}return n.hookFirstAndGetPlugin("resolveId",[e,t,{attributes:a,custom:r,importerAttributes:l,isEntry:o}],u,c)}(e,t,s,i,r,o,a,l,c);if(null!=d){const[e,t]=d;return"object"!=typeof e||e.resolvedBy?"string"==typeof e?{id:e,resolvedBy:t.name}:e:{...e,resolvedBy:t.name}}return void 0===t||F(e)||"."===e[0]?async function(e,t,n){return await Sd(e,t,n)??await Sd(e+".mjs",t,n)??await Sd(e+".js",t,n)}(t?X(H(t),e):X(e),n,u):null}async function Sd(e,t,n){try{const s=await n.lstat(e);if(!t&&s.isSymbolicLink())return await Sd(await n.realpath(e),t,n);if(t&&s.isSymbolicLink()||s.isFile()){const t=G(e);if((await n.readdir(H(e))).includes(t))return e}}catch{}}function $d(e){return 65279===e.charCodeAt(0)?$d(e.slice(1)):e}const vd=(e,t,n=Nd)=>{const{onwarn:s,onLog:i}=e,r=Pd(n,s);if(i){const e=xt[t];return(t,n)=>i(t,Id(n),(t,n)=>{if("error"===t)return Ft(wd(n));xt[t]>=e&&r(t,wd(n))})}return r},Pd=(e,t)=>t?(n,s)=>{n===yt?t(Id(s),t=>e(yt,wd(t))):e(n,s)}:e,Id=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),wd=e=>"string"==typeof e?{message:e}:"function"==typeof e?wd(e()):e,Nd=(e,{message:t})=>{switch(e){case yt:return console.warn(t);case Et:return console.debug(t);default:return console.info(t)}};function kd(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(yt,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const Cd={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:de,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:de,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:de,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Rd={preserve:{factory:null,fragment:null,importSource:null,mode:"preserve"},"preserve-react":{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"preserve"},react:{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"classic"},"react-jsx":{factory:"React.createElement",importSource:"react",jsxImportSource:"react/jsx-runtime",mode:"automatic"}},Dd={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Od=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};Ft(En(`${n}.preset`,s,`valid values are ${At(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;Ft(En(t,n,`valid values are ${s}${At(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)},Md=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),_d="at position ",Ld="at output position ";const Td={delete:()=>!1,get(){},has:()=>!1,set(){}};function Bd(e){return e.startsWith(_d)||e.startsWith(Ld)?Ft({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Ft({code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}async function zd(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:Hc(e.map);const a=e.code;let l=e.ast;const c=[],u=[];let d=!1;const h=()=>d=!0;let p="",f=e.code;const m=e=>(t,n)=>{t=wd(t),n&&Ut(t,n,f,i),t.id=i,t.hook="transform",e(t)};let g;try{g=await n.hookReduceArg0("transform",[f,i,{attributes:t.info.attributes}],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.onLog(yt,function(e){return{code:"NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(i.name)),e;n.attributes&&Mn('Returning attributes from the "transform" hook is forbidden.',"plugin-development/#transform",!1,s),({code:o,map:a,ast:l}=n)}return null!==a&&r.push(Hc("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),f=o,o},(e,t)=>{return p=t.name,{...e,addWatchFile(t){c.push(t),e.addWatchFile(t)},cache:d?e.cache:(l=e.cache,g=h,{delete:e=>(g(),l.delete(e)),get:e=>(g(),l.get(e)),has:e=>(g(),l.has(e)),set:(e,t)=>(g(),l.set(e,t))}),debug:m(e.debug),emitFile:e=>(u.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&Ut(t,n,f,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:Hc({version:3,...ad(e,t,n,s,od(i)).traceMappings()})}(i,a,o,r,s.onLog);if(!e){return new O(a).generateMap({hires:!0,includeContent:!0,source:i})}return o!==e&&(o=e,r.length=0),new S({...e,sourcesContent:e.sourcesContent})},info:m(e.info),setAssetSource(){return this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:m(e.warn)};var l,g})}catch(e){return Ft(kn(e,p,{hook:"transform",id:i}))}return!d&&u.length>0&&(t.transformFiles=u),{ast:l,code:g,customTransformCache:d,originalCode:a,originalSourcemap:o,safeVariableNames:null,sourcemapChain:r,transformDependencies:c}}const Vd="resolveDependencies";class Fd{constructor(e,t,n,s){this.graph=e,this.modulesById=t,this.options=n,this.pluginDriver=s,this.implicitEntryModules=new Set,this.sortedEntryModules=[],this.entryModules=new Set,this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.resolveId=async(e,t,n,s,i,r,o=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await Ad(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,o,n,"boolean"==typeof s?s:!t,i,r,this.options.fs),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,void 0))));return await this.awaitLoadModulesPromise(),n}async addEntryModules(e,t){const n=await this.extendLoadModulesPromise(Promise.all(e.map(({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null,void 0,void 0))).then(n=>{let s=!1;for(const[i,r]of n.entries())r.isUserDefinedEntryPoint=r.isUserDefinedEntryPoint||t,Ud(r,e[i],t),this.entryModules.has(r)||(this.sortedEntryModules.push(r),this.entryModules.add(r),s=!0);return s&&this.sortedEntryModules.sort((e,t)=>e.id>t.id?1:-1),n}));return await this.awaitLoadModulesPromise(),{entryModules:this.sortedEntryModules,implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}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,ue),void 0,!1,!e.resolveDependencies||Vd)).info}addEntryWithImplicitDependants(e,t){return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null,void 0,void 0).then(async n=>{if(Ud(n,e,!1),!n.info.isEntry){const s=await Promise.all(t.map(t=>this.loadEntryModule(t,!1,e.importer,n.id,void 0,void 0)));if(!n.info.isEntry){this.implicitEntryModules.add(n);for(const e of s)n.implicitlyLoadedAfter.add(e);for(const e of n.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(n)}}return n}))}async addModuleSource(e,t,n){let s;try{s=await this.graph.fileOperationQueue.run(async()=>{const t=await this.pluginDriver.hookFirst("load",[e,{attributes:n.info.attributes}]);return null!==t?("object"==typeof t&&t.attributes&&Mn('Returning attributes from the "load" hook is forbidden.',"plugin-development/#load",!1,this.options),t):(this.graph.watchFiles[e]=!0,await this.options.fs.readFile(e,{encoding:"utf8"}))})}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${$t(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:Ft(function(e){return{code:"BAD_LOADER",message:`Error loading "${$t(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e));i.code=$d(i.code);const r=this.graph.cachedModules.get(e);if(!r||r.customTransformCache||r.originalCode!==i.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:r.ast,attributes:r.attributes,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}]))n.updateOptions(i),await n.setSource(await zd(i,n,this.pluginDriver,this.options));else{if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);await n.setSource(r)}}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([{argument:t,node:n},s])=>null===s?null:"string"==typeof s?(n.resolution=s,null):"source"!==n.phase||s.external?n.resolution=await this.fetchResolvedDependency($t(s.id),e.id,s):Ft($n("string"==typeof t?t:$t(s.id),e.id)))));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 hu)return r&&Yc(e,l.info.attributes)&&this.options.onLog(yt,hn(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof Xn)return Ft({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 hu(this.graph,t,this.options,o,s,i,n,e);this.modulesById.set(t,c);const u=this.addModuleSource(t,r,c).then(()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),d]),d=Hd(u).then(()=>this.pluginDriver.hookParallel("moduleParsed",[c.info]));d.catch(()=>{}),this.moduleLoadPromises.set(c,u);const h=await u;return a?a===Vd&&await d: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 Xn))return Ft(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${$t(t)}", but is already an existing non-external module id.`}}(e,t));Yc(l.info.attributes,s)&&this.options.onLog(yt,hn(l.info.attributes,s,e,t))}else l=new Xn(this.options,r,o,a,"absolute"!==i&&F(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])=>e.sourcePhaseSources.has(t)&&!n.external?Ft($n(t,e.id)):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 hu&&(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||!F(e.id)||!0===i&&Gd(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(Gd(e,n,s)||"absolute"),id:i&&s?jd(e,t):e}}const i=s?jd(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:Gd(i,n,s)||"absolute",id:i}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map(async t=>{const n=await this.resolveDynamicImport(e,t.argument,e.id,Xc(t.node));return n&&"string"!=typeof n?(t.node.shouldIncludeDynamicAttributes=!!n.external,t.id=n.id):t.node.shouldIncludeDynamicAttributes=!0,[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,ue,!1,n,e.info.attributes),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===Vd?Hd(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?j(t)?Ft(function(e,t){return{code:nn,exporter:e,id:t,message:`Could not resolve "${e}" from "${$t(t)}"`}}(t,n)):(this.options.onLog(yt,function(e,t){return{code:nn,exporter:e,id:t,message:`"${e}" is imported by "${$t(t)}", but could not be resolved – treating it as an external dependency.`,url:wt("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(yt,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${$t(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1,r){const o=await Ad(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,ue,!0,ue,r,this.options.fs);if(null==o)return Ft(null===s?function(e){return{code:tn,message:`Could not resolve entry module "${$t(e)}".`}}(e):function(e,t){return{code:Jt,message:`Module "${$t(e)}" that should be implicitly loaded before "${$t(t)}" could not be resolved.`}}(e,s));const a="object"==typeof o&&o.external;return!1===o||a?Ft(null===s?a&&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:tn,message:`Entry module "${$t(e)}" cannot be external.`}}(e):function(e,t){return{code:Jt,message:`Module "${$t(e)}" that should be implicitly loaded before "${$t(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof o?o:{id:o},ue),void 0,t,!1)}async resolveDynamicImport(e,t,n,s){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,n,{attributes:s,importerAttributes:e.info.attributes}]);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?(Yc(i.attributes,s)&&this.options.onLog(yt,hn(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,ue,!1,s,e.info.attributes),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function jd(e,t){return j(e)?t?X(t,"..",e):X(e):e}function Ud(e,{fileName:t,name:n},s){null!==t?e.chunkFileNames.add(t):null!==n&&(e.chunkNames.push({isUserDefined:s,name:n}),e.chunkNames.sort((e,t)=>e.name>t.name?1:-1))}function Gd(e,t,n){return!0===n||"ifRelativeSource"===n&&j(t)||!F(e)}async function Hd(e){const[t,n]=await e;return Promise.all([...t,...n])}function Wd(e,t,n,s,i,r,o,a,l){const c=o.sanitizeFileName(e||"asset");return Ou(Du("function"==typeof o.assetFileNames?o.assetFileNames({get name(){return Mn('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',Vt,!1,l),e},names:t,get originalFileName(){return Mn('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',Vt,!1,l),s},originalFileNames:i,source:n,type:"asset"}):o.assetFileNames,"output.assetFileNames",{ext:()=>W(c).slice(1),extname:()=>W(c),hash:e=>r.slice(0,Math.min(Math.max(0,e||8),21)),name:()=>c.slice(0,Math.max(0,c.length-W(c).length))}),a)}function qd(e,{bundle:t},n){t[Cu].has(e.toLowerCase())?n(yt,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Ru}const Kd=new Set(["chunk","asset","prebuilt-chunk"]);function Xd(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return Ft(On(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}class Jd{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&&Kd.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!vt(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):Ft(On(`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}".`)):Ft(On(`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 Ft(sn(t.name||e))},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?(n=t,s=this.facadeChunkByModule,n.fileName?n.fileName:s?s.get(n.module).getFileName():Ft({code:"CHUNK_NOT_GENERATED",message:`Plugin error - Unable to get file name for emitted chunk "${n.fileName||n.name}". You can only get file names once chunks have been generated after the "renderStart" hook.`})):"prebuilt-chunk"===t.type?t.fileName:function(e,t){return"string"!=typeof e.fileName?Ft({code:"ASSET_NOT_FINALISED",message:`Plugin error - Unable to get file name for asset "${e.name||t}". 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}(t,e):Ft({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`});var n,s},this.setAssetSource=(e,t)=>{const n=this.filesByReferenceId.get(e);if(!n)return Ft({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return Ft(On(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return Ft({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=Xd(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=ud[t.hashCharacters],s=this.output={bundle:e,fileNamesBySourceHash:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&qd(e.fileName,s,this.options.onLog);const i=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,s);else{pe(i,n(e.source),me).push(e)}else"prebuilt-chunk"===e.type&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e));for(const[e,t]of i)this.finalizeAssetsWithSameSource(t,e,s)},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=cd(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:Xd(e.source,e,null),n=e.originalFileName||null;"string"==typeof n&&(this.graph.watchFiles[n]=!0);const s={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,originalFileName:n,referenceId:"",source:t,type:"asset"},i=this.assignReferenceId(s,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(s,this.output);else for(const e of this.outputFileEmitters)e.emitAssetWithReferenceId(s,e.output);return i}emitAssetWithReferenceId(e,t){const{fileName:n,source:s}=e;n&&qd(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>jc.LOAD_AND_PARSE)return Ft({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return Ft(On(`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 Ft(On(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||vt(e.fileName))return Ft(On(`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,fileNamesBySourceHash:s,getHash:i,outputOptions:r}){let{fileName:o,name:a,needsCodeReference:l,originalFileName:c,referenceId:u}=e;if(!o){const e=i(t);o=s.get(e),o||(o=Wd(a,a?[a]:[],t,c,c?[c]:[],e,r,n,this.options),s.set(e,o))}const d={...e,fileName:o,source:t};this.filesByReferenceId.set(u,d);const h=n[o];if("asset"===h?.type)h.needsCodeReference&&=l,a&&h.names.push(a),c&&h.originalFileNames.push(c);else{const{options:e}=this;n[o]={fileName:o,get name(){return Mn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',Vt,!1,e),a},names:a?[a]:[],needsCodeReference:l,get originalFileName(){return Mn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',Vt,!1,e),c},originalFileNames:c?[c]:[],source:t,type:"asset"}}}finalizeAssetsWithSameSource(e,t,{bundle:n,fileNamesBySourceHash:s,outputOptions:i}){const{names:r,originalFileNames:o}=function(e){const t=[],n=[];for(const{name:s,originalFileName:i}of e)"string"==typeof s&&t.push(s),i&&n.push(i);return n.sort(),t.sort((e,t)=>e.length-t.length||(e>t?1:e===t?0:-1)),{names:t,originalFileNames:n}}(e);let a,l="",c=!0;for(const s of e){c&&=s.needsCodeReference;const e=Wd(s.name,r,s.source,s.originalFileName,o,t,i,n,this.options);(!l||e.length<l.length||e.length===l.length&&e<l)&&(l=e,a=s)}s.set(t,l);for(const t of e){const e={...t,fileName:l};this.filesByReferenceId.set(t.referenceId,e)}const{options:u}=this;n[l]={fileName:l,get name(){return Mn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',Vt,!1,u),a.name},names:r,needsCodeReference:c,get originalFileName(){return Mn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',Vt,!1,u),a.originalFileName},originalFileNames:o,source:a.source,type:"asset"}}}function Yd(e,t,n,s,i){return xt[e]<xt[i]?Yn:(i,r)=>{null!=r&&n(yt,{code:"INVALID_LOG_POSITION",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=wd(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}const Zd=e;function Qd(e,t,n,s,i,r){const{logLevel:o,onLog:a}=s;let l,c=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(_d)||e.name.startsWith(Ld)||r.has(e.name)?c=!1:r.add(e.name)),t)if(c){const n=e.cacheKey||e.name;d=t[n]||(t[n]=Object.create(null)),l={delete:e=>delete d[e],get(e){const t=d[e];if(t)return t[0]=0,t[1]},has(e){const t=d[e];return!!t&&(t[0]=0,!0)},set(e,t){d[e]=[0,t]}}}else u=e.name,l={delete:()=>Bd(u),get:()=>Bd(u),has:()=>Bd(u),set:()=>Bd(u)};else l=Td;var u,d;return{addWatchFile(e){n.watchFiles[e]=!0},cache:l,debug:Yd(Et,"PLUGIN_LOG",a,e.name,o),emitFile:i.emitFile.bind(i),error:t=>Ft(kn(wd(t),e.name)),fs:s.fs,getFileName:i.getFileName,getModuleIds:()=>n.modulesById.keys(),getModuleInfo:n.getModuleInfo,getWatchFiles:()=>Object.keys(n.watchFiles),info:Yd(bt,"PLUGIN_LOG",a,e.name,o),load:e=>n.moduleLoader.preloadModule(e),meta:{rollupVersion:Zd,watchMode:n.watchMode},parse:qc,resolve:(t,s,{attributes:i,custom:r,isEntry:o,skipSelf:a,importerAttributes:l}=ce)=>(a??=!0,n.moduleLoader.resolveId(t,s,r,o,i||ue,l,a?[{importer:s,plugin:e,source:t}]:null)),setAssetSource:i.setAssetSource,warn:Yd(yt,"PLUGIN_WARNING",a,e.name,o)}}function eh(e){return Array.isArray(e)?e.filter(Boolean):e?[e]:[]}function th(e){if(e instanceof RegExp)return t=>{const n=U(t),s=e.test(n);return e.lastIndex=0,s};const t=process.cwd(),n=function(e,t){return e.startsWith("**")||F(e)?U(e):U(X(t,e))}(e,t),s=ca(n,{dot:!0});return e=>{const t=U(e);return s(t)}}function nh(e){return e instanceof RegExp?t=>{const n=e.test(t);return e.lastIndex=0,n}:t=>t.includes(e)}function sh(e,t){if(e||t)return n=>!e?.some(e=>e(n))&&(!!t?.some(e=>e(n))||!(t&&t.length>0))}function ih(e){return"string"==typeof e||e instanceof RegExp?{include:[e]}:Array.isArray(e)?{include:e}:{exclude:e.exclude?eh(e.exclude):void 0,include:e.include?eh(e.include):void 0}}function rh(e){if(!e)return;const{exclude:t,include:n}=ih(e),s=t?.map(th),i=n?.map(th);return sh(s,i)}function oh(e,t){if(!e&&!t)return;const n=rh(e),s=function(e){if(!e)return;const{exclude:t,include:n}=ih(e),s=t?.map(nh),i=n?.map(nh);return sh(s,i)}(t);return(e,t)=>{let i=!0;return n&&(i&&=n(e)),!!i&&(s&&(i&&=s(t)),i)}}const ah=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 lh{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.compiledPluginFilters={idOnlyFilter:new WeakMap,transformFilter:new WeakMap},this.fileEmitter=new Jd(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,Qd(n,s,e,t,this.fileEmitter,r)])),i)for(const e of n)for(const n of ah)n in e&&t.onLog(yt,mn(e.name,n))}createOutputPluginDriver(e){return new lh(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,dh))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(hh)}getSortedPlugins(e,t){return pe(this.sortedPlugins,e,()=>ch(e,this.plugins,t))}runHook(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;if("object"==typeof i&&"filter"in i&&i.filter)if("transform"===e){const e=i.filter,n=t,s=pe(this.compiledPluginFilters.transformFilter,e,()=>oh(e.id,e.code));if(s&&!s(n[1],n[0]))return Promise.resolve()}else if("resolveId"===e||"load"===e){const e=i.filter,n=t,s=pe(this.compiledPluginFilters.idOnlyFilter,e,()=>function(e){const t=rh(e);return t?e=>!!t(e):void 0}(e.id));if(s&&!s(n[0]))return Promise.resolve()}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),Ft(kn(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 Ft(kn(t,n.name,{hook:e}))}}}function ch(e,t,n=uh){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 uh(e,t,n){"function"!=typeof e&&Ft(function(e,t){return{code:Kt,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 dh(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return Ft(function(e,t){return{code:Kt,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 hh(){}class ph{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 fh{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,n,s,i=e;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 Me,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=jc.LOAD_AND_PARSE,this.scope=new xd,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 lh(this,e,e.plugins,this.pluginCache),this.moduleLoader=new Fd(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new ph(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[_n]=!0}return t})(e)}async build(){ru("generate module graph",2),await this.generateModuleGraph(),ou("generate module graph",2),ru("sort and bind modules",2),this.phase=jc.ANALYSE,this.sortAndBindModules(),ou("sort and bind modules",2),ru("mark included statements",2),this.includeStatements(),ou("mark included statements",2),this.phase=jc.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.cacheInfoGetters(),e instanceof hu?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)Jn(t);if(this.options.treeshake){let t=1;this.newlyIncludedVariableInits.clear();do{ru(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)if(e.isExecuted){e.hasTreeShakingPassStarted=!0,"no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include();for(const e of this.newlyIncludedVariableInits)this.newlyIncludedVariableInits.delete(e),e.include(je(),!1)}if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(),this.needsTreeshakingPass=!0);ou("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()||Ft(Sn(t))}sortAndBindModules(){const{orderedModules:e,cyclePaths:t}=nd(this.entryModules);for(const e of t)this.options.onLog(yt,an(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())if("*"!==t.name&&"source"!==t.phase){const[n,s]=t.module.getVariableForExportName(t.name,{importChain:[e.id]});n||e.log(yt,An(t.name,e.id,t.module.id,!!s?.missingButExportExists),t.start)}}}function mh(e,t){return t()}const gh=e;function yh(e,t,n,s){e=ch("onLog",e);const i=xt[s],r=(s,o,a=he)=>{Ht(o);if(!(xt[s]<i)){for(const t of e){if(a.has(t))continue;const{onLog:e}=t,l=e=>xt[e]<i?Yn:n=>r(e,wd(n),new Set(a).add(t));if(!1===("handler"in e?e.handler:e).call({debug:l(Et),error:e=>Ft(wd(e)),info:l(bt),meta:{rollupVersion:gh,watchMode:n},warn:l(yt)},s,o))return}t(s,o)}};return r}const bh=e=>()=>Ft(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:wt("plugin-development/#a-simple-example")}}(e)),Eh=bh("fs.appendFile"),xh=bh("fs.copyFile"),Ah=bh("fs.mkdir"),Sh=bh("fs.mkdtemp"),$h=bh("fs.readdir"),vh=bh("fs.readFile"),Ph=bh("fs.realpath"),Ih=bh("fs.rename"),wh=bh("fs.rmdir"),Nh=bh("fs.stat"),kh=bh("fs.lstat"),Ch=bh("fs.unlink"),Rh=bh("fs.writeFile");var Dh=Object.freeze({__proto__:null,appendFile:Eh,copyFile:xh,lstat:kh,mkdir:Ah,mkdtemp:Sh,readFile:vh,readdir:$h,realpath:Ph,rename:Ih,rmdir:wh,stat:Nh,unlink:Ch,writeFile:Rh});const Oh=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Mh=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>"\0"!==t[0]&&e(t,...n)||!1;if(e){const t=new Set,n=[];for(const s of eh(e))s instanceof RegExp?n.push(s):t.add(s);return(e,...s)=>t.has(e)||n.some(t=>t.test(e))}return()=>!1},_h=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},Lh=e=>{const t=e.jsx;if(!t)return!1;const n=Od(t,Rd,"jsx",kt,"false, "),{factory:s,importSource:i,mode:r}=n;switch(r){case"automatic":return{factory:s||"React.createElement",importSource:i||"react",jsxImportSource:n.jsxImportSource||"react/jsx-runtime",mode:"automatic"};case"preserve":return!i||s||n.fragment||Ft(En("jsx",kt,"when preserving JSX and specifying an importSource, you also need to specify a factory or fragment")),{factory:s||null,fragment:n.fragment||null,importSource:i||null,mode:"preserve"};default:return r&&"classic"!==r&&Ft(En("jsx.mode",kt,'mode must be "automatic", "classic" or "preserve"',r)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},Th=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:1e3},Bh=(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[X(t)]=s;return n=>e[n]??t}return()=>t},zh=e=>{if(!1===e.treeshake)return!1;const t=Od(e.treeshake,Cd,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??de,moduleSideEffects:Vh(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Vh=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>"\0"===t[0]||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&Ft(En("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},Fh=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,jh=/^[a-z]:/i;function Uh(e){const t=jh.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Fh,"_")}const Gh=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return Ft(En("output.file",Rt,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return Ft(En("output.file",Rt,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},Hh=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 Ft(En("output.format",Ot,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Wh=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?Ft(En("output.inlineDynamicImports",Mt,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},qh=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return Ft(En("output.inlineDynamicImports",Mt,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return Ft(En("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},Kh=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return X(t)},Xh=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Ft(En("output.amd.id",Ct,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Ft(En("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}},Jh=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},Yh=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?Ft(En("output.dir",Rt,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},Zh=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function Qh(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return Ft({code:Wt,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:wt(Dt)});return n||"auto"}const ep=(e,t)=>(null!=e.externalImportAssertions&&Mn('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),tp=e=>{const t=Od(e.generatedCode,Dd,"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}},np=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},sp=new Set(["compat","auto","esModule","default","defaultOnly"]),ip=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||rp(n=t(s)):s in e?e[s]:rp(e[s]=t(s))}return void 0===t?()=>"default":()=>rp(t)},rp=e=>sp.has(e)?e:Ft(En("output.interop",_t,`use one of ${Array.from(sp,e=>JSON.stringify(e)).join(", ")}`,e)),op=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return Ft(En("output.manualChunks",Lt,'this option is not supported for "output.inlineDynamicImports"'));if(n)return Ft(En("output.manualChunks",Lt,'this option is not supported for "output.preserveModules"'))}return s||{}},ap=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),lp=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},cp=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+"/":Ft(En("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n},up=e;function dp(e){return async function(e,t){const{options:n,unsetOptions:s}=await async function(e,t){if(!e)throw new Error("You must supply an options object to rollup");const n=await async function(e,t){const n=ch("options",await Md(e.plugins)),s=e.logLevel||bt,i=yh(n,vd(e,s),t,s);for(const r of n){const{name:n,options:o}=r,a="handler"in o?o.handler:o,l=await a.call({debug:Yd(Et,"PLUGIN_LOG",i,n,s),error:e=>Ft(kn(wd(e),n,{hook:"onLog"})),info:Yd(bt,"PLUGIN_LOG",i,n,s),meta:{rollupVersion:up,watchMode:t},warn:Yd(yt,"PLUGIN_WARNING",i,n,s)},e);l&&(e=l)}return e}(e,t),{options:s,unsetOptions:i}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await Md(e.plugins),r=e.logLevel||bt,o=yh(i,vd(e,r),t,r),a=e.strictDeprecations||!1,l=Th(e),c={cache:Oh(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Mh(e.external),fs:e.fs??Dh,input:_h(e),jsx:Lh(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:Bh(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:zh(e)};return kd(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(n,t);return hp(s.plugins,_d),{options:s,unsetOptions:i}}(e,null!==t);(function(e){e.perf?(eu=new Map,ru=nu,ou=su,e.plugins=e.plugins.map(lu)):(ru=Yn,ou=Yn)})(n),await async function(){await Ra()}();const i=new fh(n,t),r=!1!==e.cache;e.cache&&(n.cache=void 0,e.cache=void 0);ru("BUILD",1),await mh(i.pluginDriver,async()=>{try{ru("initialize",2),await i.pluginDriver.hookParallel("buildStart",[n]),ou("initialize",2),await i.build()}catch(e){const t=Object.keys(i.watchFiles);t.length>0&&(e.watchFiles=t);try{await i.pluginDriver.hookParallel("buildEnd",[e])}catch(t){const n=jt({...e,message:`There was an error during the build:\n ${e.message}\nAdditionally, handling the error in the 'buildEnd' hook caused the following error:\n ${t.message}`});throw await i.pluginDriver.hookParallel("closeBundle",[n]),n}throw await i.pluginDriver.hookParallel("closeBundle",[e]),e}try{await i.pluginDriver.hookParallel("buildEnd",[])}catch(e){throw await i.pluginDriver.hookParallel("closeBundle",[e]),e}}),ou("BUILD",1);const o={get cache(){return r?i.getCache():void 0},async close(){o.closed||(o.closed=!0,await i.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,async[Symbol.asyncDispose](){await this.close()},generate:async e=>o.closed?Ft({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):pp(!1,n,s,e,i),get watchFiles(){return Object.keys(i.watchFiles)},write:async e=>o.closed?Ft({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):pp(!0,n,s,e,i)};n.perf&&(o.getTimings=iu);return o}(e,null)}function hp(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function pp(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 Md(e.plugins);hp(i,Ld);const r=t.createOutputPluginDriver(i);return{...await fp(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return mh(0,async()=>{const n=new yd(r,a,t,o,i),s=await n.generate(e);if(e){if(ru("WRITE",1),!r.dir&&!r.file)return Ft({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:wt(Rt)});await Promise.all(Object.values(s).map(e=>i.fileOperationQueue.run(()=>async function(e,t,{fs:{mkdir:n,writeFile:s}}){const i=X(t.dir||H(t.file),e.fileName);return await n(H(i),{recursive:!0}),s(i,"asset"===e.type?e.source:e.code)}(e,r,t)))),await o.hookParallel("writeBundle",[r,s]),ou("WRITE",1)}return l=s,{output:Object.values(l).filter(e=>Object.keys(e).length>0).sort((e,t)=>gp(e)-gp(t))};var l})}function fp(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=Hh(e),o=Wh(e,t),a=qh(e,o,t),l=Gh(e,a,t),c=tp(e),u=ep(e,t),d={amd:Xh(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:Jh(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:Yh(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:Zh(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:Qh(e,s),extend:e.extend||!1,externalImportAssertions:u,externalImportAttributes:u,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:Jh(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:c,globals:e.globals||{},hashCharacters:e.hashCharacters??"base64",hoistTransitiveImports:e.hoistTransitiveImports??!0,importAttributesKey:e.importAttributesKey??"assert",indent:np(e,i),inlineDynamicImports:o,interop:ip(e),intro:Jh(e,"intro"),manualChunks:op(e,o,a),minifyInternalExports:ap(e,r,i),name:e.name,noConflict:e.noConflict||!1,onlyExplicitManualChunks:e.onlyExplicitManualChunks||!1,outro:Jh(e,"outro"),paths:e.paths||{},plugins:await Md(e.plugins),preserveModules:a,preserveModulesRoot:Kh(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Uh,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:cp(e),sourcemapDebugIds:e.sourcemapDebugIds||!1,sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:lp(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,virtualDirname:e.virtualDirname||"_virtual"};return kd(e,Object.keys(d),"output options",t.onLog),{options:d,unsetOptions:s}}(s.hookReduceArg0Sync("outputOptions",[n],(e,t)=>t||e,e=>{const t=()=>e.error({code:"CANNOT_EMIT_FROM_OPTIONS_HOOK",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 mp;function gp(e){return"asset"===e.type?mp.ASSET:e.isEntry?mp.ENTRY_CHUNK:mp.SECONDARY_CHUNK}function yp(e){return e}Symbol.asyncDispose??=Symbol("Symbol.asyncDispose"),function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(mp||(mp={}));const bp=e;export{bp as VERSION,yp as defineConfig,dp as rollup};
10
+ var e="4.63.3",t=",".charCodeAt(0),n=";".charCodeAt(0),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;e<64;e++){const t=s.charCodeAt(e);i[e]=t,r[t]=e}function o(e){let t=0,n=0,s=0;do{const i=e.next();s=r[i],t|=(31&s)<<n,n+=5}while(32&s);return t}function a(e){return 1&e?-2147483648|-(e>>>1):e>>>1}function l(e,t){do{let n=31&t;(t>>>=5)>0&&(n|=32),e.write(i[n])}while(t>0)}function c(e){return e<0?-e<<1|1:e<<1}function u(e,n){return!(e.pos>=n)&&e.peek()!==t}var d="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}},h=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=d.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:n}=this;return n>0?t+d.decode(e.subarray(0,n)):t}},p=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:t,pos:n}=this,s=t.indexOf(e,n);return-1===s?t.length:s}};function f(e){e.sort(m)}function m(e,t){return e[0]-t[0]}function g(e){const s=new h;let i=0,r=0,o=0,a=0;for(let u=0;u<e.length;u++){const d=e[u];if(u>0&&s.write(n),0===d.length)continue;let h=0;for(let e=0;e<d.length;e++){const n=d[e];e>0&&s.write(t),l(s,c(n[0]-h)),h=n[0],1!==n.length&&(l(s,c(n[1]-i)),l(s,c(n[2]-r)),l(s,c(n[3]-o)),i=n[1],r=n[2],o=n[3],4!==n.length&&(l(s,c(n[4]-a)),a=n[4]))}}return s.flush()}var y=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}},b=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){e(this);let t=this.next;for(;t;)e(t),t=t.next}eachPrevious(e){e(this);let t=this.previous;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}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}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.edited?this.edit(t,this.storeName,!0):this.split(this.start+t.length).edit("",void 0,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.edited?this.edit(t,this.storeName,!0):(this.split(this.end-t.length),this.edit("",void 0,!0))),!0):(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0)}},E=class extends Error{name="MagicStringError";constructor(e,t){super(`[MagicString] ${e}`,t)}};function x(){if("undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa)return e=>globalThis.btoa(unescape(encodeURIComponent(e)));const e=globalThis.Buffer;return e?t=>e.from(t,"utf-8").toString("base64"):()=>{throw new E("unsupported environment: `btoa` or `Buffer` is required")}}const A=x();var S=class{constructor(e){if(this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=g(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList),void 0!==e.debugId&&(this.debugId=e.debugId),void 0!==e.rangeMappings){let t=!1;for(const n of e.rangeMappings)if(0!==n.length){t=!0;break}t&&(this.rangeMappings=function(e){if(0===e.length)return"";const t=new h;for(let s=0;s<e.length;s++){const i=e[s];s>0&&t.write(n);let r=0;for(let e=0;e<i.length;e++){const n=i[e];l(t,n-r),r=n}}return t.flush()}(e.rangeMappings))}}toString(){return JSON.stringify(this)}toUrl(){return`data:application/json;charset=utf-8;base64,${A(this.toString())}`}};function $(e){const t=[0];for(let n=e.indexOf("\n");-1!==n;n=e.indexOf("\n",n+1))t.push(n+1);return function(e){let n=0,s=t.length;for(;n<s;){const i=n+s>>1;e<t[i]?s=i:n=i+1}const i=n-1;return{line:i,column:e-t[i]}}}function v(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 P=Object.prototype.toString;function w(e){return"[object Object]"===P.call(e)}function I(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||95===e}var N=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.rawRangeMappings=[],this.rawRangeMappingsIndices=this.rawRangeMappings[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,n,s){if(t.length){const i=t.length-1;let r=t.indexOf("\n",0),o=-1;for(;r>=0&&i>r;){const i=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&i.push(s),this.rawSegments.push(i),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.rawRangeMappings[this.generatedCodeLine]=this.rawRangeMappingsIndices=[],this.generatedCodeColumn=0,o=r,r=t.indexOf("\n",r+1)}const a=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&a.push(s),this.rawSegments.push(a),this.advance(t.slice(o+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,n,s,i){const r=t.end;let o=t.start;if(this.hires){const i="boundary"===this.hires,a="experimental-range"===this.hires;let l=!1;for(;o<r;){a&&o+1>=r&&this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]);const c=n.charCodeAt(o);10===c?(s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.rawRangeMappings[this.generatedCodeLine]=this.rawRangeMappingsIndices=[],this.generatedCodeColumn=0,l=!1):(i?I(c)?l||(this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),l=!0):(this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),l=!1):a?o===t.start&&(this.rawRangeMappingsIndices.push(this.rawSegments.length),this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column])):this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),s.column+=1,this.generatedCodeColumn+=1),o+=1}}else{const t=i.bits;for(;o<r;){let i=n.indexOf("\n",o);if((-1===i||i>r)&&(i=r),i>o){this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]);for(let n=o+1>>5,r=i-1>>5;n<=r;n++){let r=t[n];if(!r)continue;const a=n<<5;for(;r;){const t=r&-r,n=a+31-Math.clz32(t);if(n>o&&n<i){const t=n-o;this.rawSegments.push([this.generatedCodeColumn+t,e,s.line,s.column+t])}r^=t}}s.column+=i-o,this.generatedCodeColumn+=i-o}if(i===r)break;s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.rawRangeMappings[this.generatedCodeLine]=this.rawRangeMappingsIndices=[],this.generatedCodeColumn=0,o=i+1}}this.pending=null}advance(e){if(!e)return;const t=e.lastIndexOf("\n");if(-1!==t){for(let t=e.indexOf("\n");-1!==t;t=e.indexOf("\n",t+1))this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.rawRangeMappings[this.generatedCodeLine]=this.rawRangeMappingsIndices=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=e.length-t-1}};const k="\n",C="\n".charCodeAt(0),R="\r".charCodeAt(0),D={insertLeft:!1,insertRight:!1,storeName:!1};function O(e,t,n,s,i,r){if(!e.includes("$"))return e;let o="",a=0;for(;a<e.length;){const l=e.indexOf("$",a);if(-1===l){o+=e.slice(a);break}o+=e.slice(a,l);const c=e[l+1];let u="$",d=1;if("$"===c)d=2;else if("&"===c)u=t,d=2;else if("`"===c)u=s.slice(0,n),d=2;else if("'"===c)u=s.slice(n+t.length),d=2;else if("<"===c&&void 0!==r){const t=e.indexOf(">",l+2);-1!==t&&(u=r[e.slice(l+2,t)]??"",d=t+1-l)}else if(c>="0"&&c<="9"){const t=e[l+2],n=t>="0"&&t<="9"?Number(c+t):NaN,s=Number(c);n>=1&&n<=i.length?(u=i[n-1]??"",d=3):s>=1&&s<=i.length&&(u=i[s-1]??"",d=2)}o+=u,a=l+d}return o}var M=class e{constructor(e,t={}){const n=new b(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:new Map([[0,n]])},byEnd:{writable:!0,value:new Map([[e.length,n]])},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new y},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0},hasMovedChunks:{writable:!0,value:!1}})}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new E("content must be a string, got "+typeof e);return this.outro+=e,this}appendLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new E("content must be a string, got "+typeof t);this._split(e);const n=this.byEnd.get(e);return n?n.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new E("content must be a string, got "+typeof t);this._split(e);const n=this.byStart.get(e);return n?n.appendRight(t):this.outro+=t,this}clone(){const t=new e(this.original,{filename:this.filename,ignoreList:this.ignoreList,offset:this.offset});let n=this.firstChunk,s=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart.set(s.start,s),t.byEnd.set(s.end,s);const e=n.next,i=e&&e.clone();i&&(s.next=i,i.previous=s,s=i),n=e}return t.lastChunk=s,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new y(this.sourcemapLocations),t.storedNames={...this.storedNames},t.intro=this.intro,t.outro=this.outro,t.hasMovedChunks=this.hasMovedChunks,t}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),n=new N(e.hires),s=$(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)}),this.outro&&n.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?v(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,rangeMappings:n.rawRangeMappings}}generateMap(e){return new S(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" ".repeat(i)}(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(w(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const s=e,i={};(t=t||{}).exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)i[t]=!0});let r=!1!==t.indentStart;const o=e=>{if(""===e)return e;const t=e.replace(n,(e,t)=>t>0||r?`${s}${e}`:e);return r="\n"===e[e.length-1],t};this.intro=o(this.intro);let a=0,l=this.firstChunk;const c=e=>{r=!1,e===l.start?l.appendRight(s):(this._splitChunk(l,e),l=l.next,l.prependRight(s))};for(;l;){const e=l.end;if(i[l.start]||(l.intro=o(l.intro)),l.edited)i[a]||(l.content=o(l.content));else if(t.exclude)for(a=l.start;a<e;){if(!i[a]){const e=this.original.charCodeAt(a);e===C?r=!0:e!==R&&r&&c(a)}a+=1}else for(a=l.start;a<e;){if(!r){const t=this.original.indexOf(k,a);if(-1===t||t>=e)break;r=!0,a=t+1;continue}const t=this.original.charCodeAt(a);t!==C&&t!==R?(c(a),a+=1):a+=1}i[l.end-1]||(l.outro=o(l.outro)),a=l.end,l=l.next}return this.outro=o(this.outro),this}insert(){throw new E("insert() is deprecated, use appendLeft() or prependRight()")}insertLeft(e,t){return D.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),D.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return D.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),D.insertRight=!0),this.prependRight(e,t)}move(e,t,n){if(e+=this.offset,t+=this.offset,n+=this.offset,e===t)return this;if(n>=e&&n<=t)throw new E("cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);const s=this.byStart.get(e),i=this.byEnd.get(t);if(this.hasMovedChunks){let n=s;for(;n!==i;)if(n=n.next,!n||n.start<e||n.end>t)throw new E(`cannot move ${e} to ${t} because an earlier move split that range`)}const r=s.previous,o=i.next,a=this.byStart.get(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.hasMovedChunks=!0,this}overwrite(e,t,n,s){const i="object"==typeof s&&s?s:{};return this.update(e,t,n,{...i,overwrite:!i.contentOnly})}update(e,t,n,s){if(e+=this.offset,t+=this.offset,"string"!=typeof n)throw new E("content must be a string, got "+typeof n);if(0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e<0)throw new E(`start ${e} is out of bounds`);if(t>this.original.length)throw new E(`end ${t} is out of bounds`);if(e===t)throw new E(`cannot overwrite a zero-length range at ${e}, use appendLeft() or prependRight()`);if(e>t)throw new E(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t),!0===s&&(D.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),D.storeName=!0),s={storeName:!0});const i="object"==typeof s&&s?s:{},r=i.storeName||!1,o=i.overwrite||!1;if(r){const n=this.original.slice(e,t);Object.defineProperty(this.storedNames,n,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart.get(e),l=this.byEnd.get(t);if(a){let e=a;for(;e!==l;){if(e.next!==this.byStart.get(e.end))throw new E("cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(n,r,!o)}else{const s=new b(e,t,"").edit(n,r);l.next=s,s.previous=l}return this}prepend(e){if("string"!=typeof e)throw new E("content must be a string, got "+typeof e);return this.intro=e+this.intro,this}prependLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new E("content must be a string, got "+typeof t);this._split(e);const n=this.byEnd.get(e);return n?n.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new E("content must be a string, got "+typeof t);this._split(e);const n=this.byStart.get(e);return n?n.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e===t)return this;if(e<0||t>this.original.length)throw new E(`range ${e}–${t} is out of bounds`);if(e>t)throw new E(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t);let n=this.byStart.get(e);for(;n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart.get(n.end):null;return this}reset(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e===t)return this;if(e<0||t>this.original.length)throw new E(`range ${e}–${t} is out of bounds`);if(e>t)throw new E(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t);let n=this.byStart.get(e);for(;n;)n.reset(),n=t>n.end?this.byStart.get(n.end):null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;for(;e;){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];e=e.previous}return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(k);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,n=this.lastChunk;for(;n;){if(n.outro.length>0){if(e=n.outro.lastIndexOf(k),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(k),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(k),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}n=n.previous}return e=this.intro.lastIndexOf(k),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(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 E(`cannot use edited 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 E(`cannot use edited 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.get(e)||this.byEnd.get(e))return;let t=this.lastSearchedChunk,n=t;const s=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);if(t=s?this.byStart.get(t.end):this.byEnd.get(t.start),t===n)return;n=t}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=$(this.original)(t);throw new E(`cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`)}const n=e.split(t);return this.byEnd.set(t,e),this.byStart.set(t,n),this.byEnd.set(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(){if(this.intro.length&&this.intro.trim())return!1;let e=this.firstChunk;for(;e;){if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;e=e.next}return!this.outro.length||!this.outro.trim()}length(){let e=this.firstChunk,t=0;for(;e;)t+=e.intro.length+e.content.length+e.outro.length,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.set(n.end,n),this.byStart.set(n.next.start,n.next),this.byEnd.set(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.set(n.end,n),this.byStart.set(n.next.start,n.next),this.byEnd.set(n.next.end,n.next)),s)return!0;n=n.next}while(n);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){if(this.intro||this.outro)return!0;let e=0,t=this.firstChunk;for(;t;){if(t.intro||t.outro)return!0;if(t.edited||t.start!==e){if(!this.original.startsWith(t.content,e))return!0;e+=t.content.length}else e=t.end;t=t.next}return e!==this.original.length}_replaceRegexp(e,t){function n(e,n){return"string"==typeof t?O(t,e[0],e.index,n,e.slice(1),e.groups):void 0===e.groups?t(e[0],...e.slice(1),e.index,n):t(e[0],...e.slice(1),e.index,n,e.groups)}const s=e=>{if(null==e.index)return;const t=n(e,this.original);t!==e[0]&&(0===e[0].length?this.appendRight(e.index,t):this.overwrite(e.index,e.index+e[0].length,t))};if(e.global){e.lastIndex=0;for(const t of this.original.matchAll(e))s(t)}else{const t=this.original.match(e);t&&s(t)}return this}_replaceString(e,t){const{original:n}=this,s=n.indexOf(e);return-1!==s&&e!==(t="function"==typeof t?t(e,s,n):O(t,e,s,n,[],void 0))&&(0===e.length?this.appendRight(s,t):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;if(0===s){for(let e=0;e<=n.length;e+=1){const s="function"==typeof t?t("",e,n):O(t,"",e,n,[],void 0);""!==s&&this.appendRight(e,s)}return this}for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s)){const e=n.slice(i,i+s),r="function"==typeof t?t(e,i,n):O(t,e,i,n,[],void 0);e!==r&&this.overwrite(i,i+s,r)}return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new E("replaceAll() requires a global RegExp");return this._replaceRegexp(e,t)}};const _=Object.prototype.hasOwnProperty;var L=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 M)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!w(e)||!e.content)throw new E("addSource() requires a `content` property that is a MagicString");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(t=>{_.call(e,t)||(e[t]=e.content[t])}),void 0===e.separator&&(e.separator=this.separator),e.filename)if(_.call(this.uniqueSourceIndexByFilename,e.filename)){const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new E(`duplicate filename "${e.filename}" with different content, use unique filenames`)}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 M(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(),ignoreList:e.ignoreList,indentExclusionRanges:e.indentExclusionRanges,separator:e.separator})}),t}generateDecodedMap(e={}){const t=[];let n;this.sources.forEach(e=>{Object.keys(e.content.storedNames).forEach(e=>{t.includes(e)||t.push(e)})});const s=new N(e.hires);return this.intro&&s.advance(this.intro),this.sources.forEach((e,i)=>{i>0&&s.advance(void 0!==e.separator?e.separator:this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=$(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?v(e.file,t.filename):t.filename),sourcesContent:this.uniqueSources.map(t=>("function"==typeof e.includeContent?e.includeContent(t):e.includeContent)?t.content:null),names:t,mappings:s.raw,x_google_ignoreList:n,rangeMappings:s.rawRangeMappings}}generateMap(e){return new S(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[n]-e[t])[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,t)=>{const n=void 0!==e.separator?e.separator:this.separator;return t>0&&""!==n.trim()||!e.content.isEmpty()})}length(){return this.sources.reduce((e,t,n)=>{const s=void 0!==t.separator?t.separator:this.separator;return e+(n>0?s.length:0)+t.content.toString().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)for(let n=0;n<this.sources.length;n+=1){const s=this.sources[n];if(n>0&&(s.separator=(void 0!==s.separator?s.separator:this.separator).replace(t,""),s.separator))break;if(s.content.trimStartAborted(e))break}return this}trimEnd(e){const t=new RegExp(`${e||"\\s"}+$`);for(let n=this.sources.length-1;n>=0;n-=1){const s=this.sources[n];if(s.content.trimEndAborted(e))return this;if(n>0&&(s.separator=(void 0!==s.separator?s.separator:this.separator).replace(t,""),s.separator))return this}return this.intro=this.intro.replace(t,""),this}};const T=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,B=/^\.?\.\//,z=/\\/g,V=/[/\\]/,F=/[/\\]+$/;function j(e){return T.test(e)}function U(e){return B.test(e)}function G(e){return e.replace(z,"/")}function H(e){return e.replace(F,"").split(V).pop()||""}function W(e){const t=e.replace(F,""),n=/[/\\][^/\\]*$/.exec(t);if(n){return t.slice(0,-n[0].length)||"/"}return""===t?e?"/":".":e!==t&&/^[A-Za-z]:$/.test(t)?t:"."}function q(e){const t=H(e);if("."===t||".."===t)return"";const n=t.lastIndexOf(".");return n>0?t.slice(n):""}function K(e,t=!1){const n=[];for(const s of e)".."===s?n.length>0&&".."!==n[n.length-1]?n.pop():t||n.push(".."):"."!==s&&""!==s&&n.push(s);return n.join("/")}function X(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 J(...e){let t=[],n=!1;for(const s of e)j(s)?(t=s.split(V),n=!0):t.push(...s.split(V));const s=K(t,n);return n?/^[A-Za-z]:/.test(s)?s:"/"+s:s||"/"}function Y(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const Z={isNoStatement:!0};function Q(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 ee=/\S/g;function te(e,t){ee.lastIndex=t;return ee.exec(e).index}const ne=/\s/;function se(e,t){return t>0&&13===e.charCodeAt(t-1)?t-1:t}function ie(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[se(e,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 re(e,t,n,s,i){let r,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=n+ie(t.original.slice(n,c.start))[1]);for(let n=1;n<=e.length;n++)r=c,o=l,a=u,c=e[n],u=void 0!==c&&(!c.included||c.needsBoundaries),a||u?(l=r.end+ie(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):Y(r,t,o,l)):r.render(t,i)}function oe(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+Q(t.original.slice(r.end,s.start),",")),o=a=c+1+ie(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 ae(e,t,n){for(;;){const[s,i]=ie(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}function le(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 ce(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function ue(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${le([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}const de=Object.freeze(Object.create(null)),he=Object.freeze({}),pe=Object.freeze([]),fe=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function me(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function ge(){return new Set}function ye(){return[]}const be=Symbol("Unknown Key"),Ee=Symbol("Unknown Non-Accessor Key"),xe=Symbol("Unknown Integer"),Ae=Symbol("Unknown Well-Known"),Se=Symbol("Symbol.toStringTag"),$e=Symbol("Symbol.asyncDispose"),ve=Symbol("Symbol.dispose"),Pe=Symbol("Symbol.hasInstance"),we=new Set([Se,$e,ve,Pe]),Ie=e=>we.has(e)||e===Ae,Ne=new Set([Pe,$e,ve]),ke=e=>"string"==typeof e||we.has(e),Ce=[],Re=[be],De=[Ee],Oe=[xe],Me=[Pe],_e=Symbol("Entities");class Le{constructor(){this.entityPaths=Object.create(null,{[_e]:{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]||=Object.create(null,{[_e]:{value:new Set}});return t[_e]}}const Te=new Le;class Be{constructor(){this.entityPaths=Object.create(null,{[_e]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]||=Object.create(null,{[_e]:{value:new Map}});const i=me(s[_e],t,ge);return!!i.has(n)||(i.add(n),!1)}}const ze=Object.freeze({[be]:he});class Ve{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0,n=this,s="includedPaths",i=this.includedPaths||=(t=!1,Object.create(null));for(const r of e){if(i[be])return!0;if(!ke(r))return n[s]=ze,!1;n=i,s=r,i=i[r]||=(t=!1,Object.create(null))}return t}}const Fe=Object.freeze({[be]:!0});class je{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0;const n=this.includedPaths||=(t=!1,Object.create(null));if(n[be])return!0;const[s,i]=e;return s?ke(s)?i?n[s]===be||(n[s]=be,!1):!!n[s]||(n[s]=!0,!1):(this.includedPaths=Fe,!1):t}includeAllPaths(e,t,n){const{includedPaths:s}=this;if(s)if(s[be])e.includePath([...n,be],t);else{const i=Object.entries(s);if(0===i.length)e.includePath(n,t);else for(const[s,r]of i)e.includePath(r===be?[...n,s,be]:[...n,s],t)}}}function Ue(e,t){if("MemberExpression"===e.type)return!e.computed&&Ue(e.object,e);if("Identifier"!==e.type)return!1;switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"MetaProperty":return t.meta===e;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}}function Ge(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function He(){return{accessed:new Le,assigned:new Le,brokenFlow:!1,called:new Be,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Be,replacedVariableInits:new Map}}function We(e,t){return 0!==(e&t)}function qe(e,t,n){return e&~t|-n&t}const Ke=Symbol("Unknown Value"),Xe=Symbol("Unknown Truthy Value"),Je=Symbol("Unknown Falsy Value");class Ye{constructor(){this.flags=0}get included(){return We(this.flags,1)}set included(e){this.flags=qe(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){et(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return Ke}getReturnExpressionWhenCalledAtPath(e,t,n,s){return Qe}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included||this.includeNode(e)}includeNode(e){this.included=!0}includePath(e,t){this.included||this.includeNode(t)}includeCallArguments(e,t){tt(e,t)}shouldBeIncluded(e){return!0}}const Ze=new class extends Ye{},Qe=[Ze,!1],et=e=>{for(const t of e.args)t?.deoptimizePath(Re)},tt=(e,t)=>{e.args[0]?.includePath(Re,t),nt(e,t)},nt=({args:e},t)=>{for(let n=1;n<e.length;n++){const s=e[n];s&&(s.includePath(Re,t),s.include(t,!1))}},st={args:[null],type:0},it={args:[null,Ze],type:1},rt={args:[null],type:2,withNew:!1},ot="ArrowFunctionExpression",at="CallExpression",lt="ExportDefaultDeclaration",ct="ExpressionStatement",ut="Identifier",dt="Program",ht="Property";function pt(e,t){return e.start<=t&&t<e.end}function ft(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(pt(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 mt(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}const gt="...";function yt(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(mt(s[t-1].slice(0,n)).length+10+3,120),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=mt(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${gt}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+mt(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`}).join("\n")}const bt="silent",Et="warn",xt="info",At="debug",St={[At]:0,[xt]:1,[bt]:3,[Et]:2};function $t(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 vt(e){const t=H(e);return t.slice(0,Math.max(0,t.length-q(e).length))}function Pt(e){return j(e)?X(J(),e):e}function wt(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||j(e)}const It=/^(\.\.\/)*\.\.$/;function Nt(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=G(X(W(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+H(t);if(It.test(i))return[...i.split("/"),"..",H(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function kt(e){return`https://rollupjs.org/${e}`}const Ct="troubleshooting/#error-name-is-not-exported-by-module",Rt="configuration-options/#jsx",Dt="configuration-options/#output-amd-id",Ot="configuration-options/#output-dir",Mt="configuration-options/#output-exports",_t="configuration-options/#output-format",Lt="configuration-options/#output-inlinedynamicimports",Tt="configuration-options/#output-interop",Bt="configuration-options/#output-manualchunks",zt="configuration-options/#output-name",Vt="configuration-options/#output-sourcemapfile",Ft="es-module-syntax/#source-phase-import",jt="plugin-development/#generatebundle";function Ut(e){throw e instanceof Error?e:Gt(e)}function Gt(e){qt(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function Ht(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=ft(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=yt(n,t,s)}}const Wt=Symbol("augmented");function qt(e){if(!e.plugin&&!e.loc||e[Wt])return;e[Wt]=!0;let t="";e.plugin&&(t+=`[plugin ${e.plugin}] `);const n=e.id||e.loc?.file;if(n){const s=e.loc?` (${e.loc.line}:${e.loc.column})`:"";t+=`${Pt(n)}${s}: `}const s=e.message;e.message=t+e.message,bn(e,s)}const Kt="INVALID_EXPORT_OPTION",Xt="INVALID_IMPORT_ATTRIBUTE",Jt="INVALID_PLUGIN_HOOK",Yt="MISSING_EXPORT",Zt="MISSING_IMPLICIT_DEPENDANT",Qt="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",en="PARSE_ERROR",tn="SOURCEMAP_BROKEN",nn="UNEXPECTED_NAMED_IMPORT",sn="UNRESOLVED_ENTRY",rn="UNRESOLVED_IMPORT";function on(e){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${e}" - no asset source set.`}}function an(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function ln({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return Ht(i,n,t,e),i}function cn(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(Pt).join(" -> ")}`}}function un(e,t,n,s,i){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:t,id:s,message:`Export "${e}" of module "${Pt(t)}" was reexported through module "${Pt(n)}" 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 "${Pt(s)}" to point directly to the exporting module or ${i?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:n}}function dn(e){return{code:"FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY",message:`The output file name "${e}" is not contained in the output directory. Make sure all file names are relative paths without ".." segments.`}}function hn(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${Pt(t)} is at (${n}:${s})\n${yt(e,n,s)}`}}function pn(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${Pt(t)}".`}}function fn(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${Pt(s)}" tried to import "${Pt(n)}" with ${mn(t)} attributes, but it was already imported elsewhere with ${mn(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const mn=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map(([e,t])=>`"${e}": "${t}"`).join(", ")};function gn(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${Pt(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:kt("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function yn(e,t){return{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${t}" hook used by the output plugin ${e} 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.`}}function bn(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function En(e,t,n){return{code:Kt,message:`"${e}" was specified for "output.exports", but entry module "${Pt(n)}" has the following exports: ${$t(t)}`,url:kt(Mt)}}function xn(e){return{code:Xt,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${Pt(e)}". Import attributes need to have string keys and values.`}}function An(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:kt(t)}}function Sn(e,t){return{binding:e,code:Yt,exporter:t,message:`Exported variable "${e}" is not defined in "${Pt(t)}".`,url:kt(Ct)}}function $n(e,t,n,s){const i={binding:e,code:Yt,exporter:n,id:t,url:kt(Ct)};if(s)return{...i,message:`Exported variable "${e}" is not defined in "${Pt(n)}", but it is imported by "${Pt(t)}".`};const r=".json"===q(n);return{...i,message:`"${e}" is not exported by "${Pt(n)}", imported by "${Pt(t)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function vn(e){const t=[...e.implicitlyLoadedBefore].map(e=>Pt(e.id)).sort();return{code:Zt,message:`Module "${Pt(e.id)}" that should be implicitly loaded before ${$t(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 Pn(e,t){return{code:"NON_EXTERNAL_SOURCE_PHASE_IMPORT",message:`Source phase import "${e}" in "${Pt(t)}" must be external. Source phase imports are only supported for external modules. Use the "external" option to mark this module as external.`,url:kt(Ft)}}function wn(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function In(e,t){return{code:en,message:e,pos:t}}function Nn(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function kn(e){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${e}"`}}function Cn(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)"),bn({cause:e,code:en,id:t,message:n,stack:e.stack},e.message)}function Rn(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="PLUGIN_ERROR",e.plugin=t,n&&(e.hook=n),s&&(e.id=s),e}function Dn(e){return{code:tn,message:`Multiple conflicting contents for sourcemap source ${e}`}}function On(e,t,n){const s=n?"reexport":"import";return{code:nn,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${Pt(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:kt(Tt)}}function Mn(e){return{code:nn,exporter:e,message:`There was a namespace "*" reexport from the external module "${Pt(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:kt(Tt)}}function _n(e){return{code:"VALIDATION_ERROR",message:e}}function Ln(e,t,n,s,i){!function(e,t,n,s,i){if(n||i){const n=function(e,t){return{code:"DEPRECATED_FEATURE",message:e,url:kt(t)}}(e,t);if(i)return Ut(n);s(Et,n)}}(e,t,n,s.onLog,s.strictDeprecations)}const Tn=Symbol("PureFunction");class Bn extends Ye{markReassigned(){this.isReassigned=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.globalName=null,this.initReached=!1,this.isId=!1,this.kind=null,this.renderBaseName=null,this.renderName=null,this.isReassigned=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===at&&e.parent.callee===e||e.parent.type===lt||(this.onlyFunctionCallUsed=!1)}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,t){if(this.globalName)return this.globalName;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}includePath(e,t){this.included=!0,this.renderedLikeHoisted?.includePath(e,t)}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}const zn="*source";class Vn extends Bn{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t,this.isSourcePhase=t===zn}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)}includePath(e,t){super.includePath(e,t),this.module.used=!0}}function Fn(e,t){for(const n of t){const t=Object.getOwnPropertyDescriptor(e,n).get;Object.defineProperty(e,n,{get(){const s=t.call(e);return Object.defineProperty(e,n,{value:s}),s}})}}const jn=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"]),Un=/[^\w$]/g,Gn=/[^\w$]/,Hn=e=>(e=>/\d/.test(e[0]))(e)||jn.has(e)||"arguments"===e;function Wn(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(Un,"_"),Hn(e)&&(e=`_${e}`),e||"_"}const qn=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,Kn=/^(?:0|[1-9]\d*)$/;function Xn(e){return qn.test(e)?"__proto__"===e?'["__proto__"]':e:Kn.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function Jn(e){return qn.test(e)?e:JSON.stringify(e)}class Yn{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.importersByExportedName=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=Wn(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:pe,dynamicallyImportedIds:pe,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:pe,implicitlyLoadedBefore:pe,importedIdResolutions:pe,importedIds:pe,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,safeVariableNames:null,syntheticNamedExports:!1}}cacheInfoGetters(){Fn(this.info,["dynamicImporters","importers"])}getVariableForExportName(e,{importChain:t}){const n=this.declarations.get(e);for(const n of t)me(this.importersByExportedName,e,ge).add(n);if(n)return[n];const s=new Vn(this,e);return this.declarations.set(e,s),this.exportedVariables.set(s,e),[s]}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){const e=this.importersByExportedName.get(n);for(const n of this.importers)e?.has(n)&&t.add(n)}const n=[...t];var s,i,r;this.options.onLog(Et,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${$t(i=e,["is","are"])} imported from external module "${s}" but never used in ${$t(r.map(e=>Pt(e)))}.`,names:i})}}function Zn(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 Yn||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const Qn=()=>{};var es=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using","source","defer"];const ts="_rollupAnnotations",ns="_rollupRemoved",ss=(e,t)=>{if(0===e)return pe;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++)s[i]=is(t[e++],t);return s},is=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:es[t[e]]}},rs={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],Decorator:["expression"],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["specifiers","source","attributes","declaration"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["decorators","key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PanicError:[],ParseError:[],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["decorators","key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],YieldExpression:["argument"]},os="variables",as=Symbol("IS_SKIPPED_CHAIN");class ls extends Ye{get deoptimized(){return We(this.flags,2)}set deoptimized(e){this.flags=qe(this.flags,2,e)}constructor(e,t){super(),this.parent=e,this.scope=t,this.createScope(t)}addExportedVariables(e,t){}bind(){for(const e of rs[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 rs[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(Ce,this.assignmentInteraction,e)}include(e,t,n){this.included||this.includeNode(e);for(const n of rs[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)}}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of rs[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n))for(const t of n)t?.includePath(Re,e);else n.includePath(Re,e)}}includeAsAssignmentTarget(e,t,n){this.include(e,t)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}parseNode(e){for(const[t,n]of Object.entries(e))if(!this.hasOwnProperty(t))if(95===t.charCodeAt(0))t===ts?this.annotations=n:t===ns&&(this.invalidAnnotations=n);else if("object"!=typeof n||null===n)this[t]=n;else if(Array.isArray(n)){this[t]=new Array(n.length);let e=0;for(const s of n)this[t][e++]=null===s?null:new(this.scope.context.getNodeConstructor(s.type))(this,this.scope).parseNode(s)}else this[t]=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n);return rs[e.type]||=function(e){return Object.keys(e).filter(t=>"object"==typeof e[t]&&95!==t.charCodeAt(0))}(e),this.initialise(),this}removeAnnotations(e){if(this.annotations)for(const t of this.annotations)e.remove(t.start,t.end)}render(e,t){for(const n of rs[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(He())}applyDeoptimizations(){this.deoptimized=!0;for(const e of rs[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(Re);else t.deoptimizePath(Re)}this.scope.context.requestTreeshakingPass()}}function cs(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function us(){this.included=!0}function ds(){this.deoptimized=!0}function hs(e){return e instanceof ls&&e.type===ot}function ps(e){return e instanceof ls&&"FunctionExpression"===e.type}function fs(e){return e instanceof ls&&e.type===at}function ms(e){return e instanceof ls&&"MemberExpression"===e.type}function gs(e){return e instanceof ls&&e.type===ut}function ys(e){return e instanceof ls&&e.type===ct}function bs(e,t=null){return Object.create(t,e)}const Es=new class extends Ye{getLiteralValueAtPath(e){return e.length>0?Ke:void 0}},xs={value:{hasEffectsWhenCalled:null,returns:Ze}},As=new class extends Ye{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Ms(ks,e[0]):Qe}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Os(ks,e[0],t,n)}},Ss={value:{hasEffectsWhenCalled:null,returns:As}},$s=new class extends Ye{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Ms(Cs,e[0]):Qe}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Os(Cs,e[0],t,n)}},vs={value:{hasEffectsWhenCalled:null,returns:$s}},Ps=new class extends Ye{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Ms(Ds,e[0]):Qe}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Os(Ds,e[0],t,n)}},ws={value:{hasEffectsWhenCalled:null,returns:Ps}},Is={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(Ce,Te,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(Ce,rt,t)},returns:Ps}},Ns=bs({hasOwnProperty:Ss,isPrototypeOf:Ss,propertyIsEnumerable:Ss,toLocaleString:ws,toString:ws,valueOf:xs}),ks=bs({valueOf:Ss},Ns),Cs=bs({toExponential:ws,toFixed:ws,toLocaleString:ws,toPrecision:ws,valueOf:vs},Ns),Rs=bs({exec:xs,test:Ss},Ns),Ds=bs({anchor:ws,at:xs,big:ws,blink:ws,bold:ws,charAt:ws,charCodeAt:vs,codePointAt:xs,concat:ws,endsWith:Ss,fixed:ws,fontcolor:ws,fontsize:ws,includes:Ss,indexOf:vs,italics:ws,lastIndexOf:vs,link:ws,localeCompare:vs,match:xs,matchAll:xs,normalize:ws,padEnd:ws,padStart:ws,repeat:ws,replace:Is,replaceAll:Is,search:vs,slice:ws,small:ws,split:xs,startsWith:Ss,strike:ws,sub:ws,substr:ws,substring:ws,sup:ws,toLocaleLowerCase:ws,toLocaleUpperCase:ws,toLowerCase:ws,toString:ws,toUpperCase:ws,trim:ws,trimEnd:ws,trimLeft:ws,trimRight:ws,trimStart:ws,valueOf:ws},Ns);function Os(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function Ms(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:Qe}class _s extends Ye{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(Oe),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(Re)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?Qe:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||Ze:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,{args:t,type:n},s){if(e.length>(0===n?1:0))return!0;if(2===n){if(!0===this.description.mutatesSelfAsArray&&t[0]?.hasEffectsOnInteractionAtPath(Oe,it,s))return!0;if(this.description.callsArgs)for(const e of this.description.callsArgs)if(t[e+1]?.hasEffectsOnInteractionAtPath(Ce,rt,s))return!0}return!1}}const Ls=[new _s({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:As})],Ts=[new _s({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Ps})],Bs=[new _s({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:$s})],zs=[new _s({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Ze})],Vs=/^\d+$/;class Fs extends Ye{get hasLostTrack(){return We(this.flags,2048)}set hasLostTrack(e){this.flags=qe(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return We(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=qe(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return We(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=qe(this.flags,8192,e)}constructor(e,t,n=!1){if(super(),this.prototypeExpression=t,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.alwaysIncludedProperties=new Set,this.deoptimizedPaths=new Map,this.expressionsToBeDeoptimizedByKey=new Map,this.gettersByKey=new Map,this.propertiesAndGettersByKey=new Map,this.propertiesAndSettersByKey=new Map,this.settersByKey=new Map,this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchablePropertiesAndSetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of e.values())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[...this.propertiesAndGettersByKey.values(),...this.settersByKey.values()])for(const t of e)t.deoptimizePath(Re);this.prototypeExpression?.deoptimizePath([be,be]),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||ke(s)&&this.deoptimizedPaths.get(s)))return void et(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(ke(s)){if(a.get(s)){const t=l.get(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("string"==typeof s&&Vs.test(s))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}else{for(const t of[...l.values(),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 this.propertiesAndGettersByKey.entries())if("string"==typeof e&&Vs.test(e))for(const e of t)e.deoptimizePath(Re);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===xe)return this.deoptimizeIntegerProperties();if(!ke(t))return this.deoptimizeAllProperties(t===Ee);if(!this.deoptimizedPaths.get(t)){this.deoptimizedPaths.set(t,!0);const e=this.expressionsToBeDeoptimizedByKey.get(t);if(e)for(const t of e)t.deoptimizeCache()}}const n=1===e.length?Re:e.slice(1);for(const e of ke(t)?[...this.propertiesAndGettersByKey.get(t)||this.unmatchablePropertiesAndGetters,...this.settersByKey.get(t)||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(1===e.length?[e[0],be]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return Ke;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?Ke:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return Qe;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):Qe}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===Ee)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(ke(s)){if(r.get(s)){const e=o.get(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[...o.values(),a])for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;for(const n of this.allProperties)(t||n.shouldBeIncluded(e)||this.alwaysIncludedProperties.has(n))&&n.include(e,t);this.prototypeExpression?.include(e,t)}includePath(e,t){this.included=!0;for(const e of this.alwaysIncludedProperties)e.includePath(Re,t);if(0===e.length)return;const[n,...s]=e,[i,r]=ke(n)?[new Set([...this.propertiesAndGettersByKey.get(n)||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey.get(n)||this.unmatchablePropertiesAndSetters]),s]:[this.allProperties,Re];for(const e of i)e.includePath(r,t);this.prototypeExpression?.includePath(e,t)}buildPropertyMaps(e){const{allProperties:t,alwaysIncludedProperties:n,propertiesAndGettersByKey:s,propertiesAndSettersByKey:i,settersByKey:r,gettersByKey:o,unknownIntegerProps:a,unmatchablePropertiesAndGetters:l,unmatchablePropertiesAndSetters:c,unmatchableGetters:u,unmatchableSetters:d}=this;for(let h=e.length-1;h>=0;h--){const{key:p,kind:f,property:m}=e[h];if(t.push(m),!Ie(p)||Ne.has(p)||(n.add(m),p!==Ae))if(ke(p))"set"===f?i.has(p)||(i.set(p,[m,...c]),r.set(p,[m,...d])):"get"===f?s.has(p)||(s.set(p,[m,...l]),o.set(p,[m,...u])):(i.has(p)||i.set(p,[m,...c]),s.has(p)||s.set(p,[m,...l]));else{if(p===xe){a.push(m);continue}"set"===f&&d.push(m),"get"===f&&u.push(m),"get"!==f&&c.push(m),"set"!==f&&l.push(m)}}}deoptimizeCachedEntities(){for(const e of this.expressionsToBeDeoptimizedByKey.values())for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Re)}deoptimizeCachedIntegerEntities(){for(const[e,t]of this.expressionsToBeDeoptimizedByKey.entries())if("string"==typeof e&&Vs.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Oe)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!ke(e)||this.hasUnknownDeoptimizedInteger&&"string"==typeof e&&Vs.test(e)||this.deoptimizedPaths.get(e))return Ze;const t=this.propertiesAndGettersByKey.get(e);return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&"string"==typeof e&&Vs.test(e)?Ze:null}getMemberExpressionAndTrackDeopt(e,t){if(!ke(e))return Ze;const n=this.getMemberExpression(e);if(n!==Ze&&!this.immutable){let n=this.expressionsToBeDeoptimizedByKey.get(e);n||this.expressionsToBeDeoptimizedByKey.set(e,n=[]),n.push(t)}return n}}const js=e=>"string"==typeof e&&/^\d+$/.test(e),Us=new class extends Ye{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||js(t[0])||et(e)}getLiteralValueAtPath(e){return 1===e.length&&js(e[0])?void 0:Ke}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},Gs=new Fs(new Map([["hasOwnProperty",Ls],["isPrototypeOf",Ls],["propertyIsEnumerable",Ls],["toLocaleString",Ts],["toString",Ts],["valueOf",zs]]),Us,!0),Hs=[{key:xe,kind:"init",property:Ze},{key:"length",kind:"init",property:$s}],Ws=[new _s({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:As})],qs=[new _s({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:$s})],Ks=[new _s({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new Fs(Hs,si),returnsPrimitive:null})],Xs=[new _s({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Fs(Hs,si),returnsPrimitive:null})],Js=[new _s({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Fs(Hs,si),returnsPrimitive:null})],Ys=[new _s({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:$s})],Zs=[new _s({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Ze})],Qs=[new _s({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ze})],ei=[new _s({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ze})],ti=[new _s({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ni=[new _s({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],si=new Fs(new Map([["at",Qs],["concat",Xs],["copyWithin",ti],["entries",Xs],["every",Ws],["fill",ti],["filter",Js],["find",ei],["findIndex",qs],["findLast",ei],["findLastIndex",qs],["flat",Xs],["flatMap",Js],["forEach",ei],["includes",Ls],["indexOf",Bs],["join",Ts],["keys",zs],["lastIndexOf",Bs],["map",Js],["pop",Zs],["push",Ys],["reduce",ei],["reduceRight",ei],["reverse",ti],["shift",Zs],["slice",Xs],["some",Ws],["sort",ni],["splice",Ks],["toLocaleString",Ts],["toString",Ts],["unshift",Ys],["values",Qs]]),Gs,!0);class ii extends ls{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,Re,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(Re,st,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(Re,e)}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([be,be]),this.scope.context.requestTreeshakingPass()}}class ri extends ls{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)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.elements)t&&t?.includePath(Re,e)}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 ii)&&(e=!0,n.deoptimizePath(Re))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:$s}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof ii?s&&(t=!0,e.unshift({key:xe,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:Es})}return this.objectEntity=new Fs(e,si)}}const oi=Symbol("Value Properties"),ai=()=>Ke,li=()=>!1,ci=()=>!0,ui=e=>({__proto__:null,[oi]:{deoptimizeArgumentsOnCall:Qn,getLiteralValue:()=>e,hasEffectsWhenCalled:ci}}),di={deoptimizeArgumentsOnCall:Qn,getLiteralValue:ai,hasEffectsWhenCalled:li},hi={deoptimizeArgumentsOnCall:Qn,getLiteralValue:ai,hasEffectsWhenCalled:ci},pi={deoptimizeArgumentsOnCall:Qn,getLiteralValue:ai,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof ri)},fi={deoptimizeArgumentsOnCall:Qn,getLiteralValue:ai,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof Ye)||s.hasEffectsOnInteractionAtPath(Re,st,t)}},mi={__proto__:null,[oi]:hi},gi={__proto__:null,[oi]:di},yi={__proto__:null,[oi]:fi},bi={__proto__:null,[oi]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(Re)},getLiteralValue:ai,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(De,it,t)}},Ei={__proto__:null,[oi]:hi,prototype:mi},xi={__proto__:null,[oi]:di,prototype:mi},Ai={__proto__:null,[oi]:pi,prototype:mi},Si={__proto__:null,[oi]:di,from:mi,of:gi,prototype:mi},$i={__proto__:null,[oi]:di,supportedLocalesOf:xi},vi={deoptimizeArgumentsOnCall:Qn,getLiteralValue:()=>Ae,hasEffectsWhenCalled:ci},Pi={global:mi,globalThis:mi,self:mi,window:mi,__proto__:null,[oi]:hi,Array:{__proto__:null,[oi]:hi,from:mi,isArray:gi,of:gi,prototype:mi},ArrayBuffer:{__proto__:null,[oi]:di,isView:gi,prototype:mi},AggregateError:Ai,Atomics:mi,BigInt:Ei,BigInt64Array:Ei,BigUint64Array:Ei,Boolean:xi,constructor:Ei,DataView:xi,Date:{__proto__:null,[oi]:di,now:gi,parse:gi,prototype:mi,UTC:gi},decodeURI:gi,decodeURIComponent:gi,encodeURI:gi,encodeURIComponent:gi,Error:xi,escape:gi,eval:mi,EvalError:xi,FinalizationRegistry:Ei,Float32Array:Si,Float64Array:Si,Function:Ei,hasOwnProperty:mi,Infinity:mi,Int16Array:Si,Int32Array:Si,Int8Array:Si,isFinite:gi,isNaN:gi,isPrototypeOf:mi,JSON:mi,Map:Ai,Math:{__proto__:null,[oi]:hi,abs:gi,acos:gi,acosh:gi,asin:gi,asinh:gi,atan:gi,atan2:gi,atanh:gi,cbrt:gi,ceil:gi,clz32:gi,cos:gi,cosh:gi,exp:gi,expm1:gi,floor:gi,fround:gi,hypot:gi,imul:gi,log:gi,log10:gi,log1p:gi,log2:gi,max:gi,min:gi,pow:gi,random:gi,round:gi,sign:gi,sin:gi,sinh:gi,sqrt:gi,tan:gi,tanh:gi,trunc:gi},NaN:mi,Number:{__proto__:null,[oi]:di,isFinite:gi,isInteger:gi,isNaN:gi,isSafeInteger:gi,parseFloat:gi,parseInt:gi,prototype:mi},Object:{__proto__:null,[oi]:di,create:gi,defineProperty:bi,defineProperties:bi,freeze:bi,getOwnPropertyDescriptor:gi,getOwnPropertyDescriptors:gi,getOwnPropertyNames:gi,getOwnPropertySymbols:gi,getPrototypeOf:gi,hasOwn:gi,is:gi,isExtensible:gi,isFrozen:gi,isSealed:gi,keys:gi,fromEntries:mi,entries:yi,values:yi,prototype:mi},parseFloat:gi,parseInt:gi,Promise:{__proto__:null,[oi]:hi,all:mi,allSettled:mi,any:mi,prototype:mi,race:mi,reject:mi,resolve:mi},propertyIsEnumerable:mi,Proxy:{__proto__:null,[oi]:{deoptimizeArgumentsOnCall:({args:[,e,t]})=>{if((n=t)instanceof ls&&"ObjectExpression"===n.type){const n=t.properties.some(e=>!function(e){return e instanceof ls&&e.type===ht}(e));if(!n){for(const n of t.properties)n.deoptimizeArgumentsOnInteractionAtPath({args:[null,e],type:2,withNew:!1},Ce,Te);return}}var n;e.deoptimizePath(Re)},getLiteralValue:ai,hasEffectsWhenCalled:ci}},RangeError:xi,ReferenceError:xi,Reflect:mi,RegExp:xi,Set:Ai,SharedArrayBuffer:Ei,String:{__proto__:null,[oi]:di,fromCharCode:gi,fromCodePoint:gi,prototype:mi,raw:gi},Symbol:{__proto__:null,[oi]:di,for:gi,keyFor:gi,prototype:mi,asyncDispose:ui(ve),dispose:ui($e),hasInstance:ui(Pe),toStringTag:ui(Se)},SyntaxError:xi,toLocaleString:mi,toString:mi,TypeError:xi,Uint16Array:Si,Uint32Array:Si,Uint8Array:Si,Uint8ClampedArray:Si,unescape:gi,URIError:xi,valueOf:mi,WeakMap:Ai,WeakRef:Ei,WeakSet:Ai,clearInterval:Ei,clearTimeout:Ei,console:{__proto__:null,[oi]:hi,assert:Ei,clear:Ei,count:Ei,countReset:Ei,debug:Ei,dir:Ei,dirxml:Ei,error:Ei,exception:Ei,group:Ei,groupCollapsed:Ei,groupEnd:Ei,info:Ei,log:Ei,table:Ei,time:Ei,timeEnd:Ei,timeLog:Ei,trace:Ei,warn:Ei},Intl:{__proto__:null,[oi]:hi,Collator:$i,DateTimeFormat:$i,DisplayNames:$i,ListFormat:$i,Locale:$i,NumberFormat:$i,PluralRules:$i,RelativeTimeFormat:$i,Segmenter:$i},setInterval:Ei,setTimeout:Ei,TextDecoder:Ei,TextEncoder:Ei,URL:{__proto__:null,[oi]:hi,prototype:mi,canParse:gi},URLSearchParams:Ei,AbortController:Ei,AbortSignal:Ei,addEventListener:mi,alert:mi,AnalyserNode:Ei,Animation:Ei,AnimationEvent:Ei,applicationCache:mi,ApplicationCache:Ei,ApplicationCacheErrorEvent:Ei,atob:mi,Attr:Ei,Audio:Ei,AudioBuffer:Ei,AudioBufferSourceNode:Ei,AudioContext:Ei,AudioDestinationNode:Ei,AudioListener:Ei,AudioNode:Ei,AudioParam:Ei,AudioProcessingEvent:Ei,AudioScheduledSourceNode:Ei,AudioWorkletNode:Ei,BarProp:Ei,BaseAudioContext:Ei,BatteryManager:Ei,BeforeUnloadEvent:Ei,BiquadFilterNode:Ei,Blob:Ei,BlobEvent:Ei,blur:mi,BroadcastChannel:Ei,btoa:mi,ByteLengthQueuingStrategy:Ei,Cache:Ei,caches:mi,CacheStorage:Ei,cancelAnimationFrame:mi,cancelIdleCallback:mi,CanvasCaptureMediaStreamTrack:Ei,CanvasGradient:Ei,CanvasPattern:Ei,CanvasRenderingContext2D:Ei,ChannelMergerNode:Ei,ChannelSplitterNode:Ei,CharacterData:Ei,clientInformation:mi,ClipboardEvent:Ei,close:mi,closed:mi,CloseEvent:Ei,Comment:Ei,CompositionEvent:Ei,confirm:mi,ConstantSourceNode:Ei,ConvolverNode:Ei,CountQueuingStrategy:Ei,createImageBitmap:mi,Credential:Ei,CredentialsContainer:Ei,crypto:mi,Crypto:Ei,CryptoKey:Ei,CSS:Ei,CSSConditionRule:Ei,CSSFontFaceRule:Ei,CSSGroupingRule:Ei,CSSImportRule:Ei,CSSKeyframeRule:Ei,CSSKeyframesRule:Ei,CSSMediaRule:Ei,CSSNamespaceRule:Ei,CSSPageRule:Ei,CSSRule:Ei,CSSRuleList:Ei,CSSStyleDeclaration:Ei,CSSStyleRule:Ei,CSSStyleSheet:Ei,CSSSupportsRule:Ei,CustomElementRegistry:Ei,customElements:mi,CustomEvent:{__proto__:null,[oi]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:ai,hasEffectsWhenCalled:li},prototype:mi},DataTransfer:Ei,DataTransferItem:Ei,DataTransferItemList:Ei,defaultstatus:mi,defaultStatus:mi,DelayNode:Ei,DeviceMotionEvent:Ei,DeviceOrientationEvent:Ei,devicePixelRatio:mi,dispatchEvent:mi,document:mi,Document:Ei,DocumentFragment:Ei,DocumentType:Ei,DOMError:Ei,DOMException:Ei,DOMImplementation:Ei,DOMMatrix:Ei,DOMMatrixReadOnly:Ei,DOMParser:Ei,DOMPoint:Ei,DOMPointReadOnly:Ei,DOMQuad:Ei,DOMRect:Ei,DOMRectReadOnly:Ei,DOMStringList:Ei,DOMStringMap:Ei,DOMTokenList:Ei,DragEvent:Ei,DynamicsCompressorNode:Ei,Element:Ei,ErrorEvent:Ei,Event:Ei,EventSource:Ei,EventTarget:Ei,external:mi,fetch:mi,File:Ei,FileList:Ei,FileReader:Ei,find:mi,focus:mi,FocusEvent:Ei,FontFace:Ei,FontFaceSetLoadEvent:Ei,FormData:Ei,frames:mi,GainNode:Ei,Gamepad:Ei,GamepadButton:Ei,GamepadEvent:Ei,getComputedStyle:mi,getSelection:mi,HashChangeEvent:Ei,Headers:Ei,history:mi,History:Ei,HTMLAllCollection:Ei,HTMLAnchorElement:Ei,HTMLAreaElement:Ei,HTMLAudioElement:Ei,HTMLBaseElement:Ei,HTMLBodyElement:Ei,HTMLBRElement:Ei,HTMLButtonElement:Ei,HTMLCanvasElement:Ei,HTMLCollection:Ei,HTMLContentElement:Ei,HTMLDataElement:Ei,HTMLDataListElement:Ei,HTMLDetailsElement:Ei,HTMLDialogElement:Ei,HTMLDirectoryElement:Ei,HTMLDivElement:Ei,HTMLDListElement:Ei,HTMLDocument:Ei,HTMLElement:Ei,HTMLEmbedElement:Ei,HTMLFieldSetElement:Ei,HTMLFontElement:Ei,HTMLFormControlsCollection:Ei,HTMLFormElement:Ei,HTMLFrameElement:Ei,HTMLFrameSetElement:Ei,HTMLHeadElement:Ei,HTMLHeadingElement:Ei,HTMLHRElement:Ei,HTMLHtmlElement:Ei,HTMLIFrameElement:Ei,HTMLImageElement:Ei,HTMLInputElement:Ei,HTMLLabelElement:Ei,HTMLLegendElement:Ei,HTMLLIElement:Ei,HTMLLinkElement:Ei,HTMLMapElement:Ei,HTMLMarqueeElement:Ei,HTMLMediaElement:Ei,HTMLMenuElement:Ei,HTMLMetaElement:Ei,HTMLMeterElement:Ei,HTMLModElement:Ei,HTMLObjectElement:Ei,HTMLOListElement:Ei,HTMLOptGroupElement:Ei,HTMLOptionElement:Ei,HTMLOptionsCollection:Ei,HTMLOutputElement:Ei,HTMLParagraphElement:Ei,HTMLParamElement:Ei,HTMLPictureElement:Ei,HTMLPreElement:Ei,HTMLProgressElement:Ei,HTMLQuoteElement:Ei,HTMLScriptElement:Ei,HTMLSelectElement:Ei,HTMLShadowElement:Ei,HTMLSlotElement:Ei,HTMLSourceElement:Ei,HTMLSpanElement:Ei,HTMLStyleElement:Ei,HTMLTableCaptionElement:Ei,HTMLTableCellElement:Ei,HTMLTableColElement:Ei,HTMLTableElement:Ei,HTMLTableRowElement:Ei,HTMLTableSectionElement:Ei,HTMLTemplateElement:Ei,HTMLTextAreaElement:Ei,HTMLTimeElement:Ei,HTMLTitleElement:Ei,HTMLTrackElement:Ei,HTMLUListElement:Ei,HTMLUnknownElement:Ei,HTMLVideoElement:Ei,IDBCursor:Ei,IDBCursorWithValue:Ei,IDBDatabase:Ei,IDBFactory:Ei,IDBIndex:Ei,IDBKeyRange:Ei,IDBObjectStore:Ei,IDBOpenDBRequest:Ei,IDBRequest:Ei,IDBTransaction:Ei,IDBVersionChangeEvent:Ei,IdleDeadline:Ei,IIRFilterNode:Ei,Image:Ei,ImageBitmap:Ei,ImageBitmapRenderingContext:Ei,ImageCapture:Ei,ImageData:Ei,indexedDB:mi,innerHeight:mi,innerWidth:mi,InputEvent:Ei,IntersectionObserver:Ei,IntersectionObserverEntry:Ei,isSecureContext:mi,KeyboardEvent:Ei,KeyframeEffect:Ei,length:mi,localStorage:mi,location:mi,Location:Ei,locationbar:mi,matchMedia:mi,MediaDeviceInfo:Ei,MediaDevices:Ei,MediaElementAudioSourceNode:Ei,MediaEncryptedEvent:Ei,MediaError:Ei,MediaKeyMessageEvent:Ei,MediaKeySession:Ei,MediaKeyStatusMap:Ei,MediaKeySystemAccess:Ei,MediaList:Ei,MediaQueryList:Ei,MediaQueryListEvent:Ei,MediaRecorder:Ei,MediaSettingsRange:Ei,MediaSource:Ei,MediaStream:Ei,MediaStreamAudioDestinationNode:Ei,MediaStreamAudioSourceNode:Ei,MediaStreamEvent:Ei,MediaStreamTrack:Ei,MediaStreamTrackEvent:Ei,menubar:mi,MessageChannel:Ei,MessageEvent:Ei,MessagePort:Ei,MIDIAccess:Ei,MIDIConnectionEvent:Ei,MIDIInput:Ei,MIDIInputMap:Ei,MIDIMessageEvent:Ei,MIDIOutput:Ei,MIDIOutputMap:Ei,MIDIPort:Ei,MimeType:Ei,MimeTypeArray:Ei,MouseEvent:Ei,moveBy:mi,moveTo:mi,MutationEvent:Ei,MutationObserver:Ei,MutationRecord:Ei,name:mi,NamedNodeMap:Ei,NavigationPreloadManager:Ei,navigator:mi,Navigator:Ei,NetworkInformation:Ei,Node:Ei,NodeFilter:mi,NodeIterator:Ei,NodeList:Ei,Notification:Ei,OfflineAudioCompletionEvent:Ei,OfflineAudioContext:Ei,offscreenBuffering:mi,OffscreenCanvas:Ei,open:mi,openDatabase:mi,Option:Ei,origin:mi,OscillatorNode:Ei,outerHeight:mi,outerWidth:mi,PageTransitionEvent:Ei,pageXOffset:mi,pageYOffset:mi,PannerNode:Ei,parent:mi,Path2D:Ei,PaymentAddress:Ei,PaymentRequest:Ei,PaymentRequestUpdateEvent:Ei,PaymentResponse:Ei,performance:mi,Performance:Ei,PerformanceEntry:Ei,PerformanceLongTaskTiming:Ei,PerformanceMark:Ei,PerformanceMeasure:Ei,PerformanceNavigation:Ei,PerformanceNavigationTiming:Ei,PerformanceObserver:Ei,PerformanceObserverEntryList:Ei,PerformancePaintTiming:Ei,PerformanceResourceTiming:Ei,PerformanceTiming:Ei,PeriodicWave:Ei,Permissions:Ei,PermissionStatus:Ei,personalbar:mi,PhotoCapabilities:Ei,Plugin:Ei,PluginArray:Ei,PointerEvent:Ei,PopStateEvent:Ei,postMessage:mi,Presentation:Ei,PresentationAvailability:Ei,PresentationConnection:Ei,PresentationConnectionAvailableEvent:Ei,PresentationConnectionCloseEvent:Ei,PresentationConnectionList:Ei,PresentationReceiver:Ei,PresentationRequest:Ei,print:mi,ProcessingInstruction:Ei,ProgressEvent:Ei,PromiseRejectionEvent:Ei,prompt:mi,PushManager:Ei,PushSubscription:Ei,PushSubscriptionOptions:Ei,queueMicrotask:mi,RadioNodeList:Ei,Range:Ei,ReadableStream:Ei,RemotePlayback:Ei,removeEventListener:mi,Request:Ei,requestAnimationFrame:mi,requestIdleCallback:mi,resizeBy:mi,ResizeObserver:Ei,ResizeObserverEntry:Ei,resizeTo:mi,Response:Ei,RTCCertificate:Ei,RTCDataChannel:Ei,RTCDataChannelEvent:Ei,RTCDtlsTransport:Ei,RTCIceCandidate:Ei,RTCIceTransport:Ei,RTCPeerConnection:Ei,RTCPeerConnectionIceEvent:Ei,RTCRtpReceiver:Ei,RTCRtpSender:Ei,RTCSctpTransport:Ei,RTCSessionDescription:Ei,RTCStatsReport:Ei,RTCTrackEvent:Ei,screen:mi,Screen:Ei,screenLeft:mi,ScreenOrientation:Ei,screenTop:mi,screenX:mi,screenY:mi,ScriptProcessorNode:Ei,scroll:mi,scrollbars:mi,scrollBy:mi,scrollTo:mi,scrollX:mi,scrollY:mi,SecurityPolicyViolationEvent:Ei,Selection:Ei,ServiceWorker:Ei,ServiceWorkerContainer:Ei,ServiceWorkerRegistration:Ei,sessionStorage:mi,ShadowRoot:Ei,SharedWorker:Ei,SourceBuffer:Ei,SourceBufferList:Ei,speechSynthesis:mi,SpeechSynthesisEvent:Ei,SpeechSynthesisUtterance:Ei,StaticRange:Ei,status:mi,statusbar:mi,StereoPannerNode:Ei,stop:mi,Storage:Ei,StorageEvent:Ei,StorageManager:Ei,styleMedia:mi,StyleSheet:Ei,StyleSheetList:Ei,SubtleCrypto:Ei,SVGAElement:Ei,SVGAngle:Ei,SVGAnimatedAngle:Ei,SVGAnimatedBoolean:Ei,SVGAnimatedEnumeration:Ei,SVGAnimatedInteger:Ei,SVGAnimatedLength:Ei,SVGAnimatedLengthList:Ei,SVGAnimatedNumber:Ei,SVGAnimatedNumberList:Ei,SVGAnimatedPreserveAspectRatio:Ei,SVGAnimatedRect:Ei,SVGAnimatedString:Ei,SVGAnimatedTransformList:Ei,SVGAnimateElement:Ei,SVGAnimateMotionElement:Ei,SVGAnimateTransformElement:Ei,SVGAnimationElement:Ei,SVGCircleElement:Ei,SVGClipPathElement:Ei,SVGComponentTransferFunctionElement:Ei,SVGDefsElement:Ei,SVGDescElement:Ei,SVGDiscardElement:Ei,SVGElement:Ei,SVGEllipseElement:Ei,SVGFEBlendElement:Ei,SVGFEColorMatrixElement:Ei,SVGFEComponentTransferElement:Ei,SVGFECompositeElement:Ei,SVGFEConvolveMatrixElement:Ei,SVGFEDiffuseLightingElement:Ei,SVGFEDisplacementMapElement:Ei,SVGFEDistantLightElement:Ei,SVGFEDropShadowElement:Ei,SVGFEFloodElement:Ei,SVGFEFuncAElement:Ei,SVGFEFuncBElement:Ei,SVGFEFuncGElement:Ei,SVGFEFuncRElement:Ei,SVGFEGaussianBlurElement:Ei,SVGFEImageElement:Ei,SVGFEMergeElement:Ei,SVGFEMergeNodeElement:Ei,SVGFEMorphologyElement:Ei,SVGFEOffsetElement:Ei,SVGFEPointLightElement:Ei,SVGFESpecularLightingElement:Ei,SVGFESpotLightElement:Ei,SVGFETileElement:Ei,SVGFETurbulenceElement:Ei,SVGFilterElement:Ei,SVGForeignObjectElement:Ei,SVGGElement:Ei,SVGGeometryElement:Ei,SVGGradientElement:Ei,SVGGraphicsElement:Ei,SVGImageElement:Ei,SVGLength:Ei,SVGLengthList:Ei,SVGLinearGradientElement:Ei,SVGLineElement:Ei,SVGMarkerElement:Ei,SVGMaskElement:Ei,SVGMatrix:Ei,SVGMetadataElement:Ei,SVGMPathElement:Ei,SVGNumber:Ei,SVGNumberList:Ei,SVGPathElement:Ei,SVGPatternElement:Ei,SVGPoint:Ei,SVGPointList:Ei,SVGPolygonElement:Ei,SVGPolylineElement:Ei,SVGPreserveAspectRatio:Ei,SVGRadialGradientElement:Ei,SVGRect:Ei,SVGRectElement:Ei,SVGScriptElement:Ei,SVGSetElement:Ei,SVGStopElement:Ei,SVGStringList:Ei,SVGStyleElement:Ei,SVGSVGElement:Ei,SVGSwitchElement:Ei,SVGSymbolElement:Ei,SVGTextContentElement:Ei,SVGTextElement:Ei,SVGTextPathElement:Ei,SVGTextPositioningElement:Ei,SVGTitleElement:Ei,SVGTransform:Ei,SVGTransformList:Ei,SVGTSpanElement:Ei,SVGUnitTypes:Ei,SVGUseElement:Ei,SVGViewElement:Ei,TaskAttributionTiming:Ei,Text:Ei,TextEvent:Ei,TextMetrics:Ei,TextTrack:Ei,TextTrackCue:Ei,TextTrackCueList:Ei,TextTrackList:Ei,TimeRanges:Ei,toolbar:mi,top:mi,Touch:Ei,TouchEvent:Ei,TouchList:Ei,TrackEvent:Ei,TransitionEvent:Ei,TreeWalker:Ei,UIEvent:Ei,ValidityState:Ei,visualViewport:mi,VisualViewport:Ei,VTTCue:Ei,WaveShaperNode:Ei,WebAssembly:mi,WebGL2RenderingContext:Ei,WebGLActiveInfo:Ei,WebGLBuffer:Ei,WebGLContextEvent:Ei,WebGLFramebuffer:Ei,WebGLProgram:Ei,WebGLQuery:Ei,WebGLRenderbuffer:Ei,WebGLRenderingContext:Ei,WebGLSampler:Ei,WebGLShader:Ei,WebGLShaderPrecisionFormat:Ei,WebGLSync:Ei,WebGLTexture:Ei,WebGLTransformFeedback:Ei,WebGLUniformLocation:Ei,WebGLVertexArrayObject:Ei,WebSocket:Ei,WheelEvent:Ei,Window:Ei,Worker:Ei,WritableStream:Ei,XMLDocument:Ei,XMLHttpRequest:Ei,XMLHttpRequestEventTarget:Ei,XMLHttpRequestUpload:Ei,XMLSerializer:Ei,XPathEvaluator:Ei,XPathExpression:Ei,XPathResult:Ei,XSLTProcessor:Ei};for(const e of["window","global","self","globalThis"])Pi[e]=Pi;function wi(e){let t=Pi;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return"Symbol"===e[0]&&2===e.length?vi:null}return t[oi]}class Ii extends Bn{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(wi([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=wi([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=wi([this.name,...e]);return s?s.getLiteralValue():Ke}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!wi([this.name]):!wi([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=wi([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}const Ni=(e,t)=>{const{length:n}=e,{length:s}=t;return 0===n?t:0===s?e:n+s>6?[...e,...t.slice(0,5-e.length),"UnknownKey"]:[...e,...t]};class ki extends Bn{constructor(e,t,n,s,i,r){super(e),this.init=n,this.initPath=s,this.kind=r,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.includedPathTracker=new Ve,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=i.deoptimizationTracker,this.module=i.module}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers)for(const e of this.additionalInitializers)e.deoptimizePath(Re)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned||t.length+this.initPath.length>6?et(e):n.withTrackedEntityAtPath(t,this.init,()=>{this.init.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],n)},void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){this.markReassigned();const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=pe;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath([...this.initPath,be])}else this.init.deoptimizePath(Ni(this.initPath,e))}getLiteralValueAtPath(e,t,n){return this.isReassigned||e.length+this.initPath.length>6?Ke:t.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath([...this.initPath,...e],t,n)),Ke)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned||e.length+this.initPath.length>6?Qe:n.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],t,n,s)),Qe)}hasEffectsOnInteractionAtPath(e,t,n){if(e.length+this.initPath.length>6)return!0;switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}}includePath(e,t){if(!this.includedPathTracker.includePathAndGetIfIncluded(e)){this.module.scope.context.requestTreeshakingPass(),this.included||this.module.scope.context.newlyIncludedVariableInits.add(this.init),super.includePath(e,t);for(const e of this.declarations){e.included||e.include(t,!1);let n=e.parent;for(;!n.included&&(n.includeNode(t),n.type!==dt);)n=n.parent}e.length>0&&(this.init.includePath(Ni(this.initPath,e),t),this.additionalInitializers?.forEach(e=>e.includePath(Re,t)))}}includeCallArguments(e,t){this.isReassigned||t.includedCallArguments.has(this.init)||this.initPath.length>0?tt(e,t):(t.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),t.includedCallArguments.delete(this.init))}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=Ze,this.markReassigned()),this.additionalInitializers}}const Ci=new Set(["class","const","let","var","using","await using"]);class Ri extends ls{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return We(this.flags,4)?We(this.flags,8):null}set isTDZAccess(e){this.flags=qe(this.flags,4,!0),this.flags=qe(this.flags,8,e)}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(Ce)&&this.variable.hasEffectsOnInteractionAtPath(Ce,st,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(e,t){this.included||this.includeNode(e),t&&this.variable?.includePath(Re,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,Ce,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof ki&&this.variable.kind&&Ci.has(this.variable.kind)&&this.variable.module.hasTreeShakingPassStarted))return this.isTDZAccess=!1;let t;return this.variable.declarations&&1===this.variable.declarations.length&&(t=this.variable.declarations[0])&&this.start<t.start&&Di(this)===Di(t)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof ki&&(this.variable.module.isExecuted||Zn(this.variable.module),this.variable.consolidateInitializers(),this.scope.context.requestTreeshakingPass()),this.isVariableReference&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}disallowImportReassignment(){return this.scope.context.error(pn(this.name,this.scope.context.module.id),this.start)}getVariableRespectingTDZ(){return this.isPossibleTDZ()?Ze:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[Tn])return!0;t=t[n]}return t?.[Tn]}}function Di(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}class Oi extends Ye{constructor(e,t){super(),this.object=e,this.path=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[...this.path,...t],n)}deoptimizePath(e){this.object.deoptimizePath([...this.path,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([...this.path,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([...this.path,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([...this.path,...e],t,n)}}class Mi extends Ri{constructor(){super(...arguments),this.variable=null}get isDestructuringDeoptimized(){return We(this.flags,16777216)}set isDestructuringDeoptimized(e){this.flags=qe(this.flags,16777216,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&Ue(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0)}declare(e,t,n){let s;const{treeshake:i}=this.scope.context.options;return"parameter"===e?s=this.scope.addParameterDeclaration(this,t):(s=this.scope.addDeclaration(this,this.scope.context,n,t,e),"var"===e&&i&&i.correctVarValueBeforeDeclaration&&s.markInitializersForDeoptimization()),[this.variable=s]}deoptimizeAssignment(e,t){this.deoptimizePath(Ce),t.deoptimizePath([...e,be])}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,st,e)}includeDestructuredIfNecessary(e,t,n){t.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,n.deoptimizeArgumentsOnInteractionAtPath({args:[new Oi(n,t.slice(0,-1))],type:0},t,Te));const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;let i=this.included;return(i||=t.length>0&&!e.brokenFlow&&s&&("always"===s||n.hasEffectsOnInteractionAtPath(t,st,He())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,Ce,e),n.includePath(t,e)),!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=de){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&&s===at&&i&&e.appendRight(this.start,"0, ")}}}function _i(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}function Li(e,t,n){let s=e,i=1;for(;t.has(s)||jn.has(s)||n?.has(s);)s=`${e}$${_i(i++)}`;return t.add(s),s}class Ti{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){if("var"===i&&"var"===o.kind)return o.addDeclaration(e,n),o;t.error(Nn(r),e.start)}const a=new ki(e.name,e,n,s,t,i);return this.variables.set(r,a),a}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 Bi extends Ti{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 Bi&&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 Bi&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Bi&&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,Li(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findGlobal(e){const t=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,t),t}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}}function zi(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}class Vi extends ls{constructor(){super(...arguments),this.accessedValue=null}get computed(){return We(this.flags,1024)}set computed(e){this.flags=qe(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},Ce,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(Ce,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=Qe,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Ce,rt,Te,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}Vi.prototype.includeNode=us,Vi.prototype.applyDeoptimizations=ds;class Fi extends Vi{hasEffects(e){return super.hasEffects(e)||zi(this.decorators,e)}}class ji extends Bi{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o)return"var"===o.kind||"var"===i&&"parameter"===o.kind?(o.addDeclaration(e,n),o):t.error(Nn(r),e.start);const a=this.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class Ui extends ls{createScope(e){this.scope=new ji(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=Q(e.original.slice(this.start,this.end),"{")+1;re(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}function Gi(e){return"StaticBlock"===e.type}Ui.prototype.includeNode=us,Ui.prototype.applyDeoptimizations=ds;class Hi extends ls{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Bi(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)||zi(this.decorators,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.included||this.includeNode(e),this.superClass?.include(e,t),this.body.include(e,t);for(const n of this.decorators)n.include(e,t);this.id&&(this.id.markDeclarationReached(),this.id.include(e,t))}initialise(){super.initialise(),this.id?.declare("class",Ce,this);for(const e of this.body.body)if(e instanceof Fi&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)Gi(e)||e.static||e instanceof Fi&&"constructor"===e.kind||e.deoptimizePath(Re);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(Gi(n))continue;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(Ce,Te,this);if("symbol"==typeof e){s.push({key:Ie(e)?e:be,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof Mi?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new Fs(t,this.superClass?new Oi(this.superClass,["prototype"]):Gs)}),this.objectEntity=new Fs(e,this.superClass||Gs)}}Hi.prototype.includeNode=cs;class Wi extends Hi{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){return null!==e.id&&(this.id=new Mi(this,this.scope.parent).parseNode(e.id)),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}${le([o],t)};`);const l=o.getName(r);if(l!==a)return this.decorators.map(n=>n.render(e,t)),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 ki{constructor(e){super("arguments",null,Ze,Ce,e,"other")}addArgumentToBeDeoptimized(e){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=Ki}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}includePath(e,t){super.includePath(e,t);for(const e of this.deoptimizedArguments)e.deoptimizePath(Re);this.deoptimizedArguments.length=0}}function Ki(e){this.included?e.deoptimizePath(Re):this.deoptimizedArguments?.push(e)}const Xi=pe,Ji=new Set([be]),Yi=new Le,Zi=new Set([Ze]);class Qi extends ki{constructor(e,t,n,s){super(e,t,Ze,n,s,"parameter"),this.includedPathTracker=new je,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new Le,this.deoptimizedFields=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=Ke}addArgumentForDeoptimization(e){if(this.updateKnownValue(e),e===Ze){if(!this.argumentsToBeDeoptimized.has(Ze)){this.argumentsToBeDeoptimized.add(Ze);for(const{interaction:e}of this.deoptimizationInteractions)et(e);this.deoptimizationInteractions=Xi}}else if(this.deoptimizedFields.has(be))e.deoptimizePath([...this.initPath,be]);else if(!this.argumentsToBeDeoptimized.has(e)){this.argumentsToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([...this.initPath,t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,[...this.initPath,...n],Te)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsDependingOnKnownValue)e.deoptimizeCache();this.expressionsDependingOnKnownValue=pe}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(this.initPath,Te,this));if(this.knownValue===e||this.knownValue instanceof Mi&&e instanceof Mi&&this.knownValue.variable===e.variable)return;const{knownValueLiteral:t}=this;"symbol"!=typeof t&&e.getLiteralValueAtPath(this.initPath,Te,this)===t||this.markReassigned()}getKnownValue(){return this.knownValue||Ze}getLiteralValueAtPath(e,t,n){if(this.isReassigned||e.length+this.initPath.length>6)return Ke;const s=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(n),t.withTrackedEntityAtPath(e,s,()=>s.getLiteralValueAtPath([...this.initPath,...e],t,n),Ke)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;return this.isReassigned||1===s||e.length+this.initPath.length>6?super.hasEffectsOnInteractionAtPath(e,t,n):!(2===s?(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this):n.accessed.trackEntityAtPathAndGetIfTracked(e,this))&&this.getKnownValue().hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.argumentsToBeDeoptimized.has(Ze)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(be)||2===e.type&&this.deoptimizedFields.has(t[0]))||this.initPath.length+t.length>6)et(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.argumentsToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],Te);this.argumentsToBeDeoptimized.has(Ze)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(be))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.argumentsToBeDeoptimized)e.deoptimizePath([...this.initPath,t]);t===be&&(this.deoptimizationInteractions=Xi,this.deoptimizations=Yi,this.deoptimizedFields=Ji,this.argumentsToBeDeoptimized=Zi)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(Re):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),Qe}includeArgumentPaths(e,t){this.includedPathTracker.includeAllPaths(e,t,this.initPath)}}class er extends Qi{constructor(e){super("this",null,Ce,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||Ze).hasEffectsOnInteractionAtPath(e,t,n)}}class tr extends Bi{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const a=o.kind;if("parameter"===a&&"CatchClause"===o.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,Es,s,i);return o.renderLikeHoisted(n),this.addHoistedVariable(r,n),n}return"var"===a?(o.addDeclaration(e,n),o):t.error(Nn(r),e.start)}const a=this.parent.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class nr extends Bi{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const s=o.kind;if(!("var"!==i&&"function"!==i||"var"!==s&&"function"!==s&&"parameter"!==s))return o.addDeclaration(e,n),o;t.error(Nn(r),e.start)}const a=new ki(e.name,e,n,s,t,i);return this.variables.set(r,a),a}}class sr extends Bi{constructor(e,t){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=t?new tr(this):new nr(this)}addParameterDeclaration(e,t){const{name:n,start:s}=e;if(this.variables.get(n))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(n),s);const i=new Qi(n,e,t,this.context);return this.variables.set(n,i),this.bodyScope.addHoistedVariable(n,i),i}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments({args:e},t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];let r=e.length-1;for(let n=1;n<e.length;n++){const i=e[n];i instanceof ii&&!s&&(s=!0,r=n-1),s&&(i.includePath(Re,t),i.include(t,!1))}for(let o=r;o>=1;o--){const r=this.parameters[o-1]||i,a=e[o];if(r)if(n=!1,0===r.length)s=!0;else for(const e of r)e.calledFromTryStatement&&(n=!0),e.included&&(s=!0,n?a.include(t,!0):(e.includeArgumentPaths(a,t),a.include(t,!1)));(s||a.shouldBeIncluded(t))&&(s=!0,a.include(t,n))}}}class ir extends sr{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}deoptimizeArgumentsOnCall({args:e}){const{parameters:t}=this;let n=0;for(;n<e.length-1;n++){const s=e[n+1];if(s instanceof ii){for(;n<t.length;n++){e[n+1]?.deoptimizePath(Re);for(const e of t[n])e.markReassigned()}break}if(this.hasRest&&n>=t.length-1)s.deoptimizePath(Re);else{const e=t[n];if(e)for(const t of e)t.addArgumentForDeoptimization(s);this.addArgumentToBeDeoptimized(s)}}const s=this.hasRest?t.length-1:t.length;for(;n<s;n++)for(const e of t[n])e.addArgumentForDeoptimization(Es)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}deoptimizeAllParameters(){for(const e of this.parameters)for(const t of e)t.deoptimizePath(Re),t.markReassigned()}reassignAllParameters(){for(const e of this.parameters)for(const t of e)t.markReassigned()}addArgumentToBeDeoptimized(e){}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=Ze;for(const e of this.returnExpressions)e.deoptimizePath(Re)}}}class rr extends ir{constructor(e,t){super(e,!1),this.functionNode=t;const{context:n}=e;this.variables.set("arguments",this.argumentsVariable=new qi(n)),this.variables.set("this",this.thisVariable=new er(n))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included){const{args:n}=e;for(let e=1;e<n.length;e++){const s=n[e];s&&(s.includePath(Re,t),s.include(t,!1))}}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class or extends ls{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===dt&&this.scope.context.log(Et,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${Pt(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!==dt:super.shouldBeIncluded(e)}}or.prototype.includeNode=us,or.prototype.applyDeoptimizations=ds;class ar extends ls{get deoptimizeBody(){return We(this.flags,32768)}set deoptimizeBody(e){this.flags=qe(this.flags,32768,e)}get directlyIncluded(){return We(this.flags,16384)}set directlyIncluded(e){this.flags=qe(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(Ze)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new ji(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(){super.initialise(),this.scope.context.magicString.addSourcemapLocation(this.end-1);const e=this.body[0];this.deoptimizeBody=e instanceof or&&"use asm"===e.directive}render(e,t){this.body.length>0?re(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}ar.prototype.includeNode=us,ar.prototype.applyDeoptimizations=ds;class lr extends ls{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t,n){return this.declarationInit=n,this.argument.declare(e,cr(t),n)}deoptimizeAssignment(e,t){this.argument.deoptimizeAssignment(cr(e),t)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Ce)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Ce,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.argument.hasEffectsWhenDestructuring(e,cr(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.argument.includeDestructuredIfNecessary(e,cr(t),n);return!this.included&&s&&this.includeNode(e),this.included}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([be,be]),this.scope.context.requestTreeshakingPass())}}lr.prototype.includeNode=cs;const cr=e=>e.at(-1)===be?e:[...e,be];class ur extends ls{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1,this.includeCallArguments=this.scope.includeCallArguments.bind(this.scope)}get async(){return We(this.flags,256)}set async(e){this.flags=qe(this.flags,256,e)}get deoptimizedReturn(){return We(this.flags,512)}set deoptimizedReturn(e){this.flags=qe(this.flags,512,e)}get generator(){return We(this.flags,4194304)}set generator(e){this.flags=qe(this.flags,4194304,e)}get hasCachedEffects(){return We(this.flags,67108864)}set hasCachedEffects(e){this.flags=qe(this.flags,67108864,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){2===e.type&&0===t.length?this.scope.deoptimizeArgumentsOnCall(e):this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===be&&(this.scope.getReturnExpression().deoptimizePath(Re),this.scope.deoptimizeAllParameters())}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(Re),this.scope.context.requestTreeshakingPass()),Qe):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.hasCachedEffects)return!0;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],rt,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],st,n)))return this.hasCachedEffects=!0,!0}const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;for(let e=0;e<this.params.length;e++){const i=this.params[e];if(i.hasEffects(n)||s&&i.hasEffectsWhenDestructuring(n,Ce,t.args[e+1]||Es))return this.hasCachedEffects=!0,!0}return!1}onlyFunctionCallUsed(){let e=null;return"VariableDeclarator"===this.parent.type&&(e=this.parent.id.variable??null),this.parent.type===lt&&(e=this.parent.variable),e?.getOnlyFunctionCallUsed()??!1}include(e,t){this.included||this.includeNode(e),this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.scope.reassignAllParameters());const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}initialise(){super.initialise(),this.body instanceof ar?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationNoSideEffects=this.annotations.some(e=>"noSideEffects"===e.type))}parseNode(e){const{body:t,params:n}=e,{scope:s}=this,{bodyScope:i,context:r}=s,o=this.params=n.map(e=>new(r.getNodeConstructor(e.type))(this,s).parseNode(e));return s.addParameterVariables(o.map(e=>e.declare("parameter",Ce,Ze)),o[o.length-1]instanceof lr),this.body=new(r.getNodeConstructor(t.type))(this,i).parseNode(t),super.parseNode(e)}}ur.prototype.preventChildBlockScope=!0,ur.prototype.includeNode=us,ur.prototype.applyDeoptimizations=ds;class dr extends ur{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new rr(e,this),this.constructedEntity=new Fs(new Map,Gs),this.scope.thisVariable.addArgumentForDeoptimization(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addArgumentForDeoptimization(e.args[0])}hasEffects(e){return!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(0===e.length&&2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:Ze);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 this.hasCachedEffects=!0,!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(e,t);const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof Mi&&!n||s.include(e,t)}includeNode(e){this.included=!0;const t=this.scope.argumentsVariable.included;for(const n of this.params)n instanceof Mi&&!t||n.includePath(Re,e)}initialise(){super.initialise(),this.id?.declare("function",Ce,this)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Fs([{key:"prototype",kind:"init",property:new Fs([],Gs)}],Gs)}}class hr extends dr{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}onlyFunctionCallUsed(){return this.id?.variable.getOnlyFunctionCallUsed()??super.onlyFunctionCallUsed()}parseNode(e){return null!==e.id&&(this.id=new Mi(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class pr extends ls{bind(){super.bind();const e=this.declarationName||this.scope.context.getModuleName();this.variable.name=this.scope.variables.get(e)?`${e}_default`:e}include(e,t){this.included=!0,this.declaration.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable,Re,e)}includePath(e,t){this.included=!0,this.declaration.includePath(e,t)}initialise(){super.initialise();const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(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 te(e,Q(e,"default",t)+7)}(e.original,this.start);let o=!1;if(this.declaration instanceof hr)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=Q(e,"function",t)+8;e=e.slice(n,Q(e,"(",n));const s=Q(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof Wi)this.renderNamedDeclaration(e,r,null===this.declaration.id?Q(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void Y(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:ct}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));o=this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t),o&&e.appendLeft(this.end,";")}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 Wi&&i.has(this.variable)&&e.appendLeft(this.end,` ${le([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);return 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?"":";")),!1):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),!o)}}pr.prototype.needsBoundaries=!0,pr.prototype.includeNode=us,pr.prototype.applyDeoptimizations=ds;const fr=/[\n\r'\\\u2028\u2029]/,mr=/([\n\r'\u2028\u2029])/g,gr=/\\/g;function yr(e){return fr.test(e)?e.replace(gr,"\\\\").replace(mr,"\\$1"):e}const br="_interopDefault",Er="_interopDefaultCompat",xr="_interopNamespace",Ar="_interopNamespaceCompat",Sr="_interopNamespaceDefault",$r="_interopNamespaceDefaultOnly",vr="_mergeNamespaces",Pr="_documentCurrentScript",wr={auto:br,compat:Er,default:null,defaultOnly:null,esModule:null},Ir=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),Nr={auto:xr,compat:Ar,default:Sr,defaultOnly:$r,esModule:null},kr=(e,t)=>"esModule"!==e&&Ir(e,t),Cr=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of Gr)t.has(e)&&a.add(e);return Gr.map(e=>a.has(e)?Rr[e](n,s,i,r,o,a):"").join("")},Rr={[Pr]:(e,{_:t,n:n})=>`var ${Pr}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[Er](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Er});return`${o}${Mr(t)}${s}?${s}${n?Dr(t):Or(t)}${a}${r}${r}`},[br](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:br});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?Dr(t):Or(t)}${a}${r}${r}`},[Ar](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Sr)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ar});return`${e}${Mr(t)}${o}?${o}e${o}:${o}${Sr}(e)${n}${l}${l}`}return`function ${Ar}(e)${o}{${l}${e}if${o}(${Mr(t)})${o}return e;${l}`+_r(e,e,t,n,s,i)+`}${l}${l}`},[$r](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,u]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:$r});return`${c}${jr(s,Ur(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[Sr](e,t,n,s,i){const{_:r,n:o}=t;return`function ${Sr}(e)${r}{${o}`+_r(e,e,t,n,s,i)+`}${o}${o}`},[xr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Sr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:xr});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${Sr}(e)${t}${l}${l}`}return`function ${xr}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+_r(e,e,t,n,s,i)+`}${l}${l}`},[vr](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${vr}(n, m)${r}{${a}${e}${Tr(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?zr:Vr:Fr)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${jr(s,Ur(i,"n",t))};${a}}${a}${a}`}},Dr=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Or=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Mr=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,_r=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}=n,h=`{${u}`+(s?Br:Fr)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Hr(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${Lr(h,!s,n)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${jr(i,"n")}${d}${u}`},Lr=(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}`,Tr=(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}}`},Br=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+zr(e,t+e,n)+`${t}}${i}`},zr=(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}`},Vr=(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}`},Fr=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,jr=(e,t)=>e?`Object.freeze(${t})`:t,Ur=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${Hr(s)})`:t,Gr=Object.keys(Rr);function Hr(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class Wr extends ls{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)?Ke:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Qe:Ms(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||Os(this.members,e[0],t,n))}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return Rs;switch(typeof e){case"boolean":return ks;case"number":return Cs;case"string":return Ds}return Object.create(null)}(this.value)}parseNode(e){return 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 qr(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(Ce,Te,i);if(n===as||e.optional&&null==n)return as}else if(e.optional&&null==t.getLiteralValueAtPath(Ce,Te,i))return as;return e.getLiteralValueAtPath(n,s,i)}function Kr(e){return e.computed?function(e){if(e instanceof Wr)return String(e.value);return null}(e.property):e.property.name}function Xr(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof Mi)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof Jr){const s=Xr(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}Wr.prototype.includeNode=cs;class Jr extends ls{constructor(){super(...arguments),this.promiseHandler=null,this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return We(this.flags,1024)}set computed(e){this.flags=qe(this.flags,1024,e)}get optional(){return We(this.flags,128)}set optional(e){this.flags=qe(this.flags,128,e)}get assignmentDeoptimized(){return We(this.flags,16)}set assignmentDeoptimized(e){this.flags=qe(this.flags,16,e)}get bound(){return We(this.flags,32)}set bound(e){this.flags=qe(this.flags,32,e)}get isUndefined(){return We(this.flags,64)}set isUndefined(e){this.flags=qe(this.flags,64,e)}bind(){this.bound=!0;const e=Xr(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=Yr(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.promiseHandler?this.promiseHandler.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.isUndefined||(t.length<6?this.object.deoptimizeArgumentsOnInteractionAtPath(e,this.propertyKey===be?Re:[this.propertyKey,...t],n):et(e))}deoptimizeAssignment(e,t){this.deoptimizePath(Ce),t.deoptimizePath([...e,be])}deoptimizeCache(){if(this.propertyKey===this.dynamicPropertyKey)return;const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=pe,this.dynamicPropertyKey=this.propertyKey,t.deoptimizePath(Re),this.included&&t.includePath(Re,Ge());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){const{propertyKey:t}=this;this.object.deoptimizePath([t===be?Ee:t,...e.length<6?e:[...e.slice(0,6),be]])}}getLiteralValueAtPath(e,t,n){if(this.variable)return this.variable.getLiteralValueAtPath(e,t,n);if(this.isUndefined)return;const s=this.getDynamicPropertyKey();return s!==be&&e.length<6?(s!==this.propertyKey&&this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([s,...e],t,n)):Ke}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:qr(this,this.object,e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(this.variable)return this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s);if(this.isUndefined)return[Es,!1];const i=this.getDynamicPropertyKey();return i!==be&&e.length<6?(i!==this.propertyKey&&this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([i,...e],t,n,s)):Qe}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsChainElement(e){if(this.variable||this.isUndefined)return this.hasEffects(e);const t="hasEffectsAsChainElement"in this.object?this.object.hasEffectsAsChainElement(e):this.object.hasEffects(e);return t===as?as:this.optional&&null==this.object.getLiteralValueAtPath(Ce,Te,this)?t||as:(this.deoptimized||this.applyDeoptimizations(),t||this.property.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(Ce,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||(!(e.length<6)||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey(),...e],t,n))}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,st,e)}include(e,t){this.included||this.includeNode(e),this.object.include(e,t),this.property.include(e,t),t&&this.variable?.includePath(Re,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable?this.scope.context.includeVariableInModule(this.variable,Ce,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includeNodeAsAssignmentTarget(e){this.included=!0,this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.variable?this.scope.context.includeVariableInModule(this.variable,Ce,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includePath(e,t){this.included||this.includeNode(t),this.variable?this.variable?.includePath(e,t):this.isUndefined||this.object.includePath([this.propertyKey,...e.length<6?e:[...e.slice(0,6),be]],t)}includeAsAssignmentTarget(e,t,n){this.included||this.includeNodeAsAssignmentTarget(e),n&&!this.deoptimized&&this.applyDeoptimizations(),this.object.include(e,t),this.property.include(e,t)}includeCallArguments(e,t){this.promiseHandler?this.promiseHandler.includeCallArguments(e,t):this.variable?this.variable.includeCallArguments(e,t):tt(e,t)}includeDestructuredIfNecessary(){this.scope.context.error({message:"includeDestructuredIfNecessary is currently not supported for MemberExpressions"},this.start)}initialise(){super.initialise(),this.dynamicPropertyKey=Kr(this),this.propertyKey=null===this.dynamicPropertyKey?be:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=de){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;this.bound&&e&&!(this.variable||this.isUndefined||this.promiseHandler)&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[this.propertyKey],Te),this.scope.context.requestTreeshakingPass()),this.variable&&(this.variable.addUsedPlace(this),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.propertyKey],Te),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){if(this.object instanceof Mi){this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable,Re,Ge()),this.scope.context.log(Et,pn(this.object.name,this.scope.context.module.id),this.start))}}getDynamicPropertyKey(){if(null===this.dynamicPropertyKey){this.dynamicPropertyKey=this.propertyKey;const e=this.property.getLiteralValueAtPath(Ce,Te,this);return this.dynamicPropertyKey="symbol"==typeof e?we.has(e)?e:be:String(e)}return this.dynamicPropertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey()],this.accessInteraction,e))}}function Yr(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof Vn)return null;const s=t[0].key,[i,r]=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(Et,$n(s,n.module.id,i,!!r?.missingButExportExists),t[0].pos),"undefined"}return null}return Yr(i,t.slice(1),n)}const Zr="ROLLUP_FILE_URL_",Qr="ROLLUP_FILE_URL_OBJ_",eo="import";class to extends ls{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;if(t===eo){if(n?.startsWith(Qr))return e.getFileName(n.slice(20));if(n?.startsWith(Zr))return e.getFileName(n.slice(16))}return null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){this.included||this.includeNode()}includeNode(){if(this.included=!0,this.meta.name===eo){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Jr&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(Qr)?this.referenceId=t.slice(20):t?.startsWith(Zr)&&(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:u,start:d,end:h}=this,{id:p,info:{attributes:f}}=r;if(o!==eo)return;const m=c;if(u){const t=s.getFileName(u),i=G(X(W(m),t)),r=!!a?.startsWith(Qr),o=s.hookFirstSync("resolveFileUrl",[{attributes:f,chunkId:m,fileName:t,format:n,moduleId:p,referenceId:u,relativePath:i}])||ho[n](i,r);return void e.overwrite(l.start,l.end,o,{contentOnly:!0})}let g=s.hookFirstSync("resolveImportMeta",[a,{attributes:f,chunkId:m,format:n,moduleId:p}]);g||(g=po[n]?.(a,{chunkId:m,snippets:i}),t.accessedDocumentCurrentScript||=no.includes(n)&&"undefined"!==g),"string"==typeof g&&(l instanceof Jr?e.overwrite(l.start,l.end,g,{contentOnly:!0}):e.overwrite(d,h,g,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(Zr)||this.metaProperty?.startsWith(Qr)?io:so)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}}const no=["cjs","iife","umd"],so={amd:["document","module","URL"],cjs:["document","require","URL",Pr],es:[],iife:["document","URL",Pr],system:["module"],umd:["document","require","URL",Pr]},io={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},ro=(e,t,n="URL")=>`new ${n}(${e})${t?"":".href"}`,oo=(e,t,n=!1)=>ro(`'${yr(e)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,t),ao=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},lo=(e,t)=>`require('u' + 'rl').pathToFileURL(${e})${t?"":".href"}`,co=(e,t)=>lo(`__dirname + '/${yr(e)}'`,t),uo=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${Pr} && ${Pr}.tagName.toUpperCase() === 'SCRIPT' && ${Pr}.src || new URL('${yr(e)}', document.baseURI).href)`,ho={amd:(e,t)=>("."!==e[0]&&(e="./"+e),ro(`require.toUrl('${yr(e)}'), document.baseURI`,t)),cjs:(e,t)=>`(typeof document === 'undefined' ? ${co(e,t)} : ${oo(e,t)})`,es:(e,t)=>ro(`'${yr(e)}', import.meta.url`,t),iife:(e,t)=>oo(e,t),system:(e,t)=>ro(`'${yr(e)}', module.meta.url`,t),umd:(e,t)=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${co(e,t)} : ${oo(e,t,!0)})`},po={amd:ao(()=>ro("module.uri, document.baseURI",!1)),cjs:ao(e=>`(typeof document === 'undefined' ? ${lo("__filename",!1)} : ${uo(e)})`),iife:ao(e=>uo(e)),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:ao(e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${lo("__filename",!1)} : ${uo(e,!0)})`)};class fo extends Bn{constructor(){super("undefined")}getLiteralValueAtPath(){}}class mo extends ki{constructor(e,t){super("default",e,e.declaration,Ce,t,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const n=e.declaration;(n instanceof hr||n instanceof Wi)&&n.id?(this.hasId=!0,this.originalId=n.id):n instanceof Mi&&(this.originalId=n)}addReference(e){this.hasId||(this.name=e.name)}addUsedPlace(e){const t=this.getOriginalVariable();t===this?super.addUsedPlace(e):t.addUsedPlace(e)}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 fo||"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 mo&&!n.has(t));return this.originalVariable=t||e}}class go extends Bn{constructor(e){super(e.getModuleName()),this.areAllMembersDeoptimized=!1,this.mergedNamespaces=[],this.nonExplicitNamespacesIncluded=!1,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.module.getExportedVariablesByName().get(s)?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):et(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];if("string"==typeof t)this.module.getExportedVariablesByName().get(t)?.deoptimizePath(e.slice(1));else if(!this.areAllMembersDeoptimized){this.areAllMembersDeoptimized=!0;for(const e of this.module.getExportedVariablesByName().values())e.deoptimizePath(Re)}}}getLiteralValueAtPath(e){return e[0]===Se?"Module":Ke}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.module.getExportedVariablesByName().get(i);return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,n)}includePath(e,t){super.includePath(e,t),this.includeMemberPath(e,t)}includeMemberPath(e,t){if(e.length>0){const[n,...s]=e;if("string"==typeof n){const e=this.module.getExportedVariablesByName().get(n);e?this.context.includeVariableInModule(e,s,t):this.includeNonExplicitNamespaces()}else n&&(this.module.includeAllExports(),this.includeNonExplicitNamespaces())}}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([vr],e)}renderBlock(e){const{exportNamesByVariable:t,format:n,freeze:s,indent:i,symbols:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}}=e,h=[...this.module.getExportedVariablesByName().entries()].filter(([e,t])=>!e.startsWith("*")&&t.included).map(([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${Xn(e)}${o}()${o}{${o}return ${t.getName(c)}${d}${o}}`]:[e,t.getName(c)]);h.unshift([null,`__proto__:${o}null`]);let p=l(h,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map(e=>e.getName(c));p=`/*#__PURE__*/${vr}(${p},${o}[${e.join(`,${o}`)}])`}else r&&(p=`/*#__PURE__*/Object.defineProperty(${p},${o}Symbol.toStringTag,${o}${Hr(l)})`),s&&(p=`/*#__PURE__*/Object.freeze(${p})`);return p=`${a} ${this.getName(c)}${o}=${o}${p};`,"system"===n&&t.has(this)&&(p+=`${u}${le([this],e)};`),p}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}}}includeNonExplicitNamespaces(){this.nonExplicitNamespacesIncluded||(this.nonExplicitNamespacesIncluded=!0,this.setMergedNamespaces(this.module.includeAndGetAdditionalMergedNamespaces()))}}go.prototype.isNamespace=!0;const yo=e=>Object.create(e,{includePath:{value(t,n){e.includeMemberPath(t,n)}}});class bo extends Bn{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 mo||e instanceof bo;){if(e instanceof mo){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof bo&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}includePath(e,t){super.includePath(e,t),this.context.includeVariableInModule(this.syntheticNamespace,[this.name,...e],t)}setRenderNames(e,t){super.setRenderNames(e,t)}}class Eo{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}get moduleSideEffects(){return this.moduleInfo.moduleSideEffects}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?G(X(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=xo(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return yr(this.renormalizeRenderPath?Nt(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function xo(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map(([e,t])=>[e,`'${t}'`]);return n.length>0?t(n,{lineBreakIndent:null}):null}function Ao(e){return e.endsWith(".js")?e.slice(0,-3):e}function So(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Ao(t)}`:e.id??""}function $o(e,t,n,s,i,r,o,a,l="return "){const{_:c,getDirectReturnFunction:u,getFunctionIntro:d,getPropertyAccess:h,n:p,s:f}=i;if(!n)return`${p}${p}${l}${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:u}of t)if(u)return vo(a,u[0].imported,l,o,e,c,n,r,s,i)}(e,t,s,o,h)};`;let m="";if(n)for(const{defaultVariableName:e,importPath:n,isChunk:i,name:a,namedExportsMode:l,namespaceVariableName:d,reexports:f}of t)if(f)for(const t of f)if("*"!==t.reexported){const f=vo(a,t.imported,l,i,e,d,s,n,o,h);if(m&&(m+=p),"*"!==t.imported&&t.needsLiveBinding){const[e,n]=u([],{functionReturn:!0,lineBreakIndent:null,name:null});m+=`Object.defineProperty(exports,${c}${JSON.stringify(t.reexported)},${c}{${p}${r}enumerable:${c}true,${p}${r}get:${c}${e}${f}${n}${p}});`}else"__proto__"===t.reexported?m+=`Object.defineProperty(exports,${c}"__proto__",${c}{${p}${r}enumerable:${c}true,${p}${r}value:${c}${f}${p}});`:m+=`exports${h(t.reexported)}${c}=${c}${f};`}for(const{exported:t,local:n}of e){const e=`exports${h(t)}`;e!==n&&(m&&(m+=p),m+="__proto__"===t?`Object.defineProperty(exports,${c}"__proto__",${c}{${p}${r}enumerable:${c}true,${p}${r}value:${c}${n}${p}});`:`${e}${c}=${c}${n};`)}if(n)for(const{name:e,reexports:n}of t)if(n)for(const t of n)if("*"===t.reexported){if(m&&(m+=p),!t.needsLiveBinding&&a){const t="'__proto__'";m+=`Object.prototype.hasOwnProperty.call(${e},${c}${t})${c}&&${p}${r}!Object.prototype.hasOwnProperty.call(exports,${c}${t})${c}&&${p}${r}Object.defineProperty(exports,${c}${t},${c}{${p}${r}${r}enumerable:${c}true,${p}${r}${r}value:${c}${e}[${t}]${p}${r}});${p}${p}`}const n=`{${p}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!Object.prototype.hasOwnProperty.call(exports,${c}k))${c}${Io(e,t.needsLiveBinding,r,i)}${f}${p}}`;m+=`Object.keys(${e}).forEach(${d(["k"],{isAsync:!1,name:null})}${n});`}return m?`${p}${p}${m}`:""}function vo(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=wr[t]?i:e;return Ir(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:Nr[o(a)])?r:e:`${e}${c(t)}`}function Po(e){return e([["value","true"]],{lineBreakIndent:null})}function wo(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",Po(i)],[null,`[Symbol.toStringTag]:${s}${Hr(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${Po(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${Hr(i)});`}return""}const Io=(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`exports[k]${s}=${s}${e}[k]`};function No(e,t,n,s,i,r,o,a){const{_:l,cnst:c,n:u}=a,d=new Set,h=[],p=(e,t,n)=>{d.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,$r,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=wr[e])):"*"!==t||"*"===i||a||(a=!0,s=Nr[e],c=l),s&&p(c,s,o)}}return`${Cr(d,r,o,a,n,s,i)}${h.length>0?`${h.join(u)}${u}${u}`:""}`}function ko(e,t,n){const s=n.find(e=>e.sourcePhaseImport);s&&Ut(function(e,t,n){return{code:"SOURCE_PHASE_FORMAT_UNSUPPORTED",message:`Source phase imports are not supported for the "${e}" output format, importing "${n}" in "${t}". Use the "es" output format to support source phase imports.`,url:kt(Ft)}}(e,t,s.importPath))}function Co(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":Ao(e);var n}const Ro=new Set(["node:assert","assert","node:assert/strict","assert/strict","node:async_hooks","async_hooks","node:buffer","buffer","node:child_process","child_process","node:cluster","cluster","node:console","console","node:constants","constants","node:crypto","crypto","node:dgram","dgram","node:diagnostics_channel","diagnostics_channel","node:dns","dns","node:dns/promises","dns/promises","node:domain","domain","node:events","events","node:ffi","node:fs","fs","node:fs/promises","fs/promises","node:http","http","node:http2","http2","node:https","https","node:inspector","inspector","node:inspector/promises","inspector/promises","node:module","module","node:net","net","node:os","os","node:path","path","node:path/posix","path/posix","node:path/win32","path/win32","node:perf_hooks","perf_hooks","node:process","process","node:querystring","querystring","node:quic","node:readline","readline","node:readline/promises","readline/promises","node:repl","repl","node:sea","node:sqlite","node:stream","stream","node:stream/consumers","stream/consumers","node:stream/iter","stream/iter","node:stream/promises","stream/promises","node:stream/web","stream/web","node:string_decoder","string_decoder","node:test","node:test/reporters","node:timers","timers","node:timers/promises","timers/promises","node:tls","tls","node:trace_events","trace_events","node:tty","tty","node:url","url","node:util","util","node:util/types","util/types","node:v8","v8","node:vfs","node:vm","vm","node:wasi","wasi","node:worker_threads","worker_threads","node:zlib","zlib","node:zlib/iter","zlib/iter"]);function Do(e,t){const n=t.map(({importPath:e})=>e).filter(e=>Ro.has(e)||e.startsWith("node:"));0!==n.length&&e(Et,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${$t(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const Oo=(e,t)=>e.split(".").map(t).join("");function Mo(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(Et,kn(a[0])),a[0]=("function"==typeof n?n(a[0]):l?a[0]:n[a[0]])||a[0];const c=a.pop();let u=t,d=[...a.map(e=>(u+=r(e),`${u}${i}=${i}${u}${i}||${i}{}`)),`${u}${r(c)}`].join(`,${i}`)+`${i}=${i}${s}`;return a.length>0&&(d=`(${d})`),d}function _o(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 Lo="_missingExportShim";const To=({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},Bo=(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""},zo=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",Vo=(e,t,n)=>Fo(e.filter(e=>e.hoisted).map(e=>({name:e.exported,value:e.local})),t,n);function Fo(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}${Xn(e)}:${n}${s}`).join(`,${s}`)+`${s}});${s}${s}`}const jo=(e,t,n)=>Fo(e.filter(e=>e.expression).map(e=>({name:e.exported,value:e.local})),t,n),Uo=(e,t,n)=>Fo(e.filter(e=>e.local===Lo).map(e=>({name:e.exported,value:Lo})),t,n);function Go(e,t,n){return e?`${t}${Oo(e,n)}`:"null"}var Ho={amd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,log:h,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:b,generatedCode:{symbols:E},interop:x,reexportProtoFromExternal:A,strict:S}){Do(h,n),ko("amd",o,n);const $=n.map(e=>`'${Co(e.importPath,m.forceJsExtensionForImports)}'`),v=n.map(e=>e.name),{n:P,getNonArrowFunctionIntro:w,_:I}=f;r&&(d||"exports.default"===s[0]?.local)&&(v.unshift("exports"),$.unshift("'exports'")),t.has("require")&&(v.unshift("require"),$.unshift("'require'")),t.has("module")&&(v.unshift("module"),$.unshift("'module'"));const N=So(m,o),k=(N?`'${N}',${I}`:"")+($.length>0?`[${$.join(`,${I}`)}],${I}`:""),C=S?`${I}'use strict';`:"";e.prepend(`${l}${No(n,x,y,b,E,t,a,f)}`);const R=$o(s,n,d,x,f,a,y,A);let D=wo(d&&r,c&&(!0===g||"if-default-prop"===g&&i),u&&E,f);D&&(D=P+P+D),e.append(`${R}${D}${p}`).indent(a).prepend(`${m.define}(${k}(${w(v,{isAsync:!1,name:null})}{${C}${P}${P}`).append(`${P}${P}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,outro:h,snippets:p},{compact:f,esModule:m,externalLiveBindings:g,freeze:y,interop:b,generatedCode:{symbols:E},reexportProtoFromExternal:x,strict:A}){ko("cjs",o,n);const{_:S,n:$}=p,v=A?`'use strict';${$}${$}`:"";let P=wo(d&&r,c&&(!0===m||"if-default-prop"===m&&i),u&&E,p);P&&(P+=$+$);const w=function(e,{_:t,cnst:n,n:s},i){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:u}of e)c||u?(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,p,f),I=No(n,b,g,y,E,t,a,p);e.prepend(`${v}${l}${P}${w}${I}`);const N=$o(s,n,d,b,p,a,g,x,`module.exports${S}=${S}`);e.append(`${N}${h}`)},es:function(e,{accessedGlobals:t,indent:n,intro:s,outro:i,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:u},importAttributesKey:d}){const{n:h}=a,p=function(e,t,{_:n}){const s=[];for(const{importPath:i,reexports:r,imports:o,name:a,attributes:l,sourcePhaseImport:c}of e){const e=`'${i}'${l?`${n}${t}${n}${l}`:""};`;if(c&&s.push(`import source ${c} from${n}${e}`),r||o){if(o){let t=null,i=null;const r=[];for(const e of o)"default"===e.imported?t=e:"*"===e.imported?i=e:r.push(e);i&&s.push(`import${n}*${n}as ${i.local} from${n}${e}`),t&&0===r.length?s.push(`import ${t.local} from${n}${e}`):r.length>0&&s.push(`import ${t?`${t.local},${n}`:""}{${n}${r.map(e=>e.imported===e.local?e.imported:`${Jn(e.imported)} as ${e.local}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}if(r){let t=null;const i=[],l=[];for(const e of r)"*"===e.reexported?t=e:"*"===e.imported?i.push(e):l.push(e);if(t&&s.push(`export${n}*${n}from${n}${e}`),i.length>0){o&&o.some(e=>"*"===e.imported&&e.local===a)||s.push(`import${n}*${n}as ${a} from${n}${e}`);for(const e of i)s.push(`export${n}{${n}${a===e.reexported?a:`${a} as ${Jn(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map(e=>e.imported===e.reexported?Jn(e.imported):`${Jn(e.imported)} as ${Jn(e.reexported)}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}}else c||s.push(`import${n}${e}`)}return s}(r,d,a);p.length>0&&(s+=p.join(h)+h+h),(s+=Cr(null,t,n,a,l,c,u))&&e.prepend(s);const f=function(e,{_:t,cnst:n}){const s=[],i=new Array(e.length);let r=0;for(const o of e)o.expression&&s.push(`${n} ${o.local}${t}=${t}${o.expression};`),i[r++]=o.exported===o.local?o.local:`${o.local} as ${Jn(o.exported)}`;i.length>0&&s.push(`export${t}{${t}${i.join(`,${t}`)}${t}};`);return s}(o,a);f.length>0&&e.append(h+h+f.join(h).trim()),i&&e.append(i),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:h},{compact:p,esModule:f,extend:m,freeze:g,externalLiveBindings:y,reexportProtoFromExternal:b,globals:E,interop:x,name:A,generatedCode:{symbols:S},strict:$}){ko("iife",o,n);const{_:v,getNonArrowFunctionIntro:P,getPropertyAccess:w,n:I}=h,N=A&&A.includes("."),k=!m&&!N;if(A&&k&&(Hn(C=A)||Gn.test(C)))return Ut(function(e){return{code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:kt("configuration-options/#output-extend")}}(A));var C;Do(u,n);const R=_o(n),D=R.map(e=>e.globalName||"null"),O=R.map(e=>e.name);r&&!A&&u(Et,{code:Qt,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:kt(zt)}),r&&(c||"exports.default"===s[0]?.local)&&(m?(D.unshift(`this${Oo(A,w)}${v}=${v}this${Oo(A,w)}${v}||${v}{}`),O.unshift("exports")):(D.unshift("{}"),O.unshift("exports")));const M=$?`${a}'use strict';${I}`:"",_=No(n,x,y,g,S,t,a,h);e.prepend(`${l}${_}`);let L=`(${P(O,{isAsync:!1,name:null})}{${I}${M}${I}`;r&&(!A||m&&c||(L=(k?`var ${A}`:`this${Oo(A,w)}`)+`${v}=${v}${L}`),N&&(L=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o,a){const l=e.split("."),c=l[0]in Object.prototype;a&&c&&a(Et,kn(l[0])),l[0]=("function"==typeof n?n(l[0]):c?l[0]:n[l[0]])||l[0],l.pop();let u=t;return l.map(e=>(u+=i(e),`${u}${s}=${s}${u}${s}||${s}{}${r}`)).join(o?",":"\n")+(o&&l.length>0?";":"\n")}(A,"this",E,h,p,u)+L));let T=`${I}${I}})(${D.join(`,${v}`)});`;r&&!m&&c&&(T=`${I}${I}${a}return exports;${T}`);const B=$o(s,n,c,x,h,a,y,b);let z=wo(c&&r,!0===f||"if-default-prop"===f&&i,S,h);z&&(z=I+I+z),e.append(`${B}${z}${d}`).indent(a).prepend(L).append(T)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,id:r,indent:o,intro:a,snippets:l,outro:c,usesTopLevelAwait:u},{externalLiveBindings:d,freeze:h,name:p,generatedCode:{symbols:f},strict:m,systemNullSetters:g}){ko("system",r,n);const{_:y,getFunctionIntro:b,getNonArrowFunctionIntro:E,n:x,s:A}=l,{importBindings:S,setters:$,starExcludes:v}=function(e,t,n,{_:s,cnst:i,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let u=null;for(const{imports:d,reexports:h}of e){const p=[];if(d)for(const e of d)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){u||(u=To({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:u}}(n,s,o,l),P=p?`'${p}',${y}`:"",w=t.has("module")?["exports","module"]:i?["exports"]:[];let I=`System.register(${P}[`+n.map(({importPath:e})=>`'${e}'`).join(`,${y}`)+`],${y}(${E(w,{isAsync:!1,name:null})}{${x}${o}${m?"'use strict';":""}`+Bo(v,o,l)+zo(S,o,l)+`${x}${o}return${y}{${$.length>0?`${x}${o}${o}setters:${y}[${$.map(e=>e?`${b(["module"],{isAsync:!1,name:null})}{${x}${o}${o}${o}${e}${x}${o}${o}}`:g?"null":`${b([],{isAsync:!1,name:null})}{}`).join(`,${y}`)}],`:""}${x}`;I+=`${o}${o}execute:${y}(${E([],{isAsync:u,name:null})}{${x}${x}`;const N=`${o}${o}})${x}${o}}${A}${x}}));`;e.prepend(a+Cr(null,t,o,l,d,h,f)+Vo(s,o,l)).append(`${c}${x}${x}`+jo(s,o,l)+Uo(s,o,l)).indent(`${o}${o}${o}`).append(N).prepend(I)},umd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:h},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:b,interop:E,name:x,generatedCode:{symbols:A},globals:S,noConflict:$,reexportProtoFromExternal:v,strict:P}){const{_:w,cnst:I,getFunctionIntro:N,getNonArrowFunctionIntro:k,getPropertyAccess:C,n:R,s:D}=h,O=f?"f":"factory",M=f?"g":"global";if(r&&!x)return Ut({code:Qt,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:kt(zt)});ko("umd",o,n),Do(u,n);const _=n.map(e=>`'${Co(e.importPath,p.forceJsExtensionForImports)}'`),L=n.map(e=>`require('${e.importPath}')`),T=_o(n),B=T.map(e=>Go(e.globalName,M,C)),z=T.map(e=>e.name);(r||$)&&(c||r&&"exports.default"===s[0]?.local)&&(_.unshift("'exports'"),L.unshift("exports"),B.unshift(Mo(x,M,S,(g?`${Go(x,M,C)}${w}||${w}`:"")+"{}",h,u)),z.unshift("exports"));const V=So(p,o),F=(V?`'${V}',${w}`:"")+(_.length>0?`[${_.join(`,${w}`)}],${w}`:""),j=p.define,U=!c&&r?`module.exports${w}=${w}`:"",G=P?`${w}'use strict';${R}`:"";let H;if($){const e=f?"e":"exports";let t;if(!c&&r)t=`${I} ${e}${w}=${w}${Mo(x,M,S,`${O}(${B.join(`,${w}`)})`,h,u)};`;else{t=`${I} ${e}${w}=${w}${B.shift()};${R}${a}${a}${O}(${[e,...B].join(`,${w}`)});`}H=`(${N([],{isAsync:!1,name:null})}{${R}${a}${a}${I} current${w}=${w}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map(e=>i+=s(e)).join(`${n}&&${n}`)}(x,M,h)};${R}${a}${a}${t}${R}${a}${a}${e}.noConflict${w}=${w}${N([],{isAsync:!1,name:null})}{${w}${Go(x,M,C)}${w}=${w}current;${w}return ${e}${D}${w}};${R}${a}})()`}else H=`${O}(${B.join(`,${w}`)})`,!c&&r&&(H=Mo(x,M,S,H,h,u));const W=r||$&&c||B.length>0,q=[O];W&&q.unshift(M);const K=W?`this,${w}`:"",X=W?`(${M}${w}=${w}typeof globalThis${w}!==${w}'undefined'${w}?${w}globalThis${w}:${w}${M}${w}||${w}self,${w}`:"",J=W?")":"",Y=W?`${a}typeof exports${w}===${w}'object'${w}&&${w}typeof module${w}!==${w}'undefined'${w}?${w}${U}${O}(${L.join(`,${w}`)})${w}:${R}`:"",Z=`(${k(q,{isAsync:!1,name:null})}{${R}`+Y+`${a}typeof ${j}${w}===${w}'function'${w}&&${w}${j}.amd${w}?${w}${j}(${F}${O})${w}:${R}`+`${a}${X}${H}${J};${R}`+`})(${K}(${k(z,{isAsync:!1,name:null})}{${G}${R}`,Q=R+R+"}));";e.prepend(`${l}${No(n,E,y,b,A,t,a,h)}`);const ee=$o(s,n,c,E,h,a,y,v);let te=wo(c&&r,!0===m||"if-default-prop"===m&&i,A,h);te&&(te=R+R+te),e.append(`${ee}${te}${d}`).trim().indent(a).append(Q).prepend(Z)}};function Wo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qo,Ko,Xo,Jo,Yo,Zo,Qo,ea,ta,na,sa,ia={};function ra(){if(Ko)return qo;Ko=1;const e="\\\\/",t=`[^${e}]`,n="\\.",s="\\/",i="[^/]",r=`(?:${s}|$)`,o=`(?:^|${s})`,a=`${n}{1,2}${r}`,l={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:r,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${o}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${r})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:o,SEP:"/"},c={...l,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return qo={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?c:l},qo}function oa(){return Xo||(Xo=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=ra();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,s)=>{const i=t.lastIndexOf(n,s);return-1===i?t:"\\"===t[i-1]?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let s=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),s=n[n.length-1];return""===s?n[n.length-2]:s}}(ia)),ia}function aa(){if(Yo)return Jo;Yo=1;const e=oa(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:i,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:p,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:m}=ra(),g=e=>e===a||e===s,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Jo=(b,E)=>{const x=E||{},A=b.length-1,S=!0===x.parts||!0===x.tokens||!0===x.scanToEnd,$=[],v=[],P=[];let w,I,N=b,k=-1,C=0,R=0,D=!1,O=!1,M=!1,_=!1,L=!1,T=!1,B=!1,z=!1,V=!1,F=!1,j=0,U={value:"",depth:0,isGlob:!1};const G=()=>k>=A,H=()=>N.charCodeAt(k+1),W=()=>(w=I,N.charCodeAt(++k));for(;k<A;){let e;if(I=W(),I!==s){if(!0===T||I===l){for(j++;!0!==G()&&(I=W());)if(I!==s)if(I!==l){if(!0!==T&&I===r&&(I=W())===r){if(D=U.isBrace=!0,M=U.isGlob=!0,F=!0,!0===S)continue;break}if(!0!==T&&I===i){if(D=U.isBrace=!0,M=U.isGlob=!0,F=!0,!0===S)continue;break}if(I===p&&(j--,0===j)){T=!1,D=U.isBrace=!0,F=!0;break}}else j++;else B=U.backslashes=!0,W();if(!0===S)continue;break}if(I!==a){if(!0!==x.noext){if(!0===(I===d||I===n||I===t||I===h||I===o)&&H()===c){if(M=U.isGlob=!0,_=U.isExtglob=!0,F=!0,I===o&&k===C&&(V=!0),!0===S){let e=0;for(;!0!==G()&&(I=W());)if(I!==s)if(I!==c){if(I===f&&0===--e){F=!0;break}}else e++;else B=U.backslashes=!0,W();continue}break}}if(I===t){if(w===t&&(L=U.isGlobstar=!0),M=U.isGlob=!0,F=!0,!0===S)continue;break}if(I===h){if(M=U.isGlob=!0,F=!0,!0===S)continue;break}if(I===u){for(;!0!==G()&&(e=W());)if(e!==s){if(e===m){O=U.isBracket=!0,M=U.isGlob=!0,F=!0;break}}else B=U.backslashes=!0,W();if(!0===S)continue;break}if(!0===x.nonegate||I!==o||k!==C){if(!0!==x.noparen&&I===c){if(M=U.isGlob=!0,!0===S){let e=1;for(;!0!==G()&&(I=W());)if(I!==s)if(I!==c){if(I===f&&0===--e){F=!0;break}}else e++;else B=U.backslashes=!0,W();continue}break}if(!0===M){if(F=!0,!0===S)continue;break}}else z=U.negated=!0,C++}else{if($.push(k),v.push(U),U={value:"",depth:0,isGlob:!1},!0===F)continue;if(w===r&&k===C+1){C+=2;continue}R=k+1}}else B=U.backslashes=!0,I=W(),I===l&&(T=!0)}!0===x.noext&&(_=!1,M=!1);let q=N,K="",X="";C>0&&(K=N.slice(0,C),N=N.slice(C),R-=C),q&&!0===M&&R>0?(q=N.slice(0,R),X=N.slice(R)):!0===M?(q="",X=N):q=N,q&&""!==q&&"/"!==q&&q!==N&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===x.unescape&&(X&&(X=e.removeBackslashes(X)),q&&!0===B&&(q=e.removeBackslashes(q)));const J={prefix:K,input:b,start:C,base:q,glob:X,isBrace:D,isBracket:O,isGlob:M,isExtglob:_,isGlobstar:L,negated:z,negatedExtglob:V};if(!0===x.tokens&&(J.maxDepth=0,g(I)||v.push(U),J.tokens=v),!0===x.parts||!0===x.tokens){let e;for(let t=0;t<$.length;t++){const n=void 0!==e?e+1:C,s=$[t],i=b.slice(n,s);x.tokens&&(0===t&&0!==C?(v[t].isPrefix=!0,v[t].value=K):v[t].value=i,y(v[t]),J.maxDepth+=v[t].depth),s>=C&&(P.push(i),e=s)}const t=void 0!==e?e+1:C,n=b.slice(t);P.push(n),x.tokens&&e&&e+1<b.length&&(v[v.length-1].value=n,y(v[v.length-1]),J.maxDepth+=v[v.length-1].depth),J.slashes=$,J.parts=P}return J},Jo}function la(){if(Qo)return Zo;Qo=1;const e=ra(),t=oa(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:o}=e,a=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();return`[${e.join("-")}]`},l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,c=e=>{const t=[];let n=0,s=0,i=0,r="",o=!1;for(const a of e)if(!0!==o)if("\\"!==a)if('"'!==a){if(0===i)if("["===a)n++;else if("]"===a&&n>0)n--;else if(0===n)if("("===a)s++;else if(")"===a&&s>0)s--;else if("|"===a&&0===s){t.push(r),r="";continue}r+=a}else i=1===i?0:1,r+=a;else r+=a,o=!0;else r+=a,o=!1;return t.push(r),t},u=e=>{let t=e.trim(),n=!0;for(;!0===n;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if((e=>{let t=!1;for(const n of e)if(!0!==t)if("\\"!==n){if(/[?*+@!()[\]{}]/.test(n))return!1}else t=!0;else t=!1;return!0})(t))return t.replace(/\\(.)/g,"$1")},d=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let n=0,s=0,i=0,r=!1;for(let o=1;o<e.length;o++){const a=e[o];if(!0!==r)if("\\"!==a)if('"'!==a){if(1!==i)if("["!==a){if("]"===a&&n>0)n--;else if(!(n>0))if("("!==a){if(")"===a&&(s--,0===s)){if(!0===t&&o!==e.length-1)return;return{type:e[0],body:e.slice(2,o),end:o}}}else s++}else n++}else i=1===i?0:1;else r=!0;else r=!1}},h=e=>`${1===e.length?t.escapeRegex(e[0]):`[${e.map(e=>t.escapeRegex(e)).join("")}]`}*`,p=e=>{let t=0;const n=[];for(;t<e.length;){const s=d(e.slice(t),!1);if(!s||"*"!==s.type)return;const i=c(s.body).map(e=>e.trim());if(1!==i.length)return;const r=u(i[0]);if(!r||1!==r.length)return;n.push(r),t+=s.end+1}if(!(n.length<1))return n},f=e=>{let t=0,n=e.trim(),s=d(n);for(;s;)t++,n=s.body.trim(),s=d(n);return t},m=(t,n)=>{if(!1===n.maxExtglobRecursion)return{risky:!1};const s="number"==typeof n.maxExtglobRecursion?n.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,i=c(t).map(e=>e.trim());if(i.length>1&&(i.some(e=>""===e)||i.some(e=>/^[*?]+$/.test(e))||(e=>{const t=e.map(u).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){const s=t[e],i=t[n],r=s[0];if(r&&s===r.repeat(s.length)&&i===r.repeat(i.length)&&(s===i||s.startsWith(i)||i.startsWith(s)))return!0}return!1})(i)))return{risky:!0};const r=[];let o=!1,a=!0;for(const e of i){const t=p(e);if(t){o=!0,r.push(...t);continue}const n=u(e);if(n&&1===n.length)r.push(n);else if(a=!1,f(e)>s)return{risky:!0}}return o?a?{risky:!0,safeOutput:h([...new Set(r)])}:{risky:!0}:{risky:!1}},g=(c,u)=>{if("string"!=typeof c)throw new TypeError("Expected a string");c=o[c]||c;const d={...u},h="number"==typeof d.maxLength?Math.min(n,d.maxLength):n;let p=c.length;if(p>h)throw new SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${h}`);const f={type:"bos",value:"",output:d.prepend||""},y=[f],b=d.capture?"":"?:",E=e.globChars(d.windows),x=e.extglobChars(E),{DOT_LITERAL:A,PLUS_LITERAL:S,SLASH_LITERAL:$,ONE_CHAR:v,DOTS_SLASH:P,NO_DOT:w,NO_DOT_SLASH:I,NO_DOTS_SLASH:N,QMARK:k,QMARK_NO_DOT:C,STAR:R,START_ANCHOR:D}=E,O=e=>`(${b}(?:(?!${D}${e.dot?P:A}).)*?)`,M=d.dot?"":w,_=d.dot?k:C;let L=!0===d.bash?O(d):R;d.capture&&(L=`(${L})`),"boolean"==typeof d.noext&&(d.noextglob=d.noext);const T={input:c,index:-1,start:0,dot:!0===d.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};c=t.removePrefix(c,T),p=c.length;const B=[],z=[],V=[];let F,j=f;const U=()=>T.index===p-1,G=T.peek=(e=1)=>c[T.index+e],H=T.advance=()=>c[++T.index]||"",W=()=>c.slice(T.index+1),q=(e="",t=0)=>{T.consumed+=e,T.index+=t},K=e=>{T.output+=null!=e.output?e.output:e.value,q(e.value)},X=()=>{let e=1;for(;"!"===G()&&("("!==G(2)||"?"===G(3));)H(),T.start++,e++;return e%2!=0&&(T.negated=!0,T.start++,!0)},J=e=>{T[e]++,V.push(e)},Y=e=>{T[e]--,V.pop()},Z=e=>{if("globstar"===j.type){const t=T.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||B.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(T.output=T.output.slice(0,-j.output.length),j.type="star",j.value="*",j.output=L,T.output+=j.output)}if(B.length&&"paren"!==e.type&&(B[B.length-1].inner+=e.value),(e.value||e.output)&&K(e),j&&"text"===j.type&&"text"===e.type)return j.output=(j.output||j.value)+e.value,void(j.value+=e.value);e.prev=j,y.push(e),j=e},Q=(e,t)=>{const n={...x[t],conditions:1,inner:""};n.prev=j,n.parens=T.parens,n.output=T.output,n.startIndex=T.index,n.tokensIndex=y.length;const s=(d.capture?"(":"")+n.open;J("parens"),Z({type:e,value:t,output:T.output?"":v}),Z({type:"paren",extglob:!0,value:H(),output:s}),B.push(n)},ee=e=>{const n=c.slice(e.startIndex,T.index+1),s=c.slice(e.startIndex+2,T.index),i=m(s,d);if(("plus"===e.type||"star"===e.type)&&i.risky){const s=i.safeOutput?(e.output?"":v)+(d.capture?`(${i.safeOutput})`:i.safeOutput):void 0,r=y[e.tokensIndex];r.type="text",r.value=n,r.output=s||t.escapeRegex(n);for(let t=e.tokensIndex+1;t<y.length;t++)y[t].value="",y[t].output="",delete y[t].suffix;return T.output=e.output+r.output,T.backtrack=!0,Z({type:"paren",extglob:!0,value:F,output:""}),void Y("parens")}let r,o=e.close+(d.capture?")":"");if("negate"===e.type){let t=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(t=O(d)),(t!==L||U()||/^\)+$/.test(W()))&&(o=e.close=`)$))${t}`),e.inner.includes("*")&&(r=W())&&/^\.[^\\/.]+$/.test(r)){const n=g(r,{...u,fastpaths:!1}).output;o=e.close=`)${n})${t})`}"bos"===e.prev.type&&(T.negatedExtglob=!0)}Z({type:"paren",extglob:!0,value:F,output:o}),Y("parens")};if(!1!==d.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(c)){let e=!1,n=c.replace(r,(t,n,s,i,r,o)=>"\\"===i?(e=!0,t):"?"===i?n?n+i+(r?k.repeat(r.length):""):0===o?_+(r?k.repeat(r.length):""):k.repeat(s.length):"."===i?A.repeat(s.length):"*"===i?n?n+i+(r?L:""):L:n?t:`\\${t}`);return!0===e&&(n=!0===d.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===c&&!0===d.contains?(T.output=c,T):(T.output=t.wrapOutput(n,T,u),T)}for(;!U();){if(F=H(),"\0"===F)continue;if("\\"===F){const e=G();if("/"===e&&!0!==d.bash)continue;if("."===e||";"===e)continue;if(!e){F+="\\",Z({type:"text",value:F});continue}const t=/^\\+/.exec(W());let n=0;if(t&&t[0].length>2&&(n=t[0].length,T.index+=n,n%2!=0&&(F+="\\")),!0===d.unescape?F=H():F+=H(),0===T.brackets){Z({type:"text",value:F});continue}}if(T.brackets>0&&("]"!==F||"["===j.value||"[^"===j.value)){if(!1!==d.posix&&":"===F){const e=j.value.slice(1);if(e.includes("[")&&(j.posix=!0,e.includes(":"))){const e=j.value.lastIndexOf("["),t=j.value.slice(0,e),n=j.value.slice(e+2),i=s[n];if(i){j.value=t+i,T.backtrack=!0,H(),f.output||1!==y.indexOf(j)||(f.output=v);continue}}}("["===F&&":"!==G()||"-"===F&&"]"===G())&&(F=`\\${F}`),"]"!==F||"["!==j.value&&"[^"!==j.value||(F=`\\${F}`),!0===d.posix&&"!"===F&&"["===j.value&&(F="^"),j.value+=F,K({value:F});continue}if(1===T.quotes&&'"'!==F){F=t.escapeRegex(F),j.value+=F,K({value:F});continue}if('"'===F){T.quotes=1===T.quotes?0:1,!0===d.keepQuotes&&Z({type:"text",value:F});continue}if("("===F){J("parens"),Z({type:"paren",value:F});continue}if(")"===F){if(0===T.parens&&!0===d.strictBrackets)throw new SyntaxError(l("opening","("));const e=B[B.length-1];if(e&&T.parens===e.parens+1){ee(B.pop());continue}Z({type:"paren",value:F,output:T.parens?")":"\\)"}),Y("parens");continue}if("["===F){if(!0!==d.nobracket&&W().includes("]"))J("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw new SyntaxError(l("closing","]"));F=`\\${F}`}Z({type:"bracket",value:F});continue}if("]"===F){if(!0===d.nobracket||j&&"bracket"===j.type&&1===j.value.length){Z({type:"text",value:F,output:`\\${F}`});continue}if(0===T.brackets){if(!0===d.strictBrackets)throw new SyntaxError(l("opening","["));Z({type:"text",value:F,output:`\\${F}`});continue}Y("brackets");const e=j.value.slice(1);if(!0===j.posix||"^"!==e[0]||e.includes("/")||(F=`/${F}`),j.value+=F,K({value:F}),!1===d.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(j.value);if(T.output=T.output.slice(0,-j.value.length),!0===d.literalBrackets){T.output+=n,j.value=n;continue}j.value=`(${b}${n}|${j.value})`,T.output+=j.value;continue}if("{"===F&&!0!==d.nobrace){J("braces");const e={type:"brace",value:F,output:"(",outputIndex:T.output.length,tokensIndex:T.tokens.length};z.push(e),Z(e);continue}if("}"===F){const e=z[z.length-1];if(!0===d.nobrace||!e){Z({type:"text",value:F,output:F});continue}let t=")";if(!0===e.dots){const e=y.slice(),n=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,d),T.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=T.output.slice(0,e.outputIndex),s=T.tokens.slice(e.tokensIndex);e.value=e.output="\\{",F=t="\\}",T.output=n;for(const e of s)T.output+=e.output||e.value}Z({type:"brace",value:F,output:t}),Y("braces"),z.pop();continue}if("|"===F){B.length>0&&B[B.length-1].conditions++,Z({type:"text",value:F});continue}if(","===F){let e=F;const t=z[z.length-1];t&&"braces"===V[V.length-1]&&(t.comma=!0,e="|"),Z({type:"comma",value:F,output:e});continue}if("/"===F){if("dot"===j.type&&T.index===T.start+1){T.start=T.index+1,T.consumed="",T.output="",y.pop(),j=f;continue}Z({type:"slash",value:F,output:$});continue}if("."===F){if(T.braces>0&&"dot"===j.type){"."===j.value&&(j.output=A);const e=z[z.length-1];j.type="dots",j.output+=F,j.value+=F,e.dots=!0;continue}if(T.braces+T.parens===0&&"bos"!==j.type&&"slash"!==j.type){Z({type:"text",value:F,output:A});continue}Z({type:"dot",value:F,output:A});continue}if("?"===F){if(!(j&&"("===j.value)&&!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Q("qmark",F);continue}if(j&&"paren"===j.type){const e=G();let t=F;("("===j.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(W()))&&(t=`\\${F}`),Z({type:"text",value:F,output:t});continue}if(!0!==d.dot&&("slash"===j.type||"bos"===j.type)){Z({type:"qmark",value:F,output:C});continue}Z({type:"qmark",value:F,output:k});continue}if("!"===F){if(!0!==d.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){Q("negate",F);continue}if(!0!==d.nonegate&&0===T.index){X();continue}}if("+"===F){if(!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Q("plus",F);continue}if(j&&"("===j.value||!1===d.regex){Z({type:"plus",value:F,output:S});continue}if(j&&("bracket"===j.type||"paren"===j.type||"brace"===j.type)||T.parens>0){Z({type:"plus",value:F});continue}Z({type:"plus",value:S});continue}if("@"===F){if(!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Z({type:"at",extglob:!0,value:F,output:""});continue}Z({type:"text",value:F});continue}if("*"!==F){"$"!==F&&"^"!==F||(F=`\\${F}`);const e=i.exec(W());e&&(F+=e[0],T.index+=e[0].length),Z({type:"text",value:F});continue}if(j&&("globstar"===j.type||!0===j.star)){j.type="star",j.star=!0,j.value+=F,j.output=L,T.backtrack=!0,T.globstar=!0,q(F);continue}let e=W();if(!0!==d.noextglob&&/^\([^?]/.test(e)){Q("star",F);continue}if("star"===j.type){if(!0===d.noglobstar){q(F);continue}const t=j.prev,n=t.prev,s="slash"===t.type||"bos"===t.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===d.bash&&(!s||e[0]&&"/"!==e[0])){Z({type:"star",value:F,output:""});continue}const r=T.braces>0&&("comma"===t.type||"brace"===t.type),o=B.length&&("pipe"===t.type||"paren"===t.type);if(!s&&"paren"!==t.type&&!r&&!o){Z({type:"star",value:F,output:""});continue}for(;"/**"===e.slice(0,3);){const t=c[T.index+4];if(t&&"/"!==t)break;e=e.slice(3),q("/**",3)}const a=U()||T.parens>0&&e===")".repeat(T.parens)&&!B.some(e=>"negate"===e.type);if("bos"===t.type&&U()){j.type="globstar",j.value+=F,j.output=O(d),T.output=j.output,T.globstar=!0,q(F);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!i&&a){T.output=T.output.slice(0,-(t.output+j.output).length),t.output=`(?:${t.output}`,j.type="globstar",j.output=O(d)+(d.strictSlashes?")":"|$)"),j.value+=F,T.globstar=!0,T.output+=t.output+j.output,q(F);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";T.output=T.output.slice(0,-(t.output+j.output).length),t.output=`(?:${t.output}`,j.type="globstar",j.output=`${O(d)}${$}|${$}${n})`,j.value+=F,T.output+=t.output+j.output,T.globstar=!0,q(F+H()),Z({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){j.type="globstar",j.value+=F,j.output=`(?:^|${$}|${O(d)}${$})`,T.output=j.output,T.globstar=!0,q(F+H()),Z({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-j.output.length),j.type="globstar",j.output=O(d),j.value+=F,T.output+=j.output,T.globstar=!0,q(F);continue}const n={type:"star",value:F,output:L};!0!==d.bash?!j||"bracket"!==j.type&&"paren"!==j.type||!0!==d.regex?(T.index!==T.start&&"slash"!==j.type&&"dot"!==j.type||("dot"===j.type?(T.output+=I,j.output+=I):!0===d.dot?(T.output+=N,j.output+=N):(T.output+=M,j.output+=M),"*"!==G()&&(T.output+=v,j.output+=v)),Z(n)):(n.output=F,Z(n)):(n.output=".*?","bos"!==j.type&&"slash"!==j.type||(n.output=M+n.output),Z(n))}for(;T.brackets>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing","]"));T.output=t.escapeLast(T.output,"["),Y("brackets")}for(;T.parens>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing",")"));T.output=t.escapeLast(T.output,"("),Y("parens")}for(;T.braces>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing","}"));T.output=t.escapeLast(T.output,"{"),Y("braces")}if(!0===d.strictSlashes||"star"!==j.type&&"bracket"!==j.type||Z({type:"maybe_slash",value:"",output:`${$}?`}),!0===T.backtrack){T.output="";for(const e of T.tokens)T.output+=null!=e.output?e.output:e.value,e.suffix&&(T.output+=e.suffix)}return T};return g.fastpaths=(s,i)=>{const r={...i},a="number"==typeof r.maxLength?Math.min(n,r.maxLength):n,l=s.length;if(l>a)throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${a}`);s=o[s]||s;const{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:p,NO_DOTS:f,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(r.windows),b=r.dot?f:p,E=r.dot?m:p,x=r.capture?"":"?:";let A=!0===r.bash?".*?":g;r.capture&&(A=`(${A})`);const S=e=>!0===e.noglobstar?A:`(${x}(?:(?!${y}${e.dot?h:c}).)*?)`,$=e=>{switch(e){case"*":return`${b}${d}${A}`;case".*":return`${c}${d}${A}`;case"*.*":return`${b}${A}${c}${d}${A}`;case"*/*":return`${b}${A}${u}${d}${E}${A}`;case"**":return b+S(r);case"**/*":return`(?:${b}${S(r)}${u})?${E}${d}${A}`;case"**/*.*":return`(?:${b}${S(r)}${u})?${E}${A}${c}${d}${A}`;case"**/.*":return`(?:${b}${S(r)}${u})?${c}${d}${A}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=$(t[1]);if(!n)return;return n+c+t[2]}}},v=t.removePrefix(s,{negated:!1,prefix:""});let P=$(v);return P&&!0!==r.strictSlashes&&(P+=`${u}?`),P},Zo=g}function ca(){if(ta)return ea;ta=1;const e=aa(),t=la(),n=oa(),s=ra(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const s=e.map(e=>i(e,t,n)),r=e=>{for(const t of s){const n=t(e);if(n)return n}return!1};return r}const s=(r=e)&&"object"==typeof r&&!Array.isArray(r)&&e.tokens&&e.input;var r;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},a=o.windows,l=s?i.compileRe(e,t):i.makeRe(e,t,!1,!0),c=l.state;delete l.state;let u=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};u=i(o.ignore,e,n)}const d=(n,s=!1)=>{const{isMatch:r,match:d,output:h}=i.test(n,l,t,{glob:e,posix:a}),p={glob:e,state:c,regex:l,posix:a,input:n,output:h,match:d,isMatch:r};return"function"==typeof o.onResult&&o.onResult(p),!1===r?(p.isMatch=!1,!!s&&p):u(n)?("function"==typeof o.onIgnore&&o.onIgnore(p),p.isMatch=!1,!!s&&p):("function"==typeof o.onMatch&&o.onMatch(p),!s||p)};return n&&(d.state=c),d};return i.test=(e,t,s,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=s||{},l=a.format||(o?n.toPosixSlashes:null);let c=e===r,u=c&&l?l(e):e;return!1===c&&(u=l?l(e):e,c=u===r),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,s,o):t.exec(u)),{isMatch:Boolean(c),match:c,output:u}},i.matchBase=(e,t,s,r=s&&s.windows)=>(t instanceof RegExp?t:i.makeRe(t,s)).test(n.basename(e,{windows:r})),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,n)=>Array.isArray(e)?e.map(e=>i.parse(e,n)):t(e,{...n,fastpaths:!1}),i.scan=(t,n)=>e(t,n),i.compileRe=(e,t,n=!1,s=!1)=>{if(!0===n)return e.output;const r=t||{},o=r.contains?"":"^",a=r.contains?"":"$";let l=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);const c=i.toRegex(l,t);return!0===s&&(c.state=e),c},i.makeRe=(e,n={},s=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=t.fastpaths(e,n)),o.output||(o=t(e,n)),i.compileRe(o,n,s,r)},i.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=s,ea=i}function ua(){if(sa)return na;sa=1;const e=ca(),t=oa();function n(n,s,i=!1){return!s||null!==s.windows&&void 0!==s.windows||(s={...s,windows:t.isWindows()}),e(n,s,i)}return Object.assign(n,e),na=n}var da=Wo(ua());const ha={ArrayPattern(e,t){for(const n of t.elements)n&&ha[n.type](e,n)},AssignmentPattern(e,t){ha[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?ha.RestElement(e,n):ha[n.value.type](e,n.value)},RestElement(e,t){ha[t.argument.type](e,t.argument)}},pa=function(e){const t=[];return ha[e.type](t,e),t};function fa(e,t,n){try{const o=Ra.__wbindgen_add_to_stack_pointer(-16),a=wa(e,Ra.__wbindgen_export2,Ra.__wbindgen_export3),l=Da;Ra.parse(o,a,l,t,n);var s=Ea().getInt32(o+0,!0),i=Ea().getInt32(o+4,!0),r=ya(s,i).slice();return Ra.__wbindgen_export(s,1*i,1),r}finally{Ra.__wbindgen_add_to_stack_pointer(16)}}function ma(){return{__proto__:null,"./bindings_wasm_bg.js":{__proto__:null,__wbg___wbindgen_throw_5d9e815e6fdf150f:function(e,t){throw new Error(xa(e,t))},__wbg_error_757e9472f8410341:function(e,t){let n,s;try{n=e,s=t,console.error(xa(e,t))}finally{Ra.__wbindgen_export(n,s,1)}},__wbg_length_31bdaf014f5fbde2:function(e){return $a(e).length},__wbg_new_227d7c05414eb861:function(){return ga(new Error)},__wbg_prototypesetcall_ae9f5e7459250748:function(e,t,n){Uint8Array.prototype.set.call(ya(e,t),$a(n))},__wbg_stack_3b0d974bbf31e44f:function(e,t){const n=wa($a(t).stack,Ra.__wbindgen_export2,Ra.__wbindgen_export3),s=Da;Ea().setInt32(e+4,s,!0),Ea().setInt32(e+0,n,!0)},__wbindgen_object_drop_ref:function(e){!function(e){const t=$a(e);(function(e){if(e<1028)return;va[e]=Pa,Pa=e})(e)}(e)}}}}function ga(e){Pa===va.length&&va.push(va.length+1);const t=Pa;return Pa=va[t],va[t]=e,t}function ya(e,t){return e>>>=0,Sa().subarray(e/1,e/1+t)}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("");let ba=null;function Ea(){return(null===ba||!0===ba.buffer.detached||void 0===ba.buffer.detached&&ba.buffer!==Ra.memory.buffer)&&(ba=new DataView(Ra.memory.buffer)),ba}function xa(e,t){return function(e,t){ka+=t,ka>=Na&&(Ia=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Ia.decode(),ka=t);return Ia.decode(Sa().subarray(e,e+t))}(e>>>0,t)}let Aa=null;function Sa(){return null!==Aa&&0!==Aa.byteLength||(Aa=new Uint8Array(Ra.memory.buffer)),Aa}function $a(e){return va[e]}let va=new Array(1024).fill(void 0);va.push(void 0,null,!0,!1);let Pa=va.length;function wa(e,t,n){if(void 0===n){const n=Ca.encode(e),s=t(n.length,1)>>>0;return Sa().subarray(s,s+n.length).set(n),Da=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=Sa();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=Sa().subarray(i+o,i+s);o+=Ca.encodeInto(e,t).written,i=n(i,s,o,1)>>>0}return Da=o,i}let Ia=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Ia.decode();const Na=2146435072;let ka=0;const Ca=new TextEncoder;"encodeInto"in Ca||(Ca.encodeInto=function(e,t){const n=Ca.encode(e);return t.set(n),{read:e.length,written:n.length}});let Ra,Da=0;async function Oa(e){if(void 0!==Ra)return Ra;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===e&&(e=new URL("bindings_wasm_bg.wasm",import.meta.url));const t=ma();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:n}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if(!e.ok)throw new Error(`failed to fetch Wasm: ${e.status} ${e.statusText} fetching '${e.url}'`);if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!function(e){switch(e){case"basic":case"cors":case"default":return!0}return!1}(e.type)||"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,t);return function(e){return Ra=e.exports,ba=null,Aa=null,Ra}(n)}const Ma=[function(e,t){return{type:"PanicError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ParseError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ArrayExpression",start:t[e],end:t[e+1],elements:La(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:La(t[e+2],t)}},function(e,t){const n=t[e+2],s=ss(t[e+3],t);return{type:"ArrowFunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),expression:!(2&~n),generator:!(4&~n),...s.length>0?{[ts]:s}:{},params:La(t[e+4],t),body:_a(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:es[t[e+2]],left:_a(t[e+3],t),right:_a(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:_a(t[e+2],t),right:_a(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:_a(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:es[t[e+2]],left:_a(t[e+3],t),right:_a(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:La(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"BreakStatement",start:t[e],end:t[e+1],label:0===n?null:_a(n,t)}},function(e,t){const n=t[e+2],s=ss(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{[ts]:s}:{},callee:_a(t[e+4],t),arguments:La(t[e+5],t)}},function(e,t){const n=t[e+2];return{type:"CatchClause",start:t[e],end:t[e+1],param:0===n?null:_a(n,t),body:_a(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:_a(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:La(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassDeclaration",start:t[e],end:t[e+1],decorators:La(t[e+2],t),id:0===n?null:_a(n,t),superClass:0===s?null:_a(s,t),body:_a(t[e+5],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassExpression",start:t[e],end:t[e+1],decorators:La(t[e+2],t),id:0===n?null:_a(n,t),superClass:0===s?null:_a(s,t),body:_a(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:_a(t[e+2],t),consequent:_a(t[e+3],t),alternate:_a(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ContinueStatement",start:t[e],end:t[e+1],label:0===n?null:_a(n,t)}},function(e,t){return{type:"DebuggerStatement",start:t[e],end:t[e+1]}},function(e,t){return{type:"Decorator",start:t[e],end:t[e+1],expression:_a(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:_a(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:_a(t[e+2],t),test:_a(t[e+3],t)}},function(e,t){return{type:"EmptyStatement",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"ExportAllDeclaration",start:t[e],end:t[e+1],exported:0===n?null:_a(n,t),source:_a(t[e+3],t),attributes:La(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:_a(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+5];return{type:"ExportNamedDeclaration",start:t[e],end:t[e+1],specifiers:La(t[e+2],t),source:0===n?null:_a(n,t),attributes:La(t[e+4],t),declaration:0===s?null:_a(s,t)}},function(e,t){const n=_a(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:_a(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:_a(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:_a(t[e+2],t),right:_a(t[e+3],t),body:_a(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ForOfStatement",start:t[e],end:t[e+1],await:!(1&~n),left:_a(t[e+3],t),right:_a(t[e+4],t),body:_a(t[e+5],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=t[e+4];return{type:"ForStatement",start:t[e],end:t[e+1],init:0===n?null:_a(n,t),test:0===s?null:_a(s,t),update:0===i?null:_a(i,t),body:_a(t[e+5],t)}},function(e,t){const n=t[e+2],s=ss(t[e+3],t),i=t[e+4];return{type:"FunctionDeclaration",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[ts]:s}:{},id:0===i?null:_a(i,t),params:La(t[e+5],t),body:_a(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=ss(t[e+3],t),i=t[e+4];return{type:"FunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[ts]:s}:{},id:0===i?null:_a(i,t),params:La(t[e+5],t),body:_a(t[e+6],t),expression:!1}},function(e,t){return{type:"Identifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=t[e+4];return{type:"IfStatement",start:t[e],end:t[e+1],test:_a(t[e+2],t),consequent:_a(t[e+3],t),alternate:0===n?null:_a(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:_a(t[e+2],t),value:_a(t[e+3],t)}},function(e,t){const n=t[e+5];return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:La(t[e+2],t),source:_a(t[e+3],t),attributes:La(t[e+4],t),...0===n?{}:{phase:es[n]}}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:_a(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ImportExpression",start:t[e],end:t[e+1],source:_a(t[e+2],t),options:0===n?null:_a(n,t),...0===s?{}:{phase:es[s]}}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:_a(t[e+2],t)}},function(e,t){const n=t[e+2],s=_a(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:_a(n,t),local:s}},function(e,t){const n=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:_a(t[e+2],t),value:0===n?null:_a(n,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:_a(t[e+2],t)}},function(e,t){return{type:"JSXClosingFragment",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+4];return{type:"JSXElement",start:t[e],end:t[e+1],openingElement:_a(t[e+2],t),children:La(t[e+3],t),closingElement:0===n?null:_a(n,t)}},function(e,t){return{type:"JSXEmptyExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"JSXExpressionContainer",start:t[e],end:t[e+1],expression:_a(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:_a(t[e+2],t),children:La(t[e+3],t),closingFragment:_a(t[e+4],t)}},function(e,t){return{type:"JSXIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){return{type:"JSXMemberExpression",start:t[e],end:t[e+1],object:_a(t[e+2],t),property:_a(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:_a(t[e+2],t),name:_a(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"JSXOpeningElement",start:t[e],end:t[e+1],selfClosing:!(1&~n),name:_a(t[e+3],t),attributes:La(t[e+4],t)}},function(e,t){return{type:"JSXOpeningFragment",start:t[e],end:t[e+1],attributes:[],selfClosing:!1}},function(e,t){return{type:"JSXSpreadAttribute",start:t[e],end:t[e+1],argument:_a(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:_a(t[e+2],t)}},function(e,t){return{type:"JSXText",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:t.convertString(t[e+3])}},function(e,t){return{type:"LabeledStatement",start:t[e],end:t[e+1],label:_a(t[e+2],t),body:_a(t[e+3],t)}},function(e,t){const n=t.convertString(t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],bigint:n,raw:t.convertString(t[e+3]),value:BigInt(n)}},function(e,t){const n=!(1&~t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],value:n,raw:n?"true":"false"}},function(e,t){return{type:"Literal",start:t[e],end:t[e+1],raw:"null",value:null}},function(e,t){const n=t[e+2];return{type:"Literal",start:t[e],end:t[e+1],raw:0===n?void 0:t.convertString(n),value:new DataView(t.buffer).getFloat64(e+3<<2,!0)}},function(e,t){const n=t.convertString(t[e+2]),s=t.convertString(t[e+3]);return{type:"Literal",start:t[e],end:t[e+1],raw:`/${s}/${n}`,regex:{flags:n,pattern:s},value:new RegExp(s,n)}},function(e,t){const n=t[e+3];return{type:"Literal",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:0===n?void 0:t.convertString(n)}},function(e,t){return{type:"LogicalExpression",start:t[e],end:t[e+1],operator:es[t[e+2]],left:_a(t[e+3],t),right:_a(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"MemberExpression",start:t[e],end:t[e+1],computed:!(1&~n),optional:!(2&~n),object:_a(t[e+3],t),property:_a(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:_a(t[e+2],t),property:_a(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"MethodDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:La(t[e+3],t),key:_a(t[e+4],t),value:_a(t[e+5],t),kind:es[t[e+6]]}},function(e,t){const n=ss(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{[ts]:n}:{},callee:_a(t[e+3],t),arguments:La(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:La(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:La(t[e+2],t)}},function(e,t){return{type:"PrivateIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=ss(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:La(t[e+2],t),...n.length>0?{[ns]:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=_a(t[e+4],t);return{type:"Property",start:t[e],end:t[e+1],method:!(1&~n),shorthand:!(2&~n),computed:!(4&~n),key:0===s?{...i}:_a(s,t),value:i,kind:es[t[e+5]]}},function(e,t){const n=t[e+2],s=t[e+5];return{type:"PropertyDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:La(t[e+3],t),key:_a(t[e+4],t),value:0===s?null:_a(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:_a(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"ReturnStatement",start:t[e],end:t[e+1],argument:0===n?null:_a(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:La(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:_a(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:La(t[e+2],t)}},function(e,t){return{type:"Super",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"SwitchCase",start:t[e],end:t[e+1],test:0===n?null:_a(n,t),consequent:La(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:_a(t[e+2],t),cases:La(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:_a(t[e+2],t),quasi:_a(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=0===s?null:t.convertString(s),r=t.convertString(t[e+4]);return{type:"TemplateElement",start:t[e],end:t[e+1],tail:!(1&~n),value:{cooked:i,raw:r}}},function(e,t){return{type:"TemplateLiteral",start:t[e],end:t[e+1],quasis:La(t[e+2],t),expressions:La(t[e+3],t)}},function(e,t){return{type:"ThisExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"ThrowStatement",start:t[e],end:t[e+1],argument:_a(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"TryStatement",start:t[e],end:t[e+1],block:_a(t[e+2],t),handler:0===n?null:_a(n,t),finalizer:0===s?null:_a(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:es[t[e+2]],argument:_a(t[e+3],t),prefix:!0}},function(e,t){const n=t[e+2];return{type:"UpdateExpression",start:t[e],end:t[e+1],prefix:!(1&~n),operator:es[t[e+3]],argument:_a(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:es[t[e+2]],declarations:La(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:_a(t[e+2],t),init:0===n?null:_a(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:_a(t[e+2],t),body:_a(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3];return{type:"YieldExpression",start:t[e],end:t[e+1],delegate:!(1&~n),argument:0===s?null:_a(s,t)}}];function _a(e,t){const n=t[e],s=Ma[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function La(e,t){if(0===e)return pe;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++){const n=t[e++];s[i]=n?_a(n,t):null}return s}function Ta(e){const t=new Uint32Array(e.buffer);let n;if("undefined"!=typeof Buffer&&e instanceof Buffer)n=n=>{const s=t[n++],i=n<<2;return e.toString("utf8",i,i+s)};else{const s=new TextDecoder;n=n=>{const i=t[n++],r=n<<2;return s.decode(e.subarray(r,r+i))}}return Object.assign(t,{convertString:n})}class Ba extends ls{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e,t,n){const s=[],i=za(t);for(const t of this.elements)null!==t&&s.push(...t.declare(e,i,n));return s}deoptimizeAssignment(e,t){const n=za(e);for(const e of this.elements)e?.deoptimizeAssignment(n,t)}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(Ce)}hasEffectsWhenDestructuring(e,t,n){const s=za(t);for(const t of this.elements)if(t?.hasEffectsWhenDestructuring(e,s,n))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(Ce,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){let s=!1;const i=za(t);for(const t of[...this.elements].reverse())t&&(s&&!t.included&&t.includeNode(e),s=t.includeDestructuredIfNecessary(e,i,n)||s);return!this.included&&s&&this.includeNode(e),this.included}render(e,t){let n=this.start+1;for(const s of this.elements)if(s){if(!s.included){e.remove(n,this.end-1);break}s.render(e,t),n=s.end}}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}Ba.prototype.includeNode=cs;const za=e=>e.at(-1)===be?e:[...e,xe];class Va extends ur{constructor(){super(...arguments),this.objectEntity=null}get expression(){return We(this.flags,8388608)}set expression(e){this.flags=qe(this.flags,8388608,e)}createScope(e){this.scope=new ir(e,!1)}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;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}onlyFunctionCallUsed(){return this.parent.type===at&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,t){super.include(e,t);for(const n of this.params)n instanceof Mi||n.include(e,t)}includeNode(e){this.included=!0,this.body.includePath(Re,e);for(const t of this.params)t instanceof Mi||t.includePath(Re,e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Fs([],Gs)}}class Fa extends ls{addExportedVariables(e,t){for(const n of this.properties)n.type===ht?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t,n){const s=[];for(const i of this.properties)s.push(...i.declare(e,t,n));return s}deoptimizeAssignment(e,t){for(const n of this.properties)n.deoptimizeAssignment(e,t)}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(Ce,t,n))return!0;return!1}hasEffectsWhenDestructuring(e,t,n){for(const s of this.properties)if(s.hasEffectsWhenDestructuring(e,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){if(!this.properties.length)return this.included;const s=this.properties.at(-1);let i=s.includeDestructuredIfNecessary(e,t,n);const r="RestElement"===s.type;for(const s of this.properties.slice(0,-1))r&&i&&!s.included&&s.includeNode(e),i=s.includeDestructuredIfNecessary(e,t,n)||i;return!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}render(e,t){if(this.properties.length>0){const n=oe(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):Y(i,e,o,a);s&&e.remove(s,this.end-1)}}}Fa.prototype.includeNode=us,Fa.prototype.applyDeoptimizations=ds;class ja extends ls{constructor(){super(...arguments),this.isConstReassignment=!1}hasEffects(e){const{deoptimized:t,isConstReassignment:n,left:s,operator:i,right:r}=this;return t||this.applyDeoptimizations(),n||r.hasEffects(e)||s.hasEffectsAsAssignmentTarget(e,"="!==i)||this.left.hasEffectsWhenDestructuring?.(e,Ce,r)}hasEffectsOnInteractionAtPath(e,t,n){return 1===t.type&&this.left.included||this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,isConstReassignment:s,left:i,right:r,operator:o}=this;n||this.applyDeoptimizations(),this.included||this.includeNode(e);const a=He();(t||s||"="!==o||i.included||i.hasEffectsAsAssignmentTarget(a,!1)||i.hasEffectsWhenDestructuring?.(a,Ce,r))&&i.includeAsAssignmentTarget(e,t,"="!==o),r.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Re,e)}initialise(){if(super.initialise(),this.left instanceof Mi){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&(this.isConstReassignment=!0,this.scope.context.log(Et,{code:"CONST_REASSIGN",message:"Cannot reassign a variable declared with `const`"},this.left.start))}this.left.setAssignedValue(this.right)}render(e,t,{preventASI:n,renderedParentType:s,renderedSurroundingElement:i}=de){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=te(e.original,Q(e.original,"=",r.end)+1);e.remove(a,l),n&&ae(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof Mi){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?ce(n,a,l,e,t):ue(n,a,l,c.type!==ct,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"],`${le(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===ct,e,t)}r.included&&r instanceof Fa&&(i===ct||i===ot)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(Ce,this.right),this.scope.context.requestTreeshakingPass()}}class Ua extends ls{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t,n){return this.left.declare(e,t,n)}deoptimizeAssignment(e,t){this.left.deoptimizeAssignment(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(Ce,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.left.hasEffectsWhenDestructuring(e,t,n)}includeDestructuredIfNecessary(e,t,n){let s=this.left.includeDestructuredIfNecessary(e,t,n)||this.included;return(s||=this.right.shouldBeIncluded(e))&&(this.right.include(e,!1),this.left.included||(this.left.includeNode(e),this.left.includeDestructuredIfNecessary(e,t,n))),!this.included&&s&&this.includeNode(e),this.included}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Re,e)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=de){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Ce),this.right.deoptimizePath(Re),this.scope.context.requestTreeshakingPass()}}class Ga extends ls{deoptimizePath(e){this.argument.deoptimizePath(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}initialise(){super.initialise();let e=this.parent;do{if(e instanceof dr||e instanceof Va)return}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(Ha,e)}includePath(e,t){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(t),this.argument.includePath(e,t)}}const Ha=["then"];function Wa(e){return void 0===e?"void 0":"boolean"==typeof e?String(e):"string"==typeof e?JSON.stringify(e):"number"==typeof e?function(e){if(Object.is(-0,e))return"-0";const t=e.toExponential(),[n,s]=t.split("e"),i=n.split(".")[1]?.length||0,r=`${n.replace(".","")}e${parseInt(s)-i}`,o=String(e).replace("+","");return r.length<o.length?r:o}(e):Ke}const qa={"!=":(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},Ka=Symbol("Unassigned");class Xa extends ls{constructor(){super(...arguments),this.renderedLiteralValue=Ka}deoptimizeCache(){this.renderedLiteralValue=Ke}getLiteralValueAtPath(e,t,n){if(e.length>0)return Ke;const s=this.left.getLiteralValueAtPath(Ce,t,n);if("symbol"==typeof s)return Ke;if("in"===this.operator&&this.right.variable instanceof go){const[e]=this.right.variable.context.traceExport(String(s));return e instanceof Vn||e instanceof bo?Ke:!!e}const i=this.right.getLiteralValueAtPath(Ce,t,n);if("symbol"==typeof i)return Ke;const r=qa[this.operator];return r?r(s,i):Ke}getRenderedLiteralValue(){return"in"===this.operator&&this.right.variable instanceof go?this.renderedLiteralValue!==Ka?this.renderedLiteralValue:this.renderedLiteralValue=Wa(this.getLiteralValueAtPath(Ce,Te,this)):Ke}hasEffects(e){return"+"===this.operator&&this.parent instanceof or&&""===this.left.getLiteralValueAtPath(Ce,Te,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(e,t,n){this.included||this.includeNode(e),"symbol"==typeof this.getRenderedLiteralValue()&&(this.left.include(e,t,n),this.right.include(e,t,n),"instanceof"===this.operator&&this.right.includePath(Me,e))}includeNode(e){this.included=!0,"in"===this.operator&&"symbol"==typeof this.getRenderedLiteralValue()&&this.right.includePath(Re,e)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=de){const s=this.getRenderedLiteralValue();"symbol"!=typeof s?e.overwrite(this.start,this.end,s):(this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t))}}Xa.prototype.applyDeoptimizations=ds;class Ja extends ls{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,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}}function Ya(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(Q(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(Q(e.original,"(",n.callee.end)+1,n.end-1)}}Ja.prototype.includeNode=us,Ja.prototype.applyDeoptimizations=ds;class Za extends ls{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!==Ze);if(0!==o.length)if(i===Ze)for(const e of o)e.deoptimizePath(Re);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]!==Ze){this.returnExpression=Qe;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=fe,this.deoptimizableDependentExpressions=pe;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(Re)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==Ze&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===Ze?Ke:t.withTrackedEntityAtPath(e,s,()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n)),Ke)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===Ze?i:n.withTrackedEntityAtPath(e,i,()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]},Qe)}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 Qa extends Za{get hasCheckedForWarnings(){return We(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=qe(this.flags,134217728,e)}get optional(){return We(this.flags,128)}set optional(e){this.flags=qe(this.flags,128,e)}bind(){super.bind(),this.interaction={args:[this.callee instanceof Jr&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return qr(this,this.callee,e,t,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Ce,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===as)return as;if(this.optional&&null==this.callee.getLiteralValueAtPath(Ce,Te,this))return!this.annotationPure&&t||as;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(Ce,this.interaction,e))}include(e,t){this.included||this.includeNode(e),t?(super.include(e,!0),t===os&&this.callee instanceof Mi&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.callee.include(e,!1),this.callee.includeCallArguments(this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations()}initialise(){super.initialise(),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t,{renderedSurroundingElement:n}=de){if(this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),Ya(e,t,this),this.callee instanceof Mi&&!this.hasCheckedForWarnings){this.hasCheckedForWarnings=!0;this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(Et,an(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(Et,{code:"EVAL",id:s=this.scope.context.module.id,message:`Use of eval in "${Pt(s)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:kt("troubleshooting/#avoiding-eval")},this.start)}var s}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ce,Te),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Te){return null===this.returnExpression?(this.returnExpression=Qe,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Ce,this.interaction,e,this)):this.returnExpression}}class el extends ls{createScope(e){this.scope=new sr(e,!0)}parseNode(e){const{body:t,param:n,type:s}=e;return this.type=s,n&&(this.param=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n),this.param.declare("parameter",Ce,Ze)),this.body=new ar(this,this.scope.bodyScope).parseNode(t),super.parseNode(e)}}el.prototype.preventChildBlockScope=!0,el.prototype.includeNode=cs;class tl extends ls{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===as?void 0:s}hasEffects(e){return!0===this.expression.hasEffectsAsChainElement(e)}includePath(e,t){this.included=!0,this.expression.includePath(e,t)}removeAnnotations(e){this.expression.removeAnnotations(e)}}tl.prototype.includeNode=us,tl.prototype.applyDeoptimizations=ds;class nl extends Bi{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new ki("this",null,t,Ce,n,"other")),this.instanceScope=new Bi(this,n),this.instanceScope.variables.set("this",new er(n))}findLexicalBoundary(){return this}}class sl extends ls{createScope(e){this.scope=new nl(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,Re,e);for(const n of this.body)n.include(e,t)}parseNode(e){const t=this.body=new Array(e.body.length);let n=0;for(const s of e.body)t[n++]=new(this.scope.context.getNodeConstructor(s.type))(this,s.static?this.scope:this.scope.instanceScope).parseNode(s);return super.parseNode(e)}}sl.prototype.includeNode=us,sl.prototype.applyDeoptimizations=ds;class il extends Hi{render(e,t,{renderedSurroundingElement:n}=de){super.render(e,t),n===ct&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}function rl(e){return"symbol"==typeof e?e!==Je&&(e===Xe||Ke):!!e}class ol extends Ye{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new ol(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}}class al extends ls{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return We(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=qe(this.flags,65536,e)}get hasDeoptimizedCache(){return We(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=qe(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(!this.hasDeoptimizedCache&&(this.hasDeoptimizedCache=!0,null!==this.usedBranch)){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(Re),this.included&&e.includePath(Re,Ge());const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=pe;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();if(!s){if(this.hasDeoptimizedCache)return Ke;const s=this.consequent.getLiteralValueAtPath(e,t,n),i=rl(s);if(i===Ke)return Ke;const r=this.alternate.getLiteralValueAtPath(e,t,n);return i!==rl(r)?Ke:(this.expressionsToBeDeoptimized.push(n),s!==r?i?Xe:Je:s)}return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new ol([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();null===n||t||this.test.shouldBeIncluded(e)?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();null===n||this.test.shouldBeIncluded(t)?(this.consequent.includePath(e,t),this.alternate.includePath(e,t)):n.includePath(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}=de){if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const o=this.getUsedBranch(),a=Q(e.original,":",this.consequent.end),l=te(e.original,(this.consequent.included?Q(e.original,"?",this.test.end):a)+1);s&&ae(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=rl(this.test.getLiteralValueAtPath(Ce,Te,this));return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}al.prototype.includeNode=us,al.prototype.applyDeoptimizations=ds;class ll extends ls{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,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}}ll.prototype.includeNode=us,ll.prototype.applyDeoptimizations=ds;class cl extends ls{hasEffects(){return!0}}cl.prototype.includeNode=cs;class ul extends ls{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(Ce,rt,e)}}function dl(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 hl(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}ul.prototype.includeNode=cs;class pl extends ls{hasEffects(e){return!!this.test.hasEffects(e)||dl(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),hl(e,this.body,t)}}pl.prototype.includeNode=us,pl.prototype.applyDeoptimizations=ds;class fl extends ls{hasEffects(){return!1}}fl.prototype.includeNode=cs;class ml extends ls{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}}ml.prototype.needsBoundaries=!0,ml.prototype.includeNode=us,ml.prototype.applyDeoptimizations=ds;class gl extends ls{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){super.initialise(),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration?.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n;if(null===this.declaration)e.remove(s,i);else{let n=this.declaration.start;if(this.declaration instanceof Wi){const e=this.declaration.decorators;for(const t of e)n=Math.min(n,t.start);n<=this.start&&(n=this.declaration.start)}e.remove(this.start,n),this.declaration.render(e,t,{end:i,start:s})}}}gl.prototype.needsBoundaries=!0,gl.prototype.includeNode=us,gl.prototype.applyDeoptimizations=ds;class yl extends ls{}yl.prototype.includeNode=us,yl.prototype.applyDeoptimizations=ds;class bl extends ls{createScope(e){this.scope=new ji(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||dl(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),hl(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Re,e)}initialise(){super.initialise(),this.left.setAssignedValue(Ze)}render(e,t){this.left.render(e,t,Z),this.right.render(e,t,Z),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(Ce),this.scope.context.requestTreeshakingPass()}}class El extends ls{get await(){return We(this.flags,131072)}set await(e){this.flags=qe(this.flags,131072,e)}createScope(e){this.scope=new ji(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||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),hl(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Re,e)}initialise(){super.initialise(),this.left.setAssignedValue(Ze)}render(e,t){this.left.render(e,t,Z),this.right.render(e,t,Z),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(Ce),this.right.deoptimizePath(Re),this.scope.context.requestTreeshakingPass()}}class xl extends ls{createScope(e){this.scope=new ji(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||dl(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),hl(e,this.body,t)}render(e,t){this.init?.render(e,t,Z),this.test?.render(e,t,Z),this.update?.render(e,t,Z),this.body.render(e,t)}}xl.prototype.includeNode=us,xl.prototype.applyDeoptimizations=ds;class Al extends dr{createScope(e){super.createScope(this.idScope=new Bi(e,e.context))}parseNode(e){return null!==e.id&&(this.id=new Mi(this,this.idScope).parseNode(e.id)),super.parseNode(e)}onlyFunctionCallUsed(){return this.parent.type===at&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=de){super.render(e,t),n===ct&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Sl extends ji{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s,i)}}const $l=Symbol("unset");class vl extends ls{constructor(){super(...arguments),this.testValue=$l}deoptimizeCache(){this.testValue=Ke}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){return this.consequent=new(this.scope.context.getNodeConstructor(e.consequent.type))(this,this.consequentScope=new Sl(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new Sl(this.scope)).parseNode(e.alternate)),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)}getTestValue(){return this.testValue===$l?this.testValue=rl(this.test.getLiteralValueAtPath(Ce,Te,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!==dt&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof vl&&e.alternate)return!0;if(e instanceof ar)return!1;e=e.parent}while(e);return!1}}vl.prototype.includeNode=us,vl.prototype.applyDeoptimizations=ds;class Pl extends ls{}class wl extends ls{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}}wl.prototype.needsBoundaries=!0,wl.prototype.includeNode=us,wl.prototype.applyDeoptimizations=ds;class Il extends ls{}Il.prototype.includeNode=us,Il.prototype.applyDeoptimizations=ds;class Nl{constructor(e){this.interaction={args:[null,e],type:2,withNew:!1}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){et(e),2===e.type&&0===t.length&&(ps(e.args[1])||hs(e.args[1]))&&e.args[1].deoptimizeArgumentsOnInteractionAtPath(this.interaction,[],n)}includeCallArguments(e,t){nt(e,t),2===e.type&&(ps(e.args[1])||hs(e.args[1]))&&e.args[1].includeCallArguments(this.interaction,t)}}class kl{deoptimizeArgumentsOnInteractionAtPath(e){et(e)}includeCallArguments(e,t){nt(e,t)}}function Cl(e){return{fileName:e.getFileName(),...e.getPreRenderedChunkInfo()}}class Rl extends ls{constructor(){super(...arguments),this.inlineNamespace=null,this.resolution=null,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.localResolution=null,this.resolutionString=null}get shouldIncludeDynamicAttributes(){return We(this.flags,268435456)}set shouldIncludeDynamicAttributes(e){this.flags=qe(this.flags,268435456,e)}bind(){const{options:e,parent:t,resolution:n,source:s}=this;if(s.bind(),e?.bind(),"object"!=typeof n||!n||!("namespace"in n))return;if(ys(t)||(i=t)instanceof ls&&"AwaitExpression"===i.type)return void(this.localResolution={resolution:n,tracked:!0});var i;if(!ms(t))return void(this.localResolution={resolution:n,tracked:!1});let r=t,o=this;for(;!r.computed&&r.object===o&&gs(r.property)&&fs(r.parent);){const e=r.property.name;if(o=r.parent,"then"===e){const e=o.arguments[0];if(void 0===e||ps(e)||hs(e))return r.promiseHandler=new Nl(yo(n.namespace)),void(this.localResolution={resolution:n,tracked:!0})}else if("catch"===e||"finally"===e){if(ms(o.parent)){r.promiseHandler=new kl,r=o.parent;continue}if(ys(o.parent))return r.promiseHandler=new kl,void(this.localResolution={resolution:n,tracked:!0})}break}this.localResolution={resolution:n,tracked:!1}}deoptimizePath(e){this.localResolution?.resolution?.namespace.deoptimizePath(e)}hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.source.include(e,t),this.shouldIncludeDynamicAttributes&&this.options?.include(e,t),t&&this.localResolution?.resolution.includeAllExports()}includeNode(e){this.included=!0;const{localResolution:t,scope:n,shouldIncludeDynamicAttributes:s}=this;s&&this.options?.includePath(Re,e),n.context.includeDynamicImport(this),n.addAccessedDynamicImport(this),t&&(t.tracked?t.resolution.includeModuleInExecution():t.resolution.includeAllExports())}includePath(e,t){this.included||this.includeNode(t),this.localResolution?.resolution?.namespace.includeMemberPath(e,t)}initialise(){super.initialise(),this.scope.context.addDynamicImport(this)}parseNode(e){return this.sourceAstNode=e.source,super.parseNode(e)}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r},importAttributesKey:o}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});return void e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}if(this.mechanism&&(e.overwrite(this.start,Q(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([[o,this.attributes]],{lineBreakIndent:null})}`))}setExternalResolution(e,t,n,s,i,r,o,a,l,c){const{format:u}=t;this.inlineNamespace=null,this.resolutionString=r,this.namespaceExportName=o,this.attributes=a;const d=[...Ol[u]||[]];let h;({helper:h,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(e,t,n,s,l,c)),h&&d.push(h),d.length>0&&this.scope.addAccessedGlobals(d,i)}setInternalResolution(e){this.inlineNamespace=e}getDynamicImportMechanismAndHelper(e,{compact:t,dynamicImportInCjs:n,format:s,generatedCode:{arrowFunctions:i},interop:r},{_:o,getDirectReturnFunction:a,getDirectReturnIifeLeft:l},c,u,d){const{resolution:h,scope:p}=this,f=c.hookFirstSync("renderDynamicImport",[{chunk:Cl(u),customResolution:"string"==typeof h?h:null,format:s,getTargetChunkImports(){if(null===d)return null;const e=[],t=u.getFileName();for(const n of d.dependencies){const s=`'${n.getImportPath(t)}'`;n instanceof Eo?e.push({fileName:n.getFileName(),resolvedImportPath:s,type:"external"}):e.push({chunk:n.getPreRenderedChunkInfo(),fileName:n.getFileName(),resolvedImportPath:s,type:"internal"})}return e},moduleId:p.context.module.id,targetChunk:d?Cl(d):null,targetModuleAttributes:h&&"string"!=typeof h?h.info.attributes:{},targetModuleId:h&&"string"!=typeof h?h.id:null}]);if(f)return{helper:null,mechanism:f};const m=!h||"string"==typeof h;switch(s){case"cjs":{if(n&&(!h||"string"==typeof h||h instanceof Yn))return{helper:null,mechanism:null};const t=Dl(h,e,r);let s="require(",o=")";t&&(s=`/*#__PURE__*/${t}(${s}`,o+=")");const[c,u]=a([],{functionReturn:!0,lineBreakIndent:null,name:null});return s=`Promise.resolve().then(${c}${s}`,o+=`${u})`,!i&&m&&(s=l(["t"],`${s}t${o}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),o=")"),{helper:t,mechanism:{left:s,right:o}}}case"amd":{const n=t?"c":"resolve",s=t?"e":"reject",c=Dl(h,e,r),[u,d]=a(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),p=c?`${u}${n}(/*#__PURE__*/${c}(m))${d}`:n,[f,g]=a([n,s],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${f}require([`,b=`],${o}${p},${o}${s})${g})`;return!i&&m&&(y=l(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:c,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function Dl(e,t,n){return"external"===t?Nr[n(e instanceof Yn?e.id:null)]:"default"===t?$r:null}Rl.prototype.applyDeoptimizations=ds;const Ol={amd:["require"],cjs:["require"],system:["module"]};class Ml extends ls{}Ml.prototype.includeNode=us,Ml.prototype.applyDeoptimizations=ds;class _l extends ls{}_l.prototype.includeNode=us,_l.prototype.applyDeoptimizations=ds;class Ll extends Ri{constructor(){super(...arguments),this.isNativeElement=!1}bind(){const e=this.getType();0===e?(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)):1===e&&(this.isNativeElement=!0)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,Ce,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n}){if(this.variable){const s=this.variable.getName(t,n);s!==this.name&&e.overwrite(this.start,this.end,s,{contentOnly:!0,storeName:!0})}else this.isNativeElement&&"preserve"!==this.scope.context.options.jsx.mode&&e.update(this.start,this.end,JSON.stringify(this.name))}getType(){switch(this.parent.type){case"JSXOpeningElement":case"JSXClosingElement":return this.name.startsWith(this.name.charAt(0).toUpperCase())?0:1;case"JSXMemberExpression":return this.parent.object===this?0:2;case"JSXAttribute":case"JSXNamespacedName":return 2;default:throw new Error(`Unexpected parent node type for JSXIdentifier: ${this.parent.type}`)}}}class Tl extends ls{render(e,t,{jsxMode:n}=de){if(super.render(e,t),["classic","automatic"].includes(n)){const{name:t,value:s}=this,i=t instanceof Ll?t.name:`${t.namespace.name}:${t.name.name}`;if("automatic"!==n||"key"!==i){const n=Xn(i);i!==n&&e.overwrite(t.start,t.end,n,{contentOnly:!0}),s?(e.overwrite(t.end,s.start,": ",{contentOnly:!0}),s instanceof Wr&&"string"==typeof s.value&&s.value.includes("\n")&&e.overwrite(s.start,s.end,JSON.stringify(s.value),{contentOnly:!0})):e.appendLeft(t.end,": true")}}}}Tl.prototype.includeNode=cs;class Bl extends ls{render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n?e.overwrite(this.start,this.end,")",{contentOnly:!0}):super.render(e,t)}}Bl.prototype.includeNode=cs;class zl extends Bl{}class Vl extends Bl{}class Fl extends ls{render(e,t){this.argument.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.argument.start,"",{contentOnly:!0}),e.overwrite(this.argument.end,this.end,"",{contentOnly:!0}))}}class jl extends ls{}jl.prototype.includeNode=cs;class Ul extends ls{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.expression.includePath(Re,e)}render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.remove(this.start,this.expression.start),e.remove(this.expression.end,this.end)),this.expression.render(e,t)}}const Gl=/^[ \t]*\r?\n[ \t\r\n]*|[ \t]*\r?\n[ \t\r\n]*$/g,Hl=/[ \t]*\r?\n[ \t\r\n]*/g;class Wl extends ls{shouldRender(){return!!this.getRenderedText()}render(e){const{mode:t}=this.scope.context.options.jsx;"preserve"!==t&&e.overwrite(this.start,this.end,JSON.stringify(this.getRenderedText()),{contentOnly:!0})}getRenderedText(){return void 0===this.renderedText&&(this.renderedText=this.value.replace(Gl,"").replace(Hl," ")),this.renderedText}}function ql(e){let t=0;for(const n of e)n instanceof Ul&&n.expression instanceof jl||n instanceof Wl&&!n.shouldRender()||t++;return t}function Kl(e,t,n,s,i){const[r,o]=e.split(".");let a;if(n){if(a=s.scope.context.getImportedJsxFactoryVariable(o?"default":r,s.start,n),t){s.scope.findGlobal(r).includePath(Re,i),a.globalName=r}}else a=s.scope.findGlobal(r);return s.scope.context.includeVariableInModule(a,Re,i),a instanceof ki&&(a.consolidateInitializers(),a.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),a}Wl.prototype.includeNode=cs;class Xl extends ls{constructor(){super(...arguments),this.factoryVariable=null,this.factory=null}initialise(){super.initialise();const{importSource:e}=this.jsxMode=this.getRenderingMode();e&&this.scope.context.addImportSource(e)}include(e,t){this.included||this.includeNode(e);for(const n of this.children)n.include(e,t)}includeNode(e){this.included=!0;const{factory:t,importSource:n,mode:s}=this.jsxMode;t&&(this.factory=t,this.factoryVariable=Kl(t,"preserve"===s,n,this,e))}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;return"automatic"===t?{factory:ql(this.children)>1?"jsxs":"jsx",importSource:e.jsxImportSource,mode:t}:{factory:n,importSource:s,mode:t}}renderChildren(e,t,n){const{children:s}=this;let i=!1,r=n,o=null;for(const n of s)n instanceof Ul&&n.expression instanceof jl||n instanceof Wl&&!n.shouldRender()?e.remove(r,n.end):(e.appendLeft(r,", "),n.render(e,t),o?i=!0:o=n),r=n.end;return{childrenEnd:r,firstChild:o,hasMultipleChildren:i}}}Xl.prototype.applyDeoptimizations=ds;class Jl extends Xl{include(e,t){super.include(e,t),this.openingElement.include(e,t),this.closingElement?.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;if("automatic"===t){let e=!1;for(const t of this.openingElement.attributes)if(t instanceof Fl)e=!0;else if(e&&"key"===t.name.name)return{factory:n,importSource:s,mode:"classic"}}return super.getRenderingMode()}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factory:o,factoryVariable:a,openingElement:{end:l,selfClosing:c}}=this,[,...u]=o.split("."),{firstAttribute:d,hasAttributes:h,hasSpread:p,inObject:f,previousEnd:m}=this.renderAttributes(e,t,[a.getName(n,s),...u].join("."),!1);this.wrapAttributes(e,f,h,p,d,"null",m),this.renderChildren(e,t,l),c?e.appendLeft(r,")"):i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factoryVariable:o,openingElement:{end:a,selfClosing:l}}=this;let{firstAttribute:c,hasAttributes:u,hasSpread:d,inObject:h,keyAttribute:p,previousEnd:f}=this.renderAttributes(e,t,o.getName(n,s),!0);const{firstChild:m,hasMultipleChildren:g,childrenEnd:y}=this.renderChildren(e,t,a);m&&(e.prependRight(m.start,"children: "+(g?"[":"")),h||(e.prependRight(m.start,"{ "),h=!0),f=i.start,g&&e.appendLeft(f,"]"));const b=m?y:f;if(this.wrapAttributes(e,h,u||!!m,d,c||m,"{}",b),p){const{value:t}=p;e.appendLeft(b,", "),t?e.move(t.start,t.end,b):e.appendLeft(b,"true")}l?e.appendLeft(p?.value?.end||r,")"):i.render(e,t)}renderAttributes(e,t,n,s){const{jsxMode:{mode:i},openingElement:r}=this,{attributes:o,end:a,start:l,name:{start:c,end:u}}=r;e.update(l,c,`/*#__PURE__*/${n}(`),r.render(e,t,{jsxMode:i});let d=null,h=!1,p=!1,f=u,m=!1,g=null;for(const t of o){if(t instanceof Tl){if(s&&"key"===t.name.name){d=t,e.remove(f,t.value?.start||t.end);continue}e.appendLeft(f,","),p||(e.prependRight(t.start,"{ "),p=!0),m=!0}else p?(m&&e.appendLeft(f," "),e.appendLeft(f,"},"),p=!1):e.appendLeft(f,","),h=!0;f=t.end,g??=t}return e.remove(o.at(-1)?.end||f,a),{firstAttribute:g,hasAttributes:m,hasSpread:h,inObject:p,keyAttribute:d,previousEnd:f}}wrapAttributes(e,t,n,s,i,r,o){if(t&&e.appendLeft(o," }"),s){if(n){const{start:t}=i;i instanceof Fl&&e.prependRight(t,"{}, "),e.prependRight(t,"Object.assign("),e.appendLeft(o,")")}}else n||e.appendLeft(o,`, ${r}`)}}class Yl extends Xl{include(e,t){super.include(e,t),this.openingFragment.include(e,t),this.closingFragment.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factory:r,factoryVariable:o,openingFragment:a,start:l}=this,[,...c]=r.split(".");a.render(e,t),e.prependRight(l,`/*#__PURE__*/${[o.getName(n,s),...c].join(".")}(`),e.appendLeft(a.end,", null"),this.renderChildren(e,t,a.end),i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factoryVariable:r,openingFragment:o,start:a}=this;o.render(e,t),e.prependRight(a,`/*#__PURE__*/${r.getName(n,s)}(`);const{firstChild:l,hasMultipleChildren:c,childrenEnd:u}=this.renderChildren(e,t,o.end);l?(e.prependRight(l.start,"{ children: "+(c?"[":"")),c&&e.appendLeft(i.start,"]"),e.appendLeft(u," }")):e.appendLeft(o.end,", {}"),i.render(e,t)}}class Zl extends ls{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.object.includePath([this.property.name],e)}includePath(e,t){this.included||this.includeNode(t),this.object.includePath([this.property.name,...e],t)}}class Ql extends ls{}Ql.prototype.includeNode=cs;class ec extends ls{render(e,t,{jsxMode:n=this.scope.context.options.jsx.mode}={}){this.name.render(e,t);for(const s of this.attributes)s.render(e,t,{jsxMode:n})}}ec.prototype.includeNode=cs;class tc extends ls{constructor(){super(...arguments),this.fragment=null,this.fragmentVariable=null}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.jsx;if("automatic"===t.mode)this.fragment="Fragment",this.fragmentVariable=Kl("Fragment",!1,t.jsxImportSource,this,e);else{const{fragment:n,importSource:s,mode:i}=t;null!=n&&(this.fragment=n,this.fragmentVariable=Kl(n,"preserve"===i,s,this,e))}}render(e,t){const{mode:n}=this.scope.context.options.jsx;if("preserve"!==n){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,[,...i]=this.fragment.split("."),r=[this.fragmentVariable.getName(n,s),...i].join(".");e.update(this.start,this.end,r)}}}class nc extends ls{render(e,t){super.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.expression.start,"...",{contentOnly:!0}),e.overwrite(this.expression.end,this.end,"",{contentOnly:!0}))}}class sc extends ls{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||this.includeNode(e);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,t),e.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}includeNode(e){this.included=!0,this.body.includePath(Re,e)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,te(e.original,Q(e.original,":",this.label.end)+1)),this.body.render(e,t)}}sc.prototype.applyDeoptimizations=ds;class ic extends ls{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return We(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=qe(this.flags,65536,e)}get hasDeoptimizedCache(){return We(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=qe(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.hasDeoptimizedCache)return;if(this.hasDeoptimizedCache=!0,this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(Re),this.included&&e.includePath(Re,Ge())}const{scope:{context:e},expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=pe;for(const e of t)e.deoptimizeCache();e.requestTreeshakingPass()}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){if(n===this)return Ke;const s=this.getUsedBranch();if(s)return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n);if(!this.hasDeoptimizedCache&&!e.length){const s=rl(this.right.getLiteralValueAtPath(e,t,n));if("symbol"!=typeof s){if(!s&&"&&"===this.operator)return this.expressionsToBeDeoptimized.push(n),Je;if(s&&"||"===this.operator)return this.expressionsToBeDeoptimized.push(n),Xe}}return Ke}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new ol([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||n===this.right&&this.left.shouldBeIncluded(e)?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();!n||n===this.right&&this.left.shouldBeIncluded(t)?(this.left.includePath(e,t),this.right.includePath(e,t)):n.includePath(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=de){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=Q(e.original,this.operator,this.left.end);if(this.right.included){const t=te(e.original,o+2);e.remove(this.start,t),s&&ae(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!ne.test(e[n-1]))return n;n--}}(e.original,this.left.end,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(Ce,Te,this),t=rl(e);if("symbol"==typeof t||"??"===this.operator&&"symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&t||"&&"===this.operator&&!t||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}}ic.prototype.includeNode=us,ic.prototype.applyDeoptimizations=ds;class rc extends ls{hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Ce,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.callee.include(e,!1),this.callee.includeCallArguments(this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(Re,e)}initialise(){super.initialise(),this.interaction={args:[null,...this.arguments],type:2,withNew:!0},this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t){this.callee.render(e,t),Ya(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ce,Te),this.scope.context.requestTreeshakingPass()}}class oc extends ls{constructor(){super(...arguments),this.objectEntity=null,this.protoProp=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)}include(e,t){this.included||this.includeNode(e),this.getObjectEntity().include(e,t),this.protoProp?.include(e,t)}includeNode(e){this.included=!0,this.protoProp?.includePath(Re,e)}includePath(e,t){this.included||this.includeNode(t),this.getObjectEntity().includePath(e,t)}render(e,t,{renderedSurroundingElement:n}=de){if(n!==ct&&n!==ot||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const n=oe(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):Y(i,e,o,a);s&&e.remove(s,this.end-1)}}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=Gs;const t=[];for(const n of this.properties){if(n instanceof ii){t.push({key:be,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(Ce,Te,this);if("symbol"==typeof e){t.push({key:Ie(e)?e:be,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof Mi?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){this.protoProp=n,e=n.value instanceof Wr&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new Fs(t,e)}}oc.prototype.applyDeoptimizations=ds;class ac extends ls{initialise(){const{id:e}=this.scope.context.module;return Ut(Cn(Gt(In(this.message)),e))}}class lc extends ls{initialise(){const e=this.start,{id:t}=this.scope.context.module,n=Cn(Gt(In(this.message,e)),t);this.scope.context.error(n,e)}}class cc extends ls{}cc.prototype.includeNode=cs;class uc extends ls{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(He()):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(xt,hn(e,s.id,ft(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)}initialise(){if(super.initialise(),this.invalidAnnotations)for(const{start:e,end:t,type:n}of this.invalidAnnotations)this.scope.context.magicString.remove(e,t),"pure"!==n&&"noSideEffects"!==n||this.scope.context.log(Et,gn(this.scope.context.code.slice(e,t),this.scope.context.module.id,n),e)}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=ie(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}re(this.body,e,n,this.end,t)}else super.render(e,t)}}uc.prototype.includeNode=us,uc.prototype.applyDeoptimizations=ds;class dc extends Vi{get method(){return We(this.flags,262144)}set method(e){this.flags=qe(this.flags,262144,e)}get shorthand(){return We(this.flags,524288)}set shorthand(e){this.flags=qe(this.flags,524288,e)}declare(e,t,n){return this.value.declare(e,this.getPathInProperty(t),n)}deoptimizeAssignment(e,t){this.value.deoptimizeAssignment?.(this.getPathInProperty(e),t)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenDestructuring(e,t,n){return this.value.hasEffectsWhenDestructuring?.(e,this.getPathInProperty(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.getPathInProperty(t);let i=this.value.includeDestructuredIfNecessary(e,s,n)||this.included;return(i||=this.key.hasEffects(He()))&&(this.key.include(e,!1),this.value.included||(this.value.includeNode(e),this.value.includeDestructuredIfNecessary(e,s,n))),!this.included&&i&&this.includeNode(e),this.included}include(e,t){this.included=!0,this.key.include(e,t),this.value.include(e,t)}includePath(e,t){this.included=!0,this.value.includePath(e,t)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}getPathInProperty(e){return e.at(-1)===be?e:this.computed?[...e,be]:this.key instanceof Mi?[...e,this.key.name]:[...e,String(this.key.value)]}}dc.prototype.includeNode=us,dc.prototype.applyDeoptimizations=ds;class hc extends ls{get computed(){return We(this.flags,1024)}set computed(e){this.flags=qe(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):Ke}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):Qe}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||zi(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.value?.includePath(Re,e);for(const t of this.decorators)t.includePath(Re,e)}}hc.prototype.applyDeoptimizations=ds;class pc extends ls{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included||this.includeNode(e),this.argument?.include(e,t),e.brokenFlow=!0}includeNode(e){this.included=!0,this.argument?.includePath(Re,e)}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||Ze)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}pc.prototype.applyDeoptimizations=ds;class fc extends ls{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 or)||s.shouldBeIncluded(e))&&s.include(e,t)}includePath(e,t){this.included=!0,this.expressions[this.expressions.length-1].includePath(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=de){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:u,end:d}of oe(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&ae(e,u,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 Y(l,e,u,d);o&&e.remove(o,this.end)}}fc.prototype.includeNode=us,fc.prototype.applyDeoptimizations=ds;class mc extends ls{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,Ce,e)}}class gc extends ls{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.test&&(this.test.render(e,t),this.test.start===this.start+4&&e.prependLeft(this.test.start," ")),this.consequent.length>0){const s=this.test?this.test.end:Q(e.original,"default",this.start)+7,i=Q(e.original,":",s)+1;re(this.consequent,e,i,n.end,t)}}}gc.prototype.needsBoundaries=!0,gc.prototype.includeNode=us,gc.prototype.applyDeoptimizations=ds;class yc extends ls{createScope(e){this.parentScope=e,this.scope=new ji(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=He();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(){super.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){return this.discriminant=new(this.scope.context.getNodeConstructor(e.discriminant.type))(this,this.parentScope).parseNode(e.discriminant),super.parseNode(e)}render(e,t){this.discriminant.render(e,t),this.cases.length>0&&re(this.cases,e,this.cases[0].start,this.end-1,t)}}yc.prototype.includeNode=us,yc.prototype.applyDeoptimizations=ds;class bc extends Za{get hasCheckedForWarnings(){return We(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=qe(this.flags,134217728,e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(Ce,this.interaction,e)}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.quasi.include(e,!1),this.tag.include(e,!1),this.tag.includeCallArguments(this.interaction,e))}initialise(){super.initialise(),this.args=[Ze,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Jr&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){if(this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t),!this.hasCheckedForWarnings&&this.tag.type===ut){this.hasCheckedForWarnings=!0;const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(Et,an(e),this.start)}}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ce,Te),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Te){return null===this.returnExpression?(this.returnExpression=Qe,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Ce,this.interaction,e,this)):this.returnExpression}}bc.prototype.includeNode=cs;class Ec extends ls{get tail(){return We(this.flags,1048576)}set tail(e){this.flags=qe(this.flags,1048576,e)}bind(){}hasEffects(){return!1}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}Ec.prototype.includeNode=cs;class xc extends ls{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Ke:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Qe:Ms(Ds,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Os(Ds,e[0],t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.expressions)t.includePath(Re,e)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class Ac extends Bi{constructor(e,t,n){super(e,t),this.importDescriptions=n,this.variables.set("this",new ki("this",null,Es,Ce,t,"other"))}addDeclaration(e,t,n,s,i){return this.importDescriptions.has(e.name)&&t.error(Nn(e.name),e.start),super.addDeclaration(e,t,n,s,i)}addExportDefaultDeclaration(e,t){const n=new mo(e,t);return this.variables.set("default",n),n}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}}class Sc extends ls{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(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,Ce,e)}includePath(e,t){this.included?e.length>0&&this.variable.includePath(e,t):(this.included=!0,this.scope.context.includeVariableInModule(this.variable,e,t));const n=function(e,t){for(;!(e instanceof rr&&e.thisVariable===t);){if(!(e instanceof Bi))return null;e=e.parent}return e}(this.scope,this.variable);n&&n.functionNode.parent instanceof dc&&n.functionNode.parent.parent instanceof oc&&n.functionNode.parent.parent.includePath(e,t)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof Ac?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(Et,{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:kt("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}}class $c extends ls{hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t),e.brokenFlow=!0}includeNode(e){this.included||(this.included=!0,this.argument.includePath(Re,e))}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class vc extends ls{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?os: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)}}vc.prototype.includeNode=us,vc.prototype.applyDeoptimizations=ds;const Pc={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Ke,typeof:e=>typeof e,void:()=>{},"~":e=>~e},wc=Symbol("Unassigned");class Ic extends ls{constructor(){super(...arguments),this.renderedLiteralValue=wc}get prefix(){return We(this.flags,2097152)}set prefix(e){this.flags=qe(this.flags,2097152,e)}deoptimizeCache(){this.renderedLiteralValue=Ke}getLiteralValueAtPath(e,t,n){if(e.length>0)return Ke;const s=this.argument.getLiteralValueAtPath(Ce,t,n);if("symbol"==typeof s){if("void"===this.operator)return;if("!"===this.operator){if(s===Je)return!0;if(s===Xe)return!1}return Ke}return Pc[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof Mi)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Ce,it,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(Ce),this.scope.context.requestTreeshakingPass())}getRenderedLiteralValue(e){return this.renderedLiteralValue!==wc?this.renderedLiteralValue:this.renderedLiteralValue=e?Ke:Wa(this.getLiteralValueAtPath(Ce,Te,this))}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const s=this.argument instanceof Mi&&this.argument.variable?.included;("symbol"==typeof this.getRenderedLiteralValue(t)||this.argument.shouldBeIncluded(e)||s)&&(this.argument.include(e,t),this.renderedLiteralValue=Ke)}render(e,t){if("symbol"==typeof this.renderedLiteralValue)super.render(e,t);else{let t=this.renderedLiteralValue;Nc.test(e.original[this.start-1])||(t=` ${t}`),e.overwrite(this.start,this.end,t)}}}const Nc=/[\s([=%&*+-/<>^|,?:;]/;Ic.prototype.includeNode=cs;class kc extends ls{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.included||this.includeNode(e),this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(Ze)}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?ce(s,this.start,this.end,e,t):ue(s,this.start,this.end,this.parent.type!==ct,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${le([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==ct,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(Ce),this.argument instanceof Mi){this.scope.findVariable(this.argument.name).markReassigned()}this.scope.context.requestTreeshakingPass()}}function Cc(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}kc.prototype.includeNode=cs;class Rc extends ls{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Ce)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=de){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 Fa||i instanceof Ba)&&r.include(e,t)}}initialise(){super.initialise();for(const e of this.declarations)e.declareDeclarator(this.kind)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=de){if(this.areAllDeclarationsIncludedAndNotExported(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)}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,` ${le(r,o)};`)}renderReplacedDeclarations(e,t){const n=oe(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=te(e.original,this.start+this.kind.length);let r=i-1;e.remove(this.start,r);let o,a,l=!1,c=!1,u="";const d=[],h=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof Mi&&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,d);for(const{node:d,start:p,separator:f,contentEnd:m,end:g}of n)if(d.included){if(d.render(e,t),o="",a="",!d.id.included||d.id instanceof Mi&&Cc(d.id.variable,t.exportNamesByVariable))c&&(u+=";"),l=!1;else{if(h&&h===d.id.variable){const n=Q(e.original,"=",d.id.end);ce(h,te(e.original,n+1),null===f?m:f,e,t)}l?u+=",":(c&&(u+=";"),o+=`${this.kind} `,l=!0)}i===r+1?e.overwrite(r,i,u+o):(e.overwrite(r,r+1,u),e.appendLeft(i,o)),s=m,i=g,c=!0,r=f,u=""}else Y(d,e,p,g);this.renderDeclarationEnd(e,u,r,s,i,d,t)}areAllDeclarationsIncludedAndNotExported(e){if("await using"===this.kind||"using"===this.kind)return!0;for(const t of this.declarations){if(!t.id.included)return!1;if(t.id.type===ut){if(e.has(t.id.variable))return!1}else{const n=[];if(t.id.addExportedVariables(n,e),n.length>0)return!1}}return!0}}Rc.prototype.includeNode=us,Rc.prototype.applyDeoptimizations=ds;class Dc extends ls{declareDeclarator(e){this.isUsingDeclaration="using"===e,this.isAsyncUsingDeclaration="await using"===e,this.id.declare(e,Ce,this.init||Es)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.isUsingDeclaration||this.isAsyncUsingDeclaration||this.id.hasEffects(e)||this.scope.context.options.treeshake.propertyReadSideEffects&&this.id.hasEffectsWhenDestructuring(e,Ce,this.init||Es)}include(e,t){const{id:n,init:s}=this;this.included||this.includeNode(e),s?.include(e,t),n.markDeclarationReached(),t?n.include(e,t):n.includeDestructuredIfNecessary(e,Ce,s||Es)}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||this.isUsingDeclaration||this.isAsyncUsingDeclaration;if(c)o.render(e,t);else{const t=Q(e.original,"=",o.end);e.remove(l,te(e.original,t+1))}if(a){if(o instanceof Mi&&a instanceof il&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?de:{renderedSurroundingElement:ct})}else o instanceof Mi&&Cc(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}includeNode(e){this.included=!0;const{id:t,init:n}=this;if(n&&(this.isUsingDeclaration?n.includePath(Oc,e):this.isAsyncUsingDeclaration&&n.includePath(Mc,e),t instanceof Mi&&n instanceof il&&!n.id)){const{name:e,variable:s}=t;for(const t of n.scope.accessedOutsideVariables.values())t!==s&&t.forbidName(e)}}}Dc.prototype.applyDeoptimizations=ds;const Oc=[$e],Mc=[ve];class _c extends ls{hasEffects(e){return!!this.test.hasEffects(e)||dl(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),hl(e,this.body,t)}}_c.prototype.includeNode=us,_c.prototype.applyDeoptimizations=ds;class Lc extends ls{applyDeoptimizations(){this.deoptimized=!0,this.argument?.deoptimizePath(Re)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument?.includePath(Re,e)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}const Tc=["PanicError","ParseError","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AssignmentExpression","AssignmentPattern","AwaitExpression","BinaryExpression","BlockStatement","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","Decorator","ExpressionStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","ImportAttribute","ImportDeclaration","ImportDefaultSpecifier","ImportExpression","ImportNamespaceSpecifier","ImportSpecifier","JSXAttribute","JSXClosingElement","JSXClosingFragment","JSXElement","JSXEmptyExpression","JSXExpressionContainer","JSXFragment","JSXIdentifier","JSXMemberExpression","JSXNamespacedName","JSXOpeningElement","JSXOpeningFragment","JSXSpreadAttribute","JSXSpreadChild","JSXText","LabeledStatement","Literal","Literal","Literal","Literal","Literal","Literal","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","YieldExpression"],Bc=[ac,lc,ri,Ba,Va,ja,Ua,Ga,Xa,ar,Ja,Qa,el,tl,sl,Wi,il,al,ll,cl,ul,or,pl,fl,ml,pr,gl,yl,or,bl,El,xl,hr,Al,Mi,vl,Pl,wl,Il,Rl,Ml,_l,Tl,zl,Vl,Jl,jl,Ul,Yl,Ll,Zl,Ql,ec,tc,Fl,nc,Wl,sc,Wr,Wr,Wr,Wr,Wr,Wr,ic,Jr,to,Fi,rc,oc,Fa,cc,uc,dc,hc,lr,pc,fc,ii,Ui,mc,gc,yc,bc,Ec,xc,Sc,$c,vc,Ic,kc,Rc,Dc,_c,Lc],zc=[function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.elements=Fc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=Fc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.expression=!(2&~i),e.generator=!(4&~i);const r=e.annotations=ss(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=e.params=Fc(e,s,n[t+2],n);s.addParameterVariables(o.map(e=>e.declare("parameter",Ce,Ze)),o[o.length-1]instanceof lr),e.body=Vc(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=es[n[t]],e.left=Vc(e,s,n[t+1],n),e.right=Vc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=Vc(e,s,n[t],n),e.right=Vc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=es[n[t]],e.left=Vc(e,s,n[t+1],n),e.right=Vc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=Fc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:Vc(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=ss(n[t+1],n),e.callee=Vc(e,s,n[t+2],n),e.arguments=Fc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:Vc(e,s,i,n);r?.declare("parameter",Ce,Ze),e.body=Vc(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];if(i){const t=n[i],r=e.body=new Array(t);for(let o=0;o<t;o++){const t=n[i+1+o];r[o]=Vc(e,79===n[t]||1&n[t+3]?s:s.instanceScope,t,n)}}else e.body=[]},function(e,t,n){const{scope:s}=e;e.decorators=Fc(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:Vc(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:Vc(e,s,r,n),e.body=Vc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=Fc(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:Vc(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:Vc(e,s,r,n),e.body=Vc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=Vc(e,s,n[t],n),e.consequent=Vc(e,s,n[t+1],n),e.alternate=Vc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:Vc(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=Vc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=Vc(e,s,n[t],n),e.test=Vc(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:Vc(e,s,i,n),e.source=Vc(e,s,n[t+1],n),e.attributes=Fc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=Fc(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:Vc(e,s,i,n),e.attributes=Fc(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:Vc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=Vc(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:Vc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=Vc(e,s,n[t],n),e.right=Vc(e,s,n[t+1],n),e.body=Vc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=Vc(e,s,n[t+1],n),e.right=Vc(e,s,n[t+2],n),e.body=Vc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:Vc(e,s,i,n);const r=n[t+1];e.test=0===r?null:Vc(e,s,r,n);const o=n[t+2];e.update=0===o?null:Vc(e,s,o,n),e.body=Vc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=ss(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:Vc(e,s.parent,o,n);const a=e.params=Fc(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",Ce,Ze)),a[a.length-1]instanceof lr),e.body=Vc(e,s.bodyScope,n[t+4],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=ss(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:Vc(e,e.idScope,o,n);const a=e.params=Fc(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",Ce,Ze)),a[a.length-1]instanceof lr),e.body=Vc(e,s.bodyScope,n[t+4],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.test=Vc(e,s,n[t],n),e.consequent=Vc(e,e.consequentScope=new Sl(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:Vc(e,e.alternateScope=new Sl(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=Vc(e,s,n[t],n),e.value=Vc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=Fc(e,s,n[t],n),e.source=Vc(e,s,n[t+1],n),e.attributes=Fc(e,s,n[t+2],n);const i=n[t+3];e.phase=0===i?void 0:es[i]},function(e,t,n){const{scope:s}=e;e.local=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=Vc(e,s,n[t],n),e.sourceAstNode=_a(n[t],n);const i=n[t+1];e.options=0===i?null:Vc(e,s,i,n);const r=n[t+2];e.phase=0===r?void 0:es[r]},function(e,t,n){const{scope:s}=e;e.local=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=Vc(e,s,n[t+1],n),e.imported=0===i?e.local:Vc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=Vc(e,s,n[t],n);const i=n[t+1];e.value=0===i?null:Vc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=Vc(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e;e.openingElement=Vc(e,s,n[t],n),e.children=Fc(e,s,n[t+1],n);const i=n[t+2];e.closingElement=0===i?null:Vc(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.openingFragment=Vc(e,s,n[t],n),e.children=Fc(e,s,n[t+1],n),e.closingFragment=Vc(e,s,n[t+2],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.object=Vc(e,s,n[t],n),e.property=Vc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.namespace=Vc(e,s,n[t],n),e.name=Vc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.selfClosing=!(1&~i),e.name=Vc(e,s,n[t+1],n),e.attributes=Fc(e,s,n[t+2],n)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,n){const{scope:s}=e;e.argument=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.expression=Vc(e,s,n[t],n)},function(e,t,n){e.value=n.convertString(n[t]),e.raw=n.convertString(n[t+1])},function(e,t,n){const{scope:s}=e;e.label=Vc(e,s,n[t],n),e.body=Vc(e,s,n[t+1],n)},function(e,t,n){const s=e.bigint=n.convertString(n[t]);e.raw=n.convertString(n[t+1]),e.value=BigInt(s)},function(e,t,n){const s=n[t],i=e.value=!(1&~s);e.raw=i?"true":"false"},function(e){e.value=null},function(e,t,n){const s=n[t];e.raw=0===s?void 0:n.convertString(s),e.value=new DataView(n.buffer).getFloat64(t+1<<2,!0)},function(e,t,n){const s=n.convertString(n[t]),i=n.convertString(n[t+1]);e.raw=`/${i}/${s}`,e.regex={flags:s,pattern:i},e.value=new RegExp(i,s)},function(e,t,n){e.value=n.convertString(n[t]);const s=n[t+1];e.raw=0===s?void 0:n.convertString(s)},function(e,t,n){const{scope:s}=e;e.operator=es[n[t]],e.left=Vc(e,s,n[t+1],n),e.right=Vc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.computed=!(1&~i),e.optional=!(2&~i),e.object=Vc(e,s,n[t+1],n),e.property=Vc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=Vc(e,s,n[t],n),e.property=Vc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=Fc(e,s,n[t+1],n),e.key=Vc(e,s,n[t+2],n),e.value=Vc(e,s,n[t+3],n),e.kind=es[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=ss(n[t],n),e.callee=Vc(e,s,n[t+1],n),e.arguments=Fc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=Fc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=Fc(e,s,n[t],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.body=Fc(e,s,n[t],n),e.invalidAnnotations=ss(n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.method=!(1&~i),e.shorthand=!(2&~i),e.computed=!(4&~i);const r=n[t+1];e.value=Vc(e,s,n[t+2],n),e.kind=es[n[t+3]],e.key=0===r?e.value:Vc(e,s,r,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=Fc(e,s,n[t+1],n),e.key=Vc(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:Vc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:Vc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=Fc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=Fc(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:Vc(e,s,i,n),e.consequent=Fc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=Vc(e,e.parentScope,n[t],n),e.cases=Fc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=Vc(e,s,n[t],n),e.quasi=Vc(e,s,n[t+1],n)},function(e,t,n){const s=n[t];e.tail=!(1&~s);const i=n[t+1],r=0===i?null:n.convertString(i),o=n.convertString(n[t+2]);e.value={cooked:r,raw:o}},function(e,t,n){const{scope:s}=e;e.quasis=Fc(e,s,n[t],n),e.expressions=Fc(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=Vc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=Vc(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:Vc(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:Vc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=es[n[t]],e.argument=Vc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=es[n[t+1]],e.argument=Vc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=es[n[t]],e.declarations=Fc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=Vc(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:Vc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=Vc(e,s,n[t],n),e.body=Vc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.delegate=!(1&~i);const r=n[t+1];e.argument=0===r?null:Vc(e,s,r,n)}];function Vc(e,t,n,s){const i=s[n],r=Bc[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=Tc[i],o.start=s[n+1],o.end=s[n+2],zc[i](o,n+3,s),o.initialise(),o}function Fc(e,t,n,s){if(0===n)return pe;const i=s[n++],r=new Array(i);for(let o=0;o<i;o++){const i=s[n++];r[o]=i?Vc(e,t,i,s):null}return r}const jc={ArrayExpression:ri,ArrayPattern:Ba,ArrowFunctionExpression:Va,AssignmentExpression:ja,AssignmentPattern:Ua,AwaitExpression:Ga,BinaryExpression:Xa,BlockStatement:ar,BreakStatement:Ja,CallExpression:Qa,CatchClause:el,ChainExpression:tl,ClassBody:sl,ClassDeclaration:Wi,ClassExpression:il,ConditionalExpression:al,ContinueStatement:ll,DebuggerStatement:cl,Decorator:ul,DoWhileStatement:pl,EmptyStatement:fl,ExportAllDeclaration:ml,ExportDefaultDeclaration:pr,ExportNamedDeclaration:gl,ExportSpecifier:yl,ExpressionStatement:or,ForInStatement:bl,ForOfStatement:El,ForStatement:xl,FunctionDeclaration:hr,FunctionExpression:Al,Identifier:Mi,IfStatement:vl,ImportAttribute:Pl,ImportDeclaration:wl,ImportDefaultSpecifier:Il,ImportExpression:Rl,ImportNamespaceSpecifier:Ml,ImportSpecifier:_l,JSXAttribute:Tl,JSXClosingElement:zl,JSXClosingFragment:Vl,JSXElement:Jl,JSXEmptyExpression:jl,JSXExpressionContainer:Ul,JSXFragment:Yl,JSXIdentifier:Ll,JSXMemberExpression:Zl,JSXNamespacedName:Ql,JSXOpeningElement:ec,JSXOpeningFragment:tc,JSXSpreadAttribute:Fl,JSXSpreadChild:nc,JSXText:Wl,LabeledStatement:sc,Literal:Wr,LogicalExpression:ic,MemberExpression:Jr,MetaProperty:to,MethodDefinition:Fi,NewExpression:rc,ObjectExpression:oc,ObjectPattern:Fa,PanicError:ac,ParseError:lc,PrivateIdentifier:cc,Program:uc,Property:dc,PropertyDefinition:hc,RestElement:lr,ReturnStatement:pc,SequenceExpression:fc,SpreadElement:ii,StaticBlock:Ui,Super:mc,SwitchCase:gc,SwitchStatement:yc,TaggedTemplateExpression:bc,TemplateElement:Ec,TemplateLiteral:xc,ThisExpression:Sc,ThrowStatement:$c,TryStatement:vc,UnaryExpression:Ic,UnknownNode:class extends ls{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:kc,VariableDeclaration:Rc,VariableDeclarator:Dc,WhileStatement:_c,YieldExpression:Lc};class Uc extends Bn{constructor(e){super(Lo),this.module=e}includePath(e,t){super.includePath(e,t),this.module.needsExportShim=!0}}var Gc;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(Gc||(Gc={}));const Hc=new WeakMap;function Wc(e,t){if(e){const t=Hc.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=g(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||Wc(e)}function qc(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?function(e){const{length:t}=e,n=new p(e),s=[];let i=0,r=0,l=0,c=0,d=0;do{const e=n.indexOf(";"),t=[];let h=!0,p=0;for(i=0;n.pos<e;){let s;i+=a(o(n)),i<p&&(h=!1),p=i,u(n,e)?(r+=a(o(n)),l+=a(o(n)),c+=a(o(n)),u(n,e)?(d+=a(o(n)),s=[i,r,l,c,d]):s=[i,r,l,c]):s=[i],t.push(s),n.pos++}h||f(t),s.push(t),n.pos=e+1}while(n.pos<=t);return s}(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return Hc.set(i,s),i}function Kc(e){return e.id}const Xc=(e,{allowReturnOutsideFunction:t=!1,jsx:n=!1}={})=>function(e){const t=_a(0,e);switch(t.type){case"PanicError":return Ut(Gt(In(t.message)));case"ParseError":return Ut(Gt(In(t.message,t.start)));default:return t}}(Ta(fa(e,t,n))),Jc=new Set(["assert","with"]);function Yc(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof oc))return n&&t.module.log(Et,xn(t.module.id),s),he;const i=n.properties.find(e=>Jc.has(Zc(e)))?.value;if(!i)return he;if(!(i instanceof oc))return t.module.log(Et,(r=t.module.id,{code:Xt,message:`Rollup could not statically analyze the options argument of a dynamic import in "${Pt(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),he;var r;const o=i.properties.map(e=>{const n=Zc(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(Et,xn(t.module.id),e.start),null)}).filter(e=>!!e);return o.length>0?Object.fromEntries(o):he}const Zc=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function Qc(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some(n=>e[n]!==t[n])}var eu="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},tu={memoryUsage:()=>({heapUsed:0})};let nu=new Map;function su(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function iu(e,t=3){e=su(e,t);const n=tu.memoryUsage().heapUsed,s=eu.now(),i=nu.get(e);void 0===i?nu.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function ru(e,t=3){e=su(e,t);const n=nu.get(e);if(void 0!==n){const e=tu.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=eu.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function ou(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of nu)e[t]=[s,n,i];return e}let au=Qn,lu=Qn;const cu=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function uu(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of cu)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){au(s,4);const t=r.apply(this,e);return lu(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}const du={identifier:null,localName:Lo};function hu(e,t,n,s,i=new Map,r,o,a){const l=i.get(t);if(l){if(l.has(e))return s?[null]:Ut((c=t,{code:"CIRCULAR_REEXPORT",exporter:u=e.id,message:`"${c}" cannot be exported from "${Pt(u)}" as it is a reexport that references itself.`}));l.add(e)}else i.set(t,new Set([e]));var c,u;return e.getVariableForExportName(t,{exportOrReexportModules:a,importChain:r,importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i,sideEffectModules:o})}function pu(e,t){const n=me(t.sideEffectDependenciesByVariable,e,ge);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof mo?s.getDirectOriginalVariable():s instanceof bo?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 fu{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.hasTreeShakingPassStarted=!1,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedTopLevelAwaitingDynamicImporters=new Set,this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcePhaseSources=new Set,this.sourcesWithAttributes=new Map,this.allExportsIncluded=!1,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportDescriptions=new Map,this.exportedVariablesByName=null,this.exportNamesByVariable=null,this.exportShimVariable=new Uc(this),this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.excludeFromSourcemap=/\0/.test(t),this.context=n.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:u,exportAllSources:d,exportDescriptions: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 u.sort()},get exportedBindings(){const e={".":[...h.keys()]};for(const[t,{source:n}]of g)(e[n]??=[]).push(t);for(const t of d)(e[t]??=[]).push("*");return e},get exports(){return[...h.keys(),...g.keys(),...[...d].map(()=>"*")]},get hasDefaultExport(){return l.ast?l.exportDescriptions.has("default")||g.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,Kc).sort()},get implicitlyLoadedBefore(){return Array.from(f,Kc).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!==Gc.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,safeVariableNames:null,syntheticNamedExports:r}}basename(){const e=H(this.id),t=q(this.id);return Wn(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){Fn(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),Ut(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}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.getExportedVariablesByName().values())e.included&&n.add(e);for(let s of n){const n=this.sideEffectDependenciesByVariable.get(s);if(n)for(const e of n)t.add(e);s instanceof bo?s=s.getBaseVariable():s instanceof mo&&(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}getExportedVariablesByName(){if(this.exportedVariablesByName)return this.exportedVariablesByName;const e=this.exportedVariablesByName=new Map;for(const t of this.exportDescriptions.keys())if(t!==this.info.syntheticNamedExports){const[n]=this.getVariableForExportName(t);if(!n)return Ut(Sn(t,this.id));e.set(t,n)}for(const t of this.reexportDescriptions.keys()){const[n]=this.getVariableForExportName(t);n&&e.set(t,n)}for(const t of this.exportAllModules)if(t instanceof Yn)e.set(`*${t.id}`,t.getVariableForExportName("*",{importChain:[this.id]})[0]);else for(const n of t.getExportedVariablesByName().keys())if("default"!==n&&!e.has(n)){const[t]=this.getVariableForExportName(n);t&&e.set(n,t)}return this.exportedVariablesByName=new Map([...e].sort(yu))}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const[t,n]of this.getExportedVariablesByName().entries()){const s=n instanceof mo?n.getOriginalVariable():n;if(!n||!(n.included||n instanceof Vn))continue;const i=e.get(s);i?i.push(t):e.set(s,[t])}return this.exportNamesByVariable=e}getRenderedExports(){const e=[],t=[];for(const n of this.exportDescriptions.keys())(this.getExportedVariablesByName().get(n)?.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:Ut((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${Pt(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,importChain:n=[],isExportAllSearch:s,onlyExplicit:i,searchedNamesAndModules:r,sideEffectModules:o,exportOrReexportModules:a}=he){if("*"===e[0]){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*",{importChain:[...n,this.id]})}const l=this.reexportDescriptions.get(e);if(l){const[e,s]=hu(l.module,l.localName,t,!1,r,[...n,this.id],o,a);return e?(t&&(mu(e,t,this),this.info.moduleSideEffects&&me(t.sideEffectDependenciesByVariable,e,ge).add(this)),this.info.moduleSideEffects&&o?.add(this),a?.add(this),[e]):this.error($n(l.localName,this.id,l.module.id,!!s?.missingButExportExists),l.start)}const c=this.exportDescriptions.get(e);if(c){if(c===du)return[this.exportShimVariable];const e=c.localName,n=this.traceVariable(e,{exportOrReexportModules:a,importerForSideEffects:t,searchedNamesAndModules:r,sideEffectModules:o});return n?(t&&(mu(n,t,this),me(t.sideEffectDependenciesByVariable,n,ge).add(this)),o?.add(this),a?.add(this),[n]):[null,{missingButExportExists:!0}]}if(i)return[null];if("default"!==e){const s=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,r,[...n,this.id]);if(this.namespaceReexportsByName.set(e,s),s[0]){const[e,n]=s;if(t){const{exportOrReexportModules:s,sideEffectModules:i}=n;for(const n of s)t.alternativeReexportModules.has(e)||mu(e,t,n);for(const n of i)me(t.sideEffectDependenciesByVariable,e,ge).add(n)}return s}}return this.info.syntheticNamedExports?[me(this.syntheticExports,e,()=>new bo(this.astContext,e,this.getSyntheticNamespace()))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=Ge();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(){if(this.allExportsIncluded)return;this.allExportsIncluded=!0,this.includeModuleInExecution();const e=Ge();for(const t of this.getExportedVariablesByName().values())this.includeVariable(t,Re,e),t.deoptimizePath(Re),t instanceof Vn&&(t.module.reexported=!0)}includeAllInBundle(){this.ast.include(Ge(),!0),this.includeAllExports()}includeModuleInExecution(){this.isExecuted||(Zn(this),this.graph.needsTreeshakingPass=!0)}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 Yn?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?Ut((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,safeVariableNames:c,...u}){if(au("generate ast",3),t.startsWith("#!")){const e=t.indexOf("\n");this.shebang=t.slice(2,e)}this.info.code=t,this.info.safeVariableNames=c,this.originalCode=s,this.originalSourcemap=qc(i),this.sourcemapChain=o.map(e=>e.missing?e:qc(e)),Wc(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(u),this.resolvedIds=r??Object.create(null);const d=this.id;this.magicString=new M(t,{filename:this.excludeFromSourcemap?null:d,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),addImportSource:this.addImportSource.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:d,getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>jc[e]||jc.UnknownNode,importDescriptions:this.importDescriptions,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,newlyIncludedVariableInits:this.graph.newlyIncludedVariableInits,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e),traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new Ac(this.graph.scope,this.astContext,this.importDescriptions),this.namespace=new go(this.astContext);const h={context:this.astContext,type:"Module"};if(e)this.ast=new jc[e.type](h,this.scope).parseNode(e),this.info.ast=e;else{lu("generate ast",3);const e=await async function(e,t,n){return fa(e,t,n)}(t,!1,!1!==this.options.jsx);au("generate ast",3),this.ast=(p=e,f=h,m=this.scope,Vc(f,m,0,Ta(p))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(d))return this.graph.astLru.get(d);{const e=this.tryParse();return!1!==this.options.cache?(Object.defineProperty(this.info,"ast",{value:e}),e):(this.graph.astLru.set(d,e),e)}}})}var p,f,m;lu("generate ast",3)}toJSON(){return{ast:this.info.ast,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,Kc),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,safeVariableNames:this.info.safeVariableNames,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:n,searchedNamesAndModules:s,sideEffectModules:i,exportOrReexportModules:r}=he){const o=this.scope.variables.get(e);if(o)return o;const a=this.importDescriptions.get(e);if(a){const e=a.module;if(e instanceof fu&&"*"===a.name)return e.namespace;const[o,l]=hu(e,a.name,t||this,n,s,[this.id],i,r);return o||this.error($n(a.name,this.id,e.id,!!l?.missingButExportExists),a.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.sourceAstNode;"TemplateLiteral"===t.type?1===t.quasis.length&&"string"==typeof t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):"Literal"===t.type&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e})}assertUniqueExportName(e,t){(this.exportDescriptions.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 pr)this.assertUniqueExportName("default",e.start),this.exportDescriptions.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof ml){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof Wr?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 Wr){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=n instanceof Wr?n.value:n.name;this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:s instanceof Wr?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof Rc)for(const e of t.declarations)for(const t of pa(e.id))this.assertUniqueExportName(t,e.id.start),this.exportDescriptions.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.assertUniqueExportName(e,t.id.start),this.exportDescriptions.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:n}of e.specifiers){const e=t.name,s=n instanceof Mi?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exportDescriptions.set(s,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const n of e.specifiers){const s=n.local.name;(this.scope.variables.has(s)||this.importDescriptions.has(s))&&this.error(Nn(s),n.local.start);const i="source"===e.phase?zn:n instanceof Il?"default":n instanceof Ml?"*":n.imported instanceof Mi?n.imported.name:n.imported.value;this.importDescriptions.set(s,{module:null,name:i,phase:"source"===e.phase?"source":"instance",source:t,start:n.start})}}addImportSource(e){e&&!this.sourcesWithAttributes.has(e)&&this.sourcesWithAttributes.set(e,he)}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=ft(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];let i=n[0];for(let e of n){if(e[0]>=t.column||e===s){e=e[0]!==t.column?i:e,t={column:e[3],line:e[2]+1};continue e}i=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(Et,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))}Ht(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 Yn||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=>[Zc(e),e.value.value])):he);var s;const i=this.sourcesWithAttributes.get(e);i?Qc(i,n)&&this.log(Et,fn(i,n,e,this.id),t.start):this.sourcesWithAttributes.set(e,n),"source"===t.phase&&this.sourcePhaseSources.add(e)}getImportedJsxFactoryVariable(e,t,n){const{id:s}=this.resolvedIds[n],i=this.graph.modulesById.get(s),[r]=i.getVariableForExportName(e,{importChain:[this.id]});return r||this.error((o=e,a=s,l=this.id,{code:"MISSING_JSX_EXPORT",exporter:a,id:l,message:`Export "${o}" is not defined in module "${Pt(a)}" even though it is needed in "${Pt(l)}" to provide JSX syntax. Please check your "jsx" option.`,names:[o],url:kt(Rt)}),t);var o,a,l}getVariableFromNamespaceReexports(e,t,n,s){let i=null;const r=new Map,o=new Set,a=new Set,l=new Set;for(const c of this.exportAllModules){if(c.info.syntheticNamedExports===e)continue;const[u,d]=hu(c,e,t,!0,gu(n),s,a,l);c instanceof Yn||d?.indirectExternal?o.add(u):u instanceof bo?i||(i=u):u&&r.set(u,c)}if(r.size>0){const t=[...r],n=t[0][0];return 1===t.length?[n,{exportOrReexportModules:l,sideEffectModules:a}]:(this.options.onLog(Et,(c=e,u=this.id,d=t.map(([,e])=>e.id),{binding:c,code:"NAMESPACE_CONFLICT",ids:d,message:`Conflicting namespaces: "${Pt(u)}" re-exports "${c}" from one of the modules ${$t(d.map(e=>Pt(e)))} (will be ignored).`,reexporter:u})),[null])}var c,u,d;if(o.size>0){const t=[...o],n=t[0];return t.length>1&&this.options.onLog(Et,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${Pt(t)}" re-exports "${e}" from one of the external modules ${$t(s.map(e=>Pt(e)))}, guessing "${Pt(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map(e=>e.module.id))),[n,{exportOrReexportModules:l,indirectExternal:!0,sideEffectModules:a}]}return i?[i,{exportOrReexportModules:l,sideEffectModules:a}]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof Yn){const[t]=n.getVariableForExportName("*",{importChain:[this.id]});t.includePath(Re,Ge()),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.includePath(Re,Ge()),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const{resolution:t}=e;t instanceof fu&&(t.includedDynamicImporters.includes(this)||(t.includedDynamicImporters.push(this),this.astContext.usesTopLevelAwait&&t.includedTopLevelAwaitingDynamicImporters.add(this)))}includeVariable(e,t,n){const{included:s,module:i}=e;if(e.includePath(t,n),s)i instanceof fu&&i!==this&&pu(e,this);else if(this.graph.needsTreeshakingPass=!0,i instanceof fu&&(i.includeModuleInExecution(),i!==this)){const t=pu(e,this);for(const e of t)e.includeModuleInExecution()}}includeVariableInModule(e,t,n){this.includeVariable(e,t,n);const s=e.module;s&&s!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(Et,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${Pt(t)}".`})),this.exportDescriptions.set(e,du)}tryParse(){try{return Xc(this.info.code,{jsx:!1!==this.options.jsx})}catch(e){return this.error(Cn(e,this.id),e.pos)}}}function mu(e,t,n){if(e.module instanceof fu&&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 gu=e=>e&&new Map(Array.from(e,([e,t])=>[e,new Set(t)])),yu=([e],[t])=>e<t?-1:e>t?1:0,bu=(e,t)=>[e,t].filter(Boolean).join("\n"),Eu=(e,t)=>[e,t].filter(Boolean).join("\n\n");const xu={amd:$u,cjs:$u,es:Su,iife:$u,system:Su,umd:$u};function Au(e,t,n,s,i,r,o,a,l,c,u,d,h,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(s,i,d,h);!function(e,t,n){for(const s of t){s.info.safeVariableNames||={};for(const t of s.scope.variables.values())if(t.included&&!(t.renderBaseName||t instanceof mo&&t.getOriginalVariable()!==t)){const n=Object.getOwnPropertyDescriptor(s.info.safeVariableNames,t.name)?.value;if(n&&!e.has(n)){e.add(n),t.setRenderNames(null,n);continue}t.setRenderNames(null,Li(t.name,e,t.forbiddenNames)),s.info.safeVariableNames[t.name]=t.renderName}if(n.has(s)){const t=s.namespace;t.setRenderNames(null,Li(t.name,e,t.forbiddenNames))}}}(s,f,p),xu[i](s,n,t,r,o,a,l,c,u);for(const e of f)e.scope.deconflict(i,d,h)}function Su(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof Eo)&&(t.variableName=Li(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof Yn)?n.setRenderNames(null,(t instanceof Yn?a.get(t):o.get(t)).variableName):t instanceof Yn&&n.isSourcePhase?n.setRenderNames(null,Li(t.suggestedVariableName+"__source",e,n.forbiddenNames)):t instanceof Yn&&"default"===s?n.setRenderNames(null,Li([...t.exportedVariables].some(([e,t])=>"*"===t&&e.included)?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,Li(Wn(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,Li(t.name,e,t.forbiddenNames))}function $u(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=Li(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=Li(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&kr(r(t.id),a)?t.namespaceVariableName:Li(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof Yn){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=wr[s]?n.defaultVariableName:n.variableName;Ir(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,Nr[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 vu(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return Ut(En("default",o,i))}else if("none"===t&&o.length>0)return Ut(En("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(Et,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${Pt(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:kt(Mt)}}(i,n)),t="named")),t}function Pu(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 wu(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof Yn){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),wu(e,t,n,s,i,r)):t.push(o)}}const Iu="!~{",Nu="}~",ku=new RegExp(`${Iu}[0-9a-zA-Z_$]{1,16}${Nu}`,"g"),Cu=(e,t)=>e.replace(ku,e=>t.get(e)||e),Ru=(e,t,n)=>e.replace(ku,e=>e===t?n:e),Du=Symbol("bundleKeys"),Ou={type:"placeholder"};function Mu(e,t,n){return wt(e)?Ut(_n(`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 Ut(_n(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return wt(r)?Ut(_n(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r})}function _u(e,{[Du]:t}){if(!t.has(e.toLowerCase()))return e;const n=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),s=e.slice(0,n+1),i=e.slice(n+1),r=i.indexOf(".",1),o=s+(-1===r?i:i.slice(0,r)),a=-1===r?"":i.slice(r);let l,c=1;for(;t.has((l=o+ ++c+a).toLowerCase()););return l}const Lu=["Object","Promise","module","exports","require","__filename","__dirname",...Gr],Tu=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Bu(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(Et,(r=e.id,o=e.variableName,{code:"MISSING_GLOBAL_NAME",id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:kt("configuration-options/#output-globals")})),e.variableName):void 0);var r,o}class zu{constructor(e,t,n,s,i,r,o,a,l,c,u,d,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=u,this.getPlaceholder=d,this.bundle=h,this.inputBase=p,this.snippets=f,this.dependencies=new Set,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.isManualChunk=!1,this.accessedGlobalsByScope=new Map,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.allowExtensionModules=new Set,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)if(!m.has(e)){this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace));break}t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=Wn(this.generateVariableName()),this.isManualChunk=null!==u}static generateFacade(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){const m=new zu([],e,t,n,s,i,r,o,a,l,null,d,h,p,f);m.assignFacadeName(u,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof fu?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 bo&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>Cu(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)}}for(const t of this.allowExtensionModules){const n=t.getExportNamesByVariable();for(const[t,s]of n){this.exportNamesByVariable.set(t,[...s]);for(const e of s)this.exportsByName.set(e,t);e.delete(t)}}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=_i(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=_i(s))}while(jn.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=vu(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 s of t){if("allow-extension"===s.preserveSignature){if(this.canPreserveModuleExports(s)&&!s.chunkFileNames.size&&s.chunkNames.every(({isUserDefined:e})=>!e)){this.allowExtensionModules.add(s),this.facadeModule||(this.facadeModule=s,this.strictFacade=!1,this.assignFacadeName({},s,this.outputOptions.preserveModules)),this.facadeChunkByModule.set(s,this);continue}}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(zu.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=Vu(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}canPreserveModuleExports(e){const t=e.getExportNamesByVariable();for(const[e,n]of t)for(const t of n){const n=this.exportsByName.get(t);if(n&&n!==e)return!1}for(const[e,n]of t)for(const t of n)this.exportsByName.set(t,e);return!0}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 yr(Nt(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=H(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=Mu("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=_u(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Ou),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;const{sourcemapFileNames:e,format:t}=this.outputOptions;if(!e)return null;let n=null;const[s,i]=[e,"output.sourcemapFileNames"];let r=Mu("function"==typeof s?s(this.getPreRenderedChunkInfo()):s,i,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>t,hash:e=>n||(n=this.getPlaceholder(i,e||8)),name:()=>this.getChunkName()});return n||(r=_u(r,this.bundle)),this.preliminarySourcemapFileName={fileName:r,hashPlaceholder:n}}getRenderedChunkInfo(){if(this.renderedChunkInfo)return this.renderedChunkInfo;const e=this.getRenderedDependencies();return this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(Gu),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,Gu),importedBindings:ju(e,Gu),imports:Array.from(e.keys(),Gu),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof go?"*":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=[];wu(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)}inlineTransitiveImports(){const{facadeModule:e,dependencies:t,outputOptions:n}=this,{hoistTransitiveImports:s,preserveModules:i}=n;if(s&&!i&&null!==e)for(const e of t)e instanceof zu&&this.inlineChunkDependencies(e)}async render(){const{exportMode:e,facadeModule:t,inputOptions:{onLog:n},outputOptions:s,pluginDriver:i,snippets:r}=this,{format:o,preserveModules:a}=s,l=this.getPreliminaryFileName(),c=this.getPreliminarySourcemapFileName(),{accessedGlobals:u,indent:d,magicString:h,renderedSource:p,usedModules:f,usesTopLevelAwait:m}=this.renderModules(l.fileName),g=[...this.getRenderedDependencies().values()],y="none"===e?[]:this.getChunkExportDeclarations(o);let b=y.length>0,E=!1;for(const e of g){const{reexports:t}=e;t?.length&&(b=!0,!E&&t.some(e=>"default"===e.reexported)&&(E=!0),"es"===o&&(e.reexports=t.filter(({reexported:e})=>!y.find(({exported:t})=>t===e))))}if(!E)for(const{exported:e}of y)if("default"===e){E=!0;break}const{intro:x,outro:A,banner:S,footer:$}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],bu),t.hookReduceValue("footer",e.footer(n),[n],bu),t.hookReduceValue("intro",e.intro(n),[n],Eu),t.hookReduceValue("outro",e.outro(n),[n],Eu)]);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 Ut((s=e.message,{code:"ADDON_ERROR",message:`Could not retrieve "${e.hook}". Check configuration of plugin "${e.plugin}".\n\tError Message: ${s}`}))}var s}(s,i,this.getRenderedChunkInfo());if(Ho[o](p,{accessedGlobals:u,dependencies:g,exports:y,hasDefaultExport:E,hasExports:b,id:l.fileName,indent:d,intro:x,isEntryFacade:a||null!==t&&t.info.isEntry,isModuleFacade:null!==t,log:n,namedExportsMode:"default"!==e,outro:A,snippets:r,usesTopLevelAwait:m},s),S&&h.prepend(S),"es"===o||"cjs"===o){const e=null!==t&&t.info.isEntry&&t.shebang;e&&h.prepend(`#!${e}\n`)}return $&&h.append($),{chunk:this,magicString:h,preliminaryFileName:l,preliminarySourcemapFileName:c,usedModules:f}}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):Vu(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof fu){const s=this.chunkByModule.get(n);let i;do{if(i=t.alternativeReexportModules.get(e),i){this.chunkByModule.get(i)!==s&&this.inputOptions.onLog(Et,un(n.getExportNamesByVariable().get(e)?.[0]||"*",n.id,i.id,t.id,this.outputOptions.preserveModules)),t=i}}while(i)}}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof bo,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof go&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof fu){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?Vu(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 bo)){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 ki){for(const e of s.declarations)if(e.parent instanceof hr||e instanceof pr&&e.declaration instanceof hr){r=!0;break}}else s instanceof bo&&(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 Yn){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?wr[n(o.id)]&&i.add(a):t.isNamespace&&Nr[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every(e=>"*"===e[0]))&&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 zu||e instanceof Eo))}getDynamicImportStringAndAttributes(e,t,n){const{externalImportAttributes:s}=this.outputOptions,i=["es","cjs"].includes(this.outputOptions.format)&&s;if(e instanceof Yn){const n=this.externalChunkByModule.get(e),s=n.getImportAttributes(this.snippets);return[`'${n.getImportPath(t)}'`,s||!!i||null]}let r=null;if(i){const e=Yc(n);r=e===he||xo(e,this.snippets)}return[e||"",r]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?vt(this.fileName):vt(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;const o=s instanceof Yn&&n.isSourcePhase;if(s instanceof Yn){if(i=this.externalChunkByModule.get(s),r=n.name,!o&&"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return Ut(On(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);me(t,i,ye).push({imported:r,local:n.getName(this.snippets.getPropertyAccess),phase:o?"source":"instance"})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:n}of t.dynamicImports){if(!n.included)continue;const{resolution:t}=n;e.push(t instanceof fu?{chunk:this.chunkByModule.get(t),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(t),node:n,resolution:t}:t instanceof Yn?{chunk:null,externalChunk:this.externalChunkByModule.get(t),facadeChunk:null,node:n,resolution:t}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:t})}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=Fu(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(G(e.id.split(Uu,1)[0])),r=s(this.inputBase),o=q(i),a=Tu.has(o)?i.slice(0,-o.length):i;return j(a)?n&&J(a).startsWith(n)?a.slice(n.length).replace(/^[/\\]/,""):"/"===r&&"/"!==a[0]?X(r,a.replace(/^[a-zA-Z]:[/\\]/,"/")):X(r,a):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+H(a)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o;if("*"===s[0]){const n=s.slice(1);"defaultOnly"===t(n)&&this.inputOptions.onLog(Et,Mn(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof bo)continue;const a=n.module;if(a instanceof fu){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 Ut(On(a.id,r,!0));o=e&&("default"!==r||Ir(t(a.id),!0))}}me(n,i,ye).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;if(null===r&&null===o&&i instanceof Eo&&!i.moduleSideEffects&&!this.outputOptions.hoistTransitiveImports)continue;const a=i instanceof Eo||"default"!==i.exportMode,l=i.getImportPath(s),c=r?.find(e=>"source"===e.phase),u=r?.filter(e=>"source"!==e.phase)??null;n.set(i,{attributes:i instanceof Eo?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof Eo&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&Bu(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:u&&u.length>0?u:null,isChunk:i instanceof zu,name:i.variableName,namedExportsMode:a,namespaceVariableName:i.namespaceVariableName,reexports:o,sourcePhaseImport:c?.local})}return this.renderedDependencies=n}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof zu&&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:u,snippets:d}=this,{compact:h,format:p,freeze:f,generatedCode:{symbols:m},importAttributesKey:g}=l,{_:y,cnst:b,n:E}=d;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const x=new L({separator:`${E}${E}`}),A=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=Pu(t.originalCode);if(null!==e)return e}return"\t"}(a,l),S=[];let $="";const v=new Set,P={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,importAttributesKey:g,indent:A,pluginDriver:c,snippets:d,symbols:m,useOriginalName:null};let w=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render(P);!P.accessedDocumentCurrentScript&&no.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(Pr),P.accessedDocumentCurrentScript=!1,({source:n}=r),w||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),x.addSource(n),S.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(P);o.renderFirst()?$+=E+e:x.addSource(new M(e))}const a=t.get(e.scope);if(a)for(const e of a)v.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();u[e.id]={get code(){return n?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:s}}$&&x.prepend($+E+E),this.needsExportsShim&&x.prepend(`${E}${b} ${Lo}${y}=${y}void 0;${E}${E}`);const I=h?x:x.trim();var N;return o&&0===this.getExportNames().length&&0===n.size&&r(Et,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${N=this.getChunkName()}".`,names:[N]}),{accessedGlobals:v,indent:A,magicString:x,renderedSource:I,usedModules:S,usesTopLevelAwait:w}}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,n,i,s,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null,this,a||o)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e,o);o.setExternalResolution("external",n,i,s,t,l,!1,c,this,null)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:t},interop:n,preserveModules:s,externalLiveBindings:i}=this.outputOptions;for(const e of this.orderedModules)for(const t of e.scope.variables.values())t.setRenderNames(null,null);const 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 bo?r.add(n):n.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(Lu);this.needsExportsShim&&o.add(Lo),t&&o.add("Symbol"),Au(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))for(const n of e.getExportedVariablesByName().values())n.included&&t.add(n);for(let n of t){n instanceof mo&&(n=n.getOriginalVariable()),n instanceof bo&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof fu&&(this.checkCircularDependencyImport(n,e),n instanceof go&&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:{included:t,resolution:n}}of e.dynamicImports)t&&n instanceof fu&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function Vu(e){return Fu(e)??vt(e.id)}function Fu(e){return e.chunkNames.find(({isUserDefined:e})=>e)?.name??e.chunkNames[0]?.name}function ju(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 Uu=/[#?]/,Gu=e=>e.getFileName();function*Hu(e){for(const t of e)yield*t}function Wu(e,t,n,s,i,r){const{chunkDefinitions:o,manualChunkModules:a,manualChunkModulesByModule:l}=function(e,t,n){const s=new Set(e.keys()),i=Object.create(null),r=[...e].sort(([e],[t])=>e.execIndex-t.execIndex);for(const[e,o]of r){const r=i[o]||=[];t&&n?r.push(e):qu(e,r,s)}const o=Object.entries(i),a=new Array(o.length),l=new Array(o.length),c=new Map;let u=0;for(const[e,t]of o){l[u]={alias:e,modules:t},a[u]=t;for(const e of t)c.set(e,t);u++}return{chunkDefinitions:l,manualChunkModules:a,manualChunkModulesByModule:c}}(t,i,r),{entriesAndManualChunksCount:c,dependentEntriesByModule:u,dynamicallyDependentEntriesByDynamicEntry:d,dynamicImportsByEntry:h,dynamicallyDependentEntriesByAwaitedDynamicEntry:p,awaitedDynamicImportsByEntry:f}=function(e,t,n){const s=new Set,i=new Set,r=new Map,o=new Set(e),a=e.map(e=>[e]).concat(t),l=new Array(a.length),c=new Array(a.length);let u=0;for(const e of a){const t=new Set,d=new Set;l[u]=t,c[u]=d;const h=new Set(e),p=new Set;for(const e of h){me(r,e,ge).add(u);const l=n.get(e);if(l&&!p.has(l)){p.add(l);for(const e of l)h.add(e)}for(const t of e.getDependenciesToBeIncluded())t instanceof Yn||h.add(t);for(const{node:{resolution:n}}of e.dynamicImports)if(n instanceof fu&&n.includedDynamicImporters.length>0&&!o.has(n)){s.add(n),o.add(n),a.push([n]),t.add(n);for(const e of n.includedTopLevelAwaitingDynamicImporters)if(h.has(e)){i.add(n),d.add(n);break}}for(const t of e.implicitlyLoadedBefore)o.has(t)||(s.add(t),o.add(t),a.push([t]))}u++}const{awaitedDynamicEntries:d,awaitedDynamicImportsByEntry:h,dynamicEntries:p,dynamicImportsByEntry:f}=function(e,t,n,s,i){const r=new Map,o=new Set,a=new Set;for(const[n,i]of e.entries())for(const e of i)r.set(e,n),t.has(e)&&o.add(n),s.has(e)&&a.add(n);const l=Ku(n,r),c=Ku(i,r);return{awaitedDynamicEntries:a,awaitedDynamicImportsByEntry:c,dynamicEntries:o,dynamicImportsByEntry:l}}(a,s,l,i,c);return{awaitedDynamicImportsByEntry:h,dependentEntriesByModule:r,dynamicallyDependentEntriesByAwaitedDynamicEntry:Xu(r,d,a,e=>e.includedTopLevelAwaitingDynamicImporters),dynamicallyDependentEntriesByDynamicEntry:Xu(r,p,a,e=>e.includedDynamicImporters),dynamicImportsByEntry:f,entriesAndManualChunksCount:a.length}}(e,a,l),m=function(e){const t=Object.create(null);for(const{dependentEntries:n,module: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,n){for(const[s,i]of e)if(!t.has(s)){if(s.cycles.size>0&&s.includedTopLevelAwaitingDynamicImporters.size>0){n.push({alias:null,modules:[s]});continue}yield{dependentEntries:i,module:s}}}(u,l,o)),g=function(e,t){const n=new Array(e).fill(0n);let s=1n;for(const{dependentEntries:e}of t){for(const t of e)n[t]|=s;s<<=1n}return n}(c,m),y=Ju(g,d,h,c);!function(e,t,n){let s=1n;for(const{dependentEntries:i}of e){for(const e of i)(t[e]&s)===s&&0n===(n[e]&s)&&i.delete(e);s<<=1n}}(m,y,Ju(g,p,f,c));const{chunks:b,sideEffectAtoms:E,sizeByAtom:x}=function(e,t,n,s){const i=Object.create(null),r=new Map,o=new Array(e.length);let a=0n,l=1n,c=0;for(const{dependentEntries:u,modules:d}of e){let e=0n,h=-1n;for(const s of u)e|=1n<<BigInt(s),h&=t[s]|n[s];const p=i[String(e)]||={containedAtoms:0n,correlatedAtoms:h,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(u),modules:[],pure:!0,size:0};let f=0,m=!0;for(const e of d)r.set(e,p),e.isIncluded()&&(m&&=!e.hasEffects(),f+=s>1?e.estimateSize():1);m||(a|=l),o[c++]=f,p.containedAtoms|=l,p.modules.push(...d),p.pure&&=m,p.size+=f,l<<=1n}const u=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 Yn){if(o.info.moduleSideEffects){const e=me(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}(u,r,l),{chunks:u,sideEffectAtoms:a,sizeByAtom:o}}(m,g,y,n);return o.push(...function(e,t,n,s,i){au("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(Yu),s.sort(Yu),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return lu("optimize chunks",3),e;t>1&&i("info",wn(e.length,r.small.size,"Initially"));(function(e,t,n,s){const{small:i}=e;for(const r of i){const o=Zu(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),td(o,t,e).delete(o),o.modules.push(...a),o.size+=c,o.pure&&=l;const{dependencies:u,dependentChunks:d,dependentEntries:h}=o;o.correlatedAtoms&=s,o.containedAtoms|=n;for(const e of r.dependentEntries)h.add(e);for(const e of r.dependencies)u.add(e),e.dependentChunks.delete(r),e.dependentChunks.add(o);for(const e of r.dependentChunks)d.add(e),e.dependencies.delete(r),e.dependencies.add(o);u.delete(o),d.delete(o),td(o,t,e).add(o)}}})(r,t,n,s),t>1&&i("info",wn(r.small.size+r.big.size,r.small.size,"After merging chunks"));return lu("optimize chunks",3),[...r.small,...r.big]}(b,n,E,x,s).map(({modules:e})=>({alias:null,modules:e}))),o}function qu(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 Yn||n.has(t)||s.add(t)}}function Ku(e,t){const n=new Array(e.length);let s=0;for(const i of e){const e=new Set;for(const n of i)e.add(t.get(n));n[s++]=e}return n}function Xu(e,t,n,s){const i=new Map;for(const r of t){const t=me(i,r,ge),o=n[r];for(const n of o)for(const i of Hu([s(n),n.implicitlyLoadedAfter])){const n=e.get(i);if(n)for(const e of n)t.add(e)}}return i}function Ju(e,t,n,s){const i=Array.from({length:s},(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])me(t,e,ge).add(s)}}return i}function Yu({size:e},{size:t}){return e-t}function Zu(e,{big:t,small:n},s,i,r){let o=null;for(const a of Hu([n,t])){if(e===a)continue;const t=Qu(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function Qu(e,t,n,s,i){const r=ed(e,t,n,s,i);return r<n?r+ed(t,e,n-r,s,i):1/0}function ed(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 td(e,t,n){return e.size<t?n.small:n.big}const nd=(e,t)=>e.execIndex>t.execIndex?1:-1;function sd(e){e.sort(nd)}function id(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=(e,t)=>{r.has(e)?s.has(e)||n.push(function(e,t,n){const s=Symbol(e.id),i=[e.id];let r=t;e.cycles.add(s);for(;r!==e;)r.cycles.add(s),i.push(r.id),r=n.get(r);return i.push(i[0]),i.reverse(),i}(e,t,r)):(r.set(e,t),l(e))},l=e=>{if(e instanceof fu){for(const t of e.dependencies)a(t,e);for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{node:{resolution:t,scope:n}}of e.dynamicImports)t instanceof fu&&(n.context.usesTopLevelAwait?a(t,e):i.add(t));o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),l(t));for(const e of i)r.has(e)||(r.set(e,null),l(e));return{cyclePaths:n,orderedModules:o}}const rd=(e,t)=>t?`(${e})`:e;class od{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 ad{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:u,source:{content:d,filename:h}}=l;let p=t.get(h);if(void 0===p)p=e.length,e.push(h),t.set(h,p),n[p]=d;else if(null==n[p])n[p]=d;else if(null!=d&&n[p]!==d)return Ut(Dn(h));const f=[r[0],p,c,o];if(u){let e=i.get(u);void 0===e&&(e=s.length,s.push(u),i.set(u,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;let r=s.length-1;for(;i<=r;){const e=i+r>>1;let o=s[e];if(o[0]!==t&&i===r){o=s[s[i][0]>t?Math.max(0,i-1):i]}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 ld(e){return function(t,n){return n.missing?(e(Et,(s=n.plugin,{code:tn,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:kt("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new ad({mappings:[],names:[]},[t])):new ad(n,[t]);var s}}function cd(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=W(e)||".",o=n.sourceRoot||".",a=t.map((e,t)=>new od(J(i,o,e),s[t]));r=new ad(n,a)}else r=new od(e,t);return s.reduce(i,r)}let ud;const dd=e=>function(e){let t,n;try{const r=Ra.__wbindgen_add_to_stack_pointer(-16);Ra.xxhashBase64Url(r,ga(e));var s=Ea().getInt32(r+0,!0),i=Ea().getInt32(r+4,!0);return t=s,n=i,xa(s,i)}finally{Ra.__wbindgen_add_to_stack_pointer(16),Ra.__wbindgen_export(t,n,1)}}(pd(e)),hd={base36:e=>function(e){let t,n;try{const r=Ra.__wbindgen_add_to_stack_pointer(-16);Ra.xxhashBase36(r,ga(e));var s=Ea().getInt32(r+0,!0),i=Ea().getInt32(r+4,!0);return t=s,n=i,xa(s,i)}finally{Ra.__wbindgen_add_to_stack_pointer(16),Ra.__wbindgen_export(t,n,1)}}(pd(e)),base64:dd,hex:e=>function(e){let t,n;try{const r=Ra.__wbindgen_add_to_stack_pointer(-16);Ra.xxhashBase16(r,ga(e));var s=Ea().getInt32(r+0,!0),i=Ea().getInt32(r+4,!0);return t=s,n=i,xa(s,i)}finally{Ra.__wbindgen_add_to_stack_pointer(16),Ra.__wbindgen_export(t,n,1)}}(pd(e))};function pd(e){return"string"==typeof e?"undefined"==typeof Buffer?(ud??=new TextEncoder,ud.encode(e)):Buffer.from(e):e}let fd="sourceMa";async function md(e,t,n,s,i){au("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()));lu("render chunks",2),au("transform chunks",2);const o=hd[s.hashCharacters],a=function(e){return Object.fromEntries(e.map(e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]}))}(e),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:u,placeholders:d,renderedChunksByPlaceholder:h}=await async function(e,t,n,s,i,r){const o=[],a=new Map,l=new Map,c=new Map,u=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&u.add(t);return await Promise.all(e.map(async({chunk:e,preliminaryFileName:{fileName:d,hashPlaceholder:h},preliminarySourcemapFileName:p,magicString:f,usedModules:m})=>{const g={chunk:e,fileName:d,sourcemapFileName:p?.fileName??null,...await gd(f,d,m,t,n,s,r)},{code:y,map:b}=g;if(h){const{containedPlaceholders:t,transformedCode:n}=((e,t)=>{const n=new Set,s=e.replace(ku,e=>t.has(e)?(n.add(e),`${Iu}${"0".repeat(e.length-5)}${Nu}`):e);return{containedPlaceholders:n,transformedCode:s}})(y,u);let r=n;const o=s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],(e,t)=>(t&&(e+=t),e));o&&(r+=o),a.set(h,g),l.set(h,{containedPlaceholders:t,contentHash:i(r)})}else o.push(g);const E=p?.hashPlaceholder;b&&E&&c.set(p.hashPlaceholder,i(b.toString()).slice(0,p.hashPlaceholder.length))})),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:o,placeholders:u,renderedChunksByPlaceholder:a}}(r,a,s,n,o,i),p=function(e,t,n,s,i,r){const o=new Map(n);for(const n of s){const{fileName:s}=e.get(n);let a="";const l=new Set([n]);for(const e of l){const{containedPlaceholders:n,contentHash:s}=t.get(e);a+=s;for(const e of n)l.add(e)}let c,u;do{u&&(a=u),u=r(a).slice(0,n.length),c=Ru(s,n,u)}while(i[Du].has(c.toLowerCase()));i[c]=Ou,o.set(n,u)}return o}(h,l,c,d,t,o);!function(e,t,n,s,i,r){for(const{chunk:s,code:o,fileName:a,sourcemapFileName:l,map:c}of e.values()){let e=Cu(o,t);const u=Cu(a,t);let d=null;c&&(r.sourcemapDebugIds&&(e+=bd(e,c)),d=l?Cu(l,t):`${u}.map`,c.file=Cu(c.file??"",t),e+=yd(d,c,i,r)),n[u]=s.finalizeChunk(e,c,d,t)}for(const{chunk:e,code:o,fileName:a,sourcemapFileName:l,map:c}of s){let s=t.size>0?Cu(o,t):o,u=null;c&&(r.sourcemapDebugIds&&(s+=bd(s,c)),u=l?Cu(l,t):`${a}.map`,s+=yd(u,c,i,r)),n[a]=e.finalizeChunk(s,c,u,t)}}(h,p,t,u,n,s),lu("transform chunks",2)}async function gd(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=qc(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code});const{compact:u,dir:d,file:h,sourcemap:p,sourcemapExcludeSources:f,sourcemapFile:m,sourcemapPathTransform:g,sourcemapIgnoreList:y}=i;if(u||"\n"===c[c.length-1]||(c+="\n"),p){let s;au("sourcemaps",3),s=h?J(m||h):d?J(d,t):J(t);a=function(e,t,n,s,i,r){const o=ld(r),a=n.filter(e=>!e.excludeFromSourcemap).map(e=>cd(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o)),l=new ad(t,a),c=s.reduce(o,l);let{sources:u,sourcesContent:d,names:h,mappings:p}=c.traceMappings();if(e){const t=W(e);u=u.map(e=>X(t,e)),e=H(e)}for(const e of n)Wc(e.originalSourcemap,e.sourcemapChain);return new S({file:e,mappings:p,names:h,sources:u,sourcesContent:i?void 0:d})}(s,e.generateDecodedMap({}),n,l,f,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=y(t,n);"boolean"!=typeof i&&Ut(_n("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)),g&&(t=g(t,n),"string"!=typeof t&&Ut(_n("sourcemapPathTransform function must return a string."))),a.sources[e]=G(t)}lu("sourcemaps",3)}return{code:c,map:a}}function yd(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=H(e);r=i?new URL(s,i).toString():s,n.emitFile({fileName:e,originalFileName:null,source:t.toString(),type:"asset"})}return"hidden"===s?"":`//# sourceMappingURL=${r}\n`}function bd(e,t){const n=hd.hex(e),s=[n.slice(0,8),n.slice(8,12),"4"+n.slice(12,15),(3&parseInt(n.slice(15,16),16)|8).toString(16)+n.slice(17,20),n.slice(20,32)].join("-");return t.debugId=s,"//# debugId="+s+"\n"}fd+="ppingURL";class Ed{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){au("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===Du?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{au("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),lu("initialize render",2),au("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>21)return Ut(_n(`Hashes cannot be longer than 21 characters, received ${n}. Check the "${t}" option.`));const s=`${Iu}${_i(++e).padStart(n-5,"0")}${Nu}`;return s.length>n?Ut(_n(`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 Ut(An("output.format",_t,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return Ut(An("output.file",Ot,'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 Ut(An("output.sourcemapFile",Vt,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(Et,An("output.amd.id",Dt,'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(),e.inlineTransitiveImports();lu("generate chunks",2),await md(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),au("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),function(e){for(const[t,n]of Object.entries(e)){if(Ad(t))return Ut(dn(t));if("placeholder"!==n.type){const{fileName:e}=n;if(e!==t&&Ad(e))return Ut(dn(e))}}}(n),lu("generate bundle",2),lu("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)xd(e,n,t);return t}assignManualChunks(e){const t=new Map,n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof fu){const i=e(s.id,n);"string"==typeof i&&xd(i,s,t)}return t}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{Xc(t.code,{jsx:!1!==this.inputOptions.jsx})}catch(e){this.inputOptions.onLog(Et,ln(t,e))}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:n,inlineDynamicImports:s,manualChunks:i,preserveModules:r,onlyExplicitManualChunks:o}=this.outputOptions,a="object"==typeof i?await this.addManualChunks(i):this.assignManualChunks(i),l=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}`,u=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,d=(e,{functionReturn:n,lineBreakIndent:s,name:i})=>[`${u(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=>qn.test(e):e=>!jn.has(e)&&qn.test(e);return{_:r,cnst:l,getDirectReturnFunction:d,getDirectReturnIifeLeft:(e,n,{needsArrowReturnParens:s,needsWrappedFunction:i})=>{const[r,o]=d(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${rd(`${r}${rd(n,t&&s)}${o}`,t||i)}(`},getFunctionIntro:u,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=Xn(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),c=function(e){const t=[];for(const n of e.values())n instanceof fu&&(n.isIncluded()||n.info.isEntry||n.includedDynamicImporters.length>0)&&t.push(n);return t}(this.graph.modulesById),u=function(e){if(0===e.length)return"/";if(1===e.length)return W(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)&&j(s.id)&&n.push(s.id);return n}(c,r)),d=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof Yn&&s.set(i,new Eo(i,t,n));return s}(this.graph.modulesById,this.outputOptions,u),h=s?[{alias:null,modules:c}]:r?c.map(e=>({alias:null,modules:[e]})):Wu(this.graph.entryModules,a,n,this.inputOptions.onLog,"function"==typeof i,o),p=new Array(h.length),f=new Map;let m=0;for(const{alias:n,modules:s}of h){sd(s);const i=new zu(s,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,f,d,this.facadeChunkByModule,this.includedNamespaces,n,t,e,u,l);p[m++]=i}for(const e of p)e.link();s||r||this.checkCircularChunks(p);const g=[];for(const e of p)g.push(...e.generateFacades());return[...p,...g]}checkCircularChunks(e){const t=new Set,n=new Map,s=(e,s)=>{if(n.has(e)){if(!t.has(e)){const t=[e.getChunkName()];let i=e.isManualChunk,r=s;for(;r!==e&&r;)t.push(r.getChunkName()),i&&=r.isManualChunk,r=n.get(r);t.push(t[0]),t.reverse(),this.inputOptions.onLog(Et,function(e,t){return{code:"CIRCULAR_CHUNK",ids:e,message:`Circular chunk: ${e.join(" -> ")}. ${t?"Please adjust the manual chunk logic for these chunks.":`Please consider disabling the "output.onlyExplicitManualChunks" option, as enabling it causes modules located between the modules included in the manual chunk "${e.at(-2)}" to be extracted into the separate chunk "${e.at(-1)}".`}`}}(t,i))}}else n.set(e,s),i(e)},i=e=>{for(const t of e.dependencies)t instanceof zu&&s(t,e);t.add(e)};for(const t of e)n.has(t)||i(t)}}function xd(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return Ut((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${Pt(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}function Ad(e){const t=function(...e){const t=e.join("/"),n=V.test(t[0]);return(n?"/":"")+(K(t.split(V),n)||(n?"":"."))}(e).replaceAll("\\","/");return".."===t||t.startsWith("../")||"."===t||j(t)}class Sd extends Ti{constructor(){super(),this.parent=null,this.variables.set("undefined",new fo)}findVariable(e){let t=this.variables.get(e);return t||(t=new Ii(e),this.variables.set(e,t)),t}}async function $d(e,t,n,s,i,r,o,a,l,c,u){const d=await function(e,t,n,s,i,r,o,a,l){let c=null,u=null;if(i){c=new Set;for(const n of i)e===n.source&&t===n.importer&&c.add(n.plugin);u=(e,t)=>({...e,resolve:(e,n,{attributes:r,custom:o,isEntry:a,skipSelf:l,importerAttributes:c}=de)=>(l??=!0,l&&-1!==i.findIndex(s=>s.plugin===t&&s.source===e&&s.importer===n)?Promise.resolve(null):s(e,n,o,a,r||he,c,l?[...i,{importer:n,plugin:t,source:e}]:i))})}return n.hookFirstAndGetPlugin("resolveId",[e,t,{attributes:a,custom:r,importerAttributes:l,isEntry:o}],u,c)}(e,t,s,i,r,o,a,l,c);if(null!=d){const[e,t]=d;return"object"!=typeof e||e.resolvedBy?"string"==typeof e?{id:e,resolvedBy:t.name}:e:{...e,resolvedBy:t.name}}return void 0===t||j(e)||"."===e[0]?async function(e,t,n){return await vd(e,t,n)??await vd(e+".mjs",t,n)??await vd(e+".js",t,n)}(t?J(W(t),e):J(e),n,u):null}async function vd(e,t,n){try{const s=await n.lstat(e);if(!t&&s.isSymbolicLink())return await vd(await n.realpath(e),t,n);if(t&&s.isSymbolicLink()||s.isFile()){const t=H(e);if((await n.readdir(W(e))).includes(t))return e}}catch{}}function Pd(e){return 65279===e.charCodeAt(0)?Pd(e.slice(1)):e}const wd=(e,t,n=Cd)=>{const{onwarn:s,onLog:i}=e,r=Id(n,s);if(i){const e=St[t];return(t,n)=>i(t,Nd(n),(t,n)=>{if("error"===t)return Ut(kd(n));St[t]>=e&&r(t,kd(n))})}return r},Id=(e,t)=>t?(n,s)=>{n===Et?t(Nd(s),t=>e(Et,kd(t))):e(n,s)}:e,Nd=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),kd=e=>"string"==typeof e?{message:e}:"function"==typeof e?kd(e()):e,Cd=(e,{message:t})=>{switch(e){case Et:return console.warn(t);case At:return console.debug(t);default:return console.info(t)}};function Rd(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(Et,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const Dd={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:pe,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:pe,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:pe,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Od={preserve:{factory:null,fragment:null,importSource:null,mode:"preserve"},"preserve-react":{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"preserve"},react:{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"classic"},"react-jsx":{factory:"React.createElement",importSource:"react",jsxImportSource:"react/jsx-runtime",mode:"automatic"}},Md={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},_d=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};Ut(An(`${n}.preset`,s,`valid values are ${$t(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;Ut(An(t,n,`valid values are ${s}${$t(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)},Ld=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),Td="at position ",Bd="at output position ";const zd={delete:()=>!1,get(){},has:()=>!1,set(){}};function Vd(e){return e.startsWith(Td)||e.startsWith(Bd)?Ut({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Ut({code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}async function Fd(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:qc(e.map);const a=e.code;let l=e.ast;const c=[],u=[];let d=!1;const h=()=>d=!0;let p="",f=e.code;const m=e=>(t,n)=>{t=kd(t),n&&Ht(t,n,f,i),t.id=i,t.hook="transform",e(t)};let g;try{g=await n.hookReduceArg0("transform",[f,i,{attributes:t.info.attributes}],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.onLog(Et,function(e){return{code:"NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(i.name)),e;n.attributes&&Ln('Returning attributes from the "transform" hook is forbidden.',"plugin-development/#transform",!1,s),({code:o,map:a,ast:l}=n)}return null!==a&&r.push(qc("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),f=o,o},(e,t)=>{return p=t.name,{...e,addWatchFile(t){c.push(t),e.addWatchFile(t)},cache:d?e.cache:(l=e.cache,g=h,{delete:e=>(g(),l.delete(e)),get:e=>(g(),l.get(e)),has:e=>(g(),l.has(e)),set:(e,t)=>(g(),l.set(e,t))}),debug:m(e.debug),emitFile:e=>(u.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&Ht(t,n,f,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:qc({version:3,...cd(e,t,n,s,ld(i)).traceMappings()})}(i,a,o,r,s.onLog);if(!e){return new M(a).generateMap({hires:!0,includeContent:!0,source:i})}return o!==e&&(o=e,r.length=0),new S({...e,sourcesContent:e.sourcesContent})},info:m(e.info),setAssetSource(){return this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:m(e.warn)};var l,g})}catch(e){return Ut(Rn(e,p,{hook:"transform",id:i}))}return!d&&u.length>0&&(t.transformFiles=u),{ast:l,code:g,customTransformCache:d,originalCode:a,originalSourcemap:o,safeVariableNames:null,sourcemapChain:r,transformDependencies:c}}const jd="resolveDependencies";class Ud{constructor(e,t,n,s){this.graph=e,this.modulesById=t,this.options=n,this.pluginDriver=s,this.implicitEntryModules=new Set,this.sortedEntryModules=[],this.entryModules=new Set,this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.resolveId=async(e,t,n,s,i,r,o=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await $d(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,o,n,"boolean"==typeof s?s:!t,i,r,this.options.fs),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,void 0))));return await this.awaitLoadModulesPromise(),n}async addEntryModules(e,t){const n=await this.extendLoadModulesPromise(Promise.all(e.map(({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null,void 0,void 0))).then(n=>{let s=!1;for(const[i,r]of n.entries())r.isUserDefinedEntryPoint=r.isUserDefinedEntryPoint||t,Hd(r,e[i],t),this.entryModules.has(r)||(this.sortedEntryModules.push(r),this.entryModules.add(r),s=!0);return s&&this.sortedEntryModules.sort((e,t)=>e.id>t.id?1:-1),n}));return await this.awaitLoadModulesPromise(),{entryModules:this.sortedEntryModules,implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}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,he),void 0,!1,!e.resolveDependencies||jd)).info}addEntryWithImplicitDependants(e,t){return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null,void 0,void 0).then(async n=>{if(Hd(n,e,!1),!n.info.isEntry){const s=await Promise.all(t.map(t=>this.loadEntryModule(t,!1,e.importer,n.id,void 0,void 0)));if(!n.info.isEntry){this.implicitEntryModules.add(n);for(const e of s)n.implicitlyLoadedAfter.add(e);for(const e of n.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(n)}}return n}))}async addModuleSource(e,t,n){let s;try{s=await this.graph.fileOperationQueue.run(async()=>{const t=await this.pluginDriver.hookFirst("load",[e,{attributes:n.info.attributes}]);return null!==t?("object"==typeof t&&t.attributes&&Ln('Returning attributes from the "load" hook is forbidden.',"plugin-development/#load",!1,this.options),t):(this.graph.watchFiles[e]=!0,await this.options.fs.readFile(e,{encoding:"utf8"}))})}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${Pt(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:Ut(function(e){return{code:"BAD_LOADER",message:`Error loading "${Pt(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e));i.code=Pd(i.code);const r=this.graph.cachedModules.get(e);if(!r||r.customTransformCache||r.originalCode!==i.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:r.ast,attributes:r.attributes,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}]))n.updateOptions(i),await n.setSource(await Fd(i,n,this.pluginDriver,this.options));else{if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);await n.setSource(r)}}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([{argument:t,node:n},s])=>null===s?null:"string"==typeof s?(n.resolution=s,null):"source"!==n.phase||s.external?n.resolution=await this.fetchResolvedDependency(Pt(s.id),e.id,s):Ut(Pn("string"==typeof t?t:Pt(s.id),e.id)))));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 fu)return r&&Qc(e,l.info.attributes)&&this.options.onLog(Et,fn(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof Yn)return Ut({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 fu(this.graph,t,this.options,o,s,i,n,e);this.modulesById.set(t,c);const u=this.addModuleSource(t,r,c).then(()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),d]),d=qd(u).then(()=>this.pluginDriver.hookParallel("moduleParsed",[c.info]));d.catch(()=>{}),this.moduleLoadPromises.set(c,u);const h=await u;return a?a===jd&&await d: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 Yn))return Ut(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${Pt(t)}", but is already an existing non-external module id.`}}(e,t));Qc(l.info.attributes,s)&&this.options.onLog(Et,fn(l.info.attributes,s,e,t))}else l=new Yn(this.options,r,o,a,"absolute"!==i&&j(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])=>e.sourcePhaseSources.has(t)&&!n.external?Ut(Pn(t,e.id)):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 fu&&(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||!j(e.id)||!0===i&&Wd(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(Wd(e,n,s)||"absolute"),id:i&&s?Gd(e,t):e}}const i=s?Gd(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:Wd(i,n,s)||"absolute",id:i}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map(async t=>{const n=await this.resolveDynamicImport(e,t.argument,e.id,Yc(t.node));return n&&"string"!=typeof n?(t.node.shouldIncludeDynamicAttributes=!!n.external,t.id=n.id):t.node.shouldIncludeDynamicAttributes=!0,[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,he,!1,n,e.info.attributes),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===jd?qd(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?U(t)?Ut(function(e,t){return{code:rn,exporter:e,id:t,message:`Could not resolve "${e}" from "${Pt(t)}"`}}(t,n)):(this.options.onLog(Et,function(e,t){return{code:rn,exporter:e,id:t,message:`"${e}" is imported by "${Pt(t)}", but could not be resolved – treating it as an external dependency.`,url:kt("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(Et,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${Pt(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1,r){const o=await $d(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,he,!0,he,r,this.options.fs);if(null==o)return Ut(null===s?function(e){return{code:sn,message:`Could not resolve entry module "${Pt(e)}".`}}(e):function(e,t){return{code:Zt,message:`Module "${Pt(e)}" that should be implicitly loaded before "${Pt(t)}" could not be resolved.`}}(e,s));const a="object"==typeof o&&o.external;return!1===o||a?Ut(null===s?a&&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:sn,message:`Entry module "${Pt(e)}" cannot be external.`}}(e):function(e,t){return{code:Zt,message:`Module "${Pt(e)}" that should be implicitly loaded before "${Pt(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof o?o:{id:o},he),void 0,t,!1)}async resolveDynamicImport(e,t,n,s){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,n,{attributes:s,importerAttributes:e.info.attributes}]);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?(Qc(i.attributes,s)&&this.options.onLog(Et,fn(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,he,!1,s,e.info.attributes),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function Gd(e,t){return U(e)?t?J(t,"..",e):J(e):e}function Hd(e,{fileName:t,name:n},s){null!==t?e.chunkFileNames.add(t):null!==n&&(e.chunkNames.push({isUserDefined:s,name:n}),e.chunkNames.sort((e,t)=>e.name>t.name?1:-1))}function Wd(e,t,n){return!0===n||"ifRelativeSource"===n&&U(t)||!j(e)}async function qd(e){const[t,n]=await e;return Promise.all([...t,...n])}function Kd(e,t,n,s,i,r,o,a,l){const c=o.sanitizeFileName(e||"asset");return _u(Mu("function"==typeof o.assetFileNames?o.assetFileNames({get name(){return Ln('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',jt,!1,l),e},names:t,get originalFileName(){return Ln('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',jt,!1,l),s},originalFileNames:i,source:n,type:"asset"}):o.assetFileNames,"output.assetFileNames",{ext:()=>q(c).slice(1),extname:()=>q(c),hash:e=>r.slice(0,Math.min(Math.max(0,e||8),21)),name:()=>c.slice(0,Math.max(0,c.length-q(c).length))}),a)}function Xd(e,{bundle:t},n){t[Du].has(e.toLowerCase())?n(Et,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Ou}const Jd=new Set(["chunk","asset","prebuilt-chunk"]);function Yd(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return Ut(_n(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}class Zd{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&&Jd.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!wt(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):Ut(_n(`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}".`)):Ut(_n(`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 Ut(on(t.name||e))},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?(n=t,s=this.facadeChunkByModule,n.fileName?n.fileName:s?s.get(n.module).getFileName():Ut({code:"CHUNK_NOT_GENERATED",message:`Plugin error - Unable to get file name for emitted chunk "${n.fileName||n.name}". You can only get file names once chunks have been generated after the "renderStart" hook.`})):"prebuilt-chunk"===t.type?t.fileName:function(e,t){return"string"!=typeof e.fileName?Ut({code:"ASSET_NOT_FINALISED",message:`Plugin error - Unable to get file name for asset "${e.name||t}". 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}(t,e):Ut({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`});var n,s},this.setAssetSource=(e,t)=>{const n=this.filesByReferenceId.get(e);if(!n)return Ut({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return Ut(_n(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return Ut({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=Yd(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=hd[t.hashCharacters],s=this.output={bundle:e,fileNamesBySourceHash:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&Xd(e.fileName,s,this.options.onLog);const i=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,s);else{me(i,n(e.source),ye).push(e)}else"prebuilt-chunk"===e.type&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e));for(const[e,t]of i)this.finalizeAssetsWithSameSource(t,e,s)},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=dd(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:Yd(e.source,e,null),n=e.originalFileName||null;"string"==typeof n&&(this.graph.watchFiles[n]=!0);const s={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,originalFileName:n,referenceId:"",source:t,type:"asset"},i=this.assignReferenceId(s,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(s,this.output);else for(const e of this.outputFileEmitters)e.emitAssetWithReferenceId(s,e.output);return i}emitAssetWithReferenceId(e,t){const{fileName:n,source:s}=e;n&&Xd(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>Gc.LOAD_AND_PARSE)return Ut({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return Ut(_n(`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 Ut(_n(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||wt(e.fileName))return Ut(_n(`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,fileNamesBySourceHash:s,getHash:i,outputOptions:r}){let{fileName:o,name:a,needsCodeReference:l,originalFileName:c,referenceId:u}=e;if(!o){const e=i(t);o=s.get(e),o||(o=Kd(a,a?[a]:[],t,c,c?[c]:[],e,r,n,this.options),s.set(e,o))}const d={...e,fileName:o,source:t};this.filesByReferenceId.set(u,d);const h=n[o];if("asset"===h?.type)h.needsCodeReference&&=l,a&&h.names.push(a),c&&h.originalFileNames.push(c);else{const{options:e}=this;n[o]={fileName:o,get name(){return Ln('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',jt,!1,e),a},names:a?[a]:[],needsCodeReference:l,get originalFileName(){return Ln('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',jt,!1,e),c},originalFileNames:c?[c]:[],source:t,type:"asset"}}}finalizeAssetsWithSameSource(e,t,{bundle:n,fileNamesBySourceHash:s,outputOptions:i}){const{names:r,originalFileNames:o}=function(e){const t=[],n=[];for(const{name:s,originalFileName:i}of e)"string"==typeof s&&t.push(s),i&&n.push(i);return n.sort(),t.sort((e,t)=>e.length-t.length||(e>t?1:e===t?0:-1)),{names:t,originalFileNames:n}}(e);let a,l="",c=!0;for(const s of e){c&&=s.needsCodeReference;const e=Kd(s.name,r,s.source,s.originalFileName,o,t,i,n,this.options);(!l||e.length<l.length||e.length===l.length&&e<l)&&(l=e,a=s)}s.set(t,l);for(const t of e){const e={...t,fileName:l};this.filesByReferenceId.set(t.referenceId,e)}const{options:u}=this;n[l]={fileName:l,get name(){return Ln('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',jt,!1,u),a.name},names:r,needsCodeReference:c,get originalFileName(){return Ln('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',jt,!1,u),a.originalFileName},originalFileNames:o,source:a.source,type:"asset"}}}function Qd(e,t,n,s,i){return St[e]<St[i]?Qn:(i,r)=>{null!=r&&n(Et,{code:"INVALID_LOG_POSITION",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=kd(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}const eh=e;function th(e,t,n,s,i,r){const{logLevel:o,onLog:a}=s;let l,c=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(Td)||e.name.startsWith(Bd)||r.has(e.name)?c=!1:r.add(e.name)),t)if(c){const n=e.cacheKey||e.name;d=t[n]||(t[n]=Object.create(null)),l={delete:e=>delete d[e],get(e){const t=d[e];if(t)return t[0]=0,t[1]},has(e){const t=d[e];return!!t&&(t[0]=0,!0)},set(e,t){d[e]=[0,t]}}}else u=e.name,l={delete:()=>Vd(u),get:()=>Vd(u),has:()=>Vd(u),set:()=>Vd(u)};else l=zd;var u,d;return{addWatchFile(e){n.watchFiles[e]=!0},cache:l,debug:Qd(At,"PLUGIN_LOG",a,e.name,o),emitFile:i.emitFile.bind(i),error:t=>Ut(Rn(kd(t),e.name)),fs:s.fs,getFileName:i.getFileName,getModuleIds:()=>n.modulesById.keys(),getModuleInfo:n.getModuleInfo,getWatchFiles:()=>Object.keys(n.watchFiles),info:Qd(xt,"PLUGIN_LOG",a,e.name,o),load:e=>n.moduleLoader.preloadModule(e),meta:{rollupVersion:eh,watchMode:n.watchMode},parse:Xc,resolve:(t,s,{attributes:i,custom:r,isEntry:o,skipSelf:a,importerAttributes:l}=de)=>(a??=!0,n.moduleLoader.resolveId(t,s,r,o,i||he,l,a?[{importer:s,plugin:e,source:t}]:null)),setAssetSource:i.setAssetSource,warn:Qd(Et,"PLUGIN_WARNING",a,e.name,o)}}function nh(e){return Array.isArray(e)?e.filter(Boolean):e?[e]:[]}function sh(e){if(e instanceof RegExp)return t=>{const n=G(t),s=e.test(n);return e.lastIndex=0,s};const t=process.cwd(),n=function(e,t){return e.startsWith("**")||j(e)?G(e):G(J(t,e))}(e,t),s=da(n,{dot:!0});return e=>{const t=G(e);return s(t)}}function ih(e){return e instanceof RegExp?t=>{const n=e.test(t);return e.lastIndex=0,n}:t=>t.includes(e)}function rh(e,t){if(e||t)return n=>!e?.some(e=>e(n))&&(!!t?.some(e=>e(n))||!(t&&t.length>0))}function oh(e){return"string"==typeof e||e instanceof RegExp?{include:[e]}:Array.isArray(e)?{include:e}:{exclude:e.exclude?nh(e.exclude):void 0,include:e.include?nh(e.include):void 0}}function ah(e){if(!e)return;const{exclude:t,include:n}=oh(e),s=t?.map(sh),i=n?.map(sh);return rh(s,i)}function lh(e,t){if(!e&&!t)return;const n=ah(e),s=function(e){if(!e)return;const{exclude:t,include:n}=oh(e),s=t?.map(ih),i=n?.map(ih);return rh(s,i)}(t);return(e,t)=>{let i=!0;return n&&(i&&=n(e)),!!i&&(s&&(i&&=s(t)),i)}}const ch=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 uh{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.compiledPluginFilters={idOnlyFilter:new WeakMap,transformFilter:new WeakMap},this.fileEmitter=new Zd(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,th(n,s,e,t,this.fileEmitter,r)])),i)for(const e of n)for(const n of ch)n in e&&t.onLog(Et,yn(e.name,n))}createOutputPluginDriver(e){return new uh(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,ph))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(fh)}getSortedPlugins(e,t){return me(this.sortedPlugins,e,()=>dh(e,this.plugins,t))}runHook(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;if("object"==typeof i&&"filter"in i&&i.filter)if("transform"===e){const e=i.filter,n=t,s=me(this.compiledPluginFilters.transformFilter,e,()=>lh(e.id,e.code));if(s&&!s(n[1],n[0]))return Promise.resolve()}else if("resolveId"===e||"load"===e){const e=i.filter,n=t,s=me(this.compiledPluginFilters.idOnlyFilter,e,()=>function(e){const t=ah(e);return t?e=>!!t(e):void 0}(e.id));if(s&&!s(n[0]))return Promise.resolve()}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),Ut(Rn(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 Ut(Rn(t,n.name,{hook:e}))}}}function dh(e,t,n=hh){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 hh(e,t,n){"function"!=typeof e&&Ut(function(e,t){return{code:Jt,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 ph(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return Ut(function(e,t){return{code:Jt,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 fh(){}class mh{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 gh{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,n,s,i=e;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 Le,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=Gc.LOAD_AND_PARSE,this.scope=new Sd,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 uh(this,e,e.plugins,this.pluginCache),this.moduleLoader=new Ud(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new mh(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[Tn]=!0}return t})(e)}async build(){au("generate module graph",2),await this.generateModuleGraph(),lu("generate module graph",2),au("sort and bind modules",2),this.phase=Gc.ANALYSE,this.sortAndBindModules(),lu("sort and bind modules",2),au("mark included statements",2),this.includeStatements(),lu("mark included statements",2),this.phase=Gc.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.cacheInfoGetters(),e instanceof fu?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)Zn(t);if(this.options.treeshake){let t=1;this.newlyIncludedVariableInits.clear();do{au(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)if(e.isExecuted){e.hasTreeShakingPassStarted=!0,"no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include();for(const e of this.newlyIncludedVariableInits)this.newlyIncludedVariableInits.delete(e),e.include(Ge(),!1)}if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(),this.needsTreeshakingPass=!0);lu("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()||Ut(vn(t))}sortAndBindModules(){const{orderedModules:e,cyclePaths:t}=id(this.entryModules);for(const e of t)this.options.onLog(Et,cn(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())if("*"!==t.name&&"source"!==t.phase){const[n,s]=t.module.getVariableForExportName(t.name,{importChain:[e.id]});n||e.log(Et,$n(t.name,e.id,t.module.id,!!s?.missingButExportExists),t.start)}}}function yh(e,t){return t()}const bh=e;function Eh(e,t,n,s){e=dh("onLog",e);const i=St[s],r=(s,o,a=fe)=>{qt(o);if(!(St[s]<i)){for(const t of e){if(a.has(t))continue;const{onLog:e}=t,l=e=>St[e]<i?Qn:n=>r(e,kd(n),new Set(a).add(t));if(!1===("handler"in e?e.handler:e).call({debug:l(At),error:e=>Ut(kd(e)),info:l(xt),meta:{rollupVersion:bh,watchMode:n},warn:l(Et)},s,o))return}t(s,o)}};return r}const xh=e=>()=>Ut(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:kt("plugin-development/#a-simple-example")}}(e)),Ah=xh("fs.appendFile"),Sh=xh("fs.copyFile"),$h=xh("fs.mkdir"),vh=xh("fs.mkdtemp"),Ph=xh("fs.readdir"),wh=xh("fs.readFile"),Ih=xh("fs.realpath"),Nh=xh("fs.rename"),kh=xh("fs.rmdir"),Ch=xh("fs.stat"),Rh=xh("fs.lstat"),Dh=xh("fs.unlink"),Oh=xh("fs.writeFile");var Mh=Object.freeze({__proto__:null,appendFile:Ah,copyFile:Sh,lstat:Rh,mkdir:$h,mkdtemp:vh,readFile:wh,readdir:Ph,realpath:Ih,rename:Nh,rmdir:kh,stat:Ch,unlink:Dh,writeFile:Oh});const _h=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Lh=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>"\0"!==t[0]&&e(t,...n)||!1;if(e){const t=new Set,n=[];for(const s of nh(e))s instanceof RegExp?n.push(s):t.add(s);return(e,...s)=>t.has(e)||n.some(t=>t.test(e))}return()=>!1},Th=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},Bh=e=>{const t=e.jsx;if(!t)return!1;const n=_d(t,Od,"jsx",Rt,"false, "),{factory:s,importSource:i,mode:r}=n;switch(r){case"automatic":return{factory:s||"React.createElement",importSource:i||"react",jsxImportSource:n.jsxImportSource||"react/jsx-runtime",mode:"automatic"};case"preserve":return!i||s||n.fragment||Ut(An("jsx",Rt,"when preserving JSX and specifying an importSource, you also need to specify a factory or fragment")),{factory:s||null,fragment:n.fragment||null,importSource:i||null,mode:"preserve"};default:return r&&"classic"!==r&&Ut(An("jsx.mode",Rt,'mode must be "automatic", "classic" or "preserve"',r)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},zh=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:1e3},Vh=(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[J(t)]=s;return n=>e[n]??t}return()=>t},Fh=e=>{if(!1===e.treeshake)return!1;const t=_d(e.treeshake,Dd,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??pe,moduleSideEffects:jh(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},jh=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>"\0"===t[0]||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&Ut(An("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},Uh=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,Gh=/^[a-z]:/i;function Hh(e){const t=Gh.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Uh,"_")}const Wh=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return Ut(An("output.file",Ot,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return Ut(An("output.file",Ot,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},qh=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 Ut(An("output.format",_t,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Kh=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?Ut(An("output.inlineDynamicImports",Lt,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},Xh=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return Ut(An("output.inlineDynamicImports",Lt,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return Ut(An("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},Jh=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return J(t)},Yh=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Ut(An("output.amd.id",Dt,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Ut(An("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}},Zh=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},Qh=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?Ut(An("output.dir",Ot,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},ep=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function tp(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return Ut({code:Kt,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:kt(Mt)});return n||"auto"}const np=(e,t)=>(null!=e.externalImportAssertions&&Ln('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),sp=e=>{const t=_d(e.generatedCode,Md,"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}},ip=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},rp=new Set(["compat","auto","esModule","default","defaultOnly"]),op=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||ap(n=t(s)):s in e?e[s]:ap(e[s]=t(s))}return void 0===t?()=>"default":()=>ap(t)},ap=e=>rp.has(e)?e:Ut(An("output.interop",Tt,`use one of ${Array.from(rp,e=>JSON.stringify(e)).join(", ")}`,e)),lp=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return Ut(An("output.manualChunks",Bt,'this option is not supported for "output.inlineDynamicImports"'));if(n)return Ut(An("output.manualChunks",Bt,'this option is not supported for "output.preserveModules"'))}return s||{}},cp=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),up=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},dp=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+"/":Ut(An("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n},hp=e;function pp(e){return async function(e,t){const{options:n,unsetOptions:s}=await async function(e,t){if(!e)throw new Error("You must supply an options object to rollup");const n=await async function(e,t){const n=dh("options",await Ld(e.plugins)),s=e.logLevel||xt,i=Eh(n,wd(e,s),t,s);for(const r of n){const{name:n,options:o}=r,a="handler"in o?o.handler:o,l=await a.call({debug:Qd(At,"PLUGIN_LOG",i,n,s),error:e=>Ut(Rn(kd(e),n,{hook:"onLog"})),info:Qd(xt,"PLUGIN_LOG",i,n,s),meta:{rollupVersion:hp,watchMode:t},warn:Qd(Et,"PLUGIN_WARNING",i,n,s)},e);l&&(e=l)}return e}(e,t),{options:s,unsetOptions:i}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await Ld(e.plugins),r=e.logLevel||xt,o=Eh(i,wd(e,r),t,r),a=e.strictDeprecations||!1,l=zh(e),c={cache:_h(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Lh(e.external),fs:e.fs??Mh,input:Th(e),jsx:Bh(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:Vh(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:Fh(e)};return Rd(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(n,t);return fp(s.plugins,Td),{options:s,unsetOptions:i}}(e,null!==t);(function(e){e.perf?(nu=new Map,au=iu,lu=ru,e.plugins=e.plugins.map(uu)):(au=Qn,lu=Qn)})(n),await async function(){await Oa()}();const i=new gh(n,t),r=!1!==e.cache;e.cache&&(n.cache=void 0,e.cache=void 0);au("BUILD",1),await yh(i.pluginDriver,async()=>{try{au("initialize",2),await i.pluginDriver.hookParallel("buildStart",[n]),lu("initialize",2),await i.build()}catch(e){const t=Object.keys(i.watchFiles);t.length>0&&(e.watchFiles=t);try{await i.pluginDriver.hookParallel("buildEnd",[e])}catch(t){const n=Gt({...e,message:`There was an error during the build:\n ${e.message}\nAdditionally, handling the error in the 'buildEnd' hook caused the following error:\n ${t.message}`});throw await i.pluginDriver.hookParallel("closeBundle",[n]),n}throw await i.pluginDriver.hookParallel("closeBundle",[e]),e}try{await i.pluginDriver.hookParallel("buildEnd",[])}catch(e){throw await i.pluginDriver.hookParallel("closeBundle",[e]),e}}),lu("BUILD",1);const o={get cache(){return r?i.getCache():void 0},async close(){o.closed||(o.closed=!0,await i.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,async[Symbol.asyncDispose](){await this.close()},generate:async e=>o.closed?Ut({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):mp(!1,n,s,e,i),get watchFiles(){return Object.keys(i.watchFiles)},write:async e=>o.closed?Ut({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):mp(!0,n,s,e,i)};n.perf&&(o.getTimings=ou);return o}(e,null)}function fp(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function mp(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 Ld(e.plugins);fp(i,Bd);const r=t.createOutputPluginDriver(i);return{...await gp(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return yh(0,async()=>{const n=new Ed(r,a,t,o,i),s=await n.generate(e);if(e){if(au("WRITE",1),!r.dir&&!r.file)return Ut({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:kt(Ot)});await Promise.all(Object.values(s).map(e=>i.fileOperationQueue.run(()=>async function(e,t,{fs:{mkdir:n,writeFile:s}}){const i=J(t.dir||W(t.file),e.fileName);return await n(W(i),{recursive:!0}),s(i,"asset"===e.type?e.source:e.code)}(e,r,t)))),await o.hookParallel("writeBundle",[r,s]),lu("WRITE",1)}return l=s,{output:Object.values(l).filter(e=>Object.keys(e).length>0).sort((e,t)=>bp(e)-bp(t))};var l})}function gp(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=qh(e),o=Kh(e,t),a=Xh(e,o,t),l=Wh(e,a,t),c=sp(e),u=np(e,t),d={amd:Yh(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:Zh(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:Qh(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:ep(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:tp(e,s),extend:e.extend||!1,externalImportAssertions:u,externalImportAttributes:u,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:Zh(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:c,globals:e.globals||{},hashCharacters:e.hashCharacters??"base64",hoistTransitiveImports:e.hoistTransitiveImports??!0,importAttributesKey:e.importAttributesKey??"assert",indent:ip(e,i),inlineDynamicImports:o,interop:op(e),intro:Zh(e,"intro"),manualChunks:lp(e,o,a),minifyInternalExports:cp(e,r,i),name:e.name,noConflict:e.noConflict||!1,onlyExplicitManualChunks:e.onlyExplicitManualChunks||!1,outro:Zh(e,"outro"),paths:e.paths||{},plugins:await Ld(e.plugins),preserveModules:a,preserveModulesRoot:Jh(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Hh,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:dp(e),sourcemapDebugIds:e.sourcemapDebugIds||!1,sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:up(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,virtualDirname:e.virtualDirname||"_virtual"};return Rd(e,Object.keys(d),"output options",t.onLog),{options:d,unsetOptions:s}}(s.hookReduceArg0Sync("outputOptions",[n],(e,t)=>t||e,e=>{const t=()=>e.error({code:"CANNOT_EMIT_FROM_OPTIONS_HOOK",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 yp;function bp(e){return"asset"===e.type?yp.ASSET:e.isEntry?yp.ENTRY_CHUNK:yp.SECONDARY_CHUNK}function Ep(e){return e}Symbol.asyncDispose??=Symbol("Symbol.asyncDispose"),function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(yp||(yp={}));const xp=e;export{xp as VERSION,Ep as defineConfig,pp as rollup};