@rollup/browser 4.68.1 → 4.68.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.68.1
4
- Mon, 09 Nov 2026 05:27:12 GMT - commit d1728b6a134c3a70f53a6961b20b19d4a148d236
3
+ Rollup.js v4.68.3
4
+ Fri, 13 Nov 2026 08:23:38 GMT - commit 0c5497fb4d86cc769380d4945574488113e08ac2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
8
8
  Released under the MIT License.
9
9
  */
10
- var e="4.68.1",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))}forEach(e){const t=this.bits;for(let n=0;n<t.length;n++){let s=t[n];for(;s;){const t=s&-s;e(31+(n<<5)-Math.clz32(t)),s^=t}}}},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.replacesUntil=-1,this.replacedFrom=-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.replacesUntil=this.replacesUntil,t.replacedFrom=this.replacedFrom,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.replacesUntil=-1,this.replacedFrom=-1,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,!0),r.replacedFrom=this.replacedFrom):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="string"==typeof e.mappings?e.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 v(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 P(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 $=Object.prototype.toString;function w(e){return"[object Object]"===$.call(e)}const I=(()=>{const e=new Uint8Array(64);for(let t=0;t<64;t++)e[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t);return e})(),N=new Uint8Array(16384);function C(e,t){t=t<0?-t<<1|1:t<<1;do{let n=31&t;(t>>>=5)>0&&(n|=32),N[e++]=I[n]}while(t>0);return e}const k=new TextDecoder;var R=class{constructor(){this.out="",this.pos=0,this.lines=[],this.buffered=0,this.needsComma=!1,this.prevGenColumn=0,this.prevSourceIndex=0,this.prevSourceLine=0,this.prevSourceColumn=0,this.prevNameIndex=0}endLine(e){this.lines.push(e),this.buffered+=e.length+1,this.buffered>=4096&&this.drain(null)}segments(e){this.drain(e)}finish(e){return this.drain(e),this.flush(),this.out}drain(e){const t=this.lines,n=t.length;for(let s=0;s<=n;s++){const i=s<n?t[s]:e;if(null===i)break;for(let e=0;e<i.length;e++){this.pos>16348&&this.flush();const t=i[e];this.needsComma&&(N[this.pos++]=44),this.needsComma=!0,this.pos=C(this.pos,t[0]-this.prevGenColumn),this.prevGenColumn=t[0],this.pos=C(this.pos,t[1]-this.prevSourceIndex),this.prevSourceIndex=t[1],this.pos=C(this.pos,t[2]-this.prevSourceLine),this.prevSourceLine=t[2],this.pos=C(this.pos,t[3]-this.prevSourceColumn),this.prevSourceColumn=t[3],5===t.length&&(this.pos=C(this.pos,t[4]-this.prevNameIndex),this.prevNameIndex=t[4])}s<n&&(this.pos>16348&&this.flush(),N[this.pos++]=59,this.needsComma=!1,this.prevGenColumn=0)}t.length=0,this.buffered=0,this.flush()}flush(){this.out+=k.decode(N.subarray(0,this.pos)),this.pos=0}};function O(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||95===e}var D=class{constructor(e,t=null){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.rawRangeMappingsIndices=[],this.rawRangeMappings="experimental-range"===e?[this.rawRangeMappingsIndices]:void 0,this.encoder=t}nextLine(){null===this.encoder?(this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[]):(this.encoder.endLine(this.rawSegments),this.rawSegments=[],this.generatedCodeLine+=1),this.generatedCodeColumn=0,this.rawRangeMappings&&(this.rawRangeMappings[this.generatedCodeLine]=this.rawRangeMappingsIndices=[])}addMagicString(e,t,n){const{original:s}=e,i=v(s);e.intro&&this.advance(e.intro),e.firstChunk.eachNext(r=>{if(r.intro.length&&this.advance(r.intro),-1===t)this.advance(r.content);else if(r.edited){const e=r.storeName?n.get(s.slice(r.start,r.replacesUntil)):void 0;this.addEdit(t,r.content,i(r.start),e??-1)}else this.addUneditedChunk(t,r,s,i(r.start),e.sourcemapLocations);r.outro.length&&this.advance(r.outro)}),e.outro&&this.advance(e.outro)}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.nextLine(),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))}}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,l=a?null:this.encoder;let c=!1;for(;o<r;){null!==l&&this.rawSegments.length>=4096&&(l.segments(this.rawSegments),this.rawSegments.length=0),a&&o+1>=r&&this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]);const u=n.charCodeAt(o);10===u?(s.line+=1,s.column=0,this.nextLine(),c=!1):(i?O(u)?c||(this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),c=!0):(this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),c=!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.nextLine(),o=i+1}}}advance(e){if(!e)return;const t=e.lastIndexOf("\n");for(let t=e.indexOf("\n");-1!==t;t=e.indexOf("\n",t+1))this.nextLine();this.generatedCodeColumn+=e.length-t-1}};const M="\n",_="\n".charCodeAt(0),L="\r".charCodeAt(0),T={insertLeft:!1,insertRight:!1,storeName:!1};function z(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 B=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:new Set},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._resolveIndex(e))<0||e>this.original.length)throw new E(`index ${e} is out of bounds`);if("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._resolveIndex(e))<0||e>this.original.length)throw new E(`index ${e} is out of bounds`);if("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=new Set(this.storedNames),t.intro=this.intro,t.outro=this.outro,t.hasMovedChunks=this.hasMovedChunks,t}generateDecodedMap(e){const t=new D((e=e||{}).hires),n=this._generateMappings(t);return{...this._mapProperties(e,n),mappings:t.raw,rangeMappings:t.rawRangeMappings}}generateMap(e){e=e||{};const t=new R,n=new D(e.hires,t),s=this._generateMappings(n);return new S({...this._mapProperties(e,s),mappings:t.finish(n.rawSegments),rangeMappings:n.rawRangeMappings})}_generateMappings(e){const t=[...this.storedNames];return e.addMagicString(this,0,new Map(t.map((e,t)=>[e,t]))),t}_mapProperties(e,t){return{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?P(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,x_google_ignoreList:this.ignoreList?[0]:void 0}}_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(),this.indentStr??"\t"}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;t=t||{};const i=new y;t.exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)i.add(t)});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.has(l.start)||(l.intro=o(l.intro)),l.edited)i.has(l.start)?l.content&&(r="\n"===l.content[l.content.length-1]):l.content=o(l.content);else if(t.exclude)for(a=l.start;a<e;){if(!i.has(a)){const e=this.original.charCodeAt(a);e===_?r=!0:e!==L&&r&&c(a)}a+=1}else for(a=l.start;a<e;){if(!r){const t=this.original.indexOf(M,a);if(-1===t||t>=e)break;r=!0,a=t+1;continue}const t=this.original.charCodeAt(a);t!==_&&t!==L?(c(a),a+=1):a+=1}i.has(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 T.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),T.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return T.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),T.insertRight=!0),this.prependRight(e,t)}move(e,t,n,s="right"){if(e=this._resolveIndex(e),t=this._resolveIndex(t),n=this._resolveIndex(n),e===t)return this;if(e<0||t>this.original.length||n<0||n>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})`);if(n>=e&&n<=t)throw new E("cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);const i=this.byStart.get(e),r=this.byEnd.get(t);if(!i||!r)throw new E(`range ${e}–${t} is out of bounds`);if(this.hasMovedChunks){let n=i;for(;n!==r;)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 o=i.previous,a=r.next;let l,c;if("left"===s)if(l=this.byEnd.get(n)??null,l){if(l.next===i)return this;c=l.next}else{if(i===this.firstChunk)return this;c=this.firstChunk}else if(c=this.byStart.get(n)??null,c){if(c.previous===r)return this;l=c.previous}else{if(r===this.lastChunk)return this;l=this.lastChunk}return o&&(o.next=a),a&&(a.previous=o),l&&(l.next=i),c&&(c.previous=r),o||(this.firstChunk=a),a||(this.lastChunk=o,this.lastChunk.next=null),i.previous=l,r.next=c||null,l||(this.firstChunk=i),c||(this.lastChunk=r),this.hasMovedChunks=!0,this}overwrite(e,t,n,s){if(!0===s)return T.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),T.storeName=!0),this.update(e,t,n,{storeName:!0,overwrite:!0});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._resolveIndex(e),t=this._resolveIndex(t),"string"!=typeof n)throw new E("content must be a string, got "+typeof n);if(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&&(T.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),T.storeName=!0),s={storeName:!0});const i="object"==typeof s&&s?s:{},r=i.storeName||!1,o=i.overwrite||!1;r&&this.storedNames.add(this.original.slice(e,t));const a=this.byStart.get(e);for(let e=a;e.end<t;){const t=e.next;if(null===t||t!==this.byStart.get(e.end))throw new E("cannot overwrite across a split point");e=t}for(let n=a.next;null!==n&&n.start<t;n=n.next)n.edit("",!1,!o),n.replacesUntil=-1,n.replacedFrom=e;return a.edit(n,r,!o),a.replacesUntil=t,a.replacedFrom=-1,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._resolveIndex(e))<0||e>this.original.length)throw new E(`index ${e} is out of bounds`);if("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._resolveIndex(e))<0||e>this.original.length)throw new E(`index ${e} is out of bounds`);if("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._resolveIndex(e))===(t=this._resolveIndex(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.start>e&&(n.intro=""),n.end<t&&(n.outro=""),n.edit("",!1,!0),n.replacesUntil=-1,n.replacedFrom=-1,n=t>n.end?this.byStart.get(n.end):void 0;return this}reset(e,t){if((e=this._resolveIndex(e))===(t=this._resolveIndex(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):void 0;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(M);if(-1!==e)return this.outro.slice(e+1);let t=this.outro,n=this.lastChunk;for(;n;){if(n.outro.length>0){if(e=n.outro.lastIndexOf(M),-1!==e)return n.outro.slice(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(M),-1!==e)return n.content.slice(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(M),-1!==e)return n.intro.slice(e+1)+t;t=n.intro+t}n=n.previous}return e=this.intro.lastIndexOf(M),-1!==e?this.intro.slice(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){e=this._resolveIndex(e),t=this._resolveIndex(t);let n,s="";if(this.hasMovedChunks)for(n=this.firstChunk;n&&(n.start>e||n.end<=e);){if(n.start<t&&n.end>=t||0===t&&0===n.start)return s;n=n.next}else{if(e>=t)return s;n=this._chunkAt(e)}if(n&&n.edited&&n.start!==e)throw new E(`cannot use edited character ${e} as slice start anchor`);const i=n;for(;n&&(0!==t||0!==n.start);){!n.intro||i===n&&n.start!==e||(s+=n.intro);const r=n.start<t&&n.end>=t;if(r&&n.edited&&n.end!==t)throw new E(`cannot use edited character ${t} as slice end anchor`);const o=i===n?e-n.start:0,a=r?n.content.length+t-n.end:n.content.length;if(s+=n.content.slice(o,a),!n.outro||r&&n.end!==t||(s+=n.outro),r)break;n=n.next}return s}snip(e,t){const n=this.clone();return n.remove(-n.offset,e),n.remove(t,n.original.length-n.offset),n}_resolveIndex(e){const t=e+this.offset;if(!Number.isInteger(t))throw new E(`index must be an integer, got ${e}`);return t<0&&0!==this.original.length?Math.max(0,t+this.original.length):t}_chunkAt(e){let t=this.byStart.get(e);if(t)return t;t=this.lastSearchedChunk;const n=e>=t.end;for(;t&&!t.contains(e);)t=n?this.byStart.get(t.end):this.byEnd.get(t.start);return t&&(this.lastSearchedChunk=t),t}_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=v(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){const e=n.next;this.lastChunk===n&&(this.lastChunk=e),this.byEnd.set(n.end,n),this.byStart.set(e.start,e),this.byEnd.set(e.end,e)}if(s)return!0;n=n.previous}while(n);return this.intro=this.intro.replace(t,""),this.intro.length>0}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){const e=n.next;n===this.lastChunk&&(this.lastChunk=e),this.byEnd.set(n.end,n),this.byStart.set(e.start,e),this.byEnd.set(e.end,e)}if(s)return!0;n=n.next}while(n);return this.outro=this.outro.replace(t,""),this.outro.length>0}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}_hasRemovedContent(e,t){const n=this.byStart.get(e);if(n&&e===t){const t=this.byEnd.get(e);return!!t&&""===t.content&&""===n.content}let s=this._chunkAt(e);for(;s&&s.start<t;){if(""===s.content&&(s.replacedFrom<e||this.byStart.get(s.replacedFrom).replacesUntil<s.end))return!0;s=this.byStart.get(s.end)}return!1}_replaceRegexp(e,t){function n(e,n,s){return"string"==typeof t?z(t,e[0],n,s,e.slice(1),e.groups):void 0===e.groups?t(e[0],...e.slice(1),n,s):t(e[0],...e.slice(1),n,s,e.groups)}const s=e=>{if(null==e.index)return!1;if(this._hasRemovedContent(e.index,e.index+e[0].length))return!1;const t=n(e,e.index,this.original);return t===e[0]||(0===e[0].length?this.appendRight(e.index-this.offset,t):this.overwrite(e.index-this.offset,e.index+e[0].length-this.offset,t)),!0};if(e.global){e.lastIndex=0;for(const t of this.original.matchAll(e))s(t)}else{const t=this.original.match(e);if(t&&!s(t)){const t=new RegExp(e.source,`${e.flags}g`);for(const e of this.original.matchAll(t))if(s(e))break}}return this}_replaceString(e,t){const{original:n}=this;let s=n.indexOf(e);for(;-1!==s;){if(!this._hasRemovedContent(s,s+e.length)){e!==(t="function"==typeof t?t(e,s,n):z(t,e,s,n,[],void 0))&&(0===e.length?this.appendRight(s-this.offset,t):this.overwrite(s-this.offset,s+e.length-this.offset,t));break}s=n.indexOf(e,s+e.length)}return 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){if(this._hasRemovedContent(e,e))continue;const s="function"==typeof t?t("",e,n):z(t,"",e,n,[],void 0);""!==s&&this.appendRight(e-this.offset,s)}return this}for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s)){if(this._hasRemovedContent(i,i+s))continue;const e=n.slice(i,i+s),r="function"==typeof t?t(e,i,n):z(t,e,i,n,[],void 0);e!==r&&this.overwrite(i-this.offset,i+s-this.offset,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 F=Object.prototype.hasOwnProperty;var V=class e{constructor(e={}){this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename=new Map}addSource(e){if(e instanceof B)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");const t=e.content,n={content:t,filename:F.call(e,"filename")?e.filename:t.filename,ignoreList:F.call(e,"ignoreList")?e.ignoreList:t.ignoreList,indentExclusionRanges:F.call(e,"indentExclusionRanges")?e.indentExclusionRanges:t.indentExclusionRanges,separator:e.separator??this.separator};if(n.filename){const e=this.uniqueSourceIndexByFilename.get(n.filename);if(void 0===e)this.uniqueSourceIndexByFilename.set(n.filename,this.uniqueSources.length),this.uniqueSources.push({filename:n.filename,content:t.original});else if(t.original!==this.uniqueSources[e].content)throw new E(`duplicate filename "${n.filename}" with different content, use unique filenames`)}return this.sources.push(n),this}append(e,t){return this.addSource({content:new B(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}toMagicString(){const e=new B(this.sources.map(e=>e.content.original).join(""));let t=0,n=this.intro,s=null,i=null;const r=new Map,o=new Map;let a=!1;for(const[l,c]of this.sources.entries()){const u=c.content,d=l>0?c.separator:"";if(0===u.original.length){n+=d+u.toString();continue}n+=d+u.intro;let h=null,p=null,f=u.firstChunk;for(;f;){const e=f.clone();e.start+=t,e.end+=t,-1!==e.replacesUntil&&(e.replacesUntil+=t),-1!==e.replacedFrom&&(e.replacedFrom+=t),e.previous=p,e.next=null,p&&(p.next=e),r.set(e.start,e),o.set(e.end,e),h??=e,p=e,f=f.next}const m=p;h.intro=n+h.intro,n="",m.outro+=u.outro,i?(i.next=h,h.previous=i):s=h,i=m,u.sourcemapLocations.forEach(n=>{n<u.original.length&&e.sourcemapLocations.add(n+t)}),u.storedNames.forEach(t=>e.storedNames.add(t)),u.hasMovedChunks&&(a=!0),t+=u.original.length}return s&&i?(n&&(i.outro+=n),e.firstChunk=s,e.lastChunk=i,e.lastSearchedChunk=s,e.byStart=r,e.byEnd=o,e.hasMovedChunks=a,e):(e.intro=n,e)}generateDecodedMap(e={}){const t=new D(e.hires),{names:n,x_google_ignoreList:s}=this._generateMappings(t);return{...this._mapProperties(e,n,s),mappings:t.raw,rangeMappings:t.rawRangeMappings}}generateMap(e={}){const t=new R,n=new D(e.hires,t),{names:s,x_google_ignoreList:i}=this._generateMappings(n);return new S({...this._mapProperties(e,s,i),mappings:t.finish(n.rawSegments),rangeMappings:n.rawRangeMappings})}_generateMappings(e){let t;const n=new Set;this.sources.forEach(e=>e.content.storedNames.forEach(e=>n.add(e)));const s=[...n],i=new Map(s.map((e,t)=>[e,t]));return this.intro&&e.advance(this.intro),this.sources.forEach((n,s)=>{s>0&&e.advance(n.separator);const r=n.filename?this.uniqueSourceIndexByFilename.get(n.filename)??-1:-1;e.addMagicString(n.content,r,i),n.ignoreList&&-1!==r&&(void 0===t&&(t=[]),t.push(r))}),{names:s,x_google_ignoreList:t}}_mapProperties(e,t,n){return{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(t=>e.file?P(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,x_google_ignoreList:n}}getIndentString(){const e=new Map;return this.sources.forEach(t=>{const n=t.content._getRawIndentString();null!=n&&e.set(n,(e.get(n)??0)+1)}),[...e.entries()].sort(([,e],[,t])=>t-e)[0]?.[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=t||s>0&&/\r?\n$/.test(n.separator);n.content.indent(e,{exclude:n.indentExclusionRanges,indentStart:i}),t="\n"===n.content.lastChar()}),this.intro&&(this.intro=e+this.intro.replace(/^[^\r\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)=>(t>0?e.separator:"")+e.content.toString()).join("");return this.intro+e}isEmpty(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some((e,t)=>t>0&&""!==e.separator.trim()||!e.content.isEmpty())}length(){return this.sources.reduce((e,t,n)=>e+(n>0?t.separator.length:0)+t.content.length()+t.content.intro.length+t.content.outro.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=s.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=s.separator.replace(t,""),s.separator))return this}return this.intro=this.intro.replace(t,""),this}};const j=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,U=/^\.?\.\//,G=/\\/g,H=/[/\\]/,W=/^[A-Za-z]:$/,K=/[/\\]+$/;function q(e){return j.test(e)}function X(e){return U.test(e)}function J(e){return e.replace(G,"/")}function Y(e){return e.replace(K,"").split(H).pop()||""}function Z(e){const t=e.replace(K,""),n=/[/\\][^/\\]*$/.exec(t);if(n){return t.slice(0,-n[0].length)||"/"}return""===t?e?"/":".":e!==t&&W.test(t)?t:"."}function Q(e){const t=Y(e);if("."===t||".."===t)return"";const n=t.lastIndexOf(".");return n>0?t.slice(n):""}function ee(e,t){const n=[],s=W.test(e[0])?1:0;for(const i of e)".."===i?n.length>s&&".."!==n[n.length-1]?n.pop():t||0!==s||n.push(".."):"."!==i&&""!==i&&n.push(i);return n}function te(e,t){const n=ee(e.split(H),q(e)),s=ee(t.split(H),q(t));for(;n[0]&&s[0]&&n[0]===s[0];)n.shift(),s.shift();for(;n.pop();)s.unshift("..");return s.join("/")}function ne(...e){let t=[],n=!1;for(const s of e)q(s)?(t=s.split(H),n=!0):t.push(...s.split(H));const s=ee(t,n).join("/");return n?/^[A-Za-z]:/.test(s)?s:"/"+s:s||"/"}function se(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}const ie=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"]);const re=e=>"*"===e[0]?`*${e}`:e,oe=e=>e.startsWith("**")?e.slice(1):e,ae=e=>"*"===e[0]&&"*"!==e[1],le=e=>"*"===e[0]||"\0"===e[0]?`*\0${e}`:`*${e}`,ce=e=>e.slice("\0"===e[1]?2:1);function ue(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const de={isNoStatement:!0};function he(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 pe=/\S/g;function fe(e,t){pe.lastIndex=t;return pe.exec(e).index}const me=/\s/;function ge(e,t){return t>0&&13===e.charCodeAt(t-1)?t-1:t}function ye(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[ge(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 be(e,t,n,s,i){let r,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=n+ye(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+ye(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):ue(r,t,o,l)):r.render(t,i)}function Ee(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+he(t.original.slice(r.end,s.start),",")),o=a=c+1+ye(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 xe(e,t,n){for(;;){const[s,i]=ye(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}function Ae(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(oe(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([oe(e),s.getName(i)+r]);return`exports(${s(n,{lineBreakIndent:null})})`}}function Se(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(oe(i.get(e)[0]))},${r}`),s.appendLeft(n,")")}function ve(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${Ae([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}const Pe=Object.freeze(Object.create(null)),$e=Object.freeze({}),we=Object.freeze([]),Ie=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function Ne(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function Ce(){return new Set}function ke(){return[]}const Re=Symbol("Unknown Key"),Oe=Symbol("Unknown Non-Accessor Key"),De=Symbol("Unknown Integer"),Me=Symbol("Unknown Well-Known"),_e=Symbol("Symbol.toStringTag"),Le=Symbol("Symbol.dispose"),Te=Symbol("Symbol.asyncDispose"),ze=Symbol("Symbol.hasInstance"),Be=new Set([_e,Le,Te,ze]),Fe=e=>Be.has(e)||e===Me,Ve=new Set([ze,Le,Te]),je=e=>"string"==typeof e||Be.has(e),Ue=[],Ge=[Re],He=[Oe],We=[De],Ke=[ze],qe=Symbol("Entities");class Xe{constructor(){this.entityPaths=Object.create(null,{[qe]:{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,{[qe]:{value:new Set}});return t[qe]}}const Je=new Xe;class Ye{constructor(){this.entityPaths=Object.create(null,{[qe]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]||=Object.create(null,{[qe]:{value:new Map}});const i=Ne(s[qe],t,Ce);return!!i.has(n)||(i.add(n),!1)}}const Ze=Object.freeze({[Re]:$e});class Qe{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[Re])return!0;if(!je(r))return n[s]=Ze,!1;n=i,s=r,i=i[r]||=(t=!1,Object.create(null))}return t}includeAllPaths(e,t,n){this.includedPaths&&et(e,t,n,this.includedPaths)}}function et(e,t,n,s){if(s[Re])return void e.includePath([...n,Re],t);const i=Reflect.ownKeys(s);if(0!==i.length)for(const r of i)et(e,t,[...n,r],s[r]);else e.includePath(n,t)}const tt=Object.freeze({[Re]:!0});class nt{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0;const n=this.includedPaths||=(t=!1,Object.create(null));if(n[Re])return!0;const[s,i]=e;return s?je(s)?i?n[s]===Re||(n[s]=Re,!1):!!n[s]||(n[s]=!0,!1):(this.includedPaths=tt,!1):t}includeAllPaths(e,t,n){const{includedPaths:s}=this;if(s)if(s[Re])e.includePath([...n,Re],t);else{const i=Reflect.ownKeys(s);if(0===i.length)e.includePath(n,t);else for(const r of i)e.includePath(s[r]===Re?[...n,r,Re]:[...n,r],t)}}}function st(e,t){if("MemberExpression"===e.type)return!e.computed&&st(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 it(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function rt(){return{accessed:new Xe,assigned:new Xe,brokenFlow:!1,called:new Ye,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Ye,replacedVariableInits:new Map}}function ot(e,t){return 0!==(e&t)}function at(e,t,n){return e&~t|-n&t}const lt=Symbol("Unknown Value"),ct=Symbol("Unknown Truthy Value"),ut=Symbol("Unknown Falsy Value");class dt{constructor(){this.flags=0}get included(){return ot(this.flags,1)}set included(e){this.flags=at(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){ft(e)}deoptimizePath(e){}getKnownFunctionAtPath(e,t,n){return null}getLiteralValueAtPath(e,t,n){return lt}getReturnExpressionWhenCalledAtPath(e,t,n,s){return pt}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)}includeCallArgumentsWhenCalledAtPath(e,t,n){mt(t,n)}shouldBeIncluded(e){return!0}}const ht=new class extends dt{},pt=[ht,!1],ft=e=>{for(const t of e.args)t?.deoptimizePath(Ge)},mt=(e,t)=>{e.args[0]?.includePath(Ge,t),gt(e,t)},gt=({args:e},t)=>{for(let n=1;n<e.length;n++){const s=e[n];s&&(s.includePath(Ge,t),s.include(t,!1))}},yt={args:[null],type:0},bt={args:[null,ht],type:1},Et={args:[null],type:2,withNew:!1},xt="ArrowFunctionExpression",At="CallExpression",St="ExportDefaultDeclaration",vt="ExpressionStatement",Pt="Identifier",$t="Program",wt="Property",It="RestElement";function Nt(e,t){return e.start<=t&&t<e.end}function Ct(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(Nt(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 kt(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}const Rt="...";function Ot(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(kt(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=kt(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${Rt}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+kt(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`}).join("\n")}const Dt="silent",Mt="warn",_t="info",Lt="debug",Tt={[Lt]:0,[_t]:1,[Dt]:3,[Mt]:2};function zt(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 Bt(e){const t=Y(e);return t.slice(0,Math.max(0,t.length-Q(e).length))}function Ft(e){const t=Bt(e);if("index"!==t)return t;const n=Y(Z(e));return jt(n+"/")?t:n}function Vt(e){return q(e)?te(ne(),e):e}function jt(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||q(e)}const Ut=/^(\.\.\/)*\.\.$/;function Gt(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=J(te(Z(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+Y(t);if(Ut.test(i))return[...i.split("/"),"..",Y(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function Ht(e){return`https://rollupjs.org/${e}`}const Wt="troubleshooting/#error-name-is-not-exported-by-module",Kt="configuration-options/#jsx",qt="configuration-options/#output-amd-id",Xt="configuration-options/#output-dir",Jt="configuration-options/#output-exports",Yt="configuration-options/#output-format",Zt="configuration-options/#output-inlinedynamicimports",Qt="configuration-options/#output-interop",en="configuration-options/#output-manualchunks",tn="configuration-options/#output-name",nn="configuration-options/#output-sourcemapfile",sn="es-module-syntax/#source-phase-import",rn="plugin-development/#generatebundle";function on(e){throw e instanceof Error?e:an(e)}function an(e){dn(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function ln(e,t,n){dn(e),dn(t);const s="buildEnd"===n?"the build":"rendering";return{...e,message:`There was an error during ${s}:\n ${e.message}\nAdditionally, handling the error in the '${n}' hook caused the following error:\n ${t.message}`}}function cn(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=Ct(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=Ot(n,t,s)}}const un=Symbol("augmented");function dn(e){if(!e.plugin&&!e.loc||e[un])return;e[un]=!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+=`${Vt(n)}${s}: `}const s=e.message;e.message=t+e.message,_n(e,s)}const hn="INVALID_EXPORT_OPTION",pn="INVALID_IMPORT_ATTRIBUTE",fn="INVALID_PLUGIN_HOOK",mn="MISSING_EXPORT",gn="MISSING_IMPLICIT_DEPENDANT",yn="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",bn="PARSE_ERROR",En="SOURCEMAP_BROKEN",xn="UNEXPECTED_NAMED_IMPORT",An="UNRESOLVED_ENTRY",Sn="UNRESOLVED_IMPORT";function vn(e){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${e}" - no asset source set.`}}function Pn(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function $n({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return cn(i,n,t,e),i}function wn(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(Vt).join(" -> ")}`}}function In(e,t,n,s,i){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:t,id:s,message:`Export "${e}" of module "${Vt(t)}" was reexported through module "${Vt(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 "${Vt(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 Nn(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 Cn(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${Vt(t)} is at (${n}:${s})\n${Ot(e,n,s)}`}}function kn(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${Vt(t)}".`}}function Rn(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${Vt(s)}" tried to import "${Vt(n)}" with ${On(t)} attributes, but it was already imported elsewhere with ${On(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const On=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map(([e,t])=>`"${e}": "${t}"`).join(", ")};function Dn(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${Vt(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:Ht("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 _n(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function Ln(e,t,n){return{code:hn,message:`"${e}" was specified for "output.exports", but entry module "${Vt(n)}" has the following exports: ${zt(t)}`,url:Ht(Jt)}}function Tn(e){return{code:pn,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${Vt(e)}". Import attributes need to have string keys and values.`}}function zn(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:Ht(t)}}function Bn(e,t){return{binding:e,code:mn,exporter:t,message:`Exported variable "${e}" is not defined in "${Vt(t)}".`,url:Ht(Wt)}}function Fn(e,t,n,s){const i={binding:e,code:mn,exporter:n,id:t,url:Ht(Wt)};if(s)return{...i,message:`Exported variable "${e}" is not defined in "${Vt(n)}", but it is imported by "${Vt(t)}".`};const r=".json"===Q(n);return{...i,message:`"${e}" is not exported by "${Vt(n)}", imported by "${Vt(t)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function Vn(e){const t=[...e.implicitlyLoadedBefore].map(e=>Vt(e.id)).sort();return{code:gn,message:`Module "${Vt(e.id)}" that should be implicitly loaded before ${zt(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 jn(e,t){return{code:"NON_EXTERNAL_SOURCE_PHASE_IMPORT",message:`Source phase import "${e}" in "${Vt(t)}" must be external. Source phase imports are only supported for external modules. Use the "external" option to mark this module as external.`,url:Ht(sn)}}function Un(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function Gn(e,t){return{code:bn,message:e,pos:t}}function Hn(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 Kn(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)"),_n({cause:e,code:bn,id:t,message:n,stack:e.stack},e.message)}function qn(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 Xn(e){return{code:En,message:`Multiple conflicting contents for sourcemap source ${e}`}}function Jn(e,t,n){const s=n?"reexport":"import";return{code:xn,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${Vt(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:Ht(Qt)}}function Yn(e){return{code:xn,exporter:e,message:`There was a namespace "*" reexport from the external module "${Vt(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:Ht(Qt)}}function Zn(e){return{code:"VALIDATION_ERROR",message:e}}function Qn(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:Ht(t)}}(e,t);if(i)return on(n);s(Mt,n)}}(e,t,n,s.onLog,s.strictDeprecations)}const es=Symbol("PureFunction");class ts extends dt{markReassigned(){this.isReassigned=!0}markTargetOfAssignment(){this.isTargetOfAssignment=!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.isTargetOfAssignment=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===At&&e.parent.callee===e||e.parent.type===St||(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(){}addReassignedValue(e){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}const ns="*source";class ss extends ts{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t,this.isSourcePhase=t===ns}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 is(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 rs=/[^\w$]/g,os=/[^\w$]/,as=e=>(e=>/\d/.test(e[0]))(e)||ie.has(e)||"arguments"===e;function ls(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(rs,"_"),as(e)&&(e=`_${e}`),e||"_"}const cs=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,us=/^(?:0|[1-9]\d*)$/;function ds(e){return cs.test(e)?"__proto__"===e?'["__proto__"]':e:us.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}class hs{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=ls(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:we,dynamicallyImportedIds:we,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:we,implicitlyLoadedBefore:we,importedIdResolutions:we,importedIds:we,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,safeVariableNames:null,syntheticNamedExports:!1}}cacheInfoGetters(){is(this.info,["dynamicImporters","importers"])}getVariableForExportName(e,{importChain:t}){const n=this.declarations.get(e);for(const n of t)Ne(this.importersByExportedName,e,Ce).add(n);if(n)return[n];const s=new ss(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(Mt,(s=this.id,i=e.map(oe),{code:"UNUSED_EXTERNAL_IMPORT",exporter:s,ids:r=n,message:`${zt(i,["is","are"])} imported from external module "${s}" but never used in ${zt(r.map(e=>Vt(e)))}.`,names:i}))}}function ps(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 hs||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const fs=()=>{};var ms=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using","source","defer"];const gs="_rollupAnnotations",ys="_rollupRemoved",bs=(e,t)=>{if(0===e)return we;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++)s[i]=Es(t[e++],t);return s},Es=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:ms[t[e]]}},xs={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"]},As="variables",Ss=Symbol("IS_SKIPPED_CHAIN");class vs extends dt{get deoptimized(){return ot(this.flags,2)}set deoptimized(e){this.flags=at(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 xs[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 xs[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(Ue,this.assignmentInteraction,e)}include(e,t,n){this.included||this.includeNode(e);for(const n of xs[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 xs[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n))for(const t of n)t?.includePath(Ge,e);else n.includePath(Ge,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===gs?this.annotations=n:t===ys&&(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 xs[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 xs[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(rt())}applyDeoptimizations(){this.deoptimized=!0;for(const e of xs[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(Ge);else t.deoptimizePath(Ge)}this.scope.context.requestTreeshakingPass()}}function Ps(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function $s(){this.included=!0}function ws(){this.deoptimized=!0}function Is(e){return e instanceof vs&&e.type===xt}function Ns(e){return e instanceof vs&&"FunctionExpression"===e.type}function Cs(e){return e instanceof vs&&e.type===At}function ks(e){return e instanceof vs&&"MemberExpression"===e.type}function Rs(e){return e instanceof vs&&e.type===Pt}function Os(e){return e instanceof vs&&e.type===vt}function Ds(e,t=null){return Object.create(t,e)}const Ms=new class extends dt{getLiteralValueAtPath(e){return e.length>0?lt:void 0}},_s={value:{hasEffectsWhenCalled:null,returns:ht}},Ls=new class extends dt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Xs(Gs,e[0]):pt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||qs(Gs,e[0],t,n)}},Ts={value:{hasEffectsWhenCalled:null,returns:Ls}},zs=new class extends dt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Xs(Hs,e[0]):pt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||qs(Hs,e[0],t,n)}},Bs={value:{hasEffectsWhenCalled:null,returns:zs}},Fs=new class extends dt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Xs(Ks,e[0]):pt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||qs(Ks,e[0],t,n)}},Vs={value:{hasEffectsWhenCalled:null,returns:Fs}},js={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(Ue,Je,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(Ue,Et,t)},returns:Fs}},Us=Ds({hasOwnProperty:Ts,isPrototypeOf:Ts,propertyIsEnumerable:Ts,toLocaleString:Vs,toString:Vs,valueOf:_s}),Gs=Ds({valueOf:Ts},Us),Hs=Ds({toExponential:Vs,toFixed:Vs,toLocaleString:Vs,toPrecision:Vs,valueOf:Bs},Us),Ws=Ds({exec:_s,test:Ts},Us),Ks=Ds({anchor:Vs,at:_s,big:Vs,blink:Vs,bold:Vs,charAt:Vs,charCodeAt:Bs,codePointAt:_s,concat:Vs,endsWith:Ts,fixed:Vs,fontcolor:Vs,fontsize:Vs,includes:Ts,indexOf:Bs,italics:Vs,lastIndexOf:Bs,link:Vs,localeCompare:Bs,match:_s,matchAll:_s,normalize:Vs,padEnd:Vs,padStart:Vs,repeat:Vs,replace:js,replaceAll:js,search:Bs,slice:Vs,small:Vs,split:_s,startsWith:Ts,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},Us);function qs(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function Xs(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:pt}class Js extends dt{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(We),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(Ge)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?pt:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||ht: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(We,bt,s))return!0;if(this.description.callsArgs)for(const e of this.description.callsArgs)if(t[e+1]?.hasEffectsOnInteractionAtPath(Ue,Et,s))return!0}return!1}}const Ys=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Ls})],Zs=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Fs})],Qs=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:zs})],ei=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ht})],ti=/^\d+$/;class ni extends dt{get hasLostTrack(){return ot(this.flags,2048)}set hasLostTrack(e){this.flags=at(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return ot(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=at(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return ot(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=at(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(Ge);this.prototypeExpression?.deoptimizePath([Re,Re]),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||je(s)&&this.deoptimizedPaths.get(s)))return void ft(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(je(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&&ti.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&&ti.test(e))for(const e of t)e.deoptimizePath(Ge);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===De)return this.deoptimizeIntegerProperties();if(!je(t))return this.deoptimizeAllProperties(t===Oe);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?Ge:e.slice(1);for(const e of je(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],Re]:e)}getKnownFunctionAtPath(e,t,n){const s=e[0];if(!je(s)||this.settersByKey.has(s)||this.unmatchableSetters.length>0)return null;const i=this.getMemberExpressionAndTrackDeopt(s,n);return i?i.getKnownFunctionAtPath(e.slice(1),t,n):this.prototypeExpression?.getKnownFunctionAtPath(e,t,n)||null}getLiteralValueAtPath(e,t,n){if(0===e.length)return lt;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?lt:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return pt;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):pt}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===Oe)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(je(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(Ge,t);if(0===e.length)return;const[n,...s]=e,[i,r]=je(n)?[new Set([...this.propertiesAndGettersByKey.get(n)||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey.get(n)||this.unmatchablePropertiesAndSetters]),s]:[this.allProperties,Ge];for(const e of i)e.includePath(r,t);this.prototypeExpression?.includePath(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){const[s,...i]=e;if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!je(s)||this.deoptimizedPaths.get(s)||"string"==typeof s&&ti.test(s)&&this.hasUnknownDeoptimizedInteger)return void mt(t,n);const r=this.propertiesAndGettersByKey.get(s);if(void 0===r)this.unmatchablePropertiesAndGetters.length>0||"string"==typeof s&&ti.test(s)&&this.unknownIntegerProps.length>0||!this.prototypeExpression?mt(t,n):this.prototypeExpression.includeCallArgumentsWhenCalledAtPath(e,t,n);else{t.args[0]?.includePath(Ge,n);for(const e of r)e.includeCallArgumentsWhenCalledAtPath(i,t,n)}}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),!Fe(p)||Ve.has(p)||(n.add(m),p!==Me))if(je(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===De){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(Ge)}deoptimizeCachedIntegerEntities(){for(const[e,t]of this.expressionsToBeDeoptimizedByKey.entries())if("string"==typeof e&&ti.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(We)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!je(e)||this.hasUnknownDeoptimizedInteger&&"string"==typeof e&&ti.test(e)||this.deoptimizedPaths.get(e))return ht;const t=this.propertiesAndGettersByKey.get(e);return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&"string"==typeof e&&ti.test(e)?ht:null}getMemberExpressionAndTrackDeopt(e,t){if(!je(e))return ht;const n=this.getMemberExpression(e);if(n!==ht&&!this.immutable){let n=this.expressionsToBeDeoptimizedByKey.get(e);n||this.expressionsToBeDeoptimizedByKey.set(e,n=[]),n.push(t)}return n}}const si=e=>e===Le||e===Te||"string"==typeof e&&/^\d+$/.test(e),ii=new class extends dt{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||si(t[0])||ft(e)}getLiteralValueAtPath(e){return 1===e.length&&si(e[0])?void 0:lt}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},ri=new ni(new Map([["hasOwnProperty",Ys],["isPrototypeOf",Ys],["propertyIsEnumerable",Ys],["toLocaleString",Zs],["toString",Zs],["valueOf",ei]]),ii,!0),oi=new ni([{key:Le,kind:"init",property:ht}],ri,!0),ai=new ni([{key:Te,kind:"init",property:ht}],ri,!0),li=[{key:De,kind:"init",property:ht},{key:"length",kind:"init",property:zs}],ci=[new Js({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ls})],ui=[new Js({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:zs})],di=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new ni(li,xi),returnsPrimitive:null})],hi=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new ni(li,xi),returnsPrimitive:null})],pi=[new Js({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new ni(li,xi),returnsPrimitive:null})],fi=[new Js({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:zs})],mi=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ht})],gi=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ht})],yi=[new Js({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ht})],bi=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Ei=[new Js({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],xi=new ni(new Map([["at",gi],["concat",hi],["copyWithin",bi],["entries",hi],["every",ci],["fill",bi],["filter",pi],["find",yi],["findIndex",ui],["findLast",yi],["findLastIndex",ui],["flat",hi],["flatMap",pi],["forEach",yi],["includes",Ys],["indexOf",Qs],["join",Zs],["keys",ei],["lastIndexOf",Qs],["map",pi],["pop",mi],["push",fi],["reduce",yi],["reduceRight",yi],["reverse",bi],["shift",mi],["slice",hi],["some",ci],["sort",Ei],["splice",di],["toLocaleString",Zs],["toString",Zs],["unshift",fi],["values",gi]]),ri,!0);class Ai extends vs{deoptimizeArgumentsOnInteractionAtPath(e,t,n){(t.length>0||2===e.type)&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,Ge,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(Ge,yt,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(Ge,e)}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([Re,Re]),this.scope.context.requestTreeshakingPass()}}class Si extends vs{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(Ge,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 Ai)&&(e=!0,n.deoptimizePath(Ge))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:zs}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof Ai?s&&(t=!0,e.unshift({key:De,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:Ms})}return this.objectEntity=new ni(e,xi)}}const vi=Symbol("Value Properties"),Pi=()=>lt,$i=()=>!1,wi=()=>!0,Ii=e=>({__proto__:null,[vi]:{deoptimizeArgumentsOnCall:fs,getLiteralValue:()=>e,hasEffectsWhenCalled:wi}}),Ni={deoptimizeArgumentsOnCall:fs,getLiteralValue:Pi,hasEffectsWhenCalled:$i},Ci={deoptimizeArgumentsOnCall:fs,getLiteralValue:Pi,hasEffectsWhenCalled:wi},ki={deoptimizeArgumentsOnCall:fs,getLiteralValue:Pi,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof Si)},Ri={deoptimizeArgumentsOnCall:fs,getLiteralValue:Pi,hasEffectsWhenCalled({args:e}){const[t,n]=e;return void 0!==n&&!(n instanceof Si)&&"number"!=typeof n.getLiteralValueAtPath(Ue,Je,{deoptimizeCache:fs})}},Oi={deoptimizeArgumentsOnCall:fs,getLiteralValue:Pi,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof dt)||s.hasEffectsOnInteractionAtPath(Ge,yt,t)}},Di={__proto__:null,[vi]:Ci},Mi={__proto__:null,[vi]:Ni},_i={__proto__:null,[vi]:Oi},Li={__proto__:null,[vi]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(Ge)},getLiteralValue:Pi,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(He,bt,t)}},Ti={__proto__:null,[vi]:Ci,prototype:Di},zi={__proto__:null,[vi]:Ni,prototype:Di},Bi={__proto__:null,[vi]:ki,prototype:Di},Fi={__proto__:null,[vi]:Ri,from:Di,of:Mi,prototype:Di},Vi={__proto__:null,[vi]:Ni,supportedLocalesOf:zi},ji={deoptimizeArgumentsOnCall:fs,getLiteralValue:()=>Me,hasEffectsWhenCalled:wi},Ui={global:Di,globalThis:Di,self:Di,window:Di,__proto__:null,[vi]:Ci,Array:{__proto__:null,[vi]:Ci,from:Di,isArray:Mi,of:Mi,prototype:Di},ArrayBuffer:{__proto__:null,[vi]:Ni,isView:Mi,prototype:Di},AggregateError:Bi,Atomics:Di,BigInt:Ti,BigInt64Array:Ti,BigUint64Array:Ti,Boolean:zi,constructor:Ti,DataView:zi,Date:{__proto__:null,[vi]:Ni,now:Mi,parse:Mi,prototype:Di,UTC:Mi},decodeURI:Mi,decodeURIComponent:Mi,encodeURI:Mi,encodeURIComponent:Mi,Error:zi,escape:Mi,eval:Di,EvalError:zi,FinalizationRegistry:Ti,Float32Array:Fi,Float64Array:Fi,Function:Ti,hasOwnProperty:Di,Infinity:Di,Int16Array:Fi,Int32Array:Fi,Int8Array:Fi,isFinite:Mi,isNaN:Mi,isPrototypeOf:Di,JSON:Di,Map:Bi,Math:{__proto__:null,[vi]:Ci,abs:Mi,acos:Mi,acosh:Mi,asin:Mi,asinh:Mi,atan:Mi,atan2:Mi,atanh:Mi,cbrt:Mi,ceil:Mi,clz32:Mi,cos:Mi,cosh:Mi,exp:Mi,expm1:Mi,floor:Mi,fround:Mi,hypot:Mi,imul:Mi,log:Mi,log10:Mi,log1p:Mi,log2:Mi,max:Mi,min:Mi,pow:Mi,random:Mi,round:Mi,sign:Mi,sin:Mi,sinh:Mi,sqrt:Mi,tan:Mi,tanh:Mi,trunc:Mi},NaN:Di,Number:{__proto__:null,[vi]:Ni,isFinite:Mi,isInteger:Mi,isNaN:Mi,isSafeInteger:Mi,parseFloat:Mi,parseInt:Mi,prototype:Di},Object:{__proto__:null,[vi]:Ni,create:Mi,defineProperty:Li,defineProperties:Li,freeze:Li,getOwnPropertyDescriptor:Mi,getOwnPropertyDescriptors:Mi,getOwnPropertyNames:Mi,getOwnPropertySymbols:Mi,getPrototypeOf:Mi,hasOwn:Mi,is:Mi,isExtensible:Mi,isFrozen:Mi,isSealed:Mi,keys:Mi,fromEntries:Di,entries:_i,values:_i,prototype:Di},parseFloat:Mi,parseInt:Mi,Promise:{__proto__:null,[vi]:Ci,all:Di,allSettled:Di,any:Di,prototype:Di,race:Di,reject:Di,resolve:Di},propertyIsEnumerable:Di,Proxy:{__proto__:null,[vi]:{deoptimizeArgumentsOnCall:({args:[,e,t]})=>{if((n=t)instanceof vs&&"ObjectExpression"===n.type){const n=t.properties.some(e=>!function(e){return e instanceof vs&&e.type===wt}(e));if(!n){for(const n of t.properties)n.deoptimizeArgumentsOnInteractionAtPath({args:[null,e],type:2,withNew:!1},Ue,Je);return}}var n;e.deoptimizePath(Ge)},getLiteralValue:Pi,hasEffectsWhenCalled:wi}},RangeError:zi,ReferenceError:zi,Reflect:Di,RegExp:zi,Set:Bi,SharedArrayBuffer:Ti,String:{__proto__:null,[vi]:Ni,fromCharCode:Mi,fromCodePoint:Mi,prototype:Di,raw:Mi},Symbol:{__proto__:null,[vi]:Ni,for:Mi,keyFor:Mi,prototype:Di,asyncDispose:Ii(Te),dispose:Ii(Le),hasInstance:Ii(ze),toStringTag:Ii(_e)},SyntaxError:zi,toLocaleString:Di,toString:Di,TypeError:zi,Uint16Array:Fi,Uint32Array:Fi,Uint8Array:Fi,Uint8ClampedArray:Fi,unescape:Mi,URIError:zi,valueOf:Di,WeakMap:Bi,WeakRef:Ti,WeakSet:Bi,clearInterval:Ti,clearTimeout:Ti,console:{__proto__:null,[vi]:Ci,assert:Ti,clear:Ti,count:Ti,countReset:Ti,debug:Ti,dir:Ti,dirxml:Ti,error:Ti,exception:Ti,group:Ti,groupCollapsed:Ti,groupEnd:Ti,info:Ti,log:Ti,table:Ti,time:Ti,timeEnd:Ti,timeLog:Ti,trace:Ti,warn:Ti},Intl:{__proto__:null,[vi]:Ci,Collator:Vi,DateTimeFormat:Vi,DisplayNames:Vi,ListFormat:Vi,Locale:Vi,NumberFormat:Vi,PluralRules:Vi,RelativeTimeFormat:Vi,Segmenter:Vi},setInterval:Ti,setTimeout:Ti,TextDecoder:Ti,TextEncoder:Ti,URL:{__proto__:null,[vi]:Ci,prototype:Di,canParse:Mi},URLSearchParams:Ti,AbortController:Ti,AbortSignal:Ti,addEventListener:Di,alert:Di,AnalyserNode:Ti,Animation:Ti,AnimationEvent:Ti,applicationCache:Di,ApplicationCache:Ti,ApplicationCacheErrorEvent:Ti,atob:Di,Attr:Ti,Audio:Ti,AudioBuffer:Ti,AudioBufferSourceNode:Ti,AudioContext:Ti,AudioDestinationNode:Ti,AudioListener:Ti,AudioNode:Ti,AudioParam:Ti,AudioProcessingEvent:Ti,AudioScheduledSourceNode:Ti,AudioWorkletNode:Ti,BarProp:Ti,BaseAudioContext:Ti,BatteryManager:Ti,BeforeUnloadEvent:Ti,BiquadFilterNode:Ti,Blob:Ti,BlobEvent:Ti,blur:Di,BroadcastChannel:Ti,btoa:Di,ByteLengthQueuingStrategy:Ti,Cache:Ti,caches:Di,CacheStorage:Ti,cancelAnimationFrame:Di,cancelIdleCallback:Di,CanvasCaptureMediaStreamTrack:Ti,CanvasGradient:Ti,CanvasPattern:Ti,CanvasRenderingContext2D:Ti,ChannelMergerNode:Ti,ChannelSplitterNode:Ti,CharacterData:Ti,clientInformation:Di,ClipboardEvent:Ti,close:Di,closed:Di,CloseEvent:Ti,Comment:Ti,CompositionEvent:Ti,confirm:Di,ConstantSourceNode:Ti,ConvolverNode:Ti,CountQueuingStrategy:Ti,createImageBitmap:Di,Credential:Ti,CredentialsContainer:Ti,crypto:Di,Crypto:Ti,CryptoKey:Ti,CSS:Ti,CSSConditionRule:Ti,CSSFontFaceRule:Ti,CSSGroupingRule:Ti,CSSImportRule:Ti,CSSKeyframeRule:Ti,CSSKeyframesRule:Ti,CSSMediaRule:Ti,CSSNamespaceRule:Ti,CSSPageRule:Ti,CSSRule:Ti,CSSRuleList:Ti,CSSStyleDeclaration:Ti,CSSStyleRule:Ti,CSSStyleSheet:Ti,CSSSupportsRule:Ti,CustomElementRegistry:Ti,customElements:Di,CustomEvent:{__proto__:null,[vi]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:Pi,hasEffectsWhenCalled:$i},prototype:Di},DataTransfer:Ti,DataTransferItem:Ti,DataTransferItemList:Ti,defaultstatus:Di,defaultStatus:Di,DelayNode:Ti,DeviceMotionEvent:Ti,DeviceOrientationEvent:Ti,devicePixelRatio:Di,dispatchEvent:Di,document:Di,Document:Ti,DocumentFragment:Ti,DocumentType:Ti,DOMError:Ti,DOMException:Ti,DOMImplementation:Ti,DOMMatrix:Ti,DOMMatrixReadOnly:Ti,DOMParser:Ti,DOMPoint:Ti,DOMPointReadOnly:Ti,DOMQuad:Ti,DOMRect:Ti,DOMRectReadOnly:Ti,DOMStringList:Ti,DOMStringMap:Ti,DOMTokenList:Ti,DragEvent:Ti,DynamicsCompressorNode:Ti,Element:Ti,ErrorEvent:Ti,Event:Ti,EventSource:Ti,EventTarget:Ti,external:Di,fetch:Di,File:Ti,FileList:Ti,FileReader:Ti,find:Di,focus:Di,FocusEvent:Ti,FontFace:Ti,FontFaceSetLoadEvent:Ti,FormData:Ti,frames:Di,GainNode:Ti,Gamepad:Ti,GamepadButton:Ti,GamepadEvent:Ti,getComputedStyle:Di,getSelection:Di,HashChangeEvent:Ti,Headers:Ti,history:Di,History:Ti,HTMLAllCollection:Ti,HTMLAnchorElement:Ti,HTMLAreaElement:Ti,HTMLAudioElement:Ti,HTMLBaseElement:Ti,HTMLBodyElement:Ti,HTMLBRElement:Ti,HTMLButtonElement:Ti,HTMLCanvasElement:Ti,HTMLCollection:Ti,HTMLContentElement:Ti,HTMLDataElement:Ti,HTMLDataListElement:Ti,HTMLDetailsElement:Ti,HTMLDialogElement:Ti,HTMLDirectoryElement:Ti,HTMLDivElement:Ti,HTMLDListElement:Ti,HTMLDocument:Ti,HTMLElement:Ti,HTMLEmbedElement:Ti,HTMLFieldSetElement:Ti,HTMLFontElement:Ti,HTMLFormControlsCollection:Ti,HTMLFormElement:Ti,HTMLFrameElement:Ti,HTMLFrameSetElement:Ti,HTMLHeadElement:Ti,HTMLHeadingElement:Ti,HTMLHRElement:Ti,HTMLHtmlElement:Ti,HTMLIFrameElement:Ti,HTMLImageElement:Ti,HTMLInputElement:Ti,HTMLLabelElement:Ti,HTMLLegendElement:Ti,HTMLLIElement:Ti,HTMLLinkElement:Ti,HTMLMapElement:Ti,HTMLMarqueeElement:Ti,HTMLMediaElement:Ti,HTMLMenuElement:Ti,HTMLMetaElement:Ti,HTMLMeterElement:Ti,HTMLModElement:Ti,HTMLObjectElement:Ti,HTMLOListElement:Ti,HTMLOptGroupElement:Ti,HTMLOptionElement:Ti,HTMLOptionsCollection:Ti,HTMLOutputElement:Ti,HTMLParagraphElement:Ti,HTMLParamElement:Ti,HTMLPictureElement:Ti,HTMLPreElement:Ti,HTMLProgressElement:Ti,HTMLQuoteElement:Ti,HTMLScriptElement:Ti,HTMLSelectElement:Ti,HTMLShadowElement:Ti,HTMLSlotElement:Ti,HTMLSourceElement:Ti,HTMLSpanElement:Ti,HTMLStyleElement:Ti,HTMLTableCaptionElement:Ti,HTMLTableCellElement:Ti,HTMLTableColElement:Ti,HTMLTableElement:Ti,HTMLTableRowElement:Ti,HTMLTableSectionElement:Ti,HTMLTemplateElement:Ti,HTMLTextAreaElement:Ti,HTMLTimeElement:Ti,HTMLTitleElement:Ti,HTMLTrackElement:Ti,HTMLUListElement:Ti,HTMLUnknownElement:Ti,HTMLVideoElement:Ti,IDBCursor:Ti,IDBCursorWithValue:Ti,IDBDatabase:Ti,IDBFactory:Ti,IDBIndex:Ti,IDBKeyRange:Ti,IDBObjectStore:Ti,IDBOpenDBRequest:Ti,IDBRequest:Ti,IDBTransaction:Ti,IDBVersionChangeEvent:Ti,IdleDeadline:Ti,IIRFilterNode:Ti,Image:Ti,ImageBitmap:Ti,ImageBitmapRenderingContext:Ti,ImageCapture:Ti,ImageData:Ti,indexedDB:Di,innerHeight:Di,innerWidth:Di,InputEvent:Ti,IntersectionObserver:Ti,IntersectionObserverEntry:Ti,isSecureContext:Di,KeyboardEvent:Ti,KeyframeEffect:Ti,length:Di,localStorage:Di,location:Di,Location:Ti,locationbar:Di,matchMedia:Di,MediaDeviceInfo:Ti,MediaDevices:Ti,MediaElementAudioSourceNode:Ti,MediaEncryptedEvent:Ti,MediaError:Ti,MediaKeyMessageEvent:Ti,MediaKeySession:Ti,MediaKeyStatusMap:Ti,MediaKeySystemAccess:Ti,MediaList:Ti,MediaQueryList:Ti,MediaQueryListEvent:Ti,MediaRecorder:Ti,MediaSettingsRange:Ti,MediaSource:Ti,MediaStream:Ti,MediaStreamAudioDestinationNode:Ti,MediaStreamAudioSourceNode:Ti,MediaStreamEvent:Ti,MediaStreamTrack:Ti,MediaStreamTrackEvent:Ti,menubar:Di,MessageChannel:Ti,MessageEvent:Ti,MessagePort:Ti,MIDIAccess:Ti,MIDIConnectionEvent:Ti,MIDIInput:Ti,MIDIInputMap:Ti,MIDIMessageEvent:Ti,MIDIOutput:Ti,MIDIOutputMap:Ti,MIDIPort:Ti,MimeType:Ti,MimeTypeArray:Ti,MouseEvent:Ti,moveBy:Di,moveTo:Di,MutationEvent:Ti,MutationObserver:Ti,MutationRecord:Ti,name:Di,NamedNodeMap:Ti,NavigationPreloadManager:Ti,navigator:Di,Navigator:Ti,NetworkInformation:Ti,Node:Ti,NodeFilter:Di,NodeIterator:Ti,NodeList:Ti,Notification:Ti,OfflineAudioCompletionEvent:Ti,OfflineAudioContext:Ti,offscreenBuffering:Di,OffscreenCanvas:Ti,open:Di,openDatabase:Di,Option:Ti,origin:Di,OscillatorNode:Ti,outerHeight:Di,outerWidth:Di,PageTransitionEvent:Ti,pageXOffset:Di,pageYOffset:Di,PannerNode:Ti,parent:Di,Path2D:Ti,PaymentAddress:Ti,PaymentRequest:Ti,PaymentRequestUpdateEvent:Ti,PaymentResponse:Ti,performance:Di,Performance:Ti,PerformanceEntry:Ti,PerformanceLongTaskTiming:Ti,PerformanceMark:Ti,PerformanceMeasure:Ti,PerformanceNavigation:Ti,PerformanceNavigationTiming:Ti,PerformanceObserver:Ti,PerformanceObserverEntryList:Ti,PerformancePaintTiming:Ti,PerformanceResourceTiming:Ti,PerformanceTiming:Ti,PeriodicWave:Ti,Permissions:Ti,PermissionStatus:Ti,personalbar:Di,PhotoCapabilities:Ti,Plugin:Ti,PluginArray:Ti,PointerEvent:Ti,PopStateEvent:Ti,postMessage:Di,Presentation:Ti,PresentationAvailability:Ti,PresentationConnection:Ti,PresentationConnectionAvailableEvent:Ti,PresentationConnectionCloseEvent:Ti,PresentationConnectionList:Ti,PresentationReceiver:Ti,PresentationRequest:Ti,print:Di,ProcessingInstruction:Ti,ProgressEvent:Ti,PromiseRejectionEvent:Ti,prompt:Di,PushManager:Ti,PushSubscription:Ti,PushSubscriptionOptions:Ti,queueMicrotask:Di,RadioNodeList:Ti,Range:Ti,ReadableStream:Ti,RemotePlayback:Ti,removeEventListener:Di,Request:Ti,requestAnimationFrame:Di,requestIdleCallback:Di,resizeBy:Di,ResizeObserver:Ti,ResizeObserverEntry:Ti,resizeTo:Di,Response:Ti,RTCCertificate:Ti,RTCDataChannel:Ti,RTCDataChannelEvent:Ti,RTCDtlsTransport:Ti,RTCIceCandidate:Ti,RTCIceTransport:Ti,RTCPeerConnection:Ti,RTCPeerConnectionIceEvent:Ti,RTCRtpReceiver:Ti,RTCRtpSender:Ti,RTCSctpTransport:Ti,RTCSessionDescription:Ti,RTCStatsReport:Ti,RTCTrackEvent:Ti,screen:Di,Screen:Ti,screenLeft:Di,ScreenOrientation:Ti,screenTop:Di,screenX:Di,screenY:Di,ScriptProcessorNode:Ti,scroll:Di,scrollbars:Di,scrollBy:Di,scrollTo:Di,scrollX:Di,scrollY:Di,SecurityPolicyViolationEvent:Ti,Selection:Ti,ServiceWorker:Ti,ServiceWorkerContainer:Ti,ServiceWorkerRegistration:Ti,sessionStorage:Di,ShadowRoot:Ti,SharedWorker:Ti,SourceBuffer:Ti,SourceBufferList:Ti,speechSynthesis:Di,SpeechSynthesisEvent:Ti,SpeechSynthesisUtterance:Ti,StaticRange:Ti,status:Di,statusbar:Di,StereoPannerNode:Ti,stop:Di,Storage:Ti,StorageEvent:Ti,StorageManager:Ti,styleMedia:Di,StyleSheet:Ti,StyleSheetList:Ti,SubtleCrypto:Ti,SVGAElement:Ti,SVGAngle:Ti,SVGAnimatedAngle:Ti,SVGAnimatedBoolean:Ti,SVGAnimatedEnumeration:Ti,SVGAnimatedInteger:Ti,SVGAnimatedLength:Ti,SVGAnimatedLengthList:Ti,SVGAnimatedNumber:Ti,SVGAnimatedNumberList:Ti,SVGAnimatedPreserveAspectRatio:Ti,SVGAnimatedRect:Ti,SVGAnimatedString:Ti,SVGAnimatedTransformList:Ti,SVGAnimateElement:Ti,SVGAnimateMotionElement:Ti,SVGAnimateTransformElement:Ti,SVGAnimationElement:Ti,SVGCircleElement:Ti,SVGClipPathElement:Ti,SVGComponentTransferFunctionElement:Ti,SVGDefsElement:Ti,SVGDescElement:Ti,SVGDiscardElement:Ti,SVGElement:Ti,SVGEllipseElement:Ti,SVGFEBlendElement:Ti,SVGFEColorMatrixElement:Ti,SVGFEComponentTransferElement:Ti,SVGFECompositeElement:Ti,SVGFEConvolveMatrixElement:Ti,SVGFEDiffuseLightingElement:Ti,SVGFEDisplacementMapElement:Ti,SVGFEDistantLightElement:Ti,SVGFEDropShadowElement:Ti,SVGFEFloodElement:Ti,SVGFEFuncAElement:Ti,SVGFEFuncBElement:Ti,SVGFEFuncGElement:Ti,SVGFEFuncRElement:Ti,SVGFEGaussianBlurElement:Ti,SVGFEImageElement:Ti,SVGFEMergeElement:Ti,SVGFEMergeNodeElement:Ti,SVGFEMorphologyElement:Ti,SVGFEOffsetElement:Ti,SVGFEPointLightElement:Ti,SVGFESpecularLightingElement:Ti,SVGFESpotLightElement:Ti,SVGFETileElement:Ti,SVGFETurbulenceElement:Ti,SVGFilterElement:Ti,SVGForeignObjectElement:Ti,SVGGElement:Ti,SVGGeometryElement:Ti,SVGGradientElement:Ti,SVGGraphicsElement:Ti,SVGImageElement:Ti,SVGLength:Ti,SVGLengthList:Ti,SVGLinearGradientElement:Ti,SVGLineElement:Ti,SVGMarkerElement:Ti,SVGMaskElement:Ti,SVGMatrix:Ti,SVGMetadataElement:Ti,SVGMPathElement:Ti,SVGNumber:Ti,SVGNumberList:Ti,SVGPathElement:Ti,SVGPatternElement:Ti,SVGPoint:Ti,SVGPointList:Ti,SVGPolygonElement:Ti,SVGPolylineElement:Ti,SVGPreserveAspectRatio:Ti,SVGRadialGradientElement:Ti,SVGRect:Ti,SVGRectElement:Ti,SVGScriptElement:Ti,SVGSetElement:Ti,SVGStopElement:Ti,SVGStringList:Ti,SVGStyleElement:Ti,SVGSVGElement:Ti,SVGSwitchElement:Ti,SVGSymbolElement:Ti,SVGTextContentElement:Ti,SVGTextElement:Ti,SVGTextPathElement:Ti,SVGTextPositioningElement:Ti,SVGTitleElement:Ti,SVGTransform:Ti,SVGTransformList:Ti,SVGTSpanElement:Ti,SVGUnitTypes:Ti,SVGUseElement:Ti,SVGViewElement:Ti,TaskAttributionTiming:Ti,Text:Ti,TextEvent:Ti,TextMetrics:Ti,TextTrack:Ti,TextTrackCue:Ti,TextTrackCueList:Ti,TextTrackList:Ti,TimeRanges:Ti,toolbar:Di,top:Di,Touch:Ti,TouchEvent:Ti,TouchList:Ti,TrackEvent:Ti,TransitionEvent:Ti,TreeWalker:Ti,UIEvent:Ti,ValidityState:Ti,visualViewport:Di,VisualViewport:Ti,VTTCue:Ti,WaveShaperNode:Ti,WebAssembly:Di,WebGL2RenderingContext:Ti,WebGLActiveInfo:Ti,WebGLBuffer:Ti,WebGLContextEvent:Ti,WebGLFramebuffer:Ti,WebGLProgram:Ti,WebGLQuery:Ti,WebGLRenderbuffer:Ti,WebGLRenderingContext:Ti,WebGLSampler:Ti,WebGLShader:Ti,WebGLShaderPrecisionFormat:Ti,WebGLSync:Ti,WebGLTexture:Ti,WebGLTransformFeedback:Ti,WebGLUniformLocation:Ti,WebGLVertexArrayObject:Ti,WebSocket:Ti,WheelEvent:Ti,Window:Ti,Worker:Ti,WritableStream:Ti,XMLDocument:Ti,XMLHttpRequest:Ti,XMLHttpRequestEventTarget:Ti,XMLHttpRequestUpload:Ti,XMLSerializer:Ti,XPathEvaluator:Ti,XPathExpression:Ti,XPathResult:Ti,XSLTProcessor:Ti};for(const e of["window","global","self","globalThis"])Ui[e]=Ui;function Gi(e){let t=Ui;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return"Symbol"===e[0]&&2===e.length?ji:null}return t[vi]}class Hi extends ts{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(Gi([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=Gi([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=Gi([this.name,...e]);return s?s.getLiteralValue():lt}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!Gi([this.name]):!Gi([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=Gi([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}const Wi=(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 ts{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.assignedFunctions=null,this.includedPathTracker=new Qe,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(Ge)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned||t.length+this.initPath.length>6?ft(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=we;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath([...this.initPath,Re])}else this.init.deoptimizePath(Wi(this.initPath,e))}getKnownFunctionAtPath(e,t,n){return this.isReassigned||e.length+this.initPath.length>6?null:t.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getKnownFunctionAtPath([...this.initPath,...e],t,n)),null)}getLiteralValueAtPath(e,t,n){return this.isReassigned||e.length+this.initPath.length>6?lt:t.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath([...this.initPath,...e],t,n)),lt)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned||e.length+this.initPath.length>6?pt:n.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],t,n,s)),pt)}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!==$t);)n=n.parent}e.length>0&&(this.init.includePath(Wi(this.initPath,e),t),this.additionalInitializers?.forEach(e=>e.includePath(Ge,t)))}}includeCallArgumentsWhenCalledAtPath(e,t,n){if(this.isReassigned)return mt(t,n),void(0===e.length&&this.includeCallArgumentsOfAssignedTryCatchHelpers(t,n));n.includedCallArguments.has(this.init)||e.length+this.initPath.length>6?mt(t,n):(n.includedCallArguments.add(this.init),this.init.includeCallArgumentsWhenCalledAtPath([...this.initPath,...e],t,n),n.includedCallArguments.delete(this.init))}includeCallArgumentsOfAssignedTryCatchHelpers(e,t){0===this.initPath.length&&this.includeCallArgumentsOfTryCatchHelper(this.init,e,t);for(const n of this.assignedFunctions??we)this.includeCallArgumentsOfTryCatchHelper(n,e,t)}includeCallArgumentsOfTryCatchHelper(e,t,n){(Is(e)||Ns(e))&&e.scope.hasParameterCalledFromTryStatement()&&e.scope.includeCallArguments(t,n)}addReassignedValue(e){(Is(e)||Ns(e))&&(this.assignedFunctions??=[]).push(e)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=ht,this.markReassigned()),this.additionalInitializers}}const qi=new Set(["class","const","let","var","using","await using"]);class Xi extends vs{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return ot(this.flags,4)?ot(this.flags,8):null}set isTDZAccess(e){this.flags=at(this.flags,4,!0),this.flags=at(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)}getKnownFunctionAtPath(e,t,n){return this.getVariableRespectingTDZ().getKnownFunctionAtPath(e,t,n)}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 Hi&&!this.isPureFunction(Ue)&&this.variable.hasEffectsOnInteractionAtPath(Ue,yt,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(Ge,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,Ue,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))}includeCallArgumentsWhenCalledAtPath(e,t,n){this.variable.includeCallArgumentsWhenCalledAtPath(e,t,n)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof Ki&&this.variable.kind&&qi.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&&Ji(this)===Ji(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||ps(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(kn(this.name,this.scope.context.module.id),this.start)}getVariableRespectingTDZ(){return this.isPossibleTDZ()?ht:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[es])return!0;t=t[n]}return t?.[es]}}function Ji(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}class Yi extends dt{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 Zi extends Xi{constructor(){super(...arguments),this.variable=null}get isDestructuringDeoptimized(){return ot(this.flags,16777216)}set isDestructuringDeoptimized(e){this.flags=at(this.flags,16777216,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&st(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0,this.assignmentInteraction&&this.variable.markTargetOfAssignment())}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(Ue),0===e.length&&this.variable?.addReassignedValue(t),t.deoptimizePath([...e,Re])}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,yt,e)}includeDestructuredIfNecessary(e,t,n){t.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,n.deoptimizeArgumentsOnInteractionAtPath({args:[new Yi(n,t.slice(0,-1))],type:0},t,Je));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,yt,rt())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,Ue,e),n.includePath(t,e)),!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){this.variable.initReached=!0}isDeclarationInDestructuringPattern(){let e=this.parent;for(;e.type===wt||"AssignmentPattern"===e.type||e.type===It;)e=e.parent;return"ObjectPattern"===e.type||"ArrayPattern"===e.type}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=Pe){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 Qi(e,t,n){let s=e,i=1;for(;t.has(s)||ie.has(s)||n?.has(s);)s=`${e}$${se(i++)}`;return t.add(s),s}class er{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(Hn(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 tr extends er{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 tr&&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 tr&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof tr&&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,Qi(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 nr(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}class sr extends vs{constructor(){super(...arguments),this.accessedValue=null}get computed(){return ot(this.flags,1024)}set computed(e){this.flags=at(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},Ue,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.getAccessedValue()[0].includeCallArgumentsWhenCalledAtPath(e,t,n)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getKnownFunctionAtPath(e,t,n){return"get"===this.kind||"set"===this.kind?null:this.value.getKnownFunctionAtPath(e,t,n)}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(Ue,{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=pt,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Ue,Et,Je,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}sr.prototype.includeNode=$s,sr.prototype.applyDeoptimizations=ws;class ir extends sr{hasEffects(e){return super.hasEffects(e)||nr(this.decorators,e)}}class rr extends vs{get computed(){return ot(this.flags,1024)}set computed(e){this.flags=at(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):lt}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):pt}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||nr(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.value?.includePath(Ge,e);for(const t of this.decorators)t.includePath(Ge,e)}}rr.prototype.applyDeoptimizations=ws;class or extends tr{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(Hn(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 ar extends vs{createScope(e){this.scope=new or(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=he(e.original.slice(this.start,this.end),"{")+1;be(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}function lr(e){return"StaticBlock"===e.type}ar.prototype.includeNode=$s,ar.prototype.applyDeoptimizations=ws;class cr extends vs{constructor(){super(...arguments),this.instanceFieldValues=null,this.objectEntity=null}createScope(e){this.scope=new tr(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)||nr(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))||this.hasEffectsOnInstanceFieldInitialization(n):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",Ue,this),this.instanceEntity=new ni(new Map,new Yi(this,["prototype"])),this.body.scope.instanceThisVariable.addArgumentForDeoptimization(this.instanceEntity);for(const e of this.body.body)if(e instanceof ir&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)lr(e)||e.static||e instanceof ir&&"constructor"===e.kind||e.deoptimizePath(Ge);this.scope.context.requestTreeshakingPass()}hasEffectsOnInstanceFieldInitialization(e){const t=this.getInstanceFieldValues();if(0===t.length)return!1;const{replacedVariableInits:n}=e,s=this.body.scope.instanceThisVariable,i=n.get(s);n.set(s,this.instanceEntity);const r=t.some(t=>t.hasEffects(e));return i?n.set(s,i):n.delete(s),r}getInstanceFieldValues(){if(null===this.instanceFieldValues){this.instanceFieldValues=[];for(const e of this.body.body)e instanceof rr&&!e.static&&null!==e.value&&this.instanceFieldValues.push(e.value)}return this.instanceFieldValues}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(lr(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(Ue,Je,this);if("symbol"==typeof e){s.push({key:Fe(e)?e:Re,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof Zi?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new ni(t,this.superClass?new Yi(this.superClass,["prototype"]):ri)}),this.objectEntity=new ni(e,this.superClass||ri)}}cr.prototype.includeNode=Ps;class ur extends cr{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){return null!==e.id&&(this.id=new Zi(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}${Ae([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 dr extends Ki{constructor(e){super("arguments",null,ht,Ue,e,"other")}addArgumentToBeDeoptimized(e){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=hr}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(Ge);this.deoptimizedArguments.length=0}}function hr(e){this.included?e.deoptimizePath(Ge):this.deoptimizedArguments?.push(e)}const pr=we,fr=new Set([Re]),mr=new Xe,gr=new Set([ht]);class yr extends Ki{constructor(e,t,n,s){super(e,t,ht,n,s,"parameter"),this.includedPathTracker=new nt,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new Xe,this.deoptimizedFields=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=lt}addArgumentForDeoptimization(e){if(this.updateKnownValue(e),e===ht){if(!this.argumentsToBeDeoptimized.has(ht)){this.argumentsToBeDeoptimized.add(ht);for(const{interaction:e}of this.deoptimizationInteractions)ft(e);this.deoptimizationInteractions=pr}}else if(this.deoptimizedFields.has(Re))e.deoptimizePath([...this.initPath,Re]);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],Je)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsDependingOnKnownValue)e.deoptimizeCache();this.expressionsDependingOnKnownValue=we}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(this.initPath,Je,this));if(this.knownValue===e||this.knownValue instanceof Zi&&e instanceof Zi&&this.knownValue.variable===e.variable)return;const{knownValueLiteral:t}=this;"symbol"!=typeof t&&e.getLiteralValueAtPath(this.initPath,Je,this)===t||this.markReassigned()}getKnownValue(){return this.knownValue||ht}getLiteralValueAtPath(e,t,n){if(this.isReassigned||e.length+this.initPath.length>6)return lt;const s=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(n),t.withTrackedEntityAtPath(e,s,()=>s.getLiteralValueAtPath([...this.initPath,...e],t,n),lt)}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(ht)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(Re)||2===e.type&&this.deoptimizedFields.has(t[0]))||this.initPath.length+t.length>6)ft(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.argumentsToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],Je);this.argumentsToBeDeoptimized.has(ht)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(Re))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===Re&&(this.deoptimizationInteractions=pr,this.deoptimizations=mr,this.deoptimizedFields=fr,this.argumentsToBeDeoptimized=gr)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(Ge):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),pt}includeArgumentPaths(e,t){this.includedPathTracker.includeAllPaths(e,t,this.initPath)}}class br extends yr{constructor(e){super("this",null,Ue,e),this.includedPathTracker=new Qe}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||ht).hasEffectsOnInteractionAtPath(e,t,n)}}class Er extends dt{constructor(e){super(),this.returnedIdentifier=e}deoptimizeArgumentsOnInteractionAtPath(e,t,n){ft(e),this.returnedIdentifier.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.returnedIdentifier.deoptimizePath(e)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.returnedIdentifier.includeCallArgumentsWhenCalledAtPath(e,t,n)}}class xr extends tr{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,Ms,s,i);return o.renderLikeHoisted(n),this.addHoistedVariable(r,n),n}return"var"===a?(o.addDeclaration(e,n),o):t.error(Hn(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 Ar extends tr{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(Hn(r),e.start)}const a=new Ki(e.name,e,n,s,t,i);return this.variables.set(r,a),a}}class Sr extends tr{constructor(e,t){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=t?new xr(this):new Ar(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 yr(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}hasParameterCalledFromTryStatement(){return this.parameters.some(e=>e.some(e=>e.calledFromTryStatement))}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 Ai&&!s&&(s=!0,r=n-1),s&&(i.includePath(Ge,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 vr 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 Ai){for(;n<t.length;n++){e[n+1]?.deoptimizePath(Ge);for(const e of t[n])e.markReassigned()}break}if(this.hasRest&&n>=t.length-1)s.deoptimizePath(Ge);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(Ms)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}deoptimizeAllParameters(){for(const e of this.parameters)for(const t of e)t.deoptimizePath(Ge),t.markReassigned()}reassignAllParameters(){for(const e of this.parameters)for(const t of e)t.markReassigned()}addArgumentToBeDeoptimized(e){}updateReturnExpression(){const{returnExpressions:e}=this,[t]=e;if(t&&this.returnExpressionsResolveToSameVariable(t))this.returnExpression=t.variable.isTargetOfAssignment?new Er(t):t;else if(1===e.length)this.returnExpression=t;else{this.returnExpression=ht;for(const t of e)t.deoptimizePath(Ge)}}returnExpressionsResolveToSameVariable(e){return!(!Rs(e)||null===e.variable)&&this.returnExpressions.every(t=>Rs(t)&&t.variable===e.variable)}}class Pr extends vr{constructor(e,t){super(e,!1),this.functionNode=t;const{context:n}=e;this.variables.set("arguments",this.argumentsVariable=new dr(n)),this.variables.set("this",this.thisVariable=new br(n))}findLexicalBoundary(){return this}includeCallArguments(e,t){super.includeCallArguments(e,t);const{args:n}=e;if(n[0]&&this.thisVariable.includeArgumentPaths(n[0],t),this.argumentsVariable.included)for(let e=1;e<n.length;e++){const s=n[e];s&&(s.includePath(Ge,t),s.include(t,!1))}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class $r extends vs{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===$t&&this.scope.context.log(Mt,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${Vt(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!==$t:super.shouldBeIncluded(e)}}$r.prototype.includeNode=$s,$r.prototype.applyDeoptimizations=ws;class wr extends vs{get deoptimizeBody(){return ot(this.flags,32768)}set deoptimizeBody(e){this.flags=at(this.flags,32768,e)}get directlyIncluded(){return ot(this.flags,16384)}set directlyIncluded(e){this.flags=at(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(ht)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new or(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 $r&&"use asm"===e.directive}render(e,t){this.body.length>0?be(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}wr.prototype.includeNode=$s,wr.prototype.applyDeoptimizations=ws;class Ir extends vs{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,Nr(t),n)}deoptimizeAssignment(e,t){this.argument.deoptimizeAssignment(Nr(e),t)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Ue)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Ue,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.argument.hasEffectsWhenDestructuring(e,Nr(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.argument.includeDestructuredIfNecessary(e,Nr(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()}setAssignedValue(e){this.argument.setAssignedValue(e)}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([Re,Re]),this.scope.context.requestTreeshakingPass())}}Ir.prototype.includeNode=Ps;const Nr=e=>e.at(-1)===Re?e:[...e,Re];class Cr extends vs{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1}get async(){return ot(this.flags,256)}set async(e){this.flags=at(this.flags,256,e)}get deoptimizedReturn(){return ot(this.flags,512)}set deoptimizedReturn(e){this.flags=at(this.flags,512,e)}get generator(){return ot(this.flags,4194304)}set generator(e){this.flags=at(this.flags,4194304,e)}get hasCachedEffects(){return ot(this.flags,67108864)}set hasCachedEffects(e){this.flags=at(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]===Re&&(this.scope.getReturnExpression().deoptimizePath(Ge),this.scope.deoptimizeAllParameters())}getKnownFunctionAtPath(e,t,n){return 0===e.length?this:this.getObjectEntity().getKnownFunctionAtPath(e,t,n)}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.generator?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(Ge),this.scope.context.requestTreeshakingPass()),pt):[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"],Et,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],yt,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,Ue,t.args[e+1]||Ms))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===St&&(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}includeCallArgumentsWhenCalledAtPath(e,t,n){0===e.length?this.scope.includeCallArguments(t,n):this.getObjectEntity().includeCallArgumentsWhenCalledAtPath(e,t,n)}initialise(){super.initialise(),this.body instanceof wr?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",Ue,ht)),o[o.length-1]instanceof Ir),this.body=new(r.getNodeConstructor(t.type))(this,i).parseNode(t),super.parseNode(e)}}Cr.prototype.preventChildBlockScope=!0,Cr.prototype.includeNode=$s,Cr.prototype.applyDeoptimizations=ws;class kr extends Cr{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Pr(e,this),this.constructedEntity=new ni(new Map,ri),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:ht);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 Zi&&!n||s.include(e,t)}includeNode(e){this.included=!0;const t=this.scope.argumentsVariable.included;for(const n of this.params)n instanceof Zi&&!t||n.includePath(Ge,e)}initialise(){super.initialise(),this.id?.declare("function",Ue,this)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ni([{key:"prototype",kind:"init",property:new ni([],this.getPrototypeOfPrototype())}],ri)}getPrototypeOfPrototype(){return this.generator?this.async?ai:oi:ri}}class Rr extends kr{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 Zi(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class Or extends vs{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,Ge,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 fe(e,he(e,"default",t)+7)}(e.original,this.start);let o=!1;if(this.declaration instanceof Rr)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=he(e,"function",t)+8;e=e.slice(n,he(e,"(",n));const s=he(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof ur)this.renderNamedDeclaration(e,r,null===this.declaration.id?he(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void ue(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:vt}),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 ur&&i.has(this.variable)&&e.appendLeft(this.end,` ${Ae([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(oe(a[0]))}, `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";")),!1):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),!o)}}Or.prototype.needsBoundaries=!0,Or.prototype.includeNode=$s,Or.prototype.applyDeoptimizations=ws;const Dr=/[\n\r'\\\u2028\u2029]/,Mr=/[\n\r'\\\u2028\u2029]/g,_r={"\n":"\\n","\r":"\\r","'":"\\'","\\":"\\\\","\u2028":"\\u2028","\u2029":"\\u2029"};function Lr(e){return Dr.test(e)?e.replace(Mr,e=>_r[e]):e}const Tr="_interopDefault",zr="_interopDefaultCompat",Br="_interopNamespace",Fr="_interopNamespaceCompat",Vr="_interopNamespaceDefault",jr="_interopNamespaceDefaultOnly",Ur="_mergeNamespaces",Gr="_documentCurrentScript",Hr={auto:Tr,compat:zr,default:null,defaultOnly:null,esModule:null},Wr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),Kr={auto:Br,compat:Fr,default:Vr,defaultOnly:jr,esModule:null},qr=(e,t)=>"esModule"!==e&&Wr(e,t),Xr=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of co)t.has(e)&&a.add(e);return co.map(e=>a.has(e)?Jr[e](n,s,i,r,o,a):"").join("")},Jr={[Gr]:(e,{_:t,n:n})=>`var ${Gr}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[zr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:zr});return`${o}${Qr(t)}${s}?${s}${n?Yr(t):Zr(t)}${a}${r}${r}`},[Tr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Tr});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?Yr(t):Zr(t)}${a}${r}${r}`},[Fr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Vr)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Fr});return`${e}${Qr(t)}${o}?${o}e${o}:${o}${Vr}(e)${n}${l}${l}`}return`function ${Fr}(e)${o}{${l}${e}if${o}(${Qr(t)})${o}return e;${l}`+eo(e,e,t,n,s,i)+`}${l}${l}`},[jr](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,u]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:jr});return`${c}${ao(s,lo(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[Vr](e,t,n,s,i){const{_:r,n:o}=t;return`function ${Vr}(e)${r}{${o}`+eo(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(Vr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Br});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${Vr}(e)${t}${l}${l}`}return`function ${Br}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+eo(e,e,t,n,s,i)+`}${l}${l}`},[Ur](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${Ur}(n, m)${r}{${a}${e}${no(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?io:ro:oo)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${ao(s,lo(i,"n",t))};${a}}${a}${a}`}},Yr=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Zr=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Qr=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,eo=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}=n,h=`{${u}`+(s?so:oo)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${uo(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${to(h,!s,n)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${ao(i,"n")}${d}${u}`},to=(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}`,no=(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}}`},so=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+io(e,t+e,n)+`${t}}${i}`},io=(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}`},ro=(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}`},oo=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,ao=(e,t)=>e?`Object.freeze(${t})`:t,lo=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${uo(s)})`:t,co=Object.keys(Jr);function uo(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class ho extends ts{constructor(){super("undefined")}getLiteralValueAtPath(){}}class po extends Ki{constructor(e,t){super("default",e,e.declaration,Ue,t,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const n=e.declaration;(n instanceof Rr||n instanceof ur)&&n.id?(this.hasId=!0,this.originalId=n.id):n instanceof Zi&&(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}getOriginalNamespaceVariable(){let e=this;const t=new Set;for(;e instanceof po&&!t.has(e);){if(t.add(e),e.hasId||!e.originalId)return null;e=e.originalId.variable}return e?.isNamespace?e:null}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 vs{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)?lt:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?pt:Xs(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||qs(this.members,e[0],t,n))}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return Ws;switch(typeof e){case"boolean":return Gs;case"number":return Hs;case"string":return Ks}return Object.create(null)}(this.value)}parseNode(e){return this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(){"string"==typeof this.value&&this.scope.context.addIndentExclusionRange([this.start+1,this.end-1])}}function mo(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(Ue,Je,i);if(n===Ss||e.optional&&null==n)return Ss}else if(e.optional&&null==t.getLiteralValueAtPath(Ue,Je,i))return Ss;return e.getLiteralValueAtPath(n,s,i)}function go(e){return e.computed?function(e){if(e instanceof fo)return String(e.value);return null}(e.property):e.property.name}function yo(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof Zi)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof Eo){const s=yo(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}function bo(e){let t=e[0].key;for(let n=1;n<e.length;n++)t+="."+e[n].key;return t}fo.prototype.includeNode=Ps;class Eo extends vs{constructor(){super(...arguments),this.promiseHandler=null,this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return ot(this.flags,1024)}set computed(e){this.flags=at(this.flags,1024,e)}get optional(){return ot(this.flags,128)}set optional(e){this.flags=at(this.flags,128,e)}get assignmentDeoptimized(){return ot(this.flags,16)}set assignmentDeoptimized(e){this.flags=at(this.flags,16,e)}get bound(){return ot(this.flags,32)}set bound(e){this.flags=at(this.flags,32,e)}get deleteOfMissingNamespaceMember(){return ot(this.flags,536870912)}set deleteOfMissingNamespaceMember(e){this.flags=at(this.flags,536870912,e)}get isUndefined(){return ot(this.flags,64)}set isUndefined(e){this.flags=at(this.flags,64,e)}bind(){this.bound=!0;const e=yo(this);let t=e&&this.scope.findVariable(e[0].key);if(t instanceof po&&(t=t.getOriginalNamespaceVariable()||t),t?.isNamespace){const n=xo(t,e.slice(1),this.scope.context),s=this.isDeleteTarget();!n||this.assignmentInteraction||s?(this.deleteOfMissingNamespaceMember=s&&"undefined"===n,super.bind()):"undefined"===n?this.isUndefined=!0:(this.variable=n,this.scope.addNamespaceMemberAccess(bo(e),n))}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===Re?Ge:[this.propertyKey,...t],n):ft(e))}deoptimizeAssignment(e,t){this.deoptimizePath(Ue),t.deoptimizePath([...e,Re])}deoptimizeCache(){if(this.propertyKey===this.dynamicPropertyKey)return;const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=we,this.dynamicPropertyKey=this.propertyKey,t.deoptimizePath(Ge),this.included&&t.includePath(Ge,it());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===Re?Oe:t,...e.length<6?e:[...e.slice(0,6),Re]])}}getKnownFunctionAtPath(e,t,n){if(this.variable)return this.variable.getKnownFunctionAtPath(e,t,n);if(this.isUndefined)return null;const s=this.getDynamicPropertyKey();return s!==Re&&e.length<6?(s!==this.propertyKey&&this.expressionsToBeDeoptimized.push(n),this.object.getKnownFunctionAtPath([s,...e],t,n)):null}getLiteralValueAtPath(e,t,n){if(this.variable)return this.variable.getLiteralValueAtPath(e,t,n);if(this.isUndefined)return;const s=this.getDynamicPropertyKey();return s!==Re&&e.length<6?(s!==this.propertyKey&&this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([s,...e],t,n)):lt}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:mo(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[Ms,!1];const i=this.getDynamicPropertyKey();return i!==Re&&e.length<6?(i!==this.propertyKey&&this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([i,...e],t,n,s)):pt}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===Ss?Ss:this.optional&&null==this.object.getLiteralValueAtPath(Ue,Je,this)?t||Ss:(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(Ue,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,yt,e)}include(e,t){this.included||this.includeNode(e),this.object.include(e,t),this.property.include(e,t),t&&this.variable?.includePath(Ge,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable?this.scope.context.includeVariableInModule(this.variable,Ue,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,Ue,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),Re]],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)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.promiseHandler?0===e.length?this.promiseHandler.includeCallArguments(t,n):mt(t,n):this.variable?this.variable.includeCallArgumentsWhenCalledAtPath(e,t,n):!this.isUndefined&&e.length<6?this.object.includeCallArgumentsWhenCalledAtPath(this.propertyKey===Re?Ge:[this.propertyKey,...e],t,n):mt(t,n)}includeDestructuredIfNecessary(){this.scope.context.error({message:"includeDestructuredIfNecessary is currently not supported for MemberExpressions"},this.start)}initialise(){super.initialise(),this.dynamicPropertyKey=go(this),this.propertyKey=null===this.dynamicPropertyKey?Re:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=Pe){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],Je),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],Je),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){this.getNamespaceVariableOfObject()&&!this.deleteOfMissingNamespaceMember&&this.scope.context.log(Mt,kn(this.getNamespaceName(),this.scope.context.module.id),this.start)}getDynamicPropertyKey(){if(null===this.dynamicPropertyKey){this.dynamicPropertyKey=this.propertyKey;const e=this.property.getLiteralValueAtPath(Ue,Je,this);return this.dynamicPropertyKey="symbol"==typeof e?Be.has(e)?e:Re:String(e)}return this.dynamicPropertyKey}getNamespaceName(){return this.object instanceof Zi?this.object.name:bo(yo(this.object))}getNamespaceVariableOfObject(){let e;if(this.object instanceof Zi)e=this.scope.findVariable(this.object.name);else{if(!(this.object instanceof Eo))return null;e=this.object.variable}return e instanceof po&&(e=e.getOriginalNamespaceVariable()||e),e?.isNamespace?e:null}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))}isDeleteTarget(){const e="ChainExpression"===this.parent.type?this.parent.parent:this.parent;return"UnaryExpression"===e.type&&"delete"===e.operator}}function xo(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof ss)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(Mt,Fn(s,n.module.id,i,!!r?.missingButExportExists),t[0].pos),"undefined"}return null}return xo(i,t.slice(1),n)}const Ao="ROLLUP_FILE_URL_",So="ROLLUP_FILE_URL_OBJ_",vo="import";class Po extends vs{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;if(t===vo){if(n?.startsWith(So))return e.getFileName(n.slice(20));if(n?.startsWith(Ao))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===vo){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Eo&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(So)?this.referenceId=t.slice(20):t?.startsWith(Ao)&&(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!==vo)return;const m=c;if(u){const t=s.getFileName(u),i=J(te(Z(m),t)),r=!!a?.startsWith(So),o=s.hookFirstSync("resolveFileUrl",[{attributes:f,chunkId:m,fileName:t,format:n,moduleId:p,referenceId:u,relativePath:i}])||Mo[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=_o[n]?.(a,{chunkId:m,snippets:i}),t.accessedDocumentCurrentScript||=$o.includes(n)&&"undefined"!==g),"string"==typeof g&&(l instanceof Eo?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(Ao)||this.metaProperty?.startsWith(So)?Io:wo)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}}const $o=["cjs","iife","umd"],wo={amd:["document","module","URL"],cjs:["document","require","URL",Gr],es:[],iife:["document","URL",Gr],system:["module"],umd:["document","require","URL",Gr]},Io={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},No=(e,t,n="URL")=>`new ${n}(${e})${t?"":".href"}`,Co=(e,t,n=!1)=>No(`'${Lr(e)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,t),ko=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},Ro=(e,t)=>`require('u' + 'rl').pathToFileURL(${e})${t?"":".href"}`,Oo=(e,t)=>Ro(`__dirname + '/${Lr(e)}'`,t),Do=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${Gr} && ${Gr}.tagName.toUpperCase() === 'SCRIPT' && ${Gr}.src || new URL('${Lr(e)}', document.baseURI).href)`,Mo={amd:(e,t)=>("."!==e[0]&&(e="./"+e),No(`require.toUrl('${Lr(e)}'), document.baseURI`,t)),cjs:(e,t)=>`(typeof document === 'undefined' ? ${Oo(e,t)} : ${Co(e,t)})`,es:(e,t)=>No(`'${Lr(e)}', import.meta.url`,t),iife:(e,t)=>Co(e,t),system:(e,t)=>No(`'${Lr(e)}', module.meta.url`,t),umd:(e,t)=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Oo(e,t)} : ${Co(e,t,!0)})`},_o={amd:ko(()=>No("module.uri, document.baseURI",!1)),cjs:ko(e=>`(typeof document === 'undefined' ? ${Ro("__filename",!1)} : ${Do(e)})`),iife:ko(e=>Do(e)),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:ko(e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Ro("__filename",!1)} : ${Do(e,!0)})`)};class Lo extends ts{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.getMemberVariable(s)?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):ft(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];if("string"==typeof t)this.getMemberVariable(t)?.deoptimizePath(e.slice(1));else if(!this.areAllMembersDeoptimized){this.areAllMembersDeoptimized=!0;for(const e of this.module.getExportedVariablesByName().values())e.deoptimizePath(Ge)}}}getLiteralValueAtPath(e){return e[0]===_e?"Module":lt}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.getMemberVariable(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.getMemberVariable(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([Ur],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])=>!ae(e)&&t.included).map(([e,t])=>{const n=oe(e);return this.referencedEarly||t.isReassigned||t===this||t.module&&!t.module.info.isExternal&&t.module.execIndex>this.module.execIndex?[null,`get ${ds(n)}${o}()${o}{${o}return ${t.getName(c)}${d}${o}}`]:[n,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__*/${Ur}(${p},${o}[${e.join(`,${o}`)}])`}else r&&(p=`/*#__PURE__*/Object.defineProperty(${p},${o}Symbol.toStringTag,${o}${uo(l)})`),s&&(p=`/*#__PURE__*/Object.freeze(${p})`);return p=`${a} ${this.getName(c)}${o}=${o}${p};`,"system"===n&&t.has(this)&&(p+=`${u}${Ae([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}}}getMemberVariable(e){return this.module.getExportedVariablesByName().get(re(e))}includeNonExplicitNamespaces(){this.nonExplicitNamespacesIncluded||(this.nonExplicitNamespacesIncluded=!0,this.setMergedNamespaces(this.module.includeAndGetAdditionalMergedNamespaces()))}}Lo.prototype.isNamespace=!0;const To=e=>Object.create(e,{includePath:{value(t,n){e.includeMemberPath(t,n)}}});class zo extends ts{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 zo;){if(e instanceof po){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof zo&&(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 Bo{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?J(te(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=Fo(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return Lr(this.renormalizeRenderPath?Gt(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function Fo(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map(([e,t])=>[e,JSON.stringify(t)]);return n.length>0?t(n,{lineBreakIndent:null}):null}function Vo(e){return e.endsWith(".js")?e.slice(0,-3):e}function jo(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Vo(t)}`:e.id??""}function Uo(e,t,n,s,i,r,o,a,l="return "){const{_:c,getFunctionIntro:u,getPropertyAccess:d,n:h,s:p}=i;if(!n)return`${h}${h}${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 Go(a,u[0].imported,l,o,e,c,n,r,s,i)}(e,t,s,o,d)};`;let f="";if(n)for(const{defaultVariableName:e,importPath:n,isChunk:a,name:l,namedExportsMode:u,namespaceVariableName:p,reexports:m}of t)if(m)for(const t of m)if("*"!==t.reexported){const m=Go(l,t.imported,u,a,e,p,s,n,o,d);f&&(f+=h),"*"!==t.imported&&t.needsLiveBinding?f+=`Object.defineProperty(exports,${c}${JSON.stringify(oe(t.reexported))},${c}${qo(m,!1,r,i)});`:"__proto__"===t.reexported?f+=`Object.defineProperty(exports,${c}"__proto__",${c}{${h}${r}enumerable:${c}true,${h}${r}value:${c}${m}${h}});`:f+=`exports${d(oe(t.reexported))}${c}=${c}${m};`}for(const{exported:t,local:n,needsLiveBinding:s}of e){const e=`exports${d(oe(t))}`,o=n;if(e!==o){if(f&&(f+=h),s){f+=`Object.defineProperty(exports,${c}${JSON.stringify(oe(t))},${c}${qo(o,!0,r,i)});`;continue}f+="__proto__"===t?`Object.defineProperty(exports,${c}"__proto__",${c}{${h}${r}enumerable:${c}true,${h}${r}value:${c}${o}${h}});`:`${e}${c}=${c}${o};`}}if(n)for(const{name:e,reexports:n}of t)if(n)for(const t of n)if("*"===t.reexported){if(f&&(f+=h),!t.needsLiveBinding&&a){const t="'__proto__'";f+=`Object.prototype.hasOwnProperty.call(${e},${c}${t})${c}&&${h}${r}!Object.prototype.hasOwnProperty.call(exports,${c}${t})${c}&&${h}${r}Object.defineProperty(exports,${c}${t},${c}{${h}${r}${r}enumerable:${c}true,${h}${r}${r}value:${c}${e}[${t}]${h}${r}});${h}${h}`}const n=`{${h}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!Object.prototype.hasOwnProperty.call(exports,${c}k))${c}${Ko(e,t.needsLiveBinding,r,i)}${p}${h}}`;f+=`Object.keys(${e}).forEach(${u(["k"],{isAsync:!1,name:null})}${n});`}return f?`${h}${h}${f}`:""}function Go(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=Hr[t]?i:e;return Wr(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:Kr[o(a)])?r:e:`${e}${c(oe(t))}`}function Ho(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",Ho(i)],[null,`[Symbol.toStringTag]:${s}${uo(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${Ho(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${uo(i)});`}return""}const Ko=(e,t,n,s)=>{const{_:i}=s;return t?`Object.defineProperty(exports,${i}k,${i}${qo(`${e}[k]`,!1,n,s,n)})`:`exports[k]${i}=${i}${e}[k]`},qo=(e,t,n,{getDirectReturnFunction:s,getObject:i},r="")=>{const[o,a]=s([],{functionReturn:!0,lineBreakIndent:null,name:null}),l=[["enumerable","true"],["get",`${o}${e}${a}`]];return t&&l.unshift(["configurable","true"]),i(l,{lineBreakIndent:{base:r,t:n}})};function Xo(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,jr,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=Hr[e])):"*"!==t||"*"===i||a||(a=!0,s=Kr[e],c=l),s&&p(c,s,o)}}return`${Xr(d,r,o,a,n,s,i)}${h.length>0?`${h.join(u)}${u}${u}`:""}`}function Jo(e,t,n){const s=n.find(e=>e.sourcePhaseImport);s&&on(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:Ht(sn)}}(e,t,s.importPath))}function Yo(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":Vo(e);var n}const Zo=new Set(["node:assert","assert","node:assert/strict","assert/strict","node:async_hooks","async_hooks","node:bench","node:bench/reporters","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:net/promises","net/promises","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 Qo(e,t){const n=t.map(({importPath:e})=>e).filter(e=>Zo.has(e)||e.startsWith("node:"));0!==n.length&&e(Mt,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${zt(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const ea=e=>{return t=oe(e),cs.test(t)?t:JSON.stringify(t);var t},ta=(e,t)=>e.split(".").map(t).join("");function na(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(Mt,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 sa(e){let t=e.length;for(;t--;){const{imports:n,reexports:s}=e[t];if(n||s)return e.slice(0,t+1)}return[]}const ia="_missingExportShim";const ra=({dependencies:e,exports:t})=>{const n=new Set(t.map(e=>oe(e.exported)));n.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&n.add(oe(e.reexported));return n},oa=(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""},aa=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",la=(e,t,n)=>ca(e.filter(e=>e.hoisted).map(e=>({name:e.exported,value:e.local})),t,n);function ca(e,t,{_:n,n:s}){return 0===e.length?"":1===e.length?`exports(${JSON.stringify(oe(e[0].name))},${n}${e[0].value});${s}${s}`:`exports({${s}`+e.map(({name:e,value:s})=>`${t}${ds(oe(e))}:${n}${s}`).join(`,${s}`)+`${s}});${s}${s}`}const ua=(e,t,n)=>ca(e.filter(e=>e.expression).map(e=>({name:e.exported,value:e.local})),t,n),da=(e,t,n)=>ca(e.filter(e=>e.local===ia).map(e=>({name:e.exported,value:ia})),t,n);function ha(e,t,n){return e?`${t}${ta(e,n)}`:"null"}var pa={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}){Qo(h,n),Jo("amd",o,n);const v=n.map(e=>`'${Yo(e.importPath,m.forceJsExtensionForImports)}'`),P=n.map(e=>e.name),{n:$,getNonArrowFunctionIntro:w,_:I}=f;r&&(d||"exports.default"===s[0]?.local)&&(P.unshift("exports"),v.unshift("'exports'")),t.has("require")&&(P.unshift("require"),v.unshift("'require'")),t.has("module")&&(P.unshift("module"),v.unshift("'module'"));const N=jo(m,o),C=(N?`'${N}',${I}`:"")+(v.length>0?`[${v.join(`,${I}`)}],${I}`:""),k=S?`${I}'use strict';`:"";e.prepend(`${l}${Xo(n,x,y,b,E,t,a,f)}`);const R=Uo(s,n,d,x,f,a,y,A);let O=Wo(d&&r,c&&(!0===g||"if-default-prop"===g&&i),u&&E,f);O&&(O=$+$+O),e.append(`${R}${O}${p}`).indent(a).prepend(`${m.define}(${C}(${w(P,{isAsync:!1,name:null})}{${k}${$}${$}`).append(`${$}${$}}));`)},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}){Jo("cjs",o,n);const{_:S,n:v}=p,P=A?`'use strict';${v}${v}`:"";let $=Wo(d&&r,c&&(!0===m||"if-default-prop"===m&&i),u&&E,p);$&&($+=v+v);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=Xo(n,b,g,y,E,t,a,p);e.prepend(`${P}${l}${$}${w}${I}`);const N=Uo(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:`${ea(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 ${ea(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map(e=>e.imported===e.reexported?ea(e.imported):`${ea(e.imported)} as ${ea(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+=Xr(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 ${ea(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:v}){Jo("iife",o,n);const{_:P,getNonArrowFunctionIntro:$,getPropertyAccess:w,n:I}=h,N=A&&A.includes("."),C=!m&&!N;if(A&&C&&(as(k=A)||os.test(k)))return on(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:Ht("configuration-options/#output-extend")}}(A));var k;Qo(u,n);const R=sa(n),O=R.map(e=>e.globalName||"null"),D=R.map(e=>e.name);r&&!A&&u(Mt,{code:yn,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Ht(tn)}),r&&(c||"exports.default"===s[0]?.local)&&(m?(O.unshift(`this${ta(A,w)}${P}=${P}this${ta(A,w)}${P}||${P}{}`),D.unshift("exports")):(O.unshift("{}"),D.unshift("exports")));const M=v?`${a}'use strict';${I}`:"",_=Xo(n,x,y,g,S,t,a,h);e.prepend(`${l}${_}`);let L=`(${$(D,{isAsync:!1,name:null})}{${I}${M}${I}`;r&&(!A||m&&c||(L=(C?`var ${A}`:`this${ta(A,w)}`)+`${P}=${P}${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(Mt,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=`${I}${I}})(${O.join(`,${P}`)});`;r&&!m&&c&&(T=`${I}${I}${a}return exports;${T}`);const z=Uo(s,n,c,x,h,a,y,b);let B=Wo(c&&r,!0===f||"if-default-prop"===f&&i,S,h);B&&(B=I+I+B),e.append(`${z}${B}${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}){Jo("system",r,n);const{_:y,getFunctionIntro:b,getNonArrowFunctionIntro:E,n:x,s:A}=l,{importBindings:S,setters:v,starExcludes:P}=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(oe(e.imported))};`);if(h){const a=[];let l=!1;for(const{imported:e,reexported:t}of h)"*"===t?l=!0:a.push([oe(t),"*"===e?"module":`module${o(oe(e))}`]);if(a.length>1||l)if(l){u||(u=ra({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}',${y}`:"",w=t.has("module")?["exports","module"]:i?["exports"]:[];let I=`System.register(${$}[`+n.map(({importPath:e})=>`'${e}'`).join(`,${y}`)+`],${y}(${E(w,{isAsync:!1,name:null})}{${x}${o}${m?"'use strict';":""}`+oa(P,o,l)+aa(S,o,l)+`${x}${o}return${y}{${v.length>0?`${x}${o}${o}setters:${y}[${v.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+Xr(null,t,o,l,d,h,f)+la(s,o,l)).append(`${c}${x}${x}`+ua(s,o,l)+da(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:v,reexportProtoFromExternal:P,strict:$}){const{_:w,cnst:I,getFunctionIntro:N,getNonArrowFunctionIntro:C,getPropertyAccess:k,n:R,s:O}=h,D=f?"f":"factory",M=f?"g":"global";if(r&&!x)return on({code:yn,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:Ht(tn)});Jo("umd",o,n),Qo(u,n);const _=n.map(e=>`'${Yo(e.importPath,p.forceJsExtensionForImports)}'`),L=n.map(e=>`require('${e.importPath}')`),T=sa(n),z=T.map(e=>ha(e.globalName,M,k)),B=T.map(e=>e.name);(r||v)&&(c||r&&"exports.default"===s[0]?.local)&&(_.unshift("'exports'"),L.unshift("exports"),z.unshift(na(x,M,S,(g?`${ha(x,M,k)}${w}||${w}`:"")+"{}",h,u)),B.unshift("exports"));const F=jo(p,o),V=(F?`'${F}',${w}`:"")+(_.length>0?`[${_.join(`,${w}`)}],${w}`:""),j=p.define,U=!c&&r?`module.exports${w}=${w}`:"",G=$?`${w}'use strict';${R}`:"";let H;if(v){const e=f?"e":"exports";let t;if(!c&&r)t=`${I} ${e}${w}=${w}${na(x,M,S,`${D}(${z.join(`,${w}`)})`,h,u)};`;else{t=`${I} ${e}${w}=${w}${z.shift()};${R}${a}${a}${D}(${[e,...z].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}${ha(x,M,k)}${w}=${w}current;${w}return ${e}${O}${w}};${R}${a}})()`}else H=`${D}(${z.join(`,${w}`)})`,!c&&r&&(H=na(x,M,S,H,h,u));const W=r||v&&c||z.length>0,K=[D];W&&K.unshift(M);const q=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}${D}(${L.join(`,${w}`)})${w}:${R}`:"",Z=`(${C(K,{isAsync:!1,name:null})}{${R}`+Y+`${a}typeof ${j}${w}===${w}'function'${w}&&${w}${j}.amd${w}?${w}${j}(${V}${D})${w}:${R}`+`${a}${X}${H}${J};${R}`+`})(${q}(${C(B,{isAsync:!1,name:null})}{${G}${R}`,Q=R+R+"}));";e.prepend(`${l}${Xo(n,E,y,b,A,t,a,h)}`);const ee=Uo(s,n,c,E,h,a,y,P);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 fa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ma,ga,ya,ba,Ea,xa,Aa,Sa,va,Pa,$a,wa={};function Ia(){if(ga)return ma;ga=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 ma={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},ma}function Na(){return ya||(ya=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=Ia();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}}(wa)),wa}function Ca(){if(Ea)return ba;Ea=1;const e=Na(),{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}=Ia(),g=e=>e===a||e===s,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return ba=(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,C=-1,k=0,R=0,O=!1,D=!1,M=!1,_=!1,L=!1,T=!1,z=!1,B=!1,F=!1,V=!1,j=0,U={value:"",depth:0,isGlob:!1};const G=()=>C>=A,H=()=>N.charCodeAt(C+1),W=()=>(w=I,N.charCodeAt(++C));for(;C<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(O=U.isBrace=!0,M=U.isGlob=!0,V=!0,!0===S)continue;break}if(!0!==T&&I===i){if(O=U.isBrace=!0,M=U.isGlob=!0,V=!0,!0===S)continue;break}if(I===p&&(j--,0===j)){T=!1,O=U.isBrace=!0,V=!0;break}}else j++;else z=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,V=!0,I===o&&C===k&&(F=!0),!0===S){let e=0;for(;!0!==G()&&(I=W());)if(I!==s)if(I!==c){if(I===f&&0===--e){V=!0;break}}else e++;else z=U.backslashes=!0,W();continue}break}}if(I===t){if(w===t&&(L=U.isGlobstar=!0),M=U.isGlob=!0,V=!0,!0===S)continue;break}if(I===h){if(M=U.isGlob=!0,V=!0,!0===S)continue;break}if(I===u){for(;!0!==G()&&(e=W());)if(e!==s){if(e===m){D=U.isBracket=!0,M=U.isGlob=!0,V=!0;break}}else z=U.backslashes=!0,W();if(!0===S)continue;break}if(!0===x.nonegate||I!==o||C!==k){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){V=!0;break}}else e++;else z=U.backslashes=!0,W();continue}break}if(!0===M){if(V=!0,!0===S)continue;break}}else B=U.negated=!0,k++}else{if(v.push(C),P.push(U),U={value:"",depth:0,isGlob:!1},!0===V)continue;if(w===r&&C===k+1){k+=2;continue}R=C+1}}else z=U.backslashes=!0,I=W(),I===l&&(T=!0)}!0===x.noext&&(_=!1,M=!1);let K=N,q="",X="";k>0&&(q=N.slice(0,k),N=N.slice(k),R-=k),K&&!0===M&&R>0?(K=N.slice(0,R),X=N.slice(R)):!0===M?(K="",X=N):K=N,K&&""!==K&&"/"!==K&&K!==N&&g(K.charCodeAt(K.length-1))&&(K=K.slice(0,-1)),!0===x.unescape&&(X&&(X=e.removeBackslashes(X)),K&&!0===z&&(K=e.removeBackslashes(K)));const J={prefix:q,input:b,start:k,base:K,glob:X,isBrace:O,isBracket:D,isGlob:M,isExtglob:_,isGlobstar:L,negated:B,negatedExtglob:F};if(!0===x.tokens&&(J.maxDepth=0,g(I)||P.push(U),J.tokens=P),!0===x.parts||!0===x.tokens){let e;for(let t=0;t<v.length;t++){const n=void 0!==e?e+1:k,s=v[t],i=b.slice(n,s);x.tokens&&(0===t&&0!==k?(P[t].isPrefix=!0,P[t].value=q):P[t].value=i,y(P[t]),J.maxDepth+=P[t].depth),s>=k&&($.push(i),e=s)}const t=void 0!==e?e+1:k,n=b.slice(t);$.push(n),x.tokens&&e&&e+1<b.length&&(P[P.length-1].value=n,y(P[P.length-1]),J.maxDepth+=P[P.length-1].depth),J.slashes=v,J.parts=$}return J},ba}function ka(){if(Aa)return xa;Aa=1;const e=Ia(),t=Na(),{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:v,ONE_CHAR:P,DOTS_SLASH:$,NO_DOT:w,NO_DOT_SLASH:I,NO_DOTS_SLASH:N,QMARK:C,QMARK_NO_DOT:k,STAR:R,START_ANCHOR:O}=E,D=e=>`(${b}(?:(?!${O}${e.dot?$:A}).)*?)`,M=d.dot?"":w,_=d.dot?C:k;let L=!0===d.bash?D(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 z=[],B=[],F=[];let V,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),K=(e="",t=0)=>{T.consumed+=e,T.index+=t},q=e=>{T.output+=null!=e.output?e.output:e.value,K(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]++,F.push(e)},Y=e=>{T[e]--,F.pop()},Z=e=>{if("globstar"===j.type){const t=T.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||z.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(z.length&&"paren"!==e.type&&(z[z.length-1].inner+=e.value),(e.value||e.output)&&q(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?"":P}),Z({type:"paren",extglob:!0,value:H(),output:s}),z.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?"":P)+(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:V,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=D(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:V,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?C.repeat(r.length):""):0===o?_+(r?C.repeat(r.length):""):C.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(V=H(),"\0"===V)continue;if("\\"===V){const e=G();if("/"===e&&!0!==d.bash)continue;if("."===e||";"===e)continue;if(!e){V+="\\",Z({type:"text",value:V});continue}const t=/^\\+/.exec(W());let n=0;if(t&&t[0].length>2&&(n=t[0].length,T.index+=n,n%2!=0&&(V+="\\")),!0===d.unescape?V=H():V+=H(),0===T.brackets){Z({type:"text",value:V});continue}}if(T.brackets>0&&("]"!==V||"["===j.value||"[^"===j.value)){if(!1!==d.posix&&":"===V){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=P);continue}}}("["===V&&":"!==G()||"-"===V&&"]"===G())&&(V=`\\${V}`),"]"!==V||"["!==j.value&&"[^"!==j.value||(V=`\\${V}`),!0===d.posix&&"!"===V&&"["===j.value&&(V="^"),j.value+=V,q({value:V});continue}if(1===T.quotes&&'"'!==V){V=t.escapeRegex(V),j.value+=V,q({value:V});continue}if('"'===V){T.quotes=1===T.quotes?0:1,!0===d.keepQuotes&&Z({type:"text",value:V});continue}if("("===V){J("parens"),Z({type:"paren",value:V});continue}if(")"===V){if(0===T.parens&&!0===d.strictBrackets)throw new SyntaxError(l("opening","("));const e=z[z.length-1];if(e&&T.parens===e.parens+1){ee(z.pop());continue}Z({type:"paren",value:V,output:T.parens?")":"\\)"}),Y("parens");continue}if("["===V){if(!0!==d.nobracket&&W().includes("]"))J("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw new SyntaxError(l("closing","]"));V=`\\${V}`}Z({type:"bracket",value:V});continue}if("]"===V){if(!0===d.nobracket||j&&"bracket"===j.type&&1===j.value.length){Z({type:"text",value:V,output:`\\${V}`});continue}if(0===T.brackets){if(!0===d.strictBrackets)throw new SyntaxError(l("opening","["));Z({type:"text",value:V,output:`\\${V}`});continue}Y("brackets");const e=j.value.slice(1);if(!0===j.posix||"^"!==e[0]||e.includes("/")||(V=`/${V}`),j.value+=V,q({value:V}),!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("{"===V&&!0!==d.nobrace){J("braces");const e={type:"brace",value:V,output:"(",outputIndex:T.output.length,tokensIndex:T.tokens.length};B.push(e),Z(e);continue}if("}"===V){const e=B[B.length-1];if(!0===d.nobrace||!e){Z({type:"text",value:V,output:V});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="\\{",V=t="\\}",T.output=n;for(const e of s)T.output+=e.output||e.value}Z({type:"brace",value:V,output:t}),Y("braces"),B.pop();continue}if("|"===V){z.length>0&&z[z.length-1].conditions++,Z({type:"text",value:V});continue}if(","===V){let e=V;const t=B[B.length-1];t&&"braces"===F[F.length-1]&&(t.comma=!0,e="|"),Z({type:"comma",value:V,output:e});continue}if("/"===V){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:V,output:v});continue}if("."===V){if(T.braces>0&&"dot"===j.type){"."===j.value&&(j.output=A);const e=B[B.length-1];j.type="dots",j.output+=V,j.value+=V,e.dots=!0;continue}if(T.braces+T.parens===0&&"bos"!==j.type&&"slash"!==j.type){Z({type:"text",value:V,output:A});continue}Z({type:"dot",value:V,output:A});continue}if("?"===V){if(!(j&&"("===j.value)&&!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Q("qmark",V);continue}if(j&&"paren"===j.type){const e=G();let t=V;("("===j.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(W()))&&(t=`\\${V}`),Z({type:"text",value:V,output:t});continue}if(!0!==d.dot&&("slash"===j.type||"bos"===j.type)){Z({type:"qmark",value:V,output:k});continue}Z({type:"qmark",value:V,output:C});continue}if("!"===V){if(!0!==d.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){Q("negate",V);continue}if(!0!==d.nonegate&&0===T.index){X();continue}}if("+"===V){if(!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Q("plus",V);continue}if(j&&"("===j.value||!1===d.regex){Z({type:"plus",value:V,output:S});continue}if(j&&("bracket"===j.type||"paren"===j.type||"brace"===j.type)||T.parens>0){Z({type:"plus",value:V});continue}Z({type:"plus",value:S});continue}if("@"===V){if(!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Z({type:"at",extglob:!0,value:V,output:""});continue}Z({type:"text",value:V});continue}if("*"!==V){"$"!==V&&"^"!==V||(V=`\\${V}`);const e=i.exec(W());e&&(V+=e[0],T.index+=e[0].length),Z({type:"text",value:V});continue}if(j&&("globstar"===j.type||!0===j.star)){j.type="star",j.star=!0,j.value+=V,j.output=L,T.backtrack=!0,T.globstar=!0,K(V);continue}let e=W();if(!0!==d.noextglob&&/^\([^?]/.test(e)){Q("star",V);continue}if("star"===j.type){if(!0===d.noglobstar){K(V);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:V,output:""});continue}const r=T.braces>0&&("comma"===t.type||"brace"===t.type),o=z.length&&("pipe"===t.type||"paren"===t.type);if(!s&&"paren"!==t.type&&!r&&!o){Z({type:"star",value:V,output:""});continue}for(;"/**"===e.slice(0,3);){const t=c[T.index+4];if(t&&"/"!==t)break;e=e.slice(3),K("/**",3)}const a=U()||T.parens>0&&e===")".repeat(T.parens)&&!z.some(e=>"negate"===e.type);if("bos"===t.type&&U()){j.type="globstar",j.value+=V,j.output=D(d),T.output=j.output,T.globstar=!0,K(V);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=D(d)+(d.strictSlashes?")":"|$)"),j.value+=V,T.globstar=!0,T.output+=t.output+j.output,K(V);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=`${D(d)}${v}|${v}${n})`,j.value+=V,T.output+=t.output+j.output,T.globstar=!0,K(V+H()),Z({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){j.type="globstar",j.value+=V,j.output=`(?:^|${v}|${D(d)}${v})`,T.output=j.output,T.globstar=!0,K(V+H()),Z({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-j.output.length),j.type="globstar",j.output=D(d),j.value+=V,T.output+=j.output,T.globstar=!0,K(V);continue}const n={type:"star",value:V,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+=P,j.output+=P)),Z(n)):(n.output=V,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:`${v}?`}),!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}).)*?)`,v=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=v(t[1]);if(!n)return;return n+c+t[2]}}},P=t.removePrefix(s,{negated:!1,prefix:""});let $=v(P);return $&&!0!==r.strictSlashes&&($+=`${u}?`),$},xa=g}function Ra(){if(va)return Sa;va=1;const e=Ca(),t=ka(),n=Na(),s=Ia(),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,Sa=i}function Oa(){if($a)return Pa;$a=1;const e=Ra(),t=Na();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),Pa=n}var Da=fa(Oa());const Ma={ArrayPattern(e,t){for(const n of t.elements)n&&Ma[n.type](e,n)},AssignmentPattern(e,t){Ma[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?Ma.RestElement(e,n):Ma[n.value.type](e,n.value)},RestElement(e,t){Ma[t.argument.type](e,t.argument)}},_a=function(e){const t=[];return Ma[e.type](t,e),t};function La(e,t){return e>>>=0,Va().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 Ta=null;function za(){return(null===Ta||!0===Ta.buffer.detached||void 0===Ta.buffer.detached&&Ta.buffer!==Ka.memory.buffer)&&(Ta=new DataView(Ka.memory.buffer)),Ta}function Ba(e,t){return e>>>=0,function(e){Ha+=e.length,Ha>=Ga&&(Ua=new TextDecoder("utf-8",{ignoreBOM:!0}),Ua.decode(),Ha=e.length);return Ua.decode(e)}(Va().subarray(e,e+t))}let Fa=null;function Va(){return null!==Fa&&0!==Fa.byteLength||(Fa=new Uint8Array(Ka.memory.buffer)),Fa}function ja(e,t,n){if(void 0===n){const n=Wa.encode(e),s=t(n.length,1)>>>0;return Va().subarray(s,s+n.length).set(n),Xa=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=Va();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=Va().subarray(i+o,i+s);o+=Wa.encodeInto(e,t).written,i=n(i,s,o,1)>>>0}return Xa=o,i}let Ua=new TextDecoder("utf-8",{ignoreBOM:!0});Ua.decode();const Ga=2146435072;let Ha=0;const Wa=new TextEncoder;"encodeInto"in Wa||(Wa.encodeInto=function(e,t){const n=Wa.encode(e);return t.set(n),{read:e.length,written:n.length}});let Ka,qa,Xa=0;async function Ja(e){return void 0!==Ka?Ka:(void 0===qa&&(qa=async function(e){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={__proto__:null,"./bindings_wasm_bg.js":{__proto__:null,__wbg___wbindgen_throw_4c88d8bf264fd984: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_186163212ffe79c3:function(e){return e.length},__wbg_new_bb74001155cb8ca8:function(){return new Error},__wbg_prototypesetcall_13162965d1fe7aa3:function(e,t,n){Uint8Array.prototype.set.call(La(e,t),n)},__wbg_stack_575c4e0918581b9c:function(e,t){const n=ja(t.stack,Ka.__wbindgen_export2,Ka.__wbindgen_export3),s=Xa;za().setInt32((e>>>0)+4,s,!0),za().setInt32((e>>>0)+0,n,!0)},__wbindgen_init_externref_table:function(){const e=Ka.__wbindgen_externrefs;e.set(0,void 0),e.set(1024,void 0),e.set(1025,null),e.set(1026,!0),e.set(1027,!1)}}};("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,Ta=null,Fa=null,Ka.__wbindgen_start(),Ka}(n)}(e),qa.catch(()=>{qa=void 0})),qa)}const Ya=0===new Uint8Array(new Uint32Array([1]).buffer)[0];function Za(e,t,n){return function(e,t,n,s){try{const a=Ka.__wbindgen_add_to_stack_pointer(-16)>>>0,l=+t,c=+n,u=+s,d=ja(e,Ka.__wbindgen_export2,Ka.__wbindgen_export3),h=Xa;Ka.parse(a,d,h,l,c,u);var i=za().getInt32(a+0,!0),r=za().getInt32(a+4,!0),o=La(i,r).slice();return Ka.__wbindgen_export(i,1*r,1),o}finally{Ka.__wbindgen_add_to_stack_pointer(16)}}(e,t,n,Ya)}const Qa=[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:tl(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:tl(t[e+2],t)}},function(e,t){const n=t[e+2],s=bs(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?{[gs]:s}:{},params:tl(t[e+4],t),body:el(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:ms[t[e+2]],left:el(t[e+3],t),right:el(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:el(t[e+2],t),right:el(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:el(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:ms[t[e+2]],left:el(t[e+3],t),right:el(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:tl(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:el(n,t)}},function(e,t){const n=t[e+2],s=bs(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{[gs]:s}:{},callee:el(t[e+4],t),arguments:tl(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:el(n,t),body:el(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:el(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:tl(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:tl(t[e+2],t),id:0===n?null:el(n,t),superClass:0===s?null:el(s,t),body:el(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:tl(t[e+2],t),id:0===n?null:el(n,t),superClass:0===s?null:el(s,t),body:el(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:el(t[e+2],t),consequent:el(t[e+3],t),alternate:el(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:el(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:el(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:el(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:el(t[e+2],t),test:el(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:el(n,t),source:el(t[e+3],t),attributes:tl(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:el(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:tl(t[e+2],t),source:0===n?null:el(n,t),attributes:tl(t[e+4],t),declaration:0===s?null:el(s,t)}},function(e,t){const n=el(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:el(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:el(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:el(t[e+2],t),right:el(t[e+3],t),body:el(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:el(t[e+3],t),right:el(t[e+4],t),body:el(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:el(n,t),test:0===s?null:el(s,t),update:0===i?null:el(i,t),body:el(t[e+5],t)}},function(e,t){const n=t[e+2],s=bs(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?{[gs]:s}:{},id:0===i?null:el(i,t),params:tl(t[e+5],t),body:el(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=bs(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?{[gs]:s}:{},id:0===i?null:el(i,t),params:tl(t[e+5],t),body:el(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:el(t[e+2],t),consequent:el(t[e+3],t),alternate:0===n?null:el(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:el(t[e+2],t),value:el(t[e+3],t)}},function(e,t){const n=t[e+5];return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:tl(t[e+2],t),source:el(t[e+3],t),attributes:tl(t[e+4],t),...0===n?{}:{phase:ms[n]}}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:el(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:el(t[e+2],t),options:0===n?null:el(n,t),...0===s?{}:{phase:ms[s]}}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:el(t[e+2],t)}},function(e,t){const n=t[e+2],s=el(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:el(n,t),local:s}},function(e,t){const n=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:el(t[e+2],t),value:0===n?null:el(n,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:el(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:el(t[e+2],t),children:tl(t[e+3],t),closingElement:0===n?null:el(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:el(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:el(t[e+2],t),children:tl(t[e+3],t),closingFragment:el(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:el(t[e+2],t),property:el(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:el(t[e+2],t),name:el(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:el(t[e+3],t),attributes:tl(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:el(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:el(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:el(t[e+2],t),body:el(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:ms[t[e+2]],left:el(t[e+3],t),right:el(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:el(t[e+3],t),property:el(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:el(t[e+2],t),property:el(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:tl(t[e+3],t),key:el(t[e+4],t),value:el(t[e+5],t),kind:ms[t[e+6]]}},function(e,t){const n=bs(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{[gs]:n}:{},callee:el(t[e+3],t),arguments:tl(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:tl(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:tl(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=bs(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:tl(t[e+2],t),...n.length>0?{[ys]:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=el(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}:el(s,t),value:i,kind:ms[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:tl(t[e+3],t),key:el(t[e+4],t),value:0===s?null:el(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:el(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:el(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:tl(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:el(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:tl(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:el(n,t),consequent:tl(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:el(t[e+2],t),cases:tl(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:el(t[e+2],t),quasi:el(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:tl(t[e+2],t),expressions:tl(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:el(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:el(t[e+2],t),handler:0===n?null:el(n,t),finalizer:0===s?null:el(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:ms[t[e+2]],argument:el(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:ms[t[e+3]],argument:el(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:ms[t[e+2]],declarations:tl(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:el(t[e+2],t),init:0===n?null:el(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:el(t[e+2],t),body:el(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:el(s,t)}}];function el(e,t){const n=t[e],s=Qa[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function tl(e,t){if(0===e)return we;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++){const n=t[e++];s[i]=n?el(n,t):null}return s}function nl(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 sl extends vs{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e,t,n){const s=[],i=il(t);for(const t of this.elements)null!==t&&s.push(...t.declare(e,i,n));return s}deoptimizeAssignment(e,t){const n=il(e);for(const e of this.elements)e?.deoptimizeAssignment(n,t)}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(Ue)}hasEffectsWhenDestructuring(e,t,n){const s=il(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(Ue,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){let s=!1;const i=il(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}}setAssignedValue(e){super.setAssignedValue(e);for(const e of this.elements)e?.setAssignedValue(ht)}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}sl.prototype.includeNode=Ps;const il=e=>e.at(-1)===Re?e:[...e,De];class rl extends Cr{constructor(){super(...arguments),this.objectEntity=null}get expression(){return ot(this.flags,8388608)}set expression(e){this.flags=at(this.flags,8388608,e)}createScope(e){this.scope=new vr(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 Zi||n.include(e,t)}includeNode(e){this.included=!0,this.body.includePath(Ge,e);for(const t of this.params)t instanceof Zi||t.includePath(Ge,e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ni([],ri)}}class ol extends vs{addExportedVariables(e,t){for(const n of this.properties)n.type===wt?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(Ue,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=s.type===It;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=Ee(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)):ue(i,e,o,a);s&&e.remove(s,this.end-1)}}setAssignedValue(e){super.setAssignedValue(e);for(const e of this.properties)e.setAssignedValue(ht)}}ol.prototype.includeNode=$s,ol.prototype.applyDeoptimizations=ws;class al extends vs{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,Ue,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=rt();(t||s||"="!==o||i.included||i.hasEffectsAsAssignmentTarget(a,!1)||i.hasEffectsWhenDestructuring?.(a,Ue,r))&&i.includeAsAssignmentTarget(e,t,"="!==o),r.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Ge,e)}initialise(){if(super.initialise(),this.left instanceof Zi){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&(this.isConstReassignment=!0,this.scope.context.log(Mt,{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}=Pe){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=fe(e.original,he(e.original,"=",r.end)+1);e.remove(a,l),n&&xe(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof Zi){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?Se(n,a,l,e,t):ve(n,a,l,c.type!==vt,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"],`${Ae(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===vt,e,t)}r.included&&r instanceof ol&&(i===vt||i===xt)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(Ue,this.right),this.scope.context.requestTreeshakingPass()}}class ll extends vs{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(Ue,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(Ge,e)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=Pe){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}setAssignedValue(e){this.left.setAssignedValue(e)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Ue),this.right.deoptimizePath(Ge),this.scope.context.requestTreeshakingPass()}}function cl(e){if(e.scope.context.usesTopLevelAwait)return;let t=e.parent;do{if(t instanceof Cr)return}while(t=t.parent);e.scope.context.usesTopLevelAwait=!0}class ul extends vs{deoptimizePath(e){this.argument.deoptimizePath(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}initialise(){super.initialise(),cl(this)}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(dl,e)}includePath(e,t){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(t),this.argument.includePath(e,t)}}const dl=["then"];function hl(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):lt}const pl={"!=":(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},fl=Symbol("Unassigned");class ml extends vs{constructor(){super(...arguments),this.renderedLiteralValue=fl}deoptimizeCache(){this.renderedLiteralValue=lt}getLiteralValueAtPath(e,t,n){if(e.length>0)return lt;const s=this.left.getLiteralValueAtPath(Ue,t,n);if("symbol"==typeof s)return lt;if("in"===this.operator&&this.right.variable instanceof Lo){const[e]=this.right.variable.context.traceExport(String(s));return e instanceof ss||e instanceof zo?lt:!!e}const i=this.right.getLiteralValueAtPath(Ue,t,n);if("symbol"==typeof i)return lt;const r=pl[this.operator];return r?r(s,i):lt}getRenderedLiteralValue(){return"in"===this.operator&&this.right.variable instanceof Lo?this.renderedLiteralValue!==fl?this.renderedLiteralValue:this.renderedLiteralValue=hl(this.getLiteralValueAtPath(Ue,Je,this)):lt}hasEffects(e){return"+"===this.operator&&this.parent instanceof $r&&""===this.left.getLiteralValueAtPath(Ue,Je,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(Ke,e))}includeNode(e){this.included=!0,"in"===this.operator&&"symbol"==typeof this.getRenderedLiteralValue()&&this.right.includePath(Ge,e)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=Pe){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))}}ml.prototype.applyDeoptimizations=ws;class gl extends vs{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 yl(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(he(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(he(e.original,"(",n.callee.end)+1,n.end-1)}}gl.prototype.includeNode=$s,gl.prototype.applyDeoptimizations=ws;class bl extends vs{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!==ht);if(0!==o.length)if(i===ht)for(const e of o)e.deoptimizePath(Ge);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]!==ht){this.returnExpression=pt;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Ie,this.deoptimizableDependentExpressions=we;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(Ge)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==ht&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===ht?lt:t.withTrackedEntityAtPath(e,s,()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n)),lt)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===ht?i:n.withTrackedEntityAtPath(e,i,()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]},pt)}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)}includeCallArgumentsWhenCalledAtPath(e,t,n){const[s,i]=this.getReturnExpression();i||s===ht||n.includedCallArguments.has(s)?mt(t,n):(n.includedCallArguments.add(s),s.includeCallArgumentsWhenCalledAtPath(e,t,n),n.includedCallArguments.delete(s))}}class El extends bl{get hasCheckedForWarnings(){return ot(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=at(this.flags,134217728,e)}get optional(){return ot(this.flags,128)}set optional(e){this.flags=at(this.flags,128,e)}bind(){super.bind(),this.interaction={args:[this.callee instanceof Eo&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return mo(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(Ue,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===Ss)return Ss;if(this.optional&&null==this.callee.getLiteralValueAtPath(Ue,Je,this))return!this.annotationPure&&t||Ss;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(Ue,this.interaction,e))}include(e,t){this.included||this.includeNode(e),t?(super.include(e,!0),t===As&&this.callee instanceof Zi&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.callee.include(e,!1),this.callee.includeCallArgumentsWhenCalledAtPath(Ue,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}=Pe){if(this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),yl(e,t,this),this.callee instanceof Zi&&!this.hasCheckedForWarnings){this.hasCheckedForWarnings=!0;this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(Mt,Pn(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(Mt,{code:"EVAL",id:s=this.scope.context.module.id,message:`Use of eval in "${Vt(s)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Ht("troubleshooting/#avoiding-eval")},this.start)}var s}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ue,Je),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Je){return null===this.returnExpression?(this.returnExpression=pt,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Ue,this.interaction,e,this)):this.returnExpression}}class xl extends vs{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",Ue,ht)),this.body=new wr(this,this.scope.bodyScope).parseNode(t),super.parseNode(e)}}xl.prototype.preventChildBlockScope=!0,xl.prototype.includeNode=Ps;class Al extends vs{deoptimizeCache(){}deoptimizePath(e){this.expression.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===Ss?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)}}Al.prototype.includeNode=$s,Al.prototype.applyDeoptimizations=ws;class Sl extends tr{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new Ki("this",null,t,Ue,n,"other")),this.instanceScope=new tr(this,n),this.instanceThisVariable=new br(n),this.instanceScope.variables.set("this",this.instanceThisVariable)}findLexicalBoundary(){return this}}class vl extends vs{createScope(e){this.scope=new Sl(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,Ge,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)}}vl.prototype.includeNode=$s,vl.prototype.applyDeoptimizations=ws;class Pl extends cr{render(e,t,{renderedSurroundingElement:n}=Pe){super.render(e,t),n===vt&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}function $l(e){return"symbol"==typeof e?e!==ut&&(e===ct||lt):!!e}class wl extends dt{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new wl(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 Il extends vs{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return ot(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=at(this.flags,65536,e)}get hasDeoptimizedCache(){return ot(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=at(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(Ge),this.included&&e.includePath(Ge,it());const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=we;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 lt;const s=this.consequent.getLiteralValueAtPath(e,t,n),i=$l(s);if(i===lt)return lt;const r=this.alternate.getLiteralValueAtPath(e,t,n);return i!==$l(r)?lt:(this.expressionsToBeDeoptimized.push(n),s!==r?i?ct:ut: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 wl([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)}includeCallArgumentsWhenCalledAtPath(e,t,n){if(0===e.length){const e=this.getUsedBranch();e?e.includeCallArgumentsWhenCalledAtPath(Ue,t,n):(this.consequent.includeCallArgumentsWhenCalledAtPath(Ue,t,n),this.alternate.includeCallArgumentsWhenCalledAtPath(Ue,t,n))}else mt(t,n)}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=Pe){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=he(e.original,":",this.consequent.end),l=fe(e.original,(this.consequent.included?he(e.original,"?",this.test.end):a)+1);s&&xe(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=$l(this.test.getLiteralValueAtPath(Ue,Je,this));return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}Il.prototype.includeNode=$s,Il.prototype.applyDeoptimizations=ws;class Nl extends vs{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}}Nl.prototype.includeNode=$s,Nl.prototype.applyDeoptimizations=ws;class Cl extends vs{hasEffects(){return!0}}Cl.prototype.includeNode=Ps;class kl extends vs{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(Ue,Et,e)}}function Rl(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 Ol(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}kl.prototype.includeNode=Ps;class Dl extends vs{hasEffects(e){return!!this.test.hasEffects(e)||Rl(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Ol(e,this.body,t)}}Dl.prototype.includeNode=$s,Dl.prototype.applyDeoptimizations=ws;class Ml extends vs{hasEffects(){return!1}}Ml.prototype.includeNode=Ps;class _l extends vs{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}}_l.prototype.needsBoundaries=!0,_l.prototype.includeNode=$s,_l.prototype.applyDeoptimizations=ws;class Ll extends vs{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 ur){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})}}}Ll.prototype.needsBoundaries=!0,Ll.prototype.includeNode=$s,Ll.prototype.applyDeoptimizations=ws;class Tl extends vs{}Tl.prototype.includeNode=$s,Tl.prototype.applyDeoptimizations=ws;class zl extends vs{createScope(e){this.scope=new or(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||Rl(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),Ol(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Ge,e)}initialise(){super.initialise(),this.left.setAssignedValue(ht)}render(e,t){this.left.render(e,t,de),this.right.render(e,t,de),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(Ue),this.scope.context.requestTreeshakingPass()}}class Bl extends vs{get await(){return ot(this.flags,131072)}set await(e){this.flags=at(this.flags,131072,e)}createScope(e){this.scope=new or(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),Ol(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Ge,e)}initialise(){super.initialise(),this.await&&cl(this),this.left.setAssignedValue(ht)}render(e,t){this.left.render(e,t,de),this.right.render(e,t,de),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(Ue),this.right.deoptimizePath(Ge),this.scope.context.requestTreeshakingPass()}}class Fl extends vs{createScope(e){this.scope=new or(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Rl(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),Ol(e,this.body,t)}render(e,t){this.init?.render(e,t,de),this.test?.render(e,t,de),this.update?.render(e,t,de),this.body.render(e,t)}}Fl.prototype.includeNode=$s,Fl.prototype.applyDeoptimizations=ws;class Vl extends kr{createScope(e){super.createScope(this.idScope=new tr(e,e.context))}parseNode(e){return null!==e.id&&(this.id=new Zi(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}=Pe){super.render(e,t),n===vt&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class jl extends or{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s,i)}}const Ul=Symbol("unset");class Gl extends vs{constructor(){super(...arguments),this.testValue=Ul}deoptimizeCache(){this.testValue=lt}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 jl(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new jl(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===Ul?this.testValue=$l(this.test.getLiteralValueAtPath(Ue,Je,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!==$t&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof Gl&&e.alternate)return!0;if(e instanceof wr)return!1;e=e.parent}while(e);return!1}}Gl.prototype.includeNode=$s,Gl.prototype.applyDeoptimizations=ws;class Hl extends vs{}class Wl extends vs{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=$s,Wl.prototype.applyDeoptimizations=ws;class Kl extends vs{}Kl.prototype.includeNode=$s,Kl.prototype.applyDeoptimizations=ws;class ql{constructor(e){this.interaction={args:[null,e],type:2,withNew:!1}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){ft(e),2===e.type&&0===t.length&&(Ns(e.args[1])||Is(e.args[1]))&&e.args[1].deoptimizeArgumentsOnInteractionAtPath(this.interaction,[],n)}includeCallArguments(e,t){gt(e,t),2===e.type&&(Ns(e.args[1])||Is(e.args[1]))&&e.args[1].includeCallArgumentsWhenCalledAtPath(Ue,this.interaction,t)}}class Xl{deoptimizeArgumentsOnInteractionAtPath(e){ft(e)}includeCallArguments(e,t){gt(e,t)}}function Jl(e){return{fileName:e.getFileName(),...e.getPreRenderedChunkInfo()}}class Yl extends vs{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 ot(this.flags,268435456)}set shouldIncludeDynamicAttributes(e){this.flags=at(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(Os(t)||(i=t)instanceof vs&&"AwaitExpression"===i.type)return void(this.localResolution={resolution:n,tracked:!0});var i;if(!ks(t))return void(this.localResolution={resolution:n,tracked:!1});let r=t,o=this;for(;!r.computed&&r.object===o&&Rs(r.property)&&Cs(r.parent);){const e=r.property.name;if(o=r.parent,"then"===e){const e=o.arguments[0];if(void 0===e||Ns(e)||Is(e))return r.promiseHandler=new ql(To(n.namespace)),void(this.localResolution={resolution:n,tracked:!0})}else if("catch"===e||"finally"===e){if(ks(o.parent)){r.promiseHandler=new Xl,r=o.parent;continue}if(Os(o.parent))return r.promiseHandler=new Xl,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(Ge,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,he(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=[...Ql[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:Jl(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 Bo?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?Jl(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 hs))return{helper:null,mechanism:null};const t=Zl(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=Zl(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 Zl(e,t,n){return"external"===t?Kr[n(e instanceof hs?e.id:null)]:"default"===t?jr:null}Yl.prototype.applyDeoptimizations=ws;const Ql={amd:["require"],cjs:["require"],system:["module"]};class ec extends vs{}ec.prototype.includeNode=$s,ec.prototype.applyDeoptimizations=ws;class tc extends vs{}tc.prototype.includeNode=$s,tc.prototype.applyDeoptimizations=ws;class nc extends Xi{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,Ue,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 sc extends vs{render(e,t,{jsxMode:n}=Pe){if(super.render(e,t),["classic","automatic"].includes(n)){const{name:t,value:s}=this,i=t instanceof nc?t.name:`${t.namespace.name}:${t.name.name}`;if("automatic"!==n||"key"!==i){const n=ds(i);i!==n&&e.overwrite(t.start,t.end,n,{contentOnly:!0}),s?e.overwrite(t.end,s.start,": ",{contentOnly:!0}):e.appendLeft(t.end,": true")}s instanceof fo&&"string"==typeof s.value&&e.overwrite(s.start,s.end,JSON.stringify(s.value),{contentOnly:!0})}}}sc.prototype.includeNode=Ps;class ic extends vs{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)}}ic.prototype.includeNode=Ps;class rc extends ic{}class oc extends ic{}class ac extends vs{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 lc extends vs{}lc.prototype.includeNode=Ps;class cc extends vs{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.expression.includePath(Ge,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 uc=/^[ \t]*\r?\n[ \t\r\n]*|[ \t]*\r?\n[ \t\r\n]*$/g,dc=/[ \t]*\r?\n[ \t\r\n]*/g;class hc extends vs{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(uc,"").replace(dc," ")),this.renderedText}}function pc(e){let t=0;for(const n of e)n instanceof cc&&n.expression instanceof lc||n instanceof hc&&!n.shouldRender()||t++;return t}function fc(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(Ge,i),a.globalName=r}}else a=s.scope.findGlobal(r);return s.scope.context.includeVariableInModule(a,Ge,i),a instanceof Ki&&(a.consolidateInitializers(),a.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),a}hc.prototype.includeNode=Ps;class mc extends vs{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=fc(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:pc(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 cc&&n.expression instanceof lc||n instanceof hc&&!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}}}mc.prototype.applyDeoptimizations=ws;class gc extends mc{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 ac)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 sc){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 ac&&e.prependRight(t,"{}, "),e.prependRight(t,"Object.assign("),e.appendLeft(o,")")}}else n||e.appendLeft(o,`, ${r}`)}}class yc extends mc{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 bc extends vs{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 Ec extends vs{}Ec.prototype.includeNode=Ps;class xc extends vs{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})}}xc.prototype.includeNode=Ps;class Ac extends vs{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=fc("Fragment",!1,t.jsxImportSource,this,e);else{const{fragment:n,importSource:s,mode:i}=t;null!=n&&(this.fragment=n,this.fragmentVariable=fc(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 Sc extends vs{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 vc extends vs{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(Ge,e)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,fe(e.original,he(e.original,":",this.label.end)+1)),this.body.render(e,t)}}vc.prototype.applyDeoptimizations=ws;class Pc extends vs{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return ot(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=at(this.flags,65536,e)}get hasDeoptimizedCache(){return ot(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=at(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(Ge),this.included&&e.includePath(Ge,it())}const{scope:{context:e},expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=we;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 lt;const s=this.getUsedBranch();if(s)return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n);if(!this.hasDeoptimizedCache&&!e.length){const s=$l(this.right.getLiteralValueAtPath(e,t,n));if("symbol"!=typeof s){if(!s&&"&&"===this.operator)return this.expressionsToBeDeoptimized.push(n),ut;if(s&&"||"===this.operator)return this.expressionsToBeDeoptimized.push(n),ct}}return lt}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new wl([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}=Pe){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=he(e.original,this.operator,this.left.end);if(this.right.included){const t=fe(e.original,o+2);e.remove(this.start,t),s&&xe(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!me.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(Ue,Je,this),t=$l(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}}Pc.prototype.includeNode=$s,Pc.prototype.applyDeoptimizations=ws;class $c extends vs{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(Ue,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.includeCallArgumentsWhenCalledAtPath(Ue,this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(Ge,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),yl(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ue,Je),this.scope.context.requestTreeshakingPass()}}class wc extends vs{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)}getKnownFunctionAtPath(e,t,n){return this.getObjectEntity().getKnownFunctionAtPath(e,t,n)}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(Ge,e)}includePath(e,t){this.included||this.includeNode(t),this.getObjectEntity().includePath(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.getObjectEntity().includeCallArgumentsWhenCalledAtPath(e,t,n)}render(e,t,{renderedSurroundingElement:n}=Pe){if(n!==vt&&n!==xt||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const n=Ee(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)):ue(i,e,o,a);s&&e.remove(s,this.end-1)}}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=ri;const t=[];for(const n of this.properties){if(n instanceof Ai){t.push({key:Re,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(Ue,Je,this);if("symbol"==typeof e){t.push({key:Fe(e)?e:Re,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof Zi?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){this.protoProp=n,e=n.value instanceof fo&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new ni(t,e)}}wc.prototype.applyDeoptimizations=ws;class Ic extends vs{initialise(){const{id:e}=this.scope.context.module;return on(Kn(an(Gn(this.message)),e))}}class Nc extends vs{initialise(){const e=this.start,{id:t}=this.scope.context.module,n=Kn(an(Gn(this.message,e)),t);this.scope.context.error(n,e)}}class Cc extends vs{}Cc.prototype.includeNode=Ps;class kc extends vs{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(rt()):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(_t,Cn(e,s.id,Ct(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(Mt,Dn(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=ye(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}be(this.body,e,n,this.end,t)}else super.render(e,t)}}kc.prototype.includeNode=$s,kc.prototype.applyDeoptimizations=ws;class Rc extends sr{get method(){return ot(this.flags,262144)}set method(e){this.flags=at(this.flags,262144,e)}get shorthand(){return ot(this.flags,524288)}set shorthand(e){this.flags=at(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(rt()))&&(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})}setAssignedValue(e){this.value.setAssignedValue(e)}getPathInProperty(e){return e.at(-1)===Re?e:this.computed?[...e,Re]:this.key instanceof Zi?[...e,this.key.name]:[...e,String(this.key.value)]}}Rc.prototype.includeNode=$s,Rc.prototype.applyDeoptimizations=ws;class Oc extends vs{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(Ge,e)}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||ht)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}Oc.prototype.applyDeoptimizations=ws;class Dc extends vs{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 $r)||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}=Pe){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:u,end:d}of Ee(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&xe(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 ue(l,e,u,d);o&&e.remove(o,this.end)}}Dc.prototype.includeNode=$s,Dc.prototype.applyDeoptimizations=ws;class Mc extends vs{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,Ue,e)}}class _c extends vs{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:he(e.original,"default",this.start)+7,i=he(e.original,":",s)+1;be(this.consequent,e,i,n.end,t)}}}_c.prototype.needsBoundaries=!0,_c.prototype.includeNode=$s,_c.prototype.applyDeoptimizations=ws;class Lc extends vs{createScope(e){this.parentScope=e,this.scope=new or(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=rt();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&&be(this.cases,e,this.cases[0].start,this.end-1,t)}}Lc.prototype.includeNode=$s,Lc.prototype.applyDeoptimizations=ws;class Tc extends bl{get hasCheckedForWarnings(){return ot(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=at(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(Ue,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.includeCallArgumentsWhenCalledAtPath(Ue,this.interaction,e))}initialise(){super.initialise(),this.args=[ht,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Eo&&!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===Pt){this.hasCheckedForWarnings=!0;const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(Mt,Pn(e),this.start)}}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ue,Je),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Je){return null===this.returnExpression?(this.returnExpression=pt,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Ue,this.interaction,e,this)):this.returnExpression}}Tc.prototype.includeNode=Ps;class zc extends vs{get tail(){return ot(this.flags,1048576)}set tail(e){this.flags=at(this.flags,1048576,e)}bind(){}hasEffects(){return!1}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}zc.prototype.includeNode=Ps;class Bc extends vs{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?lt:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?pt:Xs(Ks,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||qs(Ks,e[0],t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.expressions)t.includePath(Ge,e)}render(e,t){this.scope.context.addIndentExclusionRange([this.start,this.end]),super.render(e,t)}}class Fc extends tr{constructor(e,t,n){super(e,t),this.importDescriptions=n,this.variables.set("this",new Ki("this",null,Ms,Ue,t,"other"))}addDeclaration(e,t,n,s,i){return this.importDescriptions.has(e.name)&&t.error(Hn(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 Hi&&this.accessedOutsideVariables.set(e,n),n}}class Vc extends vs{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,Ue,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 Pr&&e.thisVariable===t);){if(!(e instanceof tr))return null;e=e.parent}return e}(this.scope,this.variable);n&&n.functionNode.parent instanceof Rc&&n.functionNode.parent.parent instanceof wc&&n.functionNode.parent.parent.includePath(e,t)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof Fc?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(Mt,{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:Ht("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 jc extends vs{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(Ge,e))}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class Uc extends vs{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?As: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)}}Uc.prototype.includeNode=$s,Uc.prototype.applyDeoptimizations=ws;const Gc={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>lt,typeof:e=>typeof e,void:()=>{},"~":e=>~e},Hc=Symbol("Unassigned");class Wc extends vs{constructor(){super(...arguments),this.renderedLiteralValue=Hc}get prefix(){return ot(this.flags,2097152)}set prefix(e){this.flags=at(this.flags,2097152,e)}deoptimizeCache(){this.renderedLiteralValue=lt}getLiteralValueAtPath(e,t,n){if(e.length>0)return lt;const s=this.argument.getLiteralValueAtPath(Ue,t,n);if("symbol"==typeof s){if("void"===this.operator)return;if("!"===this.operator){if(s===ut)return!0;if(s===ct)return!1}return lt}return Gc[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof Zi)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Ue,bt,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(Ue),this.scope.context.requestTreeshakingPass())}getRenderedLiteralValue(e){return this.renderedLiteralValue!==Hc?this.renderedLiteralValue:this.renderedLiteralValue=e?lt:hl(this.getLiteralValueAtPath(Ue,Je,this))}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const s=this.argument instanceof Zi&&this.argument.variable?.included;("symbol"==typeof this.getRenderedLiteralValue(t)||this.argument.shouldBeIncluded(e)||s)&&(this.argument.include(e,t),this.renderedLiteralValue=lt)}render(e,t){if("symbol"==typeof this.renderedLiteralValue)super.render(e,t);else{let t=this.renderedLiteralValue;Kc.test(e.original[this.start-1])||(t=` ${t}`),e.overwrite(this.start,this.end,t)}}}const Kc=/[\s([=%&*+-/<>^|,?:;]/;Wc.prototype.includeNode=Ps;class qc extends vs{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(ht)}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?Se(s,this.start,this.end,e,t):ve(s,this.start,this.end,this.parent.type!==vt,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${Ae([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==vt,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(Ue),this.argument instanceof Zi){this.scope.findVariable(this.argument.name).markReassigned()}this.scope.context.requestTreeshakingPass()}}function Xc(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}qc.prototype.includeNode=Ps;class Jc extends vs{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Ue)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=Pe){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 ol||i instanceof sl)&&r.include(e,t)}}initialise(){super.initialise(),"await using"===this.kind&&cl(this);for(const e of this.declarations)e.declareDeclarator(this.kind)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=Pe){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,` ${Ae(r,o)};`)}renderReplacedDeclarations(e,t){const n=Ee(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=fe(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 Zi&&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 Zi&&Xc(d.id.variable,t.exportNamesByVariable))c&&(u+=";"),l=!1;else{if(h&&h===d.id.variable){const n=he(e.original,"=",d.id.end);Se(h,fe(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 ue(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===Pt){if(e.has(t.id.variable))return!1}else{const n=[];if(t.id.addExportedVariables(n,e),n.length>0)return!1}}return!0}}Jc.prototype.includeNode=$s,Jc.prototype.applyDeoptimizations=ws;class Yc extends vs{declareDeclarator(e){this.isUsingDeclaration="using"===e,this.isAsyncUsingDeclaration="await using"===e,this.id.declare(e,Ue,this.init||Ms)}deoptimizePath(e){this.id.deoptimizePath(e)}deoptimizeCache(){!this.hasDeoptimizedDisposal&&this.init&&(this.hasDeoptimizedDisposal=!0,this.init.deoptimizePath(Ge),this.init.includePath(Ge,it()),this.scope.context.requestTreeshakingPass())}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,Ue,this.init||Ms)}include(e,t){const{id:n,init:s}=this;this.included||this.includeNode(e);const{disposalCall:i,disposalFunction:r}=this;r&&i&&r.includeCallArgumentsWhenCalledAtPath(Ue,i,e),s?.include(e,t),n.markDeclarationReached(),t?n.include(e,t):n.includeDestructuredIfNecessary(e,Ue,s||Ms)}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=he(e.original,"=",o.end);e.remove(l,fe(e.original,t+1))}if(a){if(o instanceof Zi&&a instanceof Pl&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?Pe:{renderedSurroundingElement:vt})}else o instanceof Zi&&Xc(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}includeNode(e){this.included=!0;const{id:t,init:n}=this;if(n){if(this.isUsingDeclaration||this.isAsyncUsingDeclaration){const t={access:{args:[n],type:0},call:{args:[n],type:2,withNew:!1}};!this.isUsingDeclaration&&this.includeDisposalMethodAndCheckIfKnownFunction(n,Qc,t,e)||this.includeDisposalMethodAndCheckIfKnownFunction(n,Zc,t,e),this.scope.context.requestTreeshakingPass()}if(t instanceof Zi&&n instanceof Pl&&!n.id){const{name:e,variable:s}=t;for(const t of n.scope.accessedOutsideVariables.values())t!==s&&t.forbidName(e)}}}includeDisposalMethodAndCheckIfKnownFunction(e,t,{access:n,call:s},i){e.deoptimizeArgumentsOnInteractionAtPath(n,t,Je);const r=e.getKnownFunctionAtPath(t,Je,this);if(e.includePath(t,i),!r){const n=e.getLiteralValueAtPath(t,Je,this);return null!=n&&(e.deoptimizeArgumentsOnInteractionAtPath(s,t,Je),e.includeCallArgumentsWhenCalledAtPath(t,s,i)),!1}return this.disposalFunction=r,this.disposalCall=s,r.deoptimizeArgumentsOnInteractionAtPath(s,Ue,Je),!0}}Yc.prototype.applyDeoptimizations=ws;const Zc=[Le],Qc=[Te];class eu extends vs{hasEffects(e){return!!this.test.hasEffects(e)||Rl(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Ol(e,this.body,t)}}eu.prototype.includeNode=$s,eu.prototype.applyDeoptimizations=ws;class tu extends vs{applyDeoptimizations(){this.deoptimized=!0,this.argument?.deoptimizePath(Ge)}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(Ge,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 nu=["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"],su=[Ic,Nc,Si,sl,rl,al,ll,ul,ml,wr,gl,El,xl,Al,vl,ur,Pl,Il,Nl,Cl,kl,$r,Dl,Ml,_l,Or,Ll,Tl,$r,zl,Bl,Fl,Rr,Vl,Zi,Gl,Hl,Wl,Kl,Yl,ec,tc,sc,rc,oc,gc,lc,cc,yc,nc,bc,Ec,xc,Ac,ac,Sc,hc,vc,fo,fo,fo,fo,fo,fo,Pc,Eo,Po,ir,$c,wc,ol,Cc,kc,Rc,rr,Ir,Oc,Dc,Ai,ar,Mc,_c,Lc,Tc,zc,Bc,Vc,jc,Uc,Wc,qc,Jc,Yc,eu,tu],iu=[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=ou(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=ou(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=bs(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=e.params=ou(e,s,n[t+2],n);s.addParameterVariables(o.map(e=>e.declare("parameter",Ue,ht)),o[o.length-1]instanceof Ir),e.body=ru(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=ms[n[t]],e.left=ru(e,s,n[t+1],n),e.right=ru(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=ru(e,s,n[t],n),e.right=ru(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=ms[n[t]],e.left=ru(e,s,n[t+1],n),e.right=ru(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=ou(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:ru(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=bs(n[t+1],n),e.callee=ru(e,s,n[t+2],n),e.arguments=ou(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:ru(e,s,i,n);r?.declare("parameter",Ue,ht),e.body=ru(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=ru(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]=ru(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=ou(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:ru(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:ru(e,s,r,n),e.body=ru(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=ou(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:ru(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:ru(e,s,r,n),e.body=ru(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=ru(e,s,n[t],n),e.consequent=ru(e,s,n[t+1],n),e.alternate=ru(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:ru(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=ru(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=ru(e,s,n[t],n),e.test=ru(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:ru(e,s,i,n),e.source=ru(e,s,n[t+1],n),e.attributes=ou(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=ou(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:ru(e,s,i,n),e.attributes=ou(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:ru(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=ru(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:ru(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=ru(e,s,n[t],n),e.right=ru(e,s,n[t+1],n),e.body=ru(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=ru(e,s,n[t+1],n),e.right=ru(e,s,n[t+2],n),e.body=ru(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:ru(e,s,i,n);const r=n[t+1];e.test=0===r?null:ru(e,s,r,n);const o=n[t+2];e.update=0===o?null:ru(e,s,o,n),e.body=ru(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=bs(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:ru(e,s.parent,o,n);const a=e.params=ou(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",Ue,ht)),a[a.length-1]instanceof Ir),e.body=ru(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=bs(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:ru(e,e.idScope,o,n);const a=e.params=ou(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",Ue,ht)),a[a.length-1]instanceof Ir),e.body=ru(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=ru(e,s,n[t],n),e.consequent=ru(e,e.consequentScope=new jl(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:ru(e,e.alternateScope=new jl(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=ru(e,s,n[t],n),e.value=ru(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=ou(e,s,n[t],n),e.source=ru(e,s,n[t+1],n),e.attributes=ou(e,s,n[t+2],n);const i=n[t+3];e.phase=0===i?void 0:ms[i]},function(e,t,n){const{scope:s}=e;e.local=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=ru(e,s,n[t],n),e.sourceAstNode=el(n[t],n);const i=n[t+1];e.options=0===i?null:ru(e,s,i,n);const r=n[t+2];e.phase=0===r?void 0:ms[r]},function(e,t,n){const{scope:s}=e;e.local=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=ru(e,s,n[t+1],n),e.imported=0===i?e.local:ru(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=ru(e,s,n[t],n);const i=n[t+1];e.value=0===i?null:ru(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=ru(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e;e.openingElement=ru(e,s,n[t],n),e.children=ou(e,s,n[t+1],n);const i=n[t+2];e.closingElement=0===i?null:ru(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.openingFragment=ru(e,s,n[t],n),e.children=ou(e,s,n[t+1],n),e.closingFragment=ru(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=ru(e,s,n[t],n),e.property=ru(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.namespace=ru(e,s,n[t],n),e.name=ru(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.selfClosing=!(1&~i),e.name=ru(e,s,n[t+1],n),e.attributes=ou(e,s,n[t+2],n)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,n){const{scope:s}=e;e.argument=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.expression=ru(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=ru(e,s,n[t],n),e.body=ru(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=ms[n[t]],e.left=ru(e,s,n[t+1],n),e.right=ru(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=ru(e,s,n[t+1],n),e.property=ru(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=ru(e,s,n[t],n),e.property=ru(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=ou(e,s,n[t+1],n),e.key=ru(e,s,n[t+2],n),e.value=ru(e,s,n[t+3],n),e.kind=ms[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=bs(n[t],n),e.callee=ru(e,s,n[t+1],n),e.arguments=ou(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=ou(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=ou(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=ou(e,s,n[t],n),e.invalidAnnotations=bs(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=ru(e,s,n[t+2],n),e.kind=ms[n[t+3]],e.key=0===r?e.value:ru(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=ou(e,s,n[t+1],n),e.key=ru(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:ru(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:ru(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=ou(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=ou(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:ru(e,s,i,n),e.consequent=ou(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=ru(e,e.parentScope,n[t],n),e.cases=ou(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=ru(e,s,n[t],n),e.quasi=ru(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=ou(e,s,n[t],n),e.expressions=ou(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=ru(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=ru(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:ru(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:ru(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=ms[n[t]],e.argument=ru(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=ms[n[t+1]],e.argument=ru(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=ms[n[t]],e.declarations=ou(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=ru(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:ru(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=ru(e,s,n[t],n),e.body=ru(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:ru(e,s,r,n)}];function ru(e,t,n,s){const i=s[n],r=su[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=nu[i],o.start=s[n+1],o.end=s[n+2],iu[i](o,n+3,s),o.initialise(),o}function ou(e,t,n,s){if(0===n)return we;const i=s[n++],r=new Array(i);for(let o=0;o<i;o++){const i=s[n++];r[o]=i?ru(e,t,i,s):null}return r}const au={ArrayExpression:Si,ArrayPattern:sl,ArrowFunctionExpression:rl,AssignmentExpression:al,AssignmentPattern:ll,AwaitExpression:ul,BinaryExpression:ml,BlockStatement:wr,BreakStatement:gl,CallExpression:El,CatchClause:xl,ChainExpression:Al,ClassBody:vl,ClassDeclaration:ur,ClassExpression:Pl,ConditionalExpression:Il,ContinueStatement:Nl,DebuggerStatement:Cl,Decorator:kl,DoWhileStatement:Dl,EmptyStatement:Ml,ExportAllDeclaration:_l,ExportDefaultDeclaration:Or,ExportNamedDeclaration:Ll,ExportSpecifier:Tl,ExpressionStatement:$r,ForInStatement:zl,ForOfStatement:Bl,ForStatement:Fl,FunctionDeclaration:Rr,FunctionExpression:Vl,Identifier:Zi,IfStatement:Gl,ImportAttribute:Hl,ImportDeclaration:Wl,ImportDefaultSpecifier:Kl,ImportExpression:Yl,ImportNamespaceSpecifier:ec,ImportSpecifier:tc,JSXAttribute:sc,JSXClosingElement:rc,JSXClosingFragment:oc,JSXElement:gc,JSXEmptyExpression:lc,JSXExpressionContainer:cc,JSXFragment:yc,JSXIdentifier:nc,JSXMemberExpression:bc,JSXNamespacedName:Ec,JSXOpeningElement:xc,JSXOpeningFragment:Ac,JSXSpreadAttribute:ac,JSXSpreadChild:Sc,JSXText:hc,LabeledStatement:vc,Literal:fo,LogicalExpression:Pc,MemberExpression:Eo,MetaProperty:Po,MethodDefinition:ir,NewExpression:$c,ObjectExpression:wc,ObjectPattern:ol,PanicError:Ic,ParseError:Nc,PrivateIdentifier:Cc,Program:kc,Property:Rc,PropertyDefinition:rr,RestElement:Ir,ReturnStatement:Oc,SequenceExpression:Dc,SpreadElement:Ai,StaticBlock:ar,Super:Mc,SwitchCase:_c,SwitchStatement:Lc,TaggedTemplateExpression:Tc,TemplateElement:zc,TemplateLiteral:Bc,ThisExpression:Vc,ThrowStatement:jc,TryStatement:Uc,UnaryExpression:Wc,UnknownNode:class extends vs{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:qc,VariableDeclaration:Jc,VariableDeclarator:Yc,WhileStatement:eu,YieldExpression:tu};class lu extends ts{constructor(e){super(ia),this.module=e}includePath(e,t){super.includePath(e,t),this.module.needsExportShim=!0}}var cu;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(cu||(cu={}));const uu=new WeakMap;function du(e,t){if(e){const t=uu.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||du(e)}function hu(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),uu.has(e))return e;if("sections"in e&&(e=function({file:e,sections:t}){const n=[],s=[],i=[],r=[],o=new Map;for(const{map:e,offset:a}of t){const t=hu(e),{sourceRoot:l}=t,c=l?l.endsWith("/")?l:`${l}/`:"",u=t.sources.map((e,n)=>{const s=null==e||q(e)?e:c+e,a=t.sourcesContent?.[n]??null;let l=o.get(s);l||o.set(s,l=[]);let u=l.find(e=>null==a||null==r[e]||r[e]===a);return void 0===u?(u=i.push(s)-1,r.push(a),l.push(u)):r[u]??=a,u}),d=s.length;for(const e of t.names??[])s.push(e);for(const[e,s]of t.mappings.entries()){const t=a.line+e;for(;n.length<=t;)n.push([]);const i=0===e?a.column:0;for(const e of s){const s=e.slice();s[0]+=i,1!==s.length&&(s[1]=u[s[1]],5===s.length&&(s[4]+=d)),n[t].push(s)}}}return{file:e,mappings:n,names:s,sources:i,sourcesContent:r,version:3}}(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 uu.set(i,s),i}function pu(e){return e.id}const fu=(e,{allowReturnOutsideFunction:t=!1,jsx:n=!1}={})=>function(e){const t=el(0,e);switch(t.type){case"PanicError":return on(an(Gn(t.message)));case"ParseError":return on(an(Gn(t.message,t.start)));default:return t}}(nl(Za(e,t,n))),mu=new Set(["assert","with"]);function gu(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof wc))return n&&t.module.log(Mt,Tn(t.module.id),s),$e;const i=n.properties.find(e=>mu.has(yu(e)))?.value;if(!i)return $e;if(!(i instanceof wc))return t.module.log(Mt,(r=t.module.id,{code:pn,message:`Rollup could not statically analyze the options argument of a dynamic import in "${Vt(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),$e;var r;const o=i.properties.map(e=>{const n=yu(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(Mt,Tn(t.module.id),e.start),null)}).filter(e=>!!e);return o.length>0?Object.fromEntries(o):$e}const yu=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function bu(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},xu={memoryUsage:()=>({heapUsed:0})};let Au=new Map;function Su(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function vu(e,t=3){e=Su(e,t);const n=xu.memoryUsage().heapUsed,s=Eu.now(),i=Au.get(e);void 0===i?Au.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function Pu(e,t=3){e=Su(e,t);const n=Au.get(e);if(void 0!==n){const e=xu.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=Eu.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function $u(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of Au)e[t]=[s,n,i];return e}let wu=fs,Iu=fs;const Nu=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function Cu(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of Nu)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){wu(s,4);const t=r.apply(this,e);return Iu(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 ku={identifier:null,localName:ia};function Ru(e,t,n,s,i=new Map,r,o,a){const l=i.get(t);if(l){if(l.has(e))return s?[null]:on((c=t,{code:"CIRCULAR_REEXPORT",exporter:u=e.id,message:`"${c}" cannot be exported from "${Vt(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 Ou(e,t){const n=Ne(t.sideEffectDependenciesByVariable,e,Ce);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof po?s.getDirectOriginalVariable():s instanceof zo?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 Du{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 lu(this),this.indentExclusionRanges=[],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,pu).sort()},get implicitlyLoadedBefore(){return Array.from(f,pu).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!==cu.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,safeVariableNames:null,syntheticNamedExports:r}}basename(){const e=Y(this.id),t=Q(this.id);return ls(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){is(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),on(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 zo?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 on(Bn(oe(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 hs)e.set(le(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(Lu))}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 ss))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:on((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${Vt(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}=$e){if(ae(e)){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(ce(e)).getVariableForExportName("*",{importChain:[...n,this.id]})}const l=this.reexportDescriptions.get(e);if(l){const[e,s]=Ru(l.module,l.localName,t,!1,r,[...n,this.id],o,a);return e?(t&&(Mu(e,t,this),this.info.moduleSideEffects&&Ne(t.sideEffectDependenciesByVariable,e,Ce).add(this)),this.info.moduleSideEffects&&o?.add(this),a?.add(this),[e]):this.error(Fn(oe(l.localName),this.id,l.module.id,!!s?.missingButExportExists),l.start)}const c=this.exportDescriptions.get(e);if(c){if(c===ku)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),Ne(t.sideEffectDependenciesByVariable,n,Ce).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)Ne(t.sideEffectDependenciesByVariable,e,Ce).add(n)}return s}}return this.info.syntheticNamedExports?[Ne(this.syntheticExports,e,()=>new zo(this.astContext,oe(e),this.getSyntheticNamespace()))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}hasTopLevelAwait(){return this.astContext.usesTopLevelAwait}include(){const e=it();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(){if(this.allExportsIncluded)return;this.allExportsIncluded=!0,this.includeModuleInExecution();const e=it();for(const t of this.getExportedVariablesByName().values())this.includeVariable(t,Ge,e),t.deoptimizePath(Ge),t instanceof ss&&(t.module.reexported=!0)}includeAllInBundle(){this.ast.include(it(),!0),this.includeAllExports()}includeModuleInExecution(){this.isExecuted||(ps(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 hs?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){this.indentExclusionRanges=[];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?on((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.`})):{indentExclusionRanges:this.indentExclusionRanges,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(wu("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=hu(i),this.sourcemapChain=o.map(e=>e.missing?e:hu(e)),du(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 B(t,{filename:this.excludeFromSourcemap?null:d}),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),addIndentExclusionRange:e=>this.indentExclusionRanges.push(e),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=>au[e]||au.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(re(e)),traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new Fc(this.graph.scope,this.astContext,this.importDescriptions),this.namespace=new Lo(this.astContext);const h={context:this.astContext,type:"Module"};if(e)this.ast=new au[e.type](h,this.scope).parseNode(e),this.info.ast=e;else{Iu("generate ast",3);const e=await async function(e,t,n){return Za(e,t,n)}(t,!1,!1!==this.options.jsx);wu("generate ast",3),this.ast=(p=e,f=h,m=this.scope,ru(f,m,0,nl(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;Iu("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,pu),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}=$e){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 Du&&"*"===a.name)return e.namespace;const[o,l]=Ru(e,a.name,t||this,n,s,[this.id],i,r);return o||this.error(Fn(oe(a.name),this.id,e.id,!!l?.missingButExportExists),a.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:n},{replaceExistingMeta:s=!1}=$e){if(null!=t&&(this.info.moduleSideEffects=t),null!=n&&(this.info.syntheticNamedExports=n),null!=e){if(s)for(const e of Object.keys(this.info.meta))delete this.info.meta[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}"`}}(oe(e)),t)}addExport(e){if(e instanceof Or)this.assertUniqueExportName("default",e.start),this.exportDescriptions.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof _l){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=re(e.exported instanceof fo?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 fo){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=re(n instanceof fo?n.value:n.name);this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:re(s instanceof fo?s.value:s.name),module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof Jc)for(const e of t.declarations)for(const t of _a(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=re(n instanceof Zi?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(Hn(s),n.local.start);const i="source"===e.phase?ns:n instanceof Kl?"default":n instanceof ec?"*":n.imported instanceof Zi?n.imported.name:re(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,$e)}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=Ct(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(Mt,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))}cn(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 hs||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=>[yu(e),e.value.value])):$e);var s;const i=this.sourcesWithAttributes.get(e);i?bu(i,n)&&this.log(Mt,Rn(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 "${Vt(a)}" even though it is needed in "${Vt(l)}" to provide JSX syntax. Please check your "jsx" option.`,names:[o],url:Ht(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]=Ru(c,e,t,!0,_u(n),s,a,l);c instanceof hs||d?.indirectExternal?o.add(u):u instanceof zo?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(Mt,(c=e,u=this.id,d=t.map(([,e])=>e.id),{binding:c,code:"NAMESPACE_CONFLICT",ids:d,message:`Conflicting namespaces: "${Vt(u)}" re-exports "${c}" from one of the modules ${zt(d.map(e=>Vt(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(Mt,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${Vt(t)}" re-exports "${e}" from one of the external modules ${zt(s.map(e=>Vt(e)))}, guessing "${Vt(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 hs){const[t]=n.getVariableForExportName("*",{importChain:[this.id]});t.includePath(Ge,it()),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.includePath(Ge,it()),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const{resolution:t}=e;t instanceof Du&&(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 Du&&i!==this&&Ou(e,this);else if(this.graph.needsTreeshakingPass=!0,i instanceof Du&&(i.includeModuleInExecution(),i!==this)){const t=Ou(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(Mt,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${Vt(t)}".`})),this.exportDescriptions.set(e,ku)}tryParse(){try{return fu(this.info.code,{jsx:!1!==this.options.jsx})}catch(e){return this.error(Kn(e,this.id),e.pos)}}}function Mu(e,t,n){if(e.module instanceof Du&&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 _u=e=>e&&new Map(Array.from(e,([e,t])=>[e,new Set(t)])),Lu=([e],[t])=>e<t?-1:e>t?1:0,Tu=(e,t)=>[e,t].filter(Boolean).join("\n"),zu=(e,t)=>[e,t].filter(Boolean).join("\n\n");const Bu={amd:ju,cjs:ju,es:Vu,iife:ju,system:Vu,umd:ju};function Fu(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,Qi(t.name,e,t.forbiddenNames)),s.info.safeVariableNames[t.name]=t.renderName}if(n.has(s)){const t=s.namespace;t.setRenderNames(null,Qi(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 Vu(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof Bo)&&(t.variableName=Qi(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(t instanceof hs||i&&!t.info.syntheticNamedExports)?n.setRenderNames(null,(t instanceof hs?a.get(t):o.get(t)).variableName):t instanceof hs&&n.isSourcePhase?n.setRenderNames(null,Qi(t.suggestedVariableName+"__source",e,n.forbiddenNames)):t instanceof hs&&"default"===s?n.setRenderNames(null,Qi([...t.exportedVariables].some(([e,t])=>"*"===t&&e.included)?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,Qi(ls(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,Qi(t.name,e,t.forbiddenNames))}function ju(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=Qi(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=Qi(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&qr(r(t.id),a)?t.namespaceVariableName:Qi(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof hs){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=Hr[s]?n.defaultVariableName:n.variableName;Wr(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,Kr[r(t.id)]?n.namespaceVariableName:n.variableName):e.setRenderNames(n.variableName,oe(s))}else{const n=l.get(t);o&&e.isNamespace&&!t.info.syntheticNamedExports?e.setRenderNames(null,"default"===n.exportMode?n.namespaceVariableName:n.variableName):"default"===n.exportMode?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,oe(n.getVariableExportName(e)))}}}function Uu(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return on(Ln("default",o,i))}else if("none"===t&&o.length>0)return on(Ln("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(Mt,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${Vt(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:Ht(Jt)}}(i,n)),t="named")),t}function Gu(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 Hu(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof hs){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),Hu(e,t,n,s,i,r)):t.push(o)}}const Wu="!~{",Ku="}~",qu=new RegExp(`${Wu}[0-9a-zA-Z_$]{1,16}${Ku}`,"g"),Xu=(e,t)=>e.replace(qu,e=>t.get(e)||e),Ju=(e,t,n)=>e.replace(qu,e=>e===t?n:e),Yu=(e,t)=>{const n=new Set,s=e.replace(qu,e=>t.has(e)?(n.add(e),`${Wu}${"0".repeat(e.length-5)}${Ku}`):e);return{containedPlaceholders:n,transformedCode:s}},Zu=Symbol("bundleKeys"),Qu={type:"placeholder"};function ed(e,t,n){return jt(e)?on(Zn(`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 on(Zn(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return jt(r)?on(Zn(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r})}function td(e,{[Zu]: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 nd=["Object","Promise","module","exports","require","__filename","__dirname",...co],sd=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function id(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(Mt,(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:Ht("configuration-options/#output-globals")})),e.variableName):void 0);var r,o}class rd{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&&!t.info.syntheticNamedExports||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=ls(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 rd([],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 Du?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 zo&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>Xu(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=se(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=se(s))}while(ie.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=Uu(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(rd.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=ld(e)??Ft(e.id)):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 Lr(Gt(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=Y(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=ed("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=td(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Qu),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=ed("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=td(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(dd),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,dd),importedBindings:cd(e,dd),imports:Array.from(e.keys(),dd),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.isNativeNamespace(e)?"*":this.exportNamesByVariable.get(e)[0]}isNativeNamespace(e){return this.outputOptions.preserveModules&&e instanceof Lo&&!e.module.info.syntheticNamedExports}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=[];Hu(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 rd&&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),b="es"===o&&new Set(y.map(({exported:e})=>e));let E=y.length>0,x=!1;for(const e of g){const{reexports:t}=e;t?.length&&(E=!0,!x&&t.some(e=>"default"===e.reexported)&&(x=!0),b&&(e.reexports=t.filter(({reexported:e})=>!b.has(e))))}if(!x)for(const{exported:e}of y)if("default"===e){x=!0;break}const{intro:A,outro:S,banner:v,footer:P}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],Tu),t.hookReduceValue("footer",e.footer(n),[n],Tu),t.hookReduceValue("intro",e.intro(n),[n],zu),t.hookReduceValue("outro",e.outro(n),[n],zu)]);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 on((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(pa[o](p,{accessedGlobals:u,dependencies:g,exports:y,hasDefaultExport:x,hasExports:E,id:l.fileName,indent:d,intro:A,isEntryFacade:a||null!==t&&t.info.isEntry,isModuleFacade:null!==t,log:n,namedExportsMode:"default"!==e,outro:S,snippets:r,usesTopLevelAwait:m},s),v&&h.prepend(v),"es"===o||"cjs"===o){const e=null!==t&&t.info.isEntry&&t.shebang;e&&h.prepend(`#!${e}\n`)}return P&&h.append(P),{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):od(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof Du){const s=this.chunkByModule.get(n);let i;do{if(i=t.alternativeReexportModules.get(e),i){this.chunkByModule.get(i)!==s&&this.inputOptions.onLog(Mt,In(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 zo,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!this.isNativeNamespace(i)){const e=i.module;if(e instanceof Du){const s=this.chunkByModule.get(e);s&&s!==this&&(s.exports.add(i),t.push(i),n&&this.imports.add(i))}else e instanceof hs&&i.included&&t.push(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?od(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const n of this.getExportNames()){if(ae(n))continue;const s=this.exportsByName.get(n);if(!(s instanceof zo)){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 Rr||e instanceof Or&&e.declaration instanceof Rr){r=!0;break}}else s instanceof zo&&(i=o,"es"===e&&(o=s.renderName));t.push({exported:n,expression:i,hoisted:r,local:o,needsLiveBinding:s.isReassigned&&this.exportNamesByVariable.get(s).length>1||s.isTargetOfAssignment&&ad(s)})}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 hs){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?Hr[n(o.id)]&&i.add(a):t.isNamespace&&Kr[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every(ae))&&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 rd||e instanceof Bo))}getDynamicImportStringAndAttributes(e,t,n){const{externalImportAttributes:s}=this.outputOptions,i=["es","cjs"].includes(this.outputOptions.format)&&s;if(e instanceof hs){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=gu(n);r=e===$e||Fo(e,this.snippets)}return[e||"",r]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?Bt(this.fileName):Bt(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 hs&&n.isSourcePhase;if(s instanceof hs){if(i=this.externalChunkByModule.get(s),r=n.name,!o&&"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return on(Jn(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);Ne(t,i,ke).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 Du?{chunk:this.chunkByModule.get(t),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(t),node:n,resolution:t}:t instanceof hs?{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=ld(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(J(e.id.split(ud,1)[0])),r=s(this.inputBase),o=Q(i),a=sd.has(o)?i.slice(0,-o.length):i;return q(a)?n&&ne(a).startsWith(n)?a.slice(n.length).replace(/^[/\\]/,""):"/"===r&&"/"!==a[0]?te(r,a.replace(/^[a-zA-Z]:[/\\]/,"/")):te(r,a):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+Y(a)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o;if(ae(s)){const n=ce(s);"defaultOnly"===t(n)&&this.inputOptions.onLog(Mt,Yn(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof zo)continue;const a=n.module;if(a instanceof Du){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 on(Jn(a.id,r,!0));o=e&&("default"!==r||Wr(t(a.id),!0))}}Ne(n,i,ke).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 Bo&&!i.moduleSideEffects&&!this.outputOptions.hoistTransitiveImports)continue;const a=i instanceof Bo||"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 Bo?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof Bo&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&id(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:u&&u.length>0?u:null,isChunk:i instanceof rd,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 rd&&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 V({separator:`${E}${E}`}),A=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=Gu(t.originalCode);if(null!==e)return e}return"\t"}(a,l),S=[];let v="";const P=new Set,$={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($);!$.accessedDocumentCurrentScript&&$o.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(Gr),$.accessedDocumentCurrentScript=!1,({source:n}=r),w||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),x.addSource({content:n,indentExclusionRanges:r.indentExclusionRanges}),S.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock($);o.renderFirst()?v+=E+e:x.addSource(new B(e))}const a=t.get(e.scope);if(a)for(const e of a)P.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}}v&&x.prepend(v+E+E),this.needsExportsShim&&x.prepend(`${E}${b} ${ia}${y}=${y}void 0;${E}${E}`);const I=h?x:x.trim();var N;return o&&0===this.getExportNames().length&&0===n.size&&r(Mt,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${N=this.getChunkName()}".`,names:[N]}),{accessedGlobals:P,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||ad(n)?n instanceof zo?r.add(n):n.setRenderNames(null,null):n.setRenderNames("exports",oe(t))}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(nd);this.needsExportsShim&&o.add(ia),t&&o.add("Symbol"),Fu(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.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 zo&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof Du&&(this.checkCircularDependencyImport(n,e),this.isNativeNamespace(n)||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 Du&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function od(e){return ld(e)??Bt(e.id)}function ad(e){return e instanceof Ki&&e.declarations.some(e=>e instanceof Zi&&e.isDeclarationInDestructuringPattern())}function ld(e){return e.chunkNames.find(({isUserDefined:e})=>e)?.name??e.chunkNames[0]?.name}function cd(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 ud=/[#?]/,dd=e=>e.getFileName();function*hd(e){for(const t of e)yield*t}function pd(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):fd(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,h=new Set;l[u]=t,c[u]=d;const p=new Set(e);let f=!1;const m=new Set;for(const e of p){f||=e.hasTopLevelAwait(),Ne(r,e,Ce).add(u);const i=n.get(e);if(i&&!m.has(i)){m.add(i);for(const e of i)p.add(e)}for(const t of e.getDependenciesToBeIncluded())t instanceof hs||p.add(t);for(const{node:n}of e.dynamicImports){const{resolution:e}=n;e instanceof Du&&e.includedDynamicImporters.length>0&&(s.has(e)||!o.has(e))&&(h.add(e),n.included&&t.add(e),o.has(e)||(s.add(e),o.add(e),a.push([e])))}for(const n of e.implicitlyLoadedBefore)o.has(n)||(s.add(n),o.add(n),a.push([n])),s.has(n)&&t.add(n)}if(f)for(const e of h)i.add(e),d.add(e);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=md(n,r),c=md(i,r);return{awaitedDynamicEntries:a,awaitedDynamicImportsByEntry:c,dynamicEntries:o,dynamicImportsByEntry:l}}(a,s,l,i,c);return{awaitedDynamicImportsByEntry:h,dependentEntriesByModule:r,dynamicallyDependentEntriesByAwaitedDynamicEntry:gd(yd(r,d,a,e=>e.includedTopLevelAwaitingDynamicImporters),h),dynamicallyDependentEntriesByDynamicEntry:yd(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){return e.map(e=>({dependentEntries:t.get(e[0]),modules:e}))}(a,u),y=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,hd([m,g])),b=function(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])Ne(t,e,Ce).add(s)}}return i}(y,d,h,c),E=function(e,t,n,s){const i=new Array(s).fill(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])Ne(t,e,Ce).add(s)}}return i}(y,p,f,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,b,E);const{chunks:x,sideEffectAtoms:A,sizeByAtom:S}=function(e,t,n,s,i){const r=Object.create(null),o=new Map,a=new Array(e.length+t.length);let l=0n,c=1n,u=0;for(const{dependentEntries:t,modules:d}of e){let e=0n,h=-1n;for(const i of t)e|=1n<<BigInt(i),h&=n[i]|s[i];const p=r[String(e)]||={containedAtoms:0n,correlatedAtoms:h,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(t),modules:[],pure:!0,size:0};for(const e of d)o.set(e,p);const{pure:f,size:m}=bd(d,i);f||(l|=c),a[u++]=m,p.containedAtoms|=c,p.modules.push(...d),p.pure&&=f,p.size+=m,c<<=1n}const d=new Map;for(const{modules:e}of t){for(const t of e)d.set(t,c);const{pure:t,size:n}=bd(e,i);t||(l|=c),a[u++]=n,c<<=1n}const h=Object.values(r);return l|=function(e,t,n,s){const i=new Map;let r=0n;for(const o of e){const{dependencies:e,modules:a}=o;for(const l of a)for(const a of l.getDependenciesToBeIncluded())if(a instanceof hs){if(a.info.moduleSideEffects){const e=Ne(i,a,()=>{const e=s;return s<<=1n,r|=e,e});o.containedAtoms|=e,o.correlatedAtoms|=e}}else{const s=t.get(a);if(s)s!==o&&(e.add(s),s.dependentChunks.add(o));else{const e=n.get(a);e&&(o.containedAtoms|=e)}}}return r}(h,o,d,c),{chunks:h,sideEffectAtoms:l,sizeByAtom:a}}(m,g,y,b,n);return o.push(...function(e,t,n,s,i){wu("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(Ed),s.sort(Ed),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return Iu("optimize chunks",3),e;t>1&&i("info",Un(e.length,r.small.size,"Initially"));(function(e,t,n,s){const{small:i}=e;for(const r of i){const o=xd(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),vd(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),vd(o,t,e).add(o)}}})(r,t,n,s),t>1&&i("info",Un(r.small.size+r.big.size,r.small.size,"After merging chunks"));return Iu("optimize chunks",3),[...r.small,...r.big]}(x,n,A,S,s).map(({modules:e})=>({alias:null,modules:e}))),o}function fd(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 hs||n.has(t)||s.add(t)}}function md(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 gd(e,t){for(const[n,s]of t.entries())for(const t of s)Ne(e,t,Ce).add(n);return e}function yd(e,t,n,s){const i=new Map;for(const r of t){const t=Ne(i,r,Ce),o=n[r];for(const n of o)for(const i of hd([s(n),n.implicitlyLoadedAfter])){const n=e.get(i);if(n)for(const e of n)t.add(e)}}return i}function bd(e,t){let n=!0,s=0;for(const i of e)i.isIncluded()&&(n&&=!i.hasEffects(),s+=t>1?i.estimateSize():1);return{pure:n,size:s}}function Ed({size:e},{size:t}){return e-t}function xd(e,{big:t,small:n},s,i,r){let o=null;for(const a of hd([n,t])){if(e===a)continue;const t=Ad(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function Ad(e,t,n,s,i){const r=Sd(e,t,n,s,i);return r<n?r+Sd(t,e,n-r,s,i):1/0}function Sd(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 vd(e,t,n){return e.size<t?n.small:n.big}const Pd=(e,t)=>e.execIndex>t.execIndex?1:-1;function $d(e){e.sort(Pd)}function wd(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 Du){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 Du&&(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 Id=(e,t)=>t?`(${e})`:e;class Nd{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 Cd{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 on(Xn(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 kd(e){return function(t,n){return n.missing?(e(Mt,(s=n.plugin,{code:En,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:Ht("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new Cd({mappings:[],names:[]},[t])):new Cd(n,[t]);var s}}function Rd(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=Z(e)||".",o=n.sourceRoot||".",a=t.map((e,t)=>null==e?null:new Nd(ne(i,o,e),s[t]));r=new Cd(n,a)}else r=new Nd(e,t);return s.reduce(i,r)}let Od;const Dd=e=>function(e){let t,n;try{const r=Ka.__wbindgen_add_to_stack_pointer(-16)>>>0;Ka.xxhashBase64Url(r,e);var s=za().getInt32(r+0,!0),i=za().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)}}(_d(e)),Md={base36:e=>function(e){let t,n;try{const r=Ka.__wbindgen_add_to_stack_pointer(-16)>>>0;Ka.xxhashBase36(r,e);var s=za().getInt32(r+0,!0),i=za().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)}}(_d(e)),base64:Dd,hex:e=>function(e){let t,n;try{const r=Ka.__wbindgen_add_to_stack_pointer(-16)>>>0;Ka.xxhashBase16(r,e);var s=za().getInt32(r+0,!0),i=za().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)}}(_d(e))};function _d(e){return"string"==typeof e?"undefined"==typeof Buffer?(Od??=new TextEncoder,Od.encode(e)):Buffer.from(e):e}let Ld="sourceMa";async function Td(e,t,n,s,i){wu("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()));Iu("render chunks",2),wu("transform chunks",2);const o=Md[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,usedFileNames:p}=await async function(e,t,n,s,i,r,o){const a=[],l=new Map,c=new Map,u=new Map,d=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&d.add(t);const h=await Promise.all(e.map(async({chunk:e,preliminaryFileName:{fileName:i,hashPlaceholder:o},preliminarySourcemapFileName:a,magicString:l,usedModules:c})=>{const u={chunk:e,fileName:i,sourcemapFileName:a?.fileName??null,...await zd(l,i,c,t,n,s,r)};return{hashAugmentation:o?s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],(e,t)=>e+(t||"")):"",hashPlaceholder:o,preliminarySourcemapFileName:a,transformedChunk:u}})),p=new Set(o[Zu]);for(const{transformedChunk:e,hashPlaceholder:t,preliminarySourcemapFileName:s,hashAugmentation:r}of h){const{map:o}=e,h=s?.hashPlaceholder;if(o&&h){const{transformedCode:e}=Yu(o.toString(),d);u.set(h,"inline"===n.sourcemap?i(e).slice(0,h.length):Fd(e,s.fileName,h,p,i))}t?(l.set(t,e),c.set(t,Bd(e,n,i,d,u,r))):a.push(e)}return{hashDependenciesByPlaceholder:c,initialHashesByPlaceholder:u,nonHashedChunksWithPlaceholders:a,placeholders:d,renderedChunksByPlaceholder:l,usedFileNames:p}}(r,a,s,n,o,i,t),f=function(e,t,n,s,i,r,o){const a=new Map(n);for(const n of s){const{fileName:s}=e.get(n);let l="";const c=new Set([n]);for(const e of c){const{containedPlaceholders:n,contentHash:s}=t.get(e);l+=s;for(const e of n)c.add(e)}const u=Fd(l,s,n,r,o);i[Ju(s,n,u)]=Qu,a.set(n,u)}return a}(h,l,c,d,t,p,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=Xu(o,t);const u=Xu(a,t);let d=null;c&&(r.sourcemapDebugIds&&(e+=Ud(e,c)),d=l?Xu(l,t):`${u}.map`,c.file=Xu(c.file??"",t),e+=Vd(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?Xu(o,t):o,u=null;c&&(r.sourcemapDebugIds&&(s+=Ud(s,c)),u=l?Xu(l,t):`${a}.map`,s+=Vd(u,c,i,r)),n[a]=e.finalizeChunk(s,c,u,t)}}(h,f,t,u,n,s),Iu("transform chunks",2)}async function zd(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=hu(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;wu("sourcemaps",3),s=m?ne(m):h?ne(h):d?ne(d,t):ne(t);a=function(e,t,n,s,i,r){const o=kd(r),a=n.filter(e=>!e.excludeFromSourcemap).map(e=>Rd(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o)),l=new Cd(t,a),c=s.reduce(o,l);let{sources:u,sourcesContent:d,names:h,mappings:p}=c.traceMappings();if(e){const t=Z(e);u=u.map(e=>te(t,e)),e=Y(e)}for(const e of n)du(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&&on(Zn("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&&on(Zn("sourcemapPathTransform function must return a string."))),a.sources[e]=J(t)}Iu("sourcemaps",3)}return{code:c,map:a}}function Bd({code:e,map:t,fileName:n,sourcemapFileName:s},i,r,o,a,l){const{containedPlaceholders:c,transformedCode:u}=Yu(e,o);let d=u;if(t&&i.sourcemapDebugIds&&(d+="//# debugId=\n"),t&&"hidden"!==i.sourcemap){let e;if("inline"===i.sourcemap){const{containedPlaceholders:n,transformedCode:s}=Yu(t.toString(),o);e=n,d+=`//# ${Ld}=data:application/json,${s}\n`}else{const{containedPlaceholders:r,transformedCode:l}=Yu(Xu(s??`${n}.map`,a),o);e=r,d+=jd(l,t,i.sourcemap,i.sourcemapBaseUrl)}for(const t of e)c.add(t)}return l&&(d+=l),{containedPlaceholders:c,contentHash:r(d)}}function Fd(e,t,n,s,i){let r,o;do{o&&(e=o),o=i(e).slice(0,n.length),r=Ju(t,n,o).toLowerCase()}while(s.has(r));return s.add(r),o}function Vd(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){return"inline"!==s&&n.emitFile({fileName:e,originalFileName:null,source:t.toString(),type:"asset"}),jd(e,t,s,i)}function jd(e,t,n,s){const i="inline"===n?t.toUrl():s?new URL(Y(e),s).toString():Y(e);return"hidden"===n?"":`//# ${Ld}=${i}\n`}function Ud(e,t){const n=Md.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"}Ld+="ppingURL";class Gd{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){wu("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===Zu?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{wu("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),Iu("initialize render",2),wu("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>21)return on(Zn(`Hashes cannot be longer than 21 characters, received ${n}. Check the "${t}" option.`));const s=`${Wu}${se(++e).padStart(n-5,"0")}${Ku}`;return s.length>n?on(Zn(`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 on(zn("output.format",Yt,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return on(zn("output.file",Xt,'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 on(zn("output.sourcemapFile",nn,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(Mt,zn("output.amd.id",qt,'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();Iu("generate chunks",2),await Td(t,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){try{await this.pluginDriver.hookParallel("renderError",[e])}catch(t){on(ln(e,t,"renderError"))}throw 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),wu("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(Wd(t))return on(Nn(t));if("placeholder"!==n.type){const{fileName:e}=n;if(e!==t&&Wd(e))return on(Nn(e))}}}(n),Iu("generate bundle",2),Iu("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)Hd(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 Du){const i=e(s.id,n);"string"==typeof i&&Hd(i,s,t)}return t}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{fu(t.code,{jsx:!1!==this.inputOptions.jsx})}catch(e){this.inputOptions.onLog(Mt,$n(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=>cs.test(e):e=>!ie.has(e)&&cs.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`${Id(`${r}${Id(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=ds(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 Du&&(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 Z(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)&&q(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 hs&&s.set(i,new Bo(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]})):pd(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){$d(s);const i=new rd(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(Mt,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 rd&&s(t,e);t.add(e)};for(const t of e)n.has(t)||i(t)}}function Hd(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return on((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${Vt(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}function Wd(e){const t=function(...e){const t=e.filter(Boolean).join("/");if(""===t)return".";const n=H.test(t[0]),s=(n?"/":"")+(ee(t.split(H),n).join("/")||(n?"":"."));return K.test(t)&&!s.endsWith("/")?s+"/":s}(e).replaceAll("\\","/");return".."===t||t.startsWith("../")||"."===t||q(t)}class Kd extends er{constructor(){super(),this.parent=null,this.variables.set("undefined",new ho)}findVariable(e){let t=this.variables.get(e);return t||(t=new Hi(e),this.variables.set(e,t)),t}}async function qd(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}=Pe)=>(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||$e,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||q(e)||"."===e[0]?async function(e,t,n){return await Xd(e,t,n)??await Xd(e+".mjs",t,n)??await Xd(e+".js",t,n)}(t?ne(Z(t),e):ne(e),n,u):null}async function Xd(e,t,n){try{const s=await n.lstat(e);if(!t&&s.isSymbolicLink())return await Xd(await n.realpath(e),t,n);if(t&&s.isSymbolicLink()||s.isFile()){const t=Y(e);if((await n.readdir(Z(e))).includes(t))return e}}catch{}}function Jd(e){return 65279===e.charCodeAt(0)?Jd(e.slice(1)):e}const Yd=(e,t,n=th)=>{const{onwarn:s,onLog:i}=e,r=Zd(n,s);if(i){const e=Tt[t];return(t,n)=>i(t,Qd(n),(t,n)=>{if("error"===t)return on(eh(n));Tt[t]>=e&&r(t,eh(n))})}return r},Zd=(e,t)=>t?(n,s)=>{n===Mt?t(Qd(s),t=>e(Mt,eh(t))):e(n,s)}:e,Qd=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),eh=e=>"string"==typeof e?{message:e}:"function"==typeof e?eh(e()):e,th=(e,{message:t})=>{switch(e){case Mt:return console.warn(t);case Lt:return console.debug(t);default:return console.info(t)}};function nh(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(Mt,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const sh={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:we,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:we,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:we,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},ih={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"}},rh={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},oh=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};on(zn(`${n}.preset`,s,`valid values are ${zt(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;on(zn(t,n,`valid values are ${s}${zt(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)},ah=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),lh="at position ",ch="at output position ";const uh={delete:()=>!1,get(){},has:()=>!1,set(){}};function dh(e){return e.startsWith(lh)||e.startsWith(ch)?on({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):on({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 hh(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:hu(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=eh(t),null!=n&&cn(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(Mt,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&&Qn('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(hu("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}),null!=n&&cn(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&&!function(e){return e.sources.every(e=>null!=e)}(n)?hu({version:3,...Rd(e,t,n,s,kd(i)).traceMappings()}):n}(i,a,o,r,s.onLog);if(!e){return new B(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 on(qn(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 ph="resolveDependencies";class fh{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 qd(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,gh(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,$e),void 0,!1,!e.resolveDependencies||ph)).info}addEntryWithImplicitDependants(e,t){return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null,void 0,void 0).then(async n=>{if(gh(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&&Qn('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 ${Vt(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:on(function(e){return{code:"BAD_LOADER",message:`Error loading "${Vt(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e));i.code=Jd(i.code);const r=this.graph.cachedModules.get(e);if(r&&!r.customTransformCache&&r.originalCode===i.code){const e={meta:{...n.info.meta},moduleSideEffects:n.info.moduleSideEffects,syntheticNamedExports:n.info.syntheticNamedExports};if(n.updateOptions(r),!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}])){if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);return void await n.setSource(r)}n.updateOptions(e,{replaceExistingMeta:!0})}n.updateOptions(i),await n.setSource(await hh(i,n,this.pluginDriver,this.options))}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(Vt(s.id),e.id,s):on(jn("string"==typeof t?t:Vt(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 Du)return r&&bu(e,l.info.attributes)&&this.options.onLog(Mt,Rn(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof hs)return on({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 Du(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=bh(u).then(()=>this.pluginDriver.hookParallel("moduleParsed",[c.info]));d.catch(()=>{}),this.moduleLoadPromises.set(c,u);const h=await u;return a?a===ph&&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 hs))return on(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${Vt(t)}", but is already an existing non-external module id.`}}(e,t));bu(l.info.attributes,s)&&this.options.onLog(Mt,Rn(l.info.attributes,s,e,t))}else l=new hs(this.options,r,o,a,"absolute"!==i&&q(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?on(jn(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 Du&&(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||!q(e.id)||!0===i&&yh(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(yh(e,n,s)||"absolute"),id:i&&s?mh(e,t):e}}const i=s?mh(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:yh(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,gu(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,$e,!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===ph?bh(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?X(t)?on(function(e,t){return{code:Sn,exporter:e,id:t,message:`Could not resolve "${e}" from "${Vt(t)}"`}}(t,n)):(this.options.onLog(Mt,function(e,t){return{code:Sn,exporter:e,id:t,message:`"${e}" is imported by "${Vt(t)}", but could not be resolved – treating it as an external dependency.`,url:Ht("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(Mt,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${Vt(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1,r){const o=await qd(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,$e,!0,$e,r,this.options.fs);if(null==o)return on(null===s?function(e){return{code:An,message:`Could not resolve entry module "${Vt(e)}".`}}(e):function(e,t){return{code:gn,message:`Module "${Vt(e)}" that should be implicitly loaded before "${Vt(t)}" could not be resolved.`}}(e,s));const a="object"==typeof o&&o.external;return!1===o||a?on(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:An,message:`Entry module "${Vt(e)}" cannot be external.`}}(e):function(e,t){return{code:gn,message:`Module "${Vt(e)}" that should be implicitly loaded before "${Vt(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof o?o:{id:o},$e),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?(bu(i.attributes,s)&&this.options.onLog(Mt,Rn(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,$e,!1,s,e.info.attributes),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function mh(e,t){return X(e)?t?ne(t,"..",e):ne(e):e}function gh(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 yh(e,t,n){return!0===n||"ifRelativeSource"===n&&X(t)||!q(e)}async function bh(e){const[t,n]=await e;return Promise.all([...t,...n])}function Eh(e,t,n,s,i,r,o,a,l){const c=o.sanitizeFileName(e||"asset");return td(ed("function"==typeof o.assetFileNames?o.assetFileNames({get name(){return Qn('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',rn,!1,l),e},names:t,get originalFileName(){return Qn('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',rn,!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 xh(e,{bundle:t},n){t[Zu].has(e.toLowerCase())?n(Mt,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Qu}const Ah=new Set(["chunk","asset","prebuilt-chunk"]);function Sh(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return on(Zn(`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 vh{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&&Ah.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!jt(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):on(Zn(`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}".`)):on(Zn(`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 on(vn(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():on({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?on({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):on({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 on({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return on(Zn(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return on({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=Sh(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=Md[t.hashCharacters],s=this.output={bundle:e,fileNamesBySourceHash:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&xh(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{Ne(i,n(e.source),ke).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:Sh(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&&xh(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>cu.LOAD_AND_PARSE)return on({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return on(Zn(`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 on(Zn(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||jt(e.fileName))return on(Zn(`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=Eh(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 Qn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',rn,!1,e),a},names:a?[a]:[],needsCodeReference:l,get originalFileName(){return Qn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',rn,!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=Eh(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 Qn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',rn,!1,u),a.name},names:r,needsCodeReference:c,get originalFileName(){return Qn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',rn,!1,u),a.originalFileName},originalFileNames:o,source:a.source,type:"asset"}}}function Ph(e,t,n,s,i){return Tt[e]<Tt[i]?fs:(i,r)=>{null!=r&&n(Mt,{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=eh(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}const $h=e;function wh(e,t,n,s,i,r){const{logLevel:o,onLog:a}=s;let l,c=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(lh)||e.name.startsWith(ch)||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:()=>dh(u),get:()=>dh(u),has:()=>dh(u),set:()=>dh(u)};else l=uh;var u,d;return{addWatchFile(e){n.watchFiles[e]=!0},cache:l,debug:Ph(Lt,"PLUGIN_LOG",a,e.name,o),emitFile:i.emitFile.bind(i),error:t=>on(qn(eh(t),e.name)),fs:s.fs,getFileName:i.getFileName,getModuleIds:()=>n.modulesById.keys(),getModuleInfo:n.getModuleInfo,getWatchFiles:()=>Object.keys(n.watchFiles),info:Ph(_t,"PLUGIN_LOG",a,e.name,o),load:e=>n.moduleLoader.preloadModule(e),meta:{rollupVersion:$h,watchMode:n.watchMode},parse:fu,resolve:(t,s,{attributes:i,custom:r,isEntry:o,skipSelf:a,importerAttributes:l}=Pe)=>(a??=!0,n.moduleLoader.resolveId(t,s,r,o,i||$e,l,a?[{importer:s,plugin:e,source:t}]:null)),setAssetSource:i.setAssetSource,warn:Ph(Mt,"PLUGIN_WARNING",a,e.name,o)}}function Ih(e){return Array.isArray(e)?e.filter(Boolean):e?[e]:[]}function Nh(e){if(e instanceof RegExp)return t=>{const n=J(t),s=e.test(n);return e.lastIndex=0,s};const t=process.cwd(),n=function(e,t){return e.startsWith("**")||q(e)?J(e):J(ne(t,e))}(e,t),s=Da(n,{dot:!0});return e=>{const t=J(e);return s(t)}}function Ch(e){return e instanceof RegExp?t=>{const n=e.test(t);return e.lastIndex=0,n}:t=>t.includes(e)}function kh(e,t){if(e||t)return n=>!e?.some(e=>e(n))&&(!!t?.some(e=>e(n))||!(t&&t.length>0))}function Rh(e){return"string"==typeof e||e instanceof RegExp?{include:[e]}:Array.isArray(e)?{include:e}:{exclude:e.exclude?Ih(e.exclude):void 0,include:e.include?Ih(e.include):void 0}}function Oh(e){if(!e)return;const{exclude:t,include:n}=Rh(e),s=t?.map(Nh),i=n?.map(Nh);return kh(s,i)}function Dh(e,t){if(!e&&!t)return;const n=Oh(e),s=function(e){if(!e)return;const{exclude:t,include:n}=Rh(e),s=t?.map(Ch),i=n?.map(Ch);return kh(s,i)}(t);return(e,t)=>{let i=!0;return n&&(i&&=n(e)),!!i&&(s&&(i&&=s(t)),i)}}const Mh=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 _h{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 vh(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,wh(n,s,e,t,this.fileEmitter,r)])),i)for(const e of n)for(const n of Mh)n in e&&t.onLog(Mt,Mn(e.name,n))}createOutputPluginDriver(e){return new _h(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,zh))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(Bh)}getSortedPlugins(e,t){return Ne(this.sortedPlugins,e,()=>Lh(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=Ne(this.compiledPluginFilters.transformFilter,e,()=>Dh(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=Ne(this.compiledPluginFilters.idOnlyFilter,e,()=>function(e){const t=Oh(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),on(qn(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 on(qn(t,n.name,{hook:e}))}}}function Lh(e,t,n=Th){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 Th(e,t,n){"function"!=typeof e&&on(function(e,t){return{code:fn,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 zh(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return on(function(e,t){return{code:fn,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 Bh(){}class Fh{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 Vh{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 Xe,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=cu.LOAD_AND_PARSE,this.scope=new Kd,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]++}}t&&(this.watchMode=!0,t({closeWatcher:()=>this.pluginDriver.hookParallel("closeWatcher",[]),watchChange:(...e)=>this.pluginDriver.hookParallel("watchChange",e)})),this.pluginDriver=new _h(this,e,e.plugins,this.pluginCache),this.moduleLoader=new fh(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Fh(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[es]=!0}return t})(e)}async build(){wu("generate module graph",2),await this.generateModuleGraph(),Iu("generate module graph",2),wu("sort and bind modules",2),this.phase=cu.ANALYSE,this.sortAndBindModules(),Iu("sort and bind modules",2),wu("mark included statements",2),this.includeStatements(),Iu("mark included statements",2),this.phase=cu.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 Du?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)ps(t);if(this.options.treeshake){let t=1;this.newlyIncludedVariableInits.clear();do{wu(`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(it(),!1)}if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(),this.needsTreeshakingPass=!0);Iu("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()||on(Vn(t))}sortAndBindModules(){const{orderedModules:e,cyclePaths:t}=wd(this.entryModules);for(const e of t)this.options.onLog(Mt,wn(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(Mt,Fn(oe(t.name),e.id,t.module.id,!!s?.missingButExportExists),t.start)}}}function jh(e,t){return t()}const Uh=e;function Gh(e,t,n,s){e=Lh("onLog",e);const i=Tt[s],r=(s,o,a=Ie)=>{dn(o);if(!(Tt[s]<i)){for(const t of e){if(a.has(t))continue;const{onLog:e}=t,l=e=>Tt[e]<i?fs:n=>r(e,eh(n),new Set(a).add(t));if(!1===("handler"in e?e.handler:e).call({debug:l(Lt),error:e=>on(eh(e)),info:l(_t),meta:{rollupVersion:Uh,watchMode:n},warn:l(Mt)},s,o))return}t(s,o)}};return r}const Hh=e=>()=>on(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:Ht("plugin-development/#a-simple-example")}}(e)),Wh=Hh("fs.appendFile"),Kh=Hh("fs.copyFile"),qh=Hh("fs.mkdir"),Xh=Hh("fs.mkdtemp"),Jh=Hh("fs.readdir"),Yh=Hh("fs.readFile"),Zh=Hh("fs.realpath"),Qh=Hh("fs.rename"),ep=Hh("fs.rmdir"),tp=Hh("fs.stat"),np=Hh("fs.lstat"),sp=Hh("fs.unlink"),ip=Hh("fs.writeFile");var rp=Object.freeze({__proto__:null,appendFile:Wh,copyFile:Kh,lstat:np,mkdir:qh,mkdtemp:Xh,readFile:Yh,readdir:Jh,realpath:Zh,rename:Qh,rmdir:ep,stat:tp,unlink:sp,writeFile:ip});const op=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,ap=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 Ih(e))s instanceof RegExp?n.push(s):t.add(s);return(e,...s)=>t.has(e)||n.some(t=>t.global||t.sticky?-1!==e.search(t):t.test(e))}return()=>!1},lp=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},cp=e=>{const t=e.jsx;if(!t)return!1;const n=oh(t,ih,"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||on(zn("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&&on(zn("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"}}},up=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:1e3},dp=(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[ne(t)]=s;return n=>e[n]??t}return()=>t},hp=e=>{if(!1===e.treeshake)return!1;const t=oh(e.treeshake,sh,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??we,moduleSideEffects:pp(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},pp=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&&on(zn("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},fp=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,mp=/^[a-z]:/i;function gp(e){const t=mp.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(fp,"_")}const yp=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return on(zn("output.file",Xt,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return on(zn("output.file",Xt,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},bp=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 on(zn("output.format",Yt,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Ep=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?on(zn("output.inlineDynamicImports",Zt,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},xp=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return on(zn("output.inlineDynamicImports",Zt,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return on(zn("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},Ap=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return ne(t)},Sp=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?on(zn("output.amd.id",qt,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?on(zn("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}},vp=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},Pp=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?on(zn("output.dir",Xt,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},$p=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function wp(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return on({code:hn,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:Ht(Jt)});return n||"auto"}const Ip=(e,t)=>(null!=e.externalImportAssertions&&Qn('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),Np=e=>{const t=oh(e.generatedCode,rh,"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}},Cp=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},kp=new Set(["compat","auto","esModule","default","defaultOnly"]),Rp=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||Op(n=t(s)):s in e?e[s]:Op(e[s]=t(s))}return void 0===t?()=>"default":()=>Op(t)},Op=e=>kp.has(e)?e:on(zn("output.interop",Qt,`use one of ${Array.from(kp,e=>JSON.stringify(e)).join(", ")}`,e)),Dp=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return on(zn("output.manualChunks",en,'this option is not supported for "output.inlineDynamicImports"'));if(n)return on(zn("output.manualChunks",en,'this option is not supported for "output.preserveModules"'))}return s||{}},Mp=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),_p=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},Lp=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+"/":on(zn("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n},Tp=e;function zp(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=Lh("options",await ah(e.plugins)),s=e.logLevel||_t,i=Gh(n,Yd(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:Ph(Lt,"PLUGIN_LOG",i,n,s),error:e=>on(qn(eh(e),n,{hook:"onLog"})),info:Ph(_t,"PLUGIN_LOG",i,n,s),meta:{rollupVersion:Tp,watchMode:t},warn:Ph(Mt,"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 ah(e.plugins),r=e.logLevel||_t,o=Gh(i,Yd(e,r),t,r),a=e.strictDeprecations||!1,l=up(e),c={cache:op(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:ap(e.external),fs:e.fs??rp,input:lp(e),jsx:cp(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:dp(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:hp(e)};return nh(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(n,t);return Bp(s.plugins,lh),{options:s,unsetOptions:i}}(e,null!==t);(function(e){e.perf?(Au=new Map,wu=vu,Iu=Pu,e.plugins=e.plugins.map(Cu)):(wu=fs,Iu=fs)})(n),await async function(){await Ja()}();const i=new Vh(n,t),r=!1!==e.cache;e.cache&&(n.cache=void 0,e.cache=void 0);wu("BUILD",1),await jh(i.pluginDriver,async()=>{try{wu("initialize",2),await i.pluginDriver.hookParallel("buildStart",[n]),Iu("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=an(ln(e,t,"buildEnd"));throw await i.pluginDriver.hookParallel("closeBundle",[n]).catch(()=>{}),n}throw await i.pluginDriver.hookParallel("closeBundle",[e]).catch(()=>{}),e}try{await i.pluginDriver.hookParallel("buildEnd",[])}catch(e){throw await i.pluginDriver.hookParallel("closeBundle",[e]).catch(()=>{}),e}}),Iu("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?on({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Fp(!1,n,s,e,i),get watchFiles(){return Object.keys(i.watchFiles)},write:async e=>o.closed?on({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Fp(!0,n,s,e,i)};n.perf&&(o.getTimings=$u);return o}(e,null)}function Bp(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function Fp(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 ah(e.plugins);Bp(i,ch);const r=t.createOutputPluginDriver(i);return{...await Vp(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return jh(0,async()=>{const n=new Gd(r,a,t,o,i),s=await n.generate(e);if(e){if(wu("WRITE",1),!r.dir&&!r.file)return on({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:Ht(Xt)});await Promise.all(Object.values(s).map(e=>i.fileOperationQueue.run(()=>async function(e,t,{fs:{mkdir:n,writeFile:s}}){const i=ne(t.dir||Z(t.file),e.fileName);return await n(Z(i),{recursive:!0}),s(i,"asset"===e.type?e.source:e.code)}(e,r,t)))),await o.hookParallel("writeBundle",[r,s]),Iu("WRITE",1)}return l=s,{output:Object.values(l).filter(e=>Object.keys(e).length>0).sort((e,t)=>Up(e)-Up(t))};var l})}function Vp(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=bp(e),o=Ep(e,t),a=xp(e,o,t),l=yp(e,a,t),c=Np(e),u=Ip(e,t),d={amd:Sp(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:vp(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:Pp(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:$p(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:wp(e,s),extend:e.extend||!1,externalImportAssertions:u,externalImportAttributes:u,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:vp(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:Cp(e,i),inlineDynamicImports:o,interop:Rp(e),intro:vp(e,"intro"),manualChunks:Dp(e,o,a),minifyInternalExports:Mp(e,r,i),name:e.name,noConflict:e.noConflict||!1,onlyExplicitManualChunks:e.onlyExplicitManualChunks||!1,outro:vp(e,"outro"),paths:e.paths||{},plugins:await ah(e.plugins),preserveModules:a,preserveModulesRoot:Ap(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:gp,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:Lp(e),sourcemapDebugIds:e.sourcemapDebugIds||!1,sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:_p(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 nh(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 jp;function Up(e){return"asset"===e.type?jp.ASSET:e.isEntry?jp.ENTRY_CHUNK:jp.SECONDARY_CHUNK}function Gp(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"}(jp||(jp={}));const Hp=e;export{Hp as VERSION,Gp as defineConfig,zp as rollup};
10
+ var e="4.68.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))}forEach(e){const t=this.bits;for(let n=0;n<t.length;n++){let s=t[n];for(;s;){const t=s&-s;e(31+(n<<5)-Math.clz32(t)),s^=t}}}},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.replacesUntil=-1,this.replacedFrom=-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.replacesUntil=this.replacesUntil,t.replacedFrom=this.replacedFrom,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.replacesUntil=-1,this.replacedFrom=-1,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,!0),r.replacedFrom=this.replacedFrom):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="string"==typeof e.mappings?e.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 v(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 $(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)}const I=(()=>{const e=new Uint8Array(64);for(let t=0;t<64;t++)e[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t);return e})(),N=new Uint8Array(16384);function C(e,t){t=t<0?-t<<1|1:t<<1;do{let n=31&t;(t>>>=5)>0&&(n|=32),N[e++]=I[n]}while(t>0);return e}const k=new TextDecoder;var R=class{constructor(){this.out="",this.pos=0,this.lines=[],this.buffered=0,this.needsComma=!1,this.prevGenColumn=0,this.prevSourceIndex=0,this.prevSourceLine=0,this.prevSourceColumn=0,this.prevNameIndex=0}endLine(e){this.lines.push(e),this.buffered+=e.length+1,this.buffered>=4096&&this.drain(null)}segments(e){this.drain(e)}finish(e){return this.drain(e),this.flush(),this.out}drain(e){const t=this.lines,n=t.length;for(let s=0;s<=n;s++){const i=s<n?t[s]:e;if(null===i)break;for(let e=0;e<i.length;e++){this.pos>16348&&this.flush();const t=i[e];this.needsComma&&(N[this.pos++]=44),this.needsComma=!0,this.pos=C(this.pos,t[0]-this.prevGenColumn),this.prevGenColumn=t[0],this.pos=C(this.pos,t[1]-this.prevSourceIndex),this.prevSourceIndex=t[1],this.pos=C(this.pos,t[2]-this.prevSourceLine),this.prevSourceLine=t[2],this.pos=C(this.pos,t[3]-this.prevSourceColumn),this.prevSourceColumn=t[3],5===t.length&&(this.pos=C(this.pos,t[4]-this.prevNameIndex),this.prevNameIndex=t[4])}s<n&&(this.pos>16348&&this.flush(),N[this.pos++]=59,this.needsComma=!1,this.prevGenColumn=0)}t.length=0,this.buffered=0,this.flush()}flush(){this.out+=k.decode(N.subarray(0,this.pos)),this.pos=0}};function O(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||95===e}var D=class{constructor(e,t=null){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.rawRangeMappingsIndices=[],this.rawRangeMappings="experimental-range"===e?[this.rawRangeMappingsIndices]:void 0,this.encoder=t}nextLine(){null===this.encoder?(this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[]):(this.encoder.endLine(this.rawSegments),this.rawSegments=[],this.generatedCodeLine+=1),this.generatedCodeColumn=0,this.rawRangeMappings&&(this.rawRangeMappings[this.generatedCodeLine]=this.rawRangeMappingsIndices=[])}addMagicString(e,t,n){const{original:s}=e,i=v(s);e.intro&&this.advance(e.intro),e.firstChunk.eachNext(r=>{if(r.intro.length&&this.advance(r.intro),-1===t)this.advance(r.content);else if(r.edited){const e=r.storeName?n.get(s.slice(r.start,r.replacesUntil)):void 0;this.addEdit(t,r.content,i(r.start),e??-1)}else this.addUneditedChunk(t,r,s,i(r.start),e.sourcemapLocations);r.outro.length&&this.advance(r.outro)}),e.outro&&this.advance(e.outro)}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.nextLine(),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))}}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,l=a?null:this.encoder;let c=!1;for(;o<r;){null!==l&&this.rawSegments.length>=4096&&(l.segments(this.rawSegments),this.rawSegments.length=0),a&&o+1>=r&&this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]);const u=n.charCodeAt(o);10===u?(s.line+=1,s.column=0,this.nextLine(),c=!1):(i?O(u)?c||(this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),c=!0):(this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),c=!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.nextLine(),o=i+1}}}advance(e){if(!e)return;const t=e.lastIndexOf("\n");for(let t=e.indexOf("\n");-1!==t;t=e.indexOf("\n",t+1))this.nextLine();this.generatedCodeColumn+=e.length-t-1}};const M="\n",_="\n".charCodeAt(0),L="\r".charCodeAt(0),T={insertLeft:!1,insertRight:!1,storeName:!1};function z(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 B=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:new Set},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._resolveIndex(e))<0||e>this.original.length)throw new E(`index ${e} is out of bounds`);if("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._resolveIndex(e))<0||e>this.original.length)throw new E(`index ${e} is out of bounds`);if("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=new Set(this.storedNames),t.intro=this.intro,t.outro=this.outro,t.hasMovedChunks=this.hasMovedChunks,t}generateDecodedMap(e){const t=new D((e=e||{}).hires),n=this._generateMappings(t);return{...this._mapProperties(e,n),mappings:t.raw,rangeMappings:t.rawRangeMappings}}generateMap(e){e=e||{};const t=new R,n=new D(e.hires,t),s=this._generateMappings(n);return new S({...this._mapProperties(e,s),mappings:t.finish(n.rawSegments),rangeMappings:n.rawRangeMappings})}_generateMappings(e){const t=[...this.storedNames];return e.addMagicString(this,0,new Map(t.map((e,t)=>[e,t]))),t}_mapProperties(e,t){return{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?$(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,x_google_ignoreList:this.ignoreList?[0]:void 0}}_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(),this.indentStr??"\t"}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;t=t||{};const i=new y;t.exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)i.add(t)});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.has(l.start)||(l.intro=o(l.intro)),l.edited)i.has(l.start)?l.content&&(r="\n"===l.content[l.content.length-1]):l.content=o(l.content);else if(t.exclude)for(a=l.start;a<e;){if(!i.has(a)){const e=this.original.charCodeAt(a);e===_?r=!0:e!==L&&r&&c(a)}a+=1}else for(a=l.start;a<e;){if(!r){const t=this.original.indexOf(M,a);if(-1===t||t>=e)break;r=!0,a=t+1;continue}const t=this.original.charCodeAt(a);t!==_&&t!==L?(c(a),a+=1):a+=1}i.has(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 T.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),T.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return T.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),T.insertRight=!0),this.prependRight(e,t)}move(e,t,n,s="right"){if(e=this._resolveIndex(e),t=this._resolveIndex(t),n=this._resolveIndex(n),e===t)return this;if(e<0||t>this.original.length||n<0||n>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})`);if(n>=e&&n<=t)throw new E("cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);const i=this.byStart.get(e),r=this.byEnd.get(t);if(!i||!r)throw new E(`range ${e}–${t} is out of bounds`);if(this.hasMovedChunks){let n=i;for(;n!==r;)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 o=i.previous,a=r.next;let l,c;if("left"===s)if(l=this.byEnd.get(n)??null,l){if(l.next===i)return this;c=l.next}else{if(i===this.firstChunk)return this;c=this.firstChunk}else if(c=this.byStart.get(n)??null,c){if(c.previous===r)return this;l=c.previous}else{if(r===this.lastChunk)return this;l=this.lastChunk}return o&&(o.next=a),a&&(a.previous=o),l&&(l.next=i),c&&(c.previous=r),o||(this.firstChunk=a),a||(this.lastChunk=o,this.lastChunk.next=null),i.previous=l,r.next=c||null,l||(this.firstChunk=i),c||(this.lastChunk=r),this.hasMovedChunks=!0,this}overwrite(e,t,n,s){if(!0===s)return T.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),T.storeName=!0),this.update(e,t,n,{storeName:!0,overwrite:!0});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._resolveIndex(e),t=this._resolveIndex(t),"string"!=typeof n)throw new E("content must be a string, got "+typeof n);if(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&&(T.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),T.storeName=!0),s={storeName:!0});const i="object"==typeof s&&s?s:{},r=i.storeName||!1,o=i.overwrite||!1;r&&this.storedNames.add(this.original.slice(e,t));const a=this.byStart.get(e);for(let e=a;e.end<t;){const t=e.next;if(null===t||t!==this.byStart.get(e.end))throw new E("cannot overwrite across a split point");e=t}for(let n=a.next;null!==n&&n.start<t;n=n.next)n.edit("",!1,!o),n.replacesUntil=-1,n.replacedFrom=e;return a.edit(n,r,!o),a.replacesUntil=t,a.replacedFrom=-1,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._resolveIndex(e))<0||e>this.original.length)throw new E(`index ${e} is out of bounds`);if("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._resolveIndex(e))<0||e>this.original.length)throw new E(`index ${e} is out of bounds`);if("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._resolveIndex(e))===(t=this._resolveIndex(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.start>e&&(n.intro=""),n.end<t&&(n.outro=""),n.edit("",!1,!0),n.replacesUntil=-1,n.replacedFrom=-1,n=t>n.end?this.byStart.get(n.end):void 0;return this}reset(e,t){if((e=this._resolveIndex(e))===(t=this._resolveIndex(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):void 0;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(M);if(-1!==e)return this.outro.slice(e+1);let t=this.outro,n=this.lastChunk;for(;n;){if(n.outro.length>0){if(e=n.outro.lastIndexOf(M),-1!==e)return n.outro.slice(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(M),-1!==e)return n.content.slice(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(M),-1!==e)return n.intro.slice(e+1)+t;t=n.intro+t}n=n.previous}return e=this.intro.lastIndexOf(M),-1!==e?this.intro.slice(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){e=this._resolveIndex(e),t=this._resolveIndex(t);let n,s="";if(this.hasMovedChunks)for(n=this.firstChunk;n&&(n.start>e||n.end<=e);){if(n.start<t&&n.end>=t||0===t&&0===n.start)return s;n=n.next}else{if(e>=t)return s;n=this._chunkAt(e)}if(n&&n.edited&&n.start!==e)throw new E(`cannot use edited character ${e} as slice start anchor`);const i=n;for(;n&&(0!==t||0!==n.start);){!n.intro||i===n&&n.start!==e||(s+=n.intro);const r=n.start<t&&n.end>=t;if(r&&n.edited&&n.end!==t)throw new E(`cannot use edited character ${t} as slice end anchor`);const o=i===n?e-n.start:0,a=r?n.content.length+t-n.end:n.content.length;if(s+=n.content.slice(o,a),!n.outro||r&&n.end!==t||(s+=n.outro),r)break;n=n.next}return s}snip(e,t){const n=this.clone();return n.remove(-n.offset,e),n.remove(t,n.original.length-n.offset),n}_resolveIndex(e){const t=e+this.offset;if(!Number.isInteger(t))throw new E(`index must be an integer, got ${e}`);return t<0&&0!==this.original.length?Math.max(0,t+this.original.length):t}_chunkAt(e){let t=this.byStart.get(e);if(t)return t;t=this.lastSearchedChunk;const n=e>=t.end;for(;t&&!t.contains(e);)t=n?this.byStart.get(t.end):this.byEnd.get(t.start);return t&&(this.lastSearchedChunk=t),t}_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=v(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){const e=n.next;this.lastChunk===n&&(this.lastChunk=e),this.byEnd.set(n.end,n),this.byStart.set(e.start,e),this.byEnd.set(e.end,e)}if(s)return!0;n=n.previous}while(n);return this.intro=this.intro.replace(t,""),this.intro.length>0}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){const e=n.next;n===this.lastChunk&&(this.lastChunk=e),this.byEnd.set(n.end,n),this.byStart.set(e.start,e),this.byEnd.set(e.end,e)}if(s)return!0;n=n.next}while(n);return this.outro=this.outro.replace(t,""),this.outro.length>0}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}_hasRemovedContent(e,t){const n=this.byStart.get(e);if(n&&e===t){const t=this.byEnd.get(e);return!!t&&""===t.content&&""===n.content}let s=this._chunkAt(e);for(;s&&s.start<t;){if(""===s.content&&(s.replacedFrom<e||this.byStart.get(s.replacedFrom).replacesUntil<s.end))return!0;s=this.byStart.get(s.end)}return!1}_replaceRegexp(e,t){function n(e,n,s){return"string"==typeof t?z(t,e[0],n,s,e.slice(1),e.groups):void 0===e.groups?t(e[0],...e.slice(1),n,s):t(e[0],...e.slice(1),n,s,e.groups)}const s=e=>{if(null==e.index)return!1;if(this._hasRemovedContent(e.index,e.index+e[0].length))return!1;const t=n(e,e.index,this.original);return t===e[0]||(0===e[0].length?this.appendRight(e.index-this.offset,t):this.overwrite(e.index-this.offset,e.index+e[0].length-this.offset,t)),!0};if(e.global){e.lastIndex=0;for(const t of this.original.matchAll(e))s(t)}else{const t=this.original.match(e);if(t&&!s(t)){const t=new RegExp(e.source,`${e.flags}g`);for(const e of this.original.matchAll(t))if(s(e))break}}return this}_replaceString(e,t){const{original:n}=this;let s=n.indexOf(e);for(;-1!==s;){if(!this._hasRemovedContent(s,s+e.length)){e!==(t="function"==typeof t?t(e,s,n):z(t,e,s,n,[],void 0))&&(0===e.length?this.appendRight(s-this.offset,t):this.overwrite(s-this.offset,s+e.length-this.offset,t));break}s=n.indexOf(e,s+e.length)}return 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){if(this._hasRemovedContent(e,e))continue;const s="function"==typeof t?t("",e,n):z(t,"",e,n,[],void 0);""!==s&&this.appendRight(e-this.offset,s)}return this}for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s)){if(this._hasRemovedContent(i,i+s))continue;const e=n.slice(i,i+s),r="function"==typeof t?t(e,i,n):z(t,e,i,n,[],void 0);e!==r&&this.overwrite(i-this.offset,i+s-this.offset,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 V=Object.prototype.hasOwnProperty;var F=class e{constructor(e={}){this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename=new Map}addSource(e){if(e instanceof B)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");const t=e.content,n={content:t,filename:V.call(e,"filename")?e.filename:t.filename,ignoreList:V.call(e,"ignoreList")?e.ignoreList:t.ignoreList,indentExclusionRanges:V.call(e,"indentExclusionRanges")?e.indentExclusionRanges:t.indentExclusionRanges,separator:e.separator??this.separator};if(n.filename){const e=this.uniqueSourceIndexByFilename.get(n.filename);if(void 0===e)this.uniqueSourceIndexByFilename.set(n.filename,this.uniqueSources.length),this.uniqueSources.push({filename:n.filename,content:t.original});else if(t.original!==this.uniqueSources[e].content)throw new E(`duplicate filename "${n.filename}" with different content, use unique filenames`)}return this.sources.push(n),this}append(e,t){return this.addSource({content:new B(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}toMagicString(){const e=new B(this.sources.map(e=>e.content.original).join(""));let t=0,n=this.intro,s=null,i=null;const r=new Map,o=new Map;let a=!1;for(const[l,c]of this.sources.entries()){const u=c.content,d=l>0?c.separator:"";if(0===u.original.length){n+=d+u.toString();continue}n+=d+u.intro;let h=null,p=null,f=u.firstChunk;for(;f;){const e=f.clone();e.start+=t,e.end+=t,-1!==e.replacesUntil&&(e.replacesUntil+=t),-1!==e.replacedFrom&&(e.replacedFrom+=t),e.previous=p,e.next=null,p&&(p.next=e),r.set(e.start,e),o.set(e.end,e),h??=e,p=e,f=f.next}const m=p;h.intro=n+h.intro,n="",m.outro+=u.outro,i?(i.next=h,h.previous=i):s=h,i=m,u.sourcemapLocations.forEach(n=>{n<u.original.length&&e.sourcemapLocations.add(n+t)}),u.storedNames.forEach(t=>e.storedNames.add(t)),u.hasMovedChunks&&(a=!0),t+=u.original.length}return s&&i?(n&&(i.outro+=n),e.firstChunk=s,e.lastChunk=i,e.lastSearchedChunk=s,e.byStart=r,e.byEnd=o,e.hasMovedChunks=a,e):(e.intro=n,e)}generateDecodedMap(e={}){const t=new D(e.hires),{names:n,x_google_ignoreList:s}=this._generateMappings(t);return{...this._mapProperties(e,n,s),mappings:t.raw,rangeMappings:t.rawRangeMappings}}generateMap(e={}){const t=new R,n=new D(e.hires,t),{names:s,x_google_ignoreList:i}=this._generateMappings(n);return new S({...this._mapProperties(e,s,i),mappings:t.finish(n.rawSegments),rangeMappings:n.rawRangeMappings})}_generateMappings(e){let t;const n=new Set;this.sources.forEach(e=>e.content.storedNames.forEach(e=>n.add(e)));const s=[...n],i=new Map(s.map((e,t)=>[e,t]));return this.intro&&e.advance(this.intro),this.sources.forEach((n,s)=>{s>0&&e.advance(n.separator);const r=n.filename?this.uniqueSourceIndexByFilename.get(n.filename)??-1:-1;e.addMagicString(n.content,r,i),n.ignoreList&&-1!==r&&(void 0===t&&(t=[]),t.push(r))}),{names:s,x_google_ignoreList:t}}_mapProperties(e,t,n){return{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(t=>e.file?$(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,x_google_ignoreList:n}}getIndentString(){const e=new Map;return this.sources.forEach(t=>{const n=t.content._getRawIndentString();null!=n&&e.set(n,(e.get(n)??0)+1)}),[...e.entries()].sort(([,e],[,t])=>t-e)[0]?.[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=t||s>0&&/\r?\n$/.test(n.separator);n.content.indent(e,{exclude:n.indentExclusionRanges,indentStart:i}),t="\n"===n.content.lastChar()}),this.intro&&(this.intro=e+this.intro.replace(/^[^\r\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)=>(t>0?e.separator:"")+e.content.toString()).join("");return this.intro+e}isEmpty(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some((e,t)=>t>0&&""!==e.separator.trim()||!e.content.isEmpty())}length(){return this.sources.reduce((e,t,n)=>e+(n>0?t.separator.length:0)+t.content.length()+t.content.intro.length+t.content.outro.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=s.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=s.separator.replace(t,""),s.separator))return this}return this.intro=this.intro.replace(t,""),this}};const j=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,U=/^\.?\.\//,G=/\\/g,H=/[/\\]/,W=/^[A-Za-z]:$/,K=/[/\\]+$/;function q(e){return j.test(e)}function X(e){return U.test(e)}function J(e){return e.replace(G,"/")}function Y(e){return e.replace(K,"").split(H).pop()||""}function Z(e){const t=e.replace(K,""),n=/[/\\][^/\\]*$/.exec(t);if(n){return t.slice(0,-n[0].length)||"/"}return""===t?e?"/":".":e!==t&&W.test(t)?t:"."}function Q(e){const t=Y(e);if("."===t||".."===t)return"";const n=t.lastIndexOf(".");return n>0?t.slice(n):""}function ee(e,t){const n=[],s=W.test(e[0])?1:0;for(const i of e)".."===i?n.length>s&&".."!==n[n.length-1]?n.pop():t||0!==s||n.push(".."):"."!==i&&""!==i&&n.push(i);return n}function te(e,t){const n=ee(e.split(H),q(e)),s=ee(t.split(H),q(t));for(;n[0]&&s[0]&&n[0]===s[0];)n.shift(),s.shift();for(;n.pop();)s.unshift("..");return s.join("/")}function ne(...e){let t=[],n=!1;for(const s of e)q(s)?(t=s.split(H),n=!0):t.push(...s.split(H));const s=ee(t,n).join("/");return n?/^[A-Za-z]:/.test(s)?s:"/"+s:s||"/"}function se(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}const ie=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"]);const re=e=>"*"===e[0]?`*${e}`:e,oe=e=>e.startsWith("**")?e.slice(1):e,ae=e=>"*"===e[0]&&"*"!==e[1],le=e=>"*"===e[0]||"\0"===e[0]?`*\0${e}`:`*${e}`,ce=e=>e.slice("\0"===e[1]?2:1);function ue(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const de={isNoStatement:!0};function he(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 pe=/\S/g;function fe(e,t){pe.lastIndex=t;return pe.exec(e).index}const me=/\s/;function ge(e,t){return t>0&&13===e.charCodeAt(t-1)?t-1:t}function ye(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[ge(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 be(e,t,n,s,i){let r,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=n+ye(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+ye(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):ue(r,t,o,l)):r.render(t,i)}function Ee(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+he(t.original.slice(r.end,s.start),",")),o=a=c+1+ye(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 xe(e,t,n){for(;;){const[s,i]=ye(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}const Ae="ArrowFunctionExpression",Se="BlockStatement",ve="CallExpression",$e="ExportDefaultDeclaration",Pe="ExpressionStatement",we="Identifier",Ie="Program",Ne="Property",Ce="RestElement",ke="StaticBlock";function Re(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(oe(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([oe(e),s.getName(i)+r]);return`exports(${s(n,{lineBreakIndent:null})})`}}function Oe(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(oe(i.get(e)[0]))},${r}`),s.appendLeft(n,")")}function De(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${Re([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}function Me(e,t,n,s){const i=[];if(e.addExportedVariables(i,s.exportNamesByVariable),0===i.length)return;const{_:r,getPropertyAccess:o}=s.snippets,a=`${Re(i,s)};`;"EmptyStatement"===t.type?n.overwrite(t.start,t.end,a):t.type!==Se||function(e,t,n){const s=new Set(["exports"]);for(const e of t)s.add(e.getName(n));for(const t of e.variables.values())if(t.included&&s.has(t.getName(n)))return!0;return!1}(t.scope,i,o)?(n.prependRight(t.start,`{${r}${a}${r}`),n.appendLeft(t.end,`${r}}`)):n.prependRight(t.start+1,`${r}${a}`)}const _e=Object.freeze(Object.create(null)),Le=Object.freeze({}),Te=Object.freeze([]),ze=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function Be(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function Ve(){return new Set}function Fe(){return[]}const je=Symbol("Unknown Key"),Ue=Symbol("Unknown Non-Accessor Key"),Ge=Symbol("Unknown Integer"),He=Symbol("Unknown Well-Known"),We=Symbol("Symbol.toStringTag"),Ke=Symbol("Symbol.dispose"),qe=Symbol("Symbol.asyncDispose"),Xe=Symbol("Symbol.hasInstance"),Je=new Set([We,Ke,qe,Xe]),Ye=e=>Je.has(e)||e===He,Ze=new Set([Xe,Ke,qe]),Qe=e=>"string"==typeof e||Je.has(e),et=[],tt=[je],nt=[Ue],st=[Ge],it=[Xe],rt=Symbol("Entities");class ot{constructor(){this.entityPaths=Object.create(null,{[rt]:{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,{[rt]:{value:new Set}});return t[rt]}}const at=new ot;class lt{constructor(){this.entityPaths=Object.create(null,{[rt]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]||=Object.create(null,{[rt]:{value:new Map}});const i=Be(s[rt],t,Ve);return!!i.has(n)||(i.add(n),!1)}}const ct=Object.freeze({[je]:Le});class ut{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[je])return!0;if(!Qe(r))return n[s]=ct,!1;n=i,s=r,i=i[r]||=(t=!1,Object.create(null))}return t}includeAllPaths(e,t,n){this.includedPaths&&dt(e,t,n,this.includedPaths)}}function dt(e,t,n,s){if(s[je])return void e.includePath([...n,je],t);const i=Reflect.ownKeys(s);if(0!==i.length)for(const r of i)dt(e,t,[...n,r],s[r]);else e.includePath(n,t)}const ht=Object.freeze({[je]:!0});class pt{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0;const n=this.includedPaths||=(t=!1,Object.create(null));if(n[je])return!0;const[s,i]=e;return s?Qe(s)?i?n[s]===je||(n[s]=je,!1):!!n[s]||(n[s]=!0,!1):(this.includedPaths=ht,!1):t}includeAllPaths(e,t,n){const{includedPaths:s}=this;if(s)if(s[je])e.includePath([...n,je],t);else{const i=Reflect.ownKeys(s);if(0===i.length)e.includePath(n,t);else for(const r of i)e.includePath(s[r]===je?[...n,r,je]:[...n,r],t)}}}function ft(e,t){if("MemberExpression"===e.type)return!e.computed&&ft(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 mt(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function gt(){return{accessed:new ot,assigned:new ot,brokenFlow:!1,called:new lt,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new lt,replacedVariableInits:new Map}}function yt(e,t){return 0!==(e&t)}function bt(e,t,n){return e&~t|-n&t}const Et=Symbol("Unknown Value"),xt=Symbol("Unknown Truthy Value"),At=Symbol("Unknown Falsy Value");class St{constructor(){this.flags=0}get included(){return yt(this.flags,1)}set included(e){this.flags=bt(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){Pt(e)}deoptimizePath(e){}getKnownFunctionAtPath(e,t,n){return null}getLiteralValueAtPath(e,t,n){return Et}getReturnExpressionWhenCalledAtPath(e,t,n,s){return $t}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)}includeCallArgumentsWhenCalledAtPath(e,t,n){wt(t,n)}shouldBeIncluded(e){return!0}}const vt=new class extends St{},$t=[vt,!1],Pt=e=>{for(const t of e.args)t?.deoptimizePath(tt)},wt=(e,t)=>{e.args[0]?.includePath(tt,t),It(e,t)},It=({args:e},t)=>{for(let n=1;n<e.length;n++){const s=e[n];s&&(s.includePath(tt,t),s.include(t,!1))}},Nt={args:[null],type:0},Ct={args:[null,vt],type:1},kt={args:[null],type:2,withNew:!1};function Rt(e,t){return e.start<=t&&t<e.end}function Ot(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(Rt(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 Dt(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}const Mt="...";function _t(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(Dt(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=Dt(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${Mt}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+Dt(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`}).join("\n")}const Lt="silent",Tt="warn",zt="info",Bt="debug",Vt={[Bt]:0,[zt]:1,[Lt]:3,[Tt]:2};function Ft(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 jt(e){const t=Y(e);return t.slice(0,Math.max(0,t.length-Q(e).length))}function Ut(e){const t=jt(e);if("index"!==t)return t;const n=Y(Z(e));return Ht(n+"/")?t:n}function Gt(e){return q(e)?te(ne(),e):e}function Ht(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||q(e)}const Wt=/^(\.\.\/)*\.\.$/;function Kt(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=J(te(Z(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+Y(t);if(Wt.test(i))return[...i.split("/"),"..",Y(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function qt(e){return`https://rollupjs.org/${e}`}const Xt="troubleshooting/#error-name-is-not-exported-by-module",Jt="configuration-options/#jsx",Yt="configuration-options/#output-amd-id",Zt="configuration-options/#output-dir",Qt="configuration-options/#output-exports",en="configuration-options/#output-format",tn="configuration-options/#output-inlinedynamicimports",nn="configuration-options/#output-interop",sn="configuration-options/#output-manualchunks",rn="configuration-options/#output-name",on="configuration-options/#output-sourcemapfile",an="es-module-syntax/#source-phase-import",ln="plugin-development/#generatebundle";function cn(e){throw e instanceof Error?e:un(e)}function un(e){fn(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function dn(e,t,n){fn(e),fn(t);const s="buildEnd"===n?"the build":"rendering";return{...e,message:`There was an error during ${s}:\n ${e.message}\nAdditionally, handling the error in the '${n}' hook caused the following error:\n ${t.message}`}}function hn(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=Ot(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=_t(n,t,s)}}const pn=Symbol("augmented");function fn(e){if(!e.plugin&&!e.loc||e[pn])return;e[pn]=!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+=`${Gt(n)}${s}: `}const s=e.message;e.message=t+e.message,zn(e,s)}const mn="INVALID_EXPORT_OPTION",gn="INVALID_IMPORT_ATTRIBUTE",yn="INVALID_PLUGIN_HOOK",bn="MISSING_EXPORT",En="MISSING_IMPLICIT_DEPENDANT",xn="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",An="PARSE_ERROR",Sn="SOURCEMAP_BROKEN",vn="UNEXPECTED_NAMED_IMPORT",$n="UNRESOLVED_ENTRY",Pn="UNRESOLVED_IMPORT";function wn(e){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${e}" - no asset source set.`}}function In(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function Nn({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return hn(i,n,t,e),i}function Cn(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(Gt).join(" -> ")}`}}function kn(e,t,n,s,i){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:t,id:s,message:`Export "${e}" of module "${Gt(t)}" was reexported through module "${Gt(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 "${Gt(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 Rn(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 On(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${Gt(t)} is at (${n}:${s})\n${_t(e,n,s)}`}}function Dn(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${Gt(t)}".`}}function Mn(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${Gt(s)}" tried to import "${Gt(n)}" with ${_n(t)} attributes, but it was already imported elsewhere with ${_n(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const _n=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map(([e,t])=>`"${e}": "${t}"`).join(", ")};function Ln(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${Gt(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:qt("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function Tn(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 zn(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function Bn(e,t,n){return{code:mn,message:`"${e}" was specified for "output.exports", but entry module "${Gt(n)}" has the following exports: ${Ft(t)}`,url:qt(Qt)}}function Vn(e){return{code:gn,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${Gt(e)}". Import attributes need to have string keys and values.`}}function Fn(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:qt(t)}}function jn(e,t){return{binding:e,code:bn,exporter:t,message:`Exported variable "${e}" is not defined in "${Gt(t)}".`,url:qt(Xt)}}function Un(e,t,n,s){const i={binding:e,code:bn,exporter:n,id:t,url:qt(Xt)};if(s)return{...i,message:`Exported variable "${e}" is not defined in "${Gt(n)}", but it is imported by "${Gt(t)}".`};const r=".json"===Q(n);return{...i,message:`"${e}" is not exported by "${Gt(n)}", imported by "${Gt(t)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function Gn(e){const t=[...e.implicitlyLoadedBefore].map(e=>Gt(e.id)).sort();return{code:En,message:`Module "${Gt(e.id)}" that should be implicitly loaded before ${Ft(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 Hn(e,t){return{code:"NON_EXTERNAL_SOURCE_PHASE_IMPORT",message:`Source phase import "${e}" in "${Gt(t)}" must be external. Source phase imports are only supported for external modules. Use the "external" option to mark this module as external.`,url:qt(an)}}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 Kn(e,t){return{code:An,message:e,pos:t}}function qn(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function Xn(e){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${e}"`}}function Jn(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)"),zn({cause:e,code:An,id:t,message:n,stack:e.stack},e.message)}function Yn(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 Zn(e){return{code:Sn,message:`Multiple conflicting contents for sourcemap source ${e}`}}function Qn(e,t,n){const s=n?"reexport":"import";return{code:vn,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${Gt(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:qt(nn)}}function es(e){return{code:vn,exporter:e,message:`There was a namespace "*" reexport from the external module "${Gt(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:qt(nn)}}function ts(e){return{code:"VALIDATION_ERROR",message:e}}function ns(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:qt(t)}}(e,t);if(i)return cn(n);s(Tt,n)}}(e,t,n,s.onLog,s.strictDeprecations)}const ss=Symbol("PureFunction");class is extends St{markReassigned(){this.isReassigned=!0}markTargetOfAssignment(){this.isTargetOfAssignment=!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.isTargetOfAssignment=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===ve&&e.parent.callee===e||e.parent.type===$e||(this.onlyFunctionCallUsed=!1)}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.getNamingVariable()?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,t){if(this.globalName)return this.globalName;if(t?.(this))return this.name;const n=this.getNamingVariable();if(n)return n.getName(e,t);const s=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(s)}`:s}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}getHoistedVariable(){return this.renderedLikeHoisted}getNamingVariable(){return null===this.renderedLikeHoisted?.renderBaseName?this.renderedLikeHoisted:void 0}markCalledFromTryStatement(){}addReassignedValue(e){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}const rs="*source";class os extends is{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t,this.isSourcePhase=t===rs}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 as(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 ls=/[^\w$]/g,cs=/[^\w$]/,us=e=>(e=>/\d/.test(e[0]))(e)||ie.has(e)||"arguments"===e;function ds(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(ls,"_"),us(e)&&(e=`_${e}`),e||"_"}const hs=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,ps=/^(?:0|[1-9]\d*)$/;function fs(e){return hs.test(e)?"__proto__"===e?'["__proto__"]':e:ps.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}class ms{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=ds(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:Te,dynamicallyImportedIds:Te,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:Te,implicitlyLoadedBefore:Te,importedIdResolutions:Te,importedIds:Te,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,safeVariableNames:null,syntheticNamedExports:!1}}cacheInfoGetters(){as(this.info,["dynamicImporters","importers"])}getVariableForExportName(e,{importChain:t}){const n=this.declarations.get(e);for(const n of t)Be(this.importersByExportedName,e,Ve).add(n);if(n)return[n];const s=new os(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(Tt,(s=this.id,i=e.map(oe),{code:"UNUSED_EXTERNAL_IMPORT",exporter:s,ids:r=n,message:`${Ft(i,["is","are"])} imported from external module "${s}" but never used in ${Ft(r.map(e=>Gt(e)))}.`,names:i}))}}function gs(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 ms||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const ys=()=>{};var bs=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using","source","defer"];const Es="_rollupAnnotations",xs="_rollupRemoved",As=(e,t)=>{if(0===e)return Te;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++)s[i]=Ss(t[e++],t);return s},Ss=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:bs[t[e]]}},vs={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"]},$s="variables",Ps=Symbol("IS_SKIPPED_CHAIN");class ws extends St{get deoptimized(){return yt(this.flags,2)}set deoptimized(e){this.flags=bt(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 vs[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 vs[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(et,this.assignmentInteraction,e)}include(e,t,n){this.included||this.includeNode(e);for(const n of vs[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 vs[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n))for(const t of n)t?.includePath(tt,e);else n.includePath(tt,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===Es?this.annotations=n:t===xs&&(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 vs[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 vs[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(gt())}applyDeoptimizations(){this.deoptimized=!0;for(const e of vs[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(tt);else t.deoptimizePath(tt)}this.scope.context.requestTreeshakingPass()}}function Is(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function Ns(){this.included=!0}function Cs(){this.deoptimized=!0}function ks(e){return e instanceof ws&&e.type===Ae}function Rs(e){return e instanceof ws&&"FunctionExpression"===e.type}function Os(e){return e instanceof ws&&e.type===ve}function Ds(e){return e instanceof ws&&"MemberExpression"===e.type}function Ms(e){return e instanceof ws&&e.type===we}function _s(e){return e instanceof ws&&e.type===Pe}function Ls(e,t=null){return Object.create(t,e)}const Ts=new class extends St{getLiteralValueAtPath(e){return e.length>0?Et:void 0}},zs={value:{hasEffectsWhenCalled:null,returns:vt}},Bs=new class extends St{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Zs(Ks,e[0]):$t}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Ys(Ks,e[0],t,n)}},Vs={value:{hasEffectsWhenCalled:null,returns:Bs}},Fs=new class extends St{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Zs(qs,e[0]):$t}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Ys(qs,e[0],t,n)}},js={value:{hasEffectsWhenCalled:null,returns:Fs}},Us=new class extends St{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Zs(Js,e[0]):$t}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Ys(Js,e[0],t,n)}},Gs={value:{hasEffectsWhenCalled:null,returns:Us}},Hs={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(et,at,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(et,kt,t)},returns:Us}},Ws=Ls({hasOwnProperty:Vs,isPrototypeOf:Vs,propertyIsEnumerable:Vs,toLocaleString:Gs,toString:Gs,valueOf:zs}),Ks=Ls({valueOf:Vs},Ws),qs=Ls({toExponential:Gs,toFixed:Gs,toLocaleString:Gs,toPrecision:Gs,valueOf:js},Ws),Xs=Ls({exec:zs,test:Vs},Ws),Js=Ls({anchor:Gs,at:zs,big:Gs,blink:Gs,bold:Gs,charAt:Gs,charCodeAt:js,codePointAt:zs,concat:Gs,endsWith:Vs,fixed:Gs,fontcolor:Gs,fontsize:Gs,includes:Vs,indexOf:js,italics:Gs,lastIndexOf:js,link:Gs,localeCompare:js,match:zs,matchAll:zs,normalize:Gs,padEnd:Gs,padStart:Gs,repeat:Gs,replace:Hs,replaceAll:Hs,search:js,slice:Gs,small:Gs,split:zs,startsWith:Vs,strike:Gs,sub:Gs,substr:Gs,substring:Gs,sup:Gs,toLocaleLowerCase:Gs,toLocaleUpperCase:Gs,toLowerCase:Gs,toString:Gs,toUpperCase:Gs,trim:Gs,trimEnd:Gs,trimLeft:Gs,trimRight:Gs,trimStart:Gs,valueOf:Gs},Ws);function Ys(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function Zs(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:$t}class Qs extends St{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(st),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(tt)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?$t:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||vt: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(st,Ct,s))return!0;if(this.description.callsArgs)for(const e of this.description.callsArgs)if(t[e+1]?.hasEffectsOnInteractionAtPath(et,kt,s))return!0}return!1}}const ei=[new Qs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Bs})],ti=[new Qs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Us})],ni=[new Qs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Fs})],si=[new Qs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:vt})],ii=/^\d+$/;class ri extends St{get hasLostTrack(){return yt(this.flags,2048)}set hasLostTrack(e){this.flags=bt(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return yt(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=bt(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return yt(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=bt(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(tt);this.prototypeExpression?.deoptimizePath([je,je]),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||Qe(s)&&this.deoptimizedPaths.get(s)))return void Pt(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(Qe(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&&ii.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&&ii.test(e))for(const e of t)e.deoptimizePath(tt);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===Ge)return this.deoptimizeIntegerProperties();if(!Qe(t))return this.deoptimizeAllProperties(t===Ue);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?tt:e.slice(1);for(const e of Qe(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],je]:e)}getKnownFunctionAtPath(e,t,n){const s=e[0];if(!Qe(s)||this.settersByKey.has(s)||this.unmatchableSetters.length>0)return null;const i=this.getMemberExpressionAndTrackDeopt(s,n);return i?i.getKnownFunctionAtPath(e.slice(1),t,n):this.prototypeExpression?.getKnownFunctionAtPath(e,t,n)||null}getLiteralValueAtPath(e,t,n){if(0===e.length)return Et;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?Et:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return $t;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):$t}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===Ue)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(Qe(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(tt,t);if(0===e.length)return;const[n,...s]=e,[i,r]=Qe(n)?[new Set([...this.propertiesAndGettersByKey.get(n)||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey.get(n)||this.unmatchablePropertiesAndSetters]),s]:[this.allProperties,tt];for(const e of i)e.includePath(r,t);this.prototypeExpression?.includePath(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){const[s,...i]=e;if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!Qe(s)||this.deoptimizedPaths.get(s)||"string"==typeof s&&ii.test(s)&&this.hasUnknownDeoptimizedInteger)return void wt(t,n);const r=this.propertiesAndGettersByKey.get(s);if(void 0===r)this.unmatchablePropertiesAndGetters.length>0||"string"==typeof s&&ii.test(s)&&this.unknownIntegerProps.length>0||!this.prototypeExpression?wt(t,n):this.prototypeExpression.includeCallArgumentsWhenCalledAtPath(e,t,n);else{t.args[0]?.includePath(tt,n);for(const e of r)e.includeCallArgumentsWhenCalledAtPath(i,t,n)}}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),!Ye(p)||Ze.has(p)||(n.add(m),p!==He))if(Qe(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===Ge){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(tt)}deoptimizeCachedIntegerEntities(){for(const[e,t]of this.expressionsToBeDeoptimizedByKey.entries())if("string"==typeof e&&ii.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(st)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!Qe(e)||this.hasUnknownDeoptimizedInteger&&"string"==typeof e&&ii.test(e)||this.deoptimizedPaths.get(e))return vt;const t=this.propertiesAndGettersByKey.get(e);return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&"string"==typeof e&&ii.test(e)?vt:null}getMemberExpressionAndTrackDeopt(e,t){if(!Qe(e))return vt;const n=this.getMemberExpression(e);if(n!==vt&&!this.immutable){let n=this.expressionsToBeDeoptimizedByKey.get(e);n||this.expressionsToBeDeoptimizedByKey.set(e,n=[]),n.push(t)}return n}}const oi=e=>e===Ke||e===qe||"string"==typeof e&&/^\d+$/.test(e),ai=new class extends St{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||oi(t[0])||Pt(e)}getLiteralValueAtPath(e){return 1===e.length&&oi(e[0])?void 0:Et}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},li=new ri(new Map([["hasOwnProperty",ei],["isPrototypeOf",ei],["propertyIsEnumerable",ei],["toLocaleString",ti],["toString",ti],["valueOf",si]]),ai,!0),ci=new ri([{key:Ke,kind:"init",property:vt}],li,!0),ui=new ri([{key:qe,kind:"init",property:vt}],li,!0),di=[{key:Ge,kind:"init",property:vt},{key:"length",kind:"init",property:Fs}],hi=[new Qs({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Bs})],pi=[new Qs({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Fs})],fi=[new Qs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new ri(di,vi),returnsPrimitive:null})],mi=[new Qs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new ri(di,vi),returnsPrimitive:null})],gi=[new Qs({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new ri(di,vi),returnsPrimitive:null})],yi=[new Qs({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Fs})],bi=[new Qs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:vt})],Ei=[new Qs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:vt})],xi=[new Qs({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:vt})],Ai=[new Qs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Si=[new Qs({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],vi=new ri(new Map([["at",Ei],["concat",mi],["copyWithin",Ai],["entries",mi],["every",hi],["fill",Ai],["filter",gi],["find",xi],["findIndex",pi],["findLast",xi],["findLastIndex",pi],["flat",mi],["flatMap",gi],["forEach",xi],["includes",ei],["indexOf",ni],["join",ti],["keys",si],["lastIndexOf",ni],["map",gi],["pop",bi],["push",yi],["reduce",xi],["reduceRight",xi],["reverse",Ai],["shift",bi],["slice",mi],["some",hi],["sort",Si],["splice",fi],["toLocaleString",ti],["toString",ti],["unshift",yi],["values",Ei]]),li,!0);class $i extends ws{deoptimizeArgumentsOnInteractionAtPath(e,t,n){(t.length>0||2===e.type)&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,tt,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(tt,Nt,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(tt,e)}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([je,je]),this.scope.context.requestTreeshakingPass()}}class Pi extends ws{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){const t=this.getObjectEntity();t.deoptimizePath(e),1===e.length&&"length"===e[0]&&t.deoptimizePath(st)}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(tt,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 $i)&&(e=!0,n.deoptimizePath(tt))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:Fs}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof $i?s&&(t=!0,e.unshift({key:Ge,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:Ts})}return this.objectEntity=new ri(e,vi)}}const wi=Symbol("Value Properties"),Ii=()=>Et,Ni=()=>!1,Ci=()=>!0,ki=e=>({__proto__:null,[wi]:{deoptimizeArgumentsOnCall:ys,getLiteralValue:()=>e,hasEffectsWhenCalled:Ci}}),Ri={deoptimizeArgumentsOnCall:ys,getLiteralValue:Ii,hasEffectsWhenCalled:Ni},Oi={deoptimizeArgumentsOnCall:ys,getLiteralValue:Ii,hasEffectsWhenCalled:Ci},Di={deoptimizeArgumentsOnCall:ys,getLiteralValue:Ii,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof Pi)},Mi={deoptimizeArgumentsOnCall:ys,getLiteralValue:Ii,hasEffectsWhenCalled({args:e}){const[t,n]=e;return void 0!==n&&!(n instanceof Pi)&&"number"!=typeof n.getLiteralValueAtPath(et,at,{deoptimizeCache:ys})}},_i={deoptimizeArgumentsOnCall:ys,getLiteralValue:Ii,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof St)||s.hasEffectsOnInteractionAtPath(tt,Nt,t)}},Li={__proto__:null,[wi]:Oi},Ti={__proto__:null,[wi]:Ri},zi={__proto__:null,[wi]:_i},Bi={__proto__:null,[wi]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(tt)},getLiteralValue:Ii,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(nt,Ct,t)}},Vi={__proto__:null,[wi]:Oi,prototype:Li},Fi={__proto__:null,[wi]:Ri,prototype:Li},ji={__proto__:null,[wi]:Di,prototype:Li},Ui={__proto__:null,[wi]:Mi,from:Li,of:Ti,prototype:Li},Gi={__proto__:null,[wi]:Ri,supportedLocalesOf:Fi},Hi={deoptimizeArgumentsOnCall:ys,getLiteralValue:()=>He,hasEffectsWhenCalled:Ci},Wi={global:Li,globalThis:Li,self:Li,window:Li,__proto__:null,[wi]:Oi,Array:{__proto__:null,[wi]:Oi,from:Li,isArray:Ti,of:Ti,prototype:Li},ArrayBuffer:{__proto__:null,[wi]:Ri,isView:Ti,prototype:Li},AggregateError:ji,Atomics:Li,BigInt:Vi,BigInt64Array:Vi,BigUint64Array:Vi,Boolean:Fi,constructor:Vi,DataView:Fi,Date:{__proto__:null,[wi]:Ri,now:Ti,parse:Ti,prototype:Li,UTC:Ti},decodeURI:Ti,decodeURIComponent:Ti,encodeURI:Ti,encodeURIComponent:Ti,Error:Fi,escape:Ti,eval:Li,EvalError:Fi,FinalizationRegistry:Vi,Float32Array:Ui,Float64Array:Ui,Function:Vi,hasOwnProperty:Li,Infinity:Li,Int16Array:Ui,Int32Array:Ui,Int8Array:Ui,isFinite:Ti,isNaN:Ti,isPrototypeOf:Li,JSON:Li,Map:ji,Math:{__proto__:null,[wi]:Oi,abs:Ti,acos:Ti,acosh:Ti,asin:Ti,asinh:Ti,atan:Ti,atan2:Ti,atanh:Ti,cbrt:Ti,ceil:Ti,clz32:Ti,cos:Ti,cosh:Ti,exp:Ti,expm1:Ti,floor:Ti,fround:Ti,hypot:Ti,imul:Ti,log:Ti,log10:Ti,log1p:Ti,log2:Ti,max:Ti,min:Ti,pow:Ti,random:Ti,round:Ti,sign:Ti,sin:Ti,sinh:Ti,sqrt:Ti,tan:Ti,tanh:Ti,trunc:Ti},NaN:Li,Number:{__proto__:null,[wi]:Ri,isFinite:Ti,isInteger:Ti,isNaN:Ti,isSafeInteger:Ti,parseFloat:Ti,parseInt:Ti,prototype:Li},Object:{__proto__:null,[wi]:Ri,create:Ti,defineProperty:Bi,defineProperties:Bi,freeze:Bi,getOwnPropertyDescriptor:Ti,getOwnPropertyDescriptors:Ti,getOwnPropertyNames:Ti,getOwnPropertySymbols:Ti,getPrototypeOf:Ti,hasOwn:Ti,is:Ti,isExtensible:Ti,isFrozen:Ti,isSealed:Ti,keys:Ti,fromEntries:Li,entries:zi,values:zi,prototype:Li},parseFloat:Ti,parseInt:Ti,Promise:{__proto__:null,[wi]:Oi,all:Li,allSettled:Li,any:Li,prototype:Li,race:Li,reject:Li,resolve:Li},propertyIsEnumerable:Li,Proxy:{__proto__:null,[wi]:{deoptimizeArgumentsOnCall:({args:[,e,t]})=>{if((n=t)instanceof ws&&"ObjectExpression"===n.type){const n=t.properties.some(e=>!function(e){return e instanceof ws&&e.type===Ne}(e));if(!n){for(const n of t.properties)n.deoptimizeArgumentsOnInteractionAtPath({args:[null,e],type:2,withNew:!1},et,at);return}}var n;e.deoptimizePath(tt)},getLiteralValue:Ii,hasEffectsWhenCalled:Ci}},RangeError:Fi,ReferenceError:Fi,Reflect:Li,RegExp:Fi,Set:ji,SharedArrayBuffer:Vi,String:{__proto__:null,[wi]:Ri,fromCharCode:Ti,fromCodePoint:Ti,prototype:Li,raw:Ti},Symbol:{__proto__:null,[wi]:Ri,for:Ti,keyFor:Ti,prototype:Li,asyncDispose:ki(qe),dispose:ki(Ke),hasInstance:ki(Xe),toStringTag:ki(We)},SyntaxError:Fi,toLocaleString:Li,toString:Li,TypeError:Fi,Uint16Array:Ui,Uint32Array:Ui,Uint8Array:Ui,Uint8ClampedArray:Ui,unescape:Ti,URIError:Fi,valueOf:Li,WeakMap:ji,WeakRef:Vi,WeakSet:ji,clearInterval:Vi,clearTimeout:Vi,console:{__proto__:null,[wi]:Oi,assert:Vi,clear:Vi,count:Vi,countReset:Vi,debug:Vi,dir:Vi,dirxml:Vi,error:Vi,exception:Vi,group:Vi,groupCollapsed:Vi,groupEnd:Vi,info:Vi,log:Vi,table:Vi,time:Vi,timeEnd:Vi,timeLog:Vi,trace:Vi,warn:Vi},Intl:{__proto__:null,[wi]:Oi,Collator:Gi,DateTimeFormat:Gi,DisplayNames:Gi,ListFormat:Gi,Locale:Gi,NumberFormat:Gi,PluralRules:Gi,RelativeTimeFormat:Gi,Segmenter:Gi},setInterval:Vi,setTimeout:Vi,TextDecoder:Vi,TextEncoder:Vi,URL:{__proto__:null,[wi]:Oi,prototype:Li,canParse:Ti},URLSearchParams:Vi,AbortController:Vi,AbortSignal:Vi,addEventListener:Li,alert:Li,AnalyserNode:Vi,Animation:Vi,AnimationEvent:Vi,applicationCache:Li,ApplicationCache:Vi,ApplicationCacheErrorEvent:Vi,atob:Li,Attr:Vi,Audio:Vi,AudioBuffer:Vi,AudioBufferSourceNode:Vi,AudioContext:Vi,AudioDestinationNode:Vi,AudioListener:Vi,AudioNode:Vi,AudioParam:Vi,AudioProcessingEvent:Vi,AudioScheduledSourceNode:Vi,AudioWorkletNode:Vi,BarProp:Vi,BaseAudioContext:Vi,BatteryManager:Vi,BeforeUnloadEvent:Vi,BiquadFilterNode:Vi,Blob:Vi,BlobEvent:Vi,blur:Li,BroadcastChannel:Vi,btoa:Li,ByteLengthQueuingStrategy:Vi,Cache:Vi,caches:Li,CacheStorage:Vi,cancelAnimationFrame:Li,cancelIdleCallback:Li,CanvasCaptureMediaStreamTrack:Vi,CanvasGradient:Vi,CanvasPattern:Vi,CanvasRenderingContext2D:Vi,ChannelMergerNode:Vi,ChannelSplitterNode:Vi,CharacterData:Vi,clientInformation:Li,ClipboardEvent:Vi,close:Li,closed:Li,CloseEvent:Vi,Comment:Vi,CompositionEvent:Vi,confirm:Li,ConstantSourceNode:Vi,ConvolverNode:Vi,CountQueuingStrategy:Vi,createImageBitmap:Li,Credential:Vi,CredentialsContainer:Vi,crypto:Li,Crypto:Vi,CryptoKey:Vi,CSS:Vi,CSSConditionRule:Vi,CSSFontFaceRule:Vi,CSSGroupingRule:Vi,CSSImportRule:Vi,CSSKeyframeRule:Vi,CSSKeyframesRule:Vi,CSSMediaRule:Vi,CSSNamespaceRule:Vi,CSSPageRule:Vi,CSSRule:Vi,CSSRuleList:Vi,CSSStyleDeclaration:Vi,CSSStyleRule:Vi,CSSStyleSheet:Vi,CSSSupportsRule:Vi,CustomElementRegistry:Vi,customElements:Li,CustomEvent:{__proto__:null,[wi]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:Ii,hasEffectsWhenCalled:Ni},prototype:Li},DataTransfer:Vi,DataTransferItem:Vi,DataTransferItemList:Vi,defaultstatus:Li,defaultStatus:Li,DelayNode:Vi,DeviceMotionEvent:Vi,DeviceOrientationEvent:Vi,devicePixelRatio:Li,dispatchEvent:Li,document:Li,Document:Vi,DocumentFragment:Vi,DocumentType:Vi,DOMError:Vi,DOMException:Vi,DOMImplementation:Vi,DOMMatrix:Vi,DOMMatrixReadOnly:Vi,DOMParser:Vi,DOMPoint:Vi,DOMPointReadOnly:Vi,DOMQuad:Vi,DOMRect:Vi,DOMRectReadOnly:Vi,DOMStringList:Vi,DOMStringMap:Vi,DOMTokenList:Vi,DragEvent:Vi,DynamicsCompressorNode:Vi,Element:Vi,ErrorEvent:Vi,Event:Vi,EventSource:Vi,EventTarget:Vi,external:Li,fetch:Li,File:Vi,FileList:Vi,FileReader:Vi,find:Li,focus:Li,FocusEvent:Vi,FontFace:Vi,FontFaceSetLoadEvent:Vi,FormData:Vi,frames:Li,GainNode:Vi,Gamepad:Vi,GamepadButton:Vi,GamepadEvent:Vi,getComputedStyle:Li,getSelection:Li,HashChangeEvent:Vi,Headers:Vi,history:Li,History:Vi,HTMLAllCollection:Vi,HTMLAnchorElement:Vi,HTMLAreaElement:Vi,HTMLAudioElement:Vi,HTMLBaseElement:Vi,HTMLBodyElement:Vi,HTMLBRElement:Vi,HTMLButtonElement:Vi,HTMLCanvasElement:Vi,HTMLCollection:Vi,HTMLContentElement:Vi,HTMLDataElement:Vi,HTMLDataListElement:Vi,HTMLDetailsElement:Vi,HTMLDialogElement:Vi,HTMLDirectoryElement:Vi,HTMLDivElement:Vi,HTMLDListElement:Vi,HTMLDocument:Vi,HTMLElement:Vi,HTMLEmbedElement:Vi,HTMLFieldSetElement:Vi,HTMLFontElement:Vi,HTMLFormControlsCollection:Vi,HTMLFormElement:Vi,HTMLFrameElement:Vi,HTMLFrameSetElement:Vi,HTMLHeadElement:Vi,HTMLHeadingElement:Vi,HTMLHRElement:Vi,HTMLHtmlElement:Vi,HTMLIFrameElement:Vi,HTMLImageElement:Vi,HTMLInputElement:Vi,HTMLLabelElement:Vi,HTMLLegendElement:Vi,HTMLLIElement:Vi,HTMLLinkElement:Vi,HTMLMapElement:Vi,HTMLMarqueeElement:Vi,HTMLMediaElement:Vi,HTMLMenuElement:Vi,HTMLMetaElement:Vi,HTMLMeterElement:Vi,HTMLModElement:Vi,HTMLObjectElement:Vi,HTMLOListElement:Vi,HTMLOptGroupElement:Vi,HTMLOptionElement:Vi,HTMLOptionsCollection:Vi,HTMLOutputElement:Vi,HTMLParagraphElement:Vi,HTMLParamElement:Vi,HTMLPictureElement:Vi,HTMLPreElement:Vi,HTMLProgressElement:Vi,HTMLQuoteElement:Vi,HTMLScriptElement:Vi,HTMLSelectElement:Vi,HTMLShadowElement:Vi,HTMLSlotElement:Vi,HTMLSourceElement:Vi,HTMLSpanElement:Vi,HTMLStyleElement:Vi,HTMLTableCaptionElement:Vi,HTMLTableCellElement:Vi,HTMLTableColElement:Vi,HTMLTableElement:Vi,HTMLTableRowElement:Vi,HTMLTableSectionElement:Vi,HTMLTemplateElement:Vi,HTMLTextAreaElement:Vi,HTMLTimeElement:Vi,HTMLTitleElement:Vi,HTMLTrackElement:Vi,HTMLUListElement:Vi,HTMLUnknownElement:Vi,HTMLVideoElement:Vi,IDBCursor:Vi,IDBCursorWithValue:Vi,IDBDatabase:Vi,IDBFactory:Vi,IDBIndex:Vi,IDBKeyRange:Vi,IDBObjectStore:Vi,IDBOpenDBRequest:Vi,IDBRequest:Vi,IDBTransaction:Vi,IDBVersionChangeEvent:Vi,IdleDeadline:Vi,IIRFilterNode:Vi,Image:Vi,ImageBitmap:Vi,ImageBitmapRenderingContext:Vi,ImageCapture:Vi,ImageData:Vi,indexedDB:Li,innerHeight:Li,innerWidth:Li,InputEvent:Vi,IntersectionObserver:Vi,IntersectionObserverEntry:Vi,isSecureContext:Li,KeyboardEvent:Vi,KeyframeEffect:Vi,length:Li,localStorage:Li,location:Li,Location:Vi,locationbar:Li,matchMedia:Li,MediaDeviceInfo:Vi,MediaDevices:Vi,MediaElementAudioSourceNode:Vi,MediaEncryptedEvent:Vi,MediaError:Vi,MediaKeyMessageEvent:Vi,MediaKeySession:Vi,MediaKeyStatusMap:Vi,MediaKeySystemAccess:Vi,MediaList:Vi,MediaQueryList:Vi,MediaQueryListEvent:Vi,MediaRecorder:Vi,MediaSettingsRange:Vi,MediaSource:Vi,MediaStream:Vi,MediaStreamAudioDestinationNode:Vi,MediaStreamAudioSourceNode:Vi,MediaStreamEvent:Vi,MediaStreamTrack:Vi,MediaStreamTrackEvent:Vi,menubar:Li,MessageChannel:Vi,MessageEvent:Vi,MessagePort:Vi,MIDIAccess:Vi,MIDIConnectionEvent:Vi,MIDIInput:Vi,MIDIInputMap:Vi,MIDIMessageEvent:Vi,MIDIOutput:Vi,MIDIOutputMap:Vi,MIDIPort:Vi,MimeType:Vi,MimeTypeArray:Vi,MouseEvent:Vi,moveBy:Li,moveTo:Li,MutationEvent:Vi,MutationObserver:Vi,MutationRecord:Vi,name:Li,NamedNodeMap:Vi,NavigationPreloadManager:Vi,navigator:Li,Navigator:Vi,NetworkInformation:Vi,Node:Vi,NodeFilter:Li,NodeIterator:Vi,NodeList:Vi,Notification:Vi,OfflineAudioCompletionEvent:Vi,OfflineAudioContext:Vi,offscreenBuffering:Li,OffscreenCanvas:Vi,open:Li,openDatabase:Li,Option:Vi,origin:Li,OscillatorNode:Vi,outerHeight:Li,outerWidth:Li,PageTransitionEvent:Vi,pageXOffset:Li,pageYOffset:Li,PannerNode:Vi,parent:Li,Path2D:Vi,PaymentAddress:Vi,PaymentRequest:Vi,PaymentRequestUpdateEvent:Vi,PaymentResponse:Vi,performance:Li,Performance:Vi,PerformanceEntry:Vi,PerformanceLongTaskTiming:Vi,PerformanceMark:Vi,PerformanceMeasure:Vi,PerformanceNavigation:Vi,PerformanceNavigationTiming:Vi,PerformanceObserver:Vi,PerformanceObserverEntryList:Vi,PerformancePaintTiming:Vi,PerformanceResourceTiming:Vi,PerformanceTiming:Vi,PeriodicWave:Vi,Permissions:Vi,PermissionStatus:Vi,personalbar:Li,PhotoCapabilities:Vi,Plugin:Vi,PluginArray:Vi,PointerEvent:Vi,PopStateEvent:Vi,postMessage:Li,Presentation:Vi,PresentationAvailability:Vi,PresentationConnection:Vi,PresentationConnectionAvailableEvent:Vi,PresentationConnectionCloseEvent:Vi,PresentationConnectionList:Vi,PresentationReceiver:Vi,PresentationRequest:Vi,print:Li,ProcessingInstruction:Vi,ProgressEvent:Vi,PromiseRejectionEvent:Vi,prompt:Li,PushManager:Vi,PushSubscription:Vi,PushSubscriptionOptions:Vi,queueMicrotask:Li,RadioNodeList:Vi,Range:Vi,ReadableStream:Vi,RemotePlayback:Vi,removeEventListener:Li,Request:Vi,requestAnimationFrame:Li,requestIdleCallback:Li,resizeBy:Li,ResizeObserver:Vi,ResizeObserverEntry:Vi,resizeTo:Li,Response:Vi,RTCCertificate:Vi,RTCDataChannel:Vi,RTCDataChannelEvent:Vi,RTCDtlsTransport:Vi,RTCIceCandidate:Vi,RTCIceTransport:Vi,RTCPeerConnection:Vi,RTCPeerConnectionIceEvent:Vi,RTCRtpReceiver:Vi,RTCRtpSender:Vi,RTCSctpTransport:Vi,RTCSessionDescription:Vi,RTCStatsReport:Vi,RTCTrackEvent:Vi,screen:Li,Screen:Vi,screenLeft:Li,ScreenOrientation:Vi,screenTop:Li,screenX:Li,screenY:Li,ScriptProcessorNode:Vi,scroll:Li,scrollbars:Li,scrollBy:Li,scrollTo:Li,scrollX:Li,scrollY:Li,SecurityPolicyViolationEvent:Vi,Selection:Vi,ServiceWorker:Vi,ServiceWorkerContainer:Vi,ServiceWorkerRegistration:Vi,sessionStorage:Li,ShadowRoot:Vi,SharedWorker:Vi,SourceBuffer:Vi,SourceBufferList:Vi,speechSynthesis:Li,SpeechSynthesisEvent:Vi,SpeechSynthesisUtterance:Vi,StaticRange:Vi,status:Li,statusbar:Li,StereoPannerNode:Vi,stop:Li,Storage:Vi,StorageEvent:Vi,StorageManager:Vi,styleMedia:Li,StyleSheet:Vi,StyleSheetList:Vi,SubtleCrypto:Vi,SVGAElement:Vi,SVGAngle:Vi,SVGAnimatedAngle:Vi,SVGAnimatedBoolean:Vi,SVGAnimatedEnumeration:Vi,SVGAnimatedInteger:Vi,SVGAnimatedLength:Vi,SVGAnimatedLengthList:Vi,SVGAnimatedNumber:Vi,SVGAnimatedNumberList:Vi,SVGAnimatedPreserveAspectRatio:Vi,SVGAnimatedRect:Vi,SVGAnimatedString:Vi,SVGAnimatedTransformList:Vi,SVGAnimateElement:Vi,SVGAnimateMotionElement:Vi,SVGAnimateTransformElement:Vi,SVGAnimationElement:Vi,SVGCircleElement:Vi,SVGClipPathElement:Vi,SVGComponentTransferFunctionElement:Vi,SVGDefsElement:Vi,SVGDescElement:Vi,SVGDiscardElement:Vi,SVGElement:Vi,SVGEllipseElement:Vi,SVGFEBlendElement:Vi,SVGFEColorMatrixElement:Vi,SVGFEComponentTransferElement:Vi,SVGFECompositeElement:Vi,SVGFEConvolveMatrixElement:Vi,SVGFEDiffuseLightingElement:Vi,SVGFEDisplacementMapElement:Vi,SVGFEDistantLightElement:Vi,SVGFEDropShadowElement:Vi,SVGFEFloodElement:Vi,SVGFEFuncAElement:Vi,SVGFEFuncBElement:Vi,SVGFEFuncGElement:Vi,SVGFEFuncRElement:Vi,SVGFEGaussianBlurElement:Vi,SVGFEImageElement:Vi,SVGFEMergeElement:Vi,SVGFEMergeNodeElement:Vi,SVGFEMorphologyElement:Vi,SVGFEOffsetElement:Vi,SVGFEPointLightElement:Vi,SVGFESpecularLightingElement:Vi,SVGFESpotLightElement:Vi,SVGFETileElement:Vi,SVGFETurbulenceElement:Vi,SVGFilterElement:Vi,SVGForeignObjectElement:Vi,SVGGElement:Vi,SVGGeometryElement:Vi,SVGGradientElement:Vi,SVGGraphicsElement:Vi,SVGImageElement:Vi,SVGLength:Vi,SVGLengthList:Vi,SVGLinearGradientElement:Vi,SVGLineElement:Vi,SVGMarkerElement:Vi,SVGMaskElement:Vi,SVGMatrix:Vi,SVGMetadataElement:Vi,SVGMPathElement:Vi,SVGNumber:Vi,SVGNumberList:Vi,SVGPathElement:Vi,SVGPatternElement:Vi,SVGPoint:Vi,SVGPointList:Vi,SVGPolygonElement:Vi,SVGPolylineElement:Vi,SVGPreserveAspectRatio:Vi,SVGRadialGradientElement:Vi,SVGRect:Vi,SVGRectElement:Vi,SVGScriptElement:Vi,SVGSetElement:Vi,SVGStopElement:Vi,SVGStringList:Vi,SVGStyleElement:Vi,SVGSVGElement:Vi,SVGSwitchElement:Vi,SVGSymbolElement:Vi,SVGTextContentElement:Vi,SVGTextElement:Vi,SVGTextPathElement:Vi,SVGTextPositioningElement:Vi,SVGTitleElement:Vi,SVGTransform:Vi,SVGTransformList:Vi,SVGTSpanElement:Vi,SVGUnitTypes:Vi,SVGUseElement:Vi,SVGViewElement:Vi,TaskAttributionTiming:Vi,Text:Vi,TextEvent:Vi,TextMetrics:Vi,TextTrack:Vi,TextTrackCue:Vi,TextTrackCueList:Vi,TextTrackList:Vi,TimeRanges:Vi,toolbar:Li,top:Li,Touch:Vi,TouchEvent:Vi,TouchList:Vi,TrackEvent:Vi,TransitionEvent:Vi,TreeWalker:Vi,UIEvent:Vi,ValidityState:Vi,visualViewport:Li,VisualViewport:Vi,VTTCue:Vi,WaveShaperNode:Vi,WebAssembly:Li,WebGL2RenderingContext:Vi,WebGLActiveInfo:Vi,WebGLBuffer:Vi,WebGLContextEvent:Vi,WebGLFramebuffer:Vi,WebGLProgram:Vi,WebGLQuery:Vi,WebGLRenderbuffer:Vi,WebGLRenderingContext:Vi,WebGLSampler:Vi,WebGLShader:Vi,WebGLShaderPrecisionFormat:Vi,WebGLSync:Vi,WebGLTexture:Vi,WebGLTransformFeedback:Vi,WebGLUniformLocation:Vi,WebGLVertexArrayObject:Vi,WebSocket:Vi,WheelEvent:Vi,Window:Vi,Worker:Vi,WritableStream:Vi,XMLDocument:Vi,XMLHttpRequest:Vi,XMLHttpRequestEventTarget:Vi,XMLHttpRequestUpload:Vi,XMLSerializer:Vi,XPathEvaluator:Vi,XPathExpression:Vi,XPathResult:Vi,XSLTProcessor:Vi};for(const e of["window","global","self","globalThis"])Wi[e]=Wi;function Ki(e){let t=Wi;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return"Symbol"===e[0]&&2===e.length?Hi:null}return t[wi]}class qi extends is{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(Ki([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=Ki([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=Ki([this.name,...e]);return s?s.getLiteralValue():Et}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!Ki([this.name]):!Ki([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=Ki([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}const Xi=(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 Ji extends is{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.assignedFunctions=null,this.includedPathTracker=new ut,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(tt)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned||t.length+this.initPath.length>6?Pt(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=Te;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath([...this.initPath,je])}else this.init.deoptimizePath(Xi(this.initPath,e))}getKnownFunctionAtPath(e,t,n){return this.isReassigned||e.length+this.initPath.length>6?null:t.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getKnownFunctionAtPath([...this.initPath,...e],t,n)),null)}getLiteralValueAtPath(e,t,n){return this.isReassigned||e.length+this.initPath.length>6?Et:t.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath([...this.initPath,...e],t,n)),Et)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned||e.length+this.initPath.length>6?$t:n.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],t,n,s)),$t)}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!==Ie);)n=n.parent}e.length>0&&(this.init.includePath(Xi(this.initPath,e),t),this.additionalInitializers?.forEach(e=>e.includePath(tt,t)))}}includeCallArgumentsWhenCalledAtPath(e,t,n){if(this.isReassigned)return wt(t,n),void(0===e.length&&this.includeCallArgumentsOfAssignedTryCatchHelpers(t,n));n.includedCallArguments.has(this.init)||e.length+this.initPath.length>6?wt(t,n):(n.includedCallArguments.add(this.init),this.init.includeCallArgumentsWhenCalledAtPath([...this.initPath,...e],t,n),n.includedCallArguments.delete(this.init))}includeCallArgumentsOfAssignedTryCatchHelpers(e,t){0===this.initPath.length&&this.includeCallArgumentsOfTryCatchHelper(this.init,e,t);for(const n of this.assignedFunctions??Te)this.includeCallArgumentsOfTryCatchHelper(n,e,t)}includeCallArgumentsOfTryCatchHelper(e,t,n){(ks(e)||Rs(e))&&e.scope.hasParameterCalledFromTryStatement()&&e.scope.includeCallArguments(t,n)}addReassignedValue(e){(ks(e)||Rs(e))&&(this.assignedFunctions??=[]).push(e)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=vt,this.markReassigned()),this.additionalInitializers}}const Yi=new Set(["class","const","let","var","using","await using"]);class Zi extends ws{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return yt(this.flags,4)?yt(this.flags,8):null}set isTDZAccess(e){this.flags=bt(this.flags,4,!0),this.flags=bt(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)}getKnownFunctionAtPath(e,t,n){return this.getVariableRespectingTDZ().getKnownFunctionAtPath(e,t,n)}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 qi&&!this.isPureFunction(et)&&this.variable.hasEffectsOnInteractionAtPath(et,Nt,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(tt,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,et,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))}includeCallArgumentsWhenCalledAtPath(e,t,n){this.variable.includeCallArgumentsWhenCalledAtPath(e,t,n)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof Ji&&this.variable.kind&&Yi.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&&Qi(this)===Qi(t)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof Ji&&(this.variable.module.isExecuted||gs(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()?vt:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[ss])return!0;t=t[n]}return t?.[ss]}}function Qi(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}class er extends St{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 tr extends Zi{constructor(){super(...arguments),this.variable=null}get isDestructuringDeoptimized(){return yt(this.flags,16777216)}set isDestructuringDeoptimized(e){this.flags=bt(this.flags,16777216,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&ft(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0,this.assignmentInteraction&&this.variable.markTargetOfAssignment())}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(et),0===e.length&&this.variable?.addReassignedValue(t),t.deoptimizePath([...e,je])}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,Nt,e)}includeDestructuredIfNecessary(e,t,n){t.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,n.deoptimizeArgumentsOnInteractionAtPath({args:[new er(n,t.slice(0,-1))],type:0},t,at));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,Nt,gt())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,et,e),n.includePath(t,e)),!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){this.variable.initReached=!0}isDeclarationInDestructuringPattern(){let e=this.parent;for(;e.type===Ne||"AssignmentPattern"===e.type||e.type===Ce;)e=e.parent;return"ObjectPattern"===e.type||"ArrayPattern"===e.type}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=_e){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===ve&&i&&e.appendRight(this.start,"0, ")}}}function nr(e,t,n){let s=e,i=1;for(;t.has(s)||ie.has(s)||n?.has(s);)s=`${e}$${se(i++)}`;return t.add(s),s}class sr{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(qn(r),e.start)}const a=new Ji(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 ir extends sr{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 ir&&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 ir&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof ir&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,n,s){for(const s of this.accessedOutsideVariables.values())this.addUsedOutsideVariableName(s,e,t,n);if(this.hoistedVariables)for(const s of this.hoistedVariables.values())this.addUsedOutsideVariableName(s,e,t,n);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,nr(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}addUsedOutsideVariableName(e,t,n,s){e.included&&(t.add(e.getBaseVariableName()),"system"===n&&s.has(e)&&t.add("exports"))}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 rr(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}class or extends ws{constructor(){super(...arguments),this.accessedValue=null}get computed(){return yt(this.flags,1024)}set computed(e){this.flags=bt(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},et,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.getAccessedValue()[0].includeCallArgumentsWhenCalledAtPath(e,t,n)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getKnownFunctionAtPath(e,t,n){return"get"===this.kind||"set"===this.kind?null:this.value.getKnownFunctionAtPath(e,t,n)}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(et,{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=$t,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(et,kt,at,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}or.prototype.includeNode=Ns,or.prototype.applyDeoptimizations=Cs;class ar extends or{hasEffects(e){return super.hasEffects(e)||rr(this.decorators,e)}}class lr extends ws{get computed(){return yt(this.flags,1024)}set computed(e){this.flags=bt(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):Et}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):$t}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||rr(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.value?.includePath(tt,e);for(const t of this.decorators)t.includePath(tt,e)}}lr.prototype.applyDeoptimizations=Cs;class cr extends ir{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?(o.addDeclaration(e,n),o):"parameter"===o.kind?this.parent.addDeclaration(e,t,n,s,i):t.error(qn(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 ur extends ws{createScope(e){this.scope=new cr(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=he(e.original.slice(this.start,this.end),"{")+1;be(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}function dr(e){return e.type===ke}ur.prototype.includeNode=Ns,ur.prototype.applyDeoptimizations=Cs;class hr extends ws{constructor(){super(...arguments),this.instanceFieldValues=null,this.objectEntity=null}createScope(e){this.scope=new ir(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)||rr(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))||this.hasEffectsOnInstanceFieldInitialization(n):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",et,this),this.instanceEntity=new ri(new Map,new er(this,["prototype"])),this.body.scope.instanceThisVariable.addArgumentForDeoptimization(this.instanceEntity);for(const e of this.body.body)if(e instanceof ar&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)dr(e)||e.static||e instanceof ar&&"constructor"===e.kind||e.deoptimizePath(tt);this.scope.context.requestTreeshakingPass()}hasEffectsOnInstanceFieldInitialization(e){const t=this.getInstanceFieldValues();if(0===t.length)return!1;const{replacedVariableInits:n}=e,s=this.body.scope.instanceThisVariable,i=n.get(s);n.set(s,this.instanceEntity);const r=t.some(t=>t.hasEffects(e));return i?n.set(s,i):n.delete(s),r}getInstanceFieldValues(){if(null===this.instanceFieldValues){this.instanceFieldValues=[];for(const e of this.body.body)e instanceof lr&&!e.static&&null!==e.value&&this.instanceFieldValues.push(e.value)}return this.instanceFieldValues}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(dr(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(et,at,this);if("symbol"==typeof e){s.push({key:Ye(e)?e:je,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof tr?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new ri(t,this.superClass?new er(this.superClass,["prototype"]):li)}),this.objectEntity=new ri(e,this.superClass||li)}}hr.prototype.includeNode=Is;class pr extends hr{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){return null!==e.id&&(this.id=new tr(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}${Re([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 fr extends Ji{constructor(e){super("arguments",null,vt,et,e,"other")}addArgumentToBeDeoptimized(e){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=mr}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(tt);this.deoptimizedArguments.length=0}}function mr(e){this.included?e.deoptimizePath(tt):this.deoptimizedArguments?.push(e)}const gr=Te,yr=new Set([je]),br=new ot,Er=new Set([vt]);class xr extends Ji{constructor(e,t,n,s){super(e,t,vt,n,s,"parameter"),this.includedPathTracker=new pt,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new ot,this.deoptimizedFields=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=Et}addArgumentForDeoptimization(e){if(this.updateKnownValue(e),e===vt){if(!this.argumentsToBeDeoptimized.has(vt)){this.argumentsToBeDeoptimized.add(vt);for(const{interaction:e}of this.deoptimizationInteractions)Pt(e);this.deoptimizationInteractions=gr}}else if(this.deoptimizedFields.has(je))e.deoptimizePath([...this.initPath,je]);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],at)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsDependingOnKnownValue)e.deoptimizeCache();this.expressionsDependingOnKnownValue=Te}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(this.initPath,at,this));if(this.knownValue===e||this.knownValue instanceof tr&&e instanceof tr&&this.knownValue.variable===e.variable)return;const{knownValueLiteral:t}=this;"symbol"!=typeof t&&e.getLiteralValueAtPath(this.initPath,at,this)===t||this.markReassigned()}getKnownValue(){return this.knownValue||vt}getLiteralValueAtPath(e,t,n){if(this.isReassigned||e.length+this.initPath.length>6)return Et;const s=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(n),t.withTrackedEntityAtPath(e,s,()=>s.getLiteralValueAtPath([...this.initPath,...e],t,n),Et)}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(vt)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(je)||2===e.type&&this.deoptimizedFields.has(t[0]))||this.initPath.length+t.length>6)Pt(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.argumentsToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],at);this.argumentsToBeDeoptimized.has(vt)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(je))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===je&&(this.deoptimizationInteractions=gr,this.deoptimizations=br,this.deoptimizedFields=yr,this.argumentsToBeDeoptimized=Er)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(tt):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),$t}includeArgumentPaths(e,t){this.includedPathTracker.includeAllPaths(e,t,this.initPath)}}class Ar extends xr{constructor(e){super("this",null,et,e),this.includedPathTracker=new ut}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||vt).hasEffectsOnInteractionAtPath(e,t,n)}}class Sr extends St{constructor(e){super(),this.returnedIdentifier=e}deoptimizeArgumentsOnInteractionAtPath(e,t,n){Pt(e),this.returnedIdentifier.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.returnedIdentifier.deoptimizePath(e)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.returnedIdentifier.includeCallArgumentsWhenCalledAtPath(e,t,n)}}class vr extends ir{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.parent.variables.get(r);if($r(o)){const a=this.parent.parent.addDeclaration(e,t,Ts,s,i);return a.markInitializersForDeoptimization(),o.renderLikeHoisted(a.getHoistedVariable()??a),this.isShadowedByInnerCatchParameter(e,r)||o.addDeclaration(e,n),o}const a=this.hoistedVariables?.get(r)||this.variables.get(r);if(a)return"var"===a.kind?(a.addDeclaration(e,n),a):"parameter"===a.kind&&a!==o?this.parent.parent.addDeclaration(e,t,n,s,i):t.error(qn(r),e.start);const l=this.parent.parent.addDeclaration(e,t,n,s,i);return l.markInitializersForDeoptimization(),this.addHoistedVariable(r,l),l}return super.addDeclaration(e,t,n,s,i)}isShadowedByInnerCatchParameter(e,t){let n=e.scope;for(;n!==this;){if(n instanceof vr){if($r(n.parent.variables.get(t)))return!0}n=n.parent}return!1}}function $r(e){return"parameter"===e?.kind&&"CatchClause"===e.declarations[0].parent.type}class Pr extends ir{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(qn(r),e.start)}const a=new Ji(e.name,e,n,s,t,i);return this.variables.set(r,a),a}}class wr extends ir{constructor(e,t){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=t?new vr(this):new Pr(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 xr(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}hasParameterCalledFromTryStatement(){return this.parameters.some(e=>e.some(e=>e.calledFromTryStatement))}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 $i&&!s&&(s=!0,r=n-1),s&&(i.includePath(tt,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 wr{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 $i){for(;n<t.length;n++){e[n+1]?.deoptimizePath(tt);for(const e of t[n])e.markReassigned()}break}if(this.hasRest&&n>=t.length-1)s.deoptimizePath(tt);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(Ts)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}deoptimizeAllParameters(){for(const e of this.parameters)for(const t of e)t.deoptimizePath(tt),t.markReassigned()}reassignAllParameters(){for(const e of this.parameters)for(const t of e)t.markReassigned()}addArgumentToBeDeoptimized(e){}updateReturnExpression(){const{returnExpressions:e}=this,[t]=e;if(t&&this.returnExpressionsResolveToSameVariable(t))this.returnExpression=t.variable.isTargetOfAssignment?new Sr(t):t;else if(1===e.length)this.returnExpression=t;else{this.returnExpression=vt;for(const t of e)t.deoptimizePath(tt)}}returnExpressionsResolveToSameVariable(e){return!(!Ms(e)||null===e.variable)&&this.returnExpressions.every(t=>Ms(t)&&t.variable===e.variable)}}class Nr extends Ir{constructor(e,t){super(e,!1),this.functionNode=t;const{context:n}=e;this.variables.set("arguments",this.argumentsVariable=new fr(n)),this.variables.set("this",this.thisVariable=new Ar(n))}findLexicalBoundary(){return this}includeCallArguments(e,t){super.includeCallArguments(e,t);const{args:n}=e;if(n[0]&&this.thisVariable.includeArgumentPaths(n[0],t),this.argumentsVariable.included)for(let e=1;e<n.length;e++){const s=n[e];s&&(s.includePath(tt,t),s.include(t,!1))}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class Cr extends ws{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===Ie&&this.scope.context.log(Tt,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${Gt(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!==Ie:super.shouldBeIncluded(e)}}Cr.prototype.includeNode=Ns,Cr.prototype.applyDeoptimizations=Cs;class kr extends ws{get deoptimizeBody(){return yt(this.flags,32768)}set deoptimizeBody(e){this.flags=bt(this.flags,32768,e)}get directlyIncluded(){return yt(this.flags,16384)}set directlyIncluded(e){this.flags=bt(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(vt)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new cr(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 Cr&&"use asm"===e.directive}render(e,t){this.body.length>0?be(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}kr.prototype.includeNode=Ns,kr.prototype.applyDeoptimizations=Cs;class Rr extends ws{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,Or(t),n)}deoptimizeAssignment(e,t){this.argument.deoptimizeAssignment(Or(e),t)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(et)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(et,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.argument.hasEffectsWhenDestructuring(e,Or(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.argument.includeDestructuredIfNecessary(e,Or(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()}setAssignedValue(e){this.argument.setAssignedValue(e)}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([je,je]),this.scope.context.requestTreeshakingPass())}}Rr.prototype.includeNode=Is;const Or=e=>e.at(-1)===je?e:[...e,je];class Dr extends ws{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1}get async(){return yt(this.flags,256)}set async(e){this.flags=bt(this.flags,256,e)}get deoptimizedReturn(){return yt(this.flags,512)}set deoptimizedReturn(e){this.flags=bt(this.flags,512,e)}get generator(){return yt(this.flags,4194304)}set generator(e){this.flags=bt(this.flags,4194304,e)}get hasCachedEffects(){return yt(this.flags,67108864)}set hasCachedEffects(e){this.flags=bt(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]===je&&(this.scope.getReturnExpression().deoptimizePath(tt),this.scope.deoptimizeAllParameters())}getKnownFunctionAtPath(e,t,n){return 0===e.length?this:this.getObjectEntity().getKnownFunctionAtPath(e,t,n)}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.generator?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(tt),this.scope.context.requestTreeshakingPass()),$t):[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"],kt,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],Nt,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,et,t.args[e+1]||Ts))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===$e&&(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}includeCallArgumentsWhenCalledAtPath(e,t,n){0===e.length?this.scope.includeCallArguments(t,n):this.getObjectEntity().includeCallArgumentsWhenCalledAtPath(e,t,n)}initialise(){super.initialise(),this.body instanceof kr?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",et,vt)),o[o.length-1]instanceof Rr),this.body=new(r.getNodeConstructor(t.type))(this,i).parseNode(t),super.parseNode(e)}}Dr.prototype.preventChildBlockScope=!0,Dr.prototype.includeNode=Ns,Dr.prototype.applyDeoptimizations=Cs;class Mr extends Dr{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Nr(e,this),this.constructedEntity=new ri(new Map,li),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:vt);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 tr&&!n||s.include(e,t)}includeNode(e){this.included=!0;const t=this.scope.argumentsVariable.included;for(const n of this.params)n instanceof tr&&!t||n.includePath(tt,e)}initialise(){super.initialise(),this.id?.declare("function",et,this)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ri([{key:"prototype",kind:"init",property:new ri([],this.getPrototypeOfPrototype())}],li)}getPrototypeOfPrototype(){return this.generator?this.async?ui:ci:li}}class _r extends Mr{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 tr(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class Lr extends ws{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,tt,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 fe(e,he(e,"default",t)+7)}(e.original,this.start);let o=!1;if(this.declaration instanceof _r)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=he(e,"function",t)+8;e=e.slice(n,he(e,"(",n));const s=he(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof pr)this.renderNamedDeclaration(e,r,null===this.declaration.id?he(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void ue(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:Pe}),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 pr&&i.has(this.variable)&&e.appendLeft(this.end,` ${Re([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(oe(a[0]))}, `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";")),!1):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),!o)}}Lr.prototype.needsBoundaries=!0,Lr.prototype.includeNode=Ns,Lr.prototype.applyDeoptimizations=Cs;const Tr=/[\n\r'\\\u2028\u2029]/,zr=/[\n\r'\\\u2028\u2029]/g,Br={"\n":"\\n","\r":"\\r","'":"\\'","\\":"\\\\","\u2028":"\\u2028","\u2029":"\\u2029"};function Vr(e){return Tr.test(e)?e.replace(zr,e=>Br[e]):e}const Fr="_interopDefault",jr="_interopDefaultCompat",Ur="_interopNamespace",Gr="_interopNamespaceCompat",Hr="_interopNamespaceDefault",Wr="_interopNamespaceDefaultOnly",Kr="_mergeNamespaces",qr="_documentCurrentScript",Xr={auto:Fr,compat:jr,default:null,defaultOnly:null,esModule:null},Jr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),Yr={auto:Ur,compat:Gr,default:Hr,defaultOnly:Wr,esModule:null},Zr=(e,t)=>"esModule"!==e&&Jr(e,t),Qr=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of fo)t.has(e)&&a.add(e);return fo.map(e=>a.has(e)?eo[e](n,s,i,r,o,a):"").join("")},eo={[qr]:(e,{_:t,n:n})=>`var ${qr}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[jr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:jr});return`${o}${so(t)}${s}?${s}${n?to(t):no(t)}${a}${r}${r}`},[Fr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Fr});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?to(t):no(t)}${a}${r}${r}`},[Gr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Hr)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Gr});return`${e}${so(t)}${o}?${o}e${o}:${o}${Hr}(e)${n}${l}${l}`}return`function ${Gr}(e)${o}{${l}${e}if${o}(${so(t)})${o}return e;${l}`+io(e,e,t,n,s,i)+`}${l}${l}`},[Wr](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,u]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:Wr});return`${c}${ho(s,po(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[Hr](e,t,n,s,i){const{_:r,n:o}=t;return`function ${Hr}(e)${r}{${o}`+io(e,e,t,n,s,i)+`}${o}${o}`},[Ur](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Hr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ur});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${Hr}(e)${t}${l}${l}`}return`function ${Ur}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+io(e,e,t,n,s,i)+`}${l}${l}`},[Kr](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${Kr}(n, m)${r}{${a}${e}${oo(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?lo:co:uo)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${ho(s,po(i,"n",t))};${a}}${a}${a}`}},to=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,no=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,so=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,io=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}=n,h=`{${u}`+(s?ao:uo)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${mo(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${ro(h,!s,n)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${ho(i,"n")}${d}${u}`},ro=(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}`,oo=(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}}`},ao=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+lo(e,t+e,n)+`${t}}${i}`},lo=(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}`},co=(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}`},uo=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,ho=(e,t)=>e?`Object.freeze(${t})`:t,po=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${mo(s)})`:t,fo=Object.keys(eo);function mo(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class go extends is{constructor(){super("undefined")}getLiteralValueAtPath(){}}class yo extends Ji{constructor(e,t){super("default",e,e.declaration,et,t,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const n=e.declaration;(n instanceof _r||n instanceof pr)&&n.id?(this.hasId=!0,this.originalId=n.id):n instanceof tr&&(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 go||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getOriginalNamespaceVariable(){let e=this;const t=new Set;for(;e instanceof yo&&!t.has(e);){if(t.add(e),e.hasId||!e.originalId)return null;e=e.originalId.variable}return e?.isNamespace?e:null}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 yo&&!n.has(t));return this.originalVariable=t||e}}class bo extends ws{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)?Et:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?$t:Zs(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||Ys(this.members,e[0],t,n))}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return Xs;switch(typeof e){case"boolean":return Ks;case"number":return qs;case"string":return Js}return Object.create(null)}(this.value)}parseNode(e){return this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(){"string"==typeof this.value&&this.scope.context.addIndentExclusionRange([this.start+1,this.end-1])}}function Eo(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(et,at,i);if(n===Ps||e.optional&&null==n)return Ps}else if(e.optional&&null==t.getLiteralValueAtPath(et,at,i))return Ps;return e.getLiteralValueAtPath(n,s,i)}function xo(e){return e.computed?function(e){if(e instanceof bo)return String(e.value);return null}(e.property):e.property.name}function Ao(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof tr)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof vo){const s=Ao(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}function So(e){let t=e[0].key;for(let n=1;n<e.length;n++)t+="."+e[n].key;return t}bo.prototype.includeNode=Is;class vo extends ws{constructor(){super(...arguments),this.promiseHandler=null,this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return yt(this.flags,1024)}set computed(e){this.flags=bt(this.flags,1024,e)}get optional(){return yt(this.flags,128)}set optional(e){this.flags=bt(this.flags,128,e)}get assignmentDeoptimized(){return yt(this.flags,16)}set assignmentDeoptimized(e){this.flags=bt(this.flags,16,e)}get bound(){return yt(this.flags,32)}set bound(e){this.flags=bt(this.flags,32,e)}get deleteOfMissingNamespaceMember(){return yt(this.flags,536870912)}set deleteOfMissingNamespaceMember(e){this.flags=bt(this.flags,536870912,e)}get isUndefined(){return yt(this.flags,64)}set isUndefined(e){this.flags=bt(this.flags,64,e)}bind(){this.bound=!0;const e=Ao(this);let t=e&&this.scope.findVariable(e[0].key);if(t instanceof yo&&(t=t.getOriginalNamespaceVariable()||t),t?.isNamespace){const n=$o(t,e.slice(1),this.scope.context),s=this.isDeleteTarget();!n||this.assignmentInteraction||s?(this.deleteOfMissingNamespaceMember=s&&"undefined"===n,super.bind()):"undefined"===n?this.isUndefined=!0:(this.variable=n,this.scope.addNamespaceMemberAccess(So(e),n))}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===je?tt:[this.propertyKey,...t],n):Pt(e))}deoptimizeAssignment(e,t){this.deoptimizePath(et),t.deoptimizePath([...e,je])}deoptimizeCache(){if(this.propertyKey===this.dynamicPropertyKey)return;const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=Te,this.dynamicPropertyKey=this.propertyKey,t.deoptimizePath(tt),this.included&&t.includePath(tt,mt());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===je?Ue:t,...e.length<6?e:[...e.slice(0,6),je]])}}getKnownFunctionAtPath(e,t,n){if(this.variable)return this.variable.getKnownFunctionAtPath(e,t,n);if(this.isUndefined)return null;const s=this.getDynamicPropertyKey();return s!==je&&e.length<6?(s!==this.propertyKey&&this.expressionsToBeDeoptimized.push(n),this.object.getKnownFunctionAtPath([s,...e],t,n)):null}getLiteralValueAtPath(e,t,n){if(this.variable)return this.variable.getLiteralValueAtPath(e,t,n);if(this.isUndefined)return;const s=this.getDynamicPropertyKey();return s!==je&&e.length<6?(s!==this.propertyKey&&this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([s,...e],t,n)):Et}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:Eo(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[Ts,!1];const i=this.getDynamicPropertyKey();return i!==je&&e.length<6?(i!==this.propertyKey&&this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([i,...e],t,n,s)):$t}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===Ps?Ps:this.optional&&null==this.object.getLiteralValueAtPath(et,at,this)?t||Ps:(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(et,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,Nt,e)}include(e,t){this.included||this.includeNode(e),this.object.include(e,t),this.property.include(e,t),t&&this.variable?.includePath(tt,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable?this.scope.context.includeVariableInModule(this.variable,et,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,et,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),je]],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)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.promiseHandler?0===e.length?this.promiseHandler.includeCallArguments(t,n):wt(t,n):this.variable?this.variable.includeCallArgumentsWhenCalledAtPath(e,t,n):!this.isUndefined&&e.length<6?this.object.includeCallArgumentsWhenCalledAtPath(this.propertyKey===je?tt:[this.propertyKey,...e],t,n):wt(t,n)}includeDestructuredIfNecessary(){this.scope.context.error({message:"includeDestructuredIfNecessary is currently not supported for MemberExpressions"},this.start)}initialise(){super.initialise(),this.dynamicPropertyKey=xo(this),this.propertyKey=null===this.dynamicPropertyKey?je:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=_e){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],at),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],at),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){this.getNamespaceVariableOfObject()&&!this.deleteOfMissingNamespaceMember&&this.scope.context.log(Tt,Dn(this.getNamespaceName(),this.scope.context.module.id),this.start)}getDynamicPropertyKey(){if(null===this.dynamicPropertyKey){this.dynamicPropertyKey=this.propertyKey;const e=this.property.getLiteralValueAtPath(et,at,this);return this.dynamicPropertyKey="symbol"==typeof e?Je.has(e)?e:je:String(e)}return this.dynamicPropertyKey}getNamespaceName(){return this.object instanceof tr?this.object.name:So(Ao(this.object))}getNamespaceVariableOfObject(){let e;if(this.object instanceof tr)e=this.scope.findVariable(this.object.name);else{if(!(this.object instanceof vo))return null;e=this.object.variable}return e instanceof yo&&(e=e.getOriginalNamespaceVariable()||e),e?.isNamespace?e:null}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))}isDeleteTarget(){const e="ChainExpression"===this.parent.type?this.parent.parent:this.parent;return"UnaryExpression"===e.type&&"delete"===e.operator}}function $o(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof os)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(Tt,Un(s,n.module.id,i,!!r?.missingButExportExists),t[0].pos),"undefined"}return null}return $o(i,t.slice(1),n)}const Po="ROLLUP_FILE_URL_",wo="ROLLUP_FILE_URL_OBJ_",Io="import";class No extends ws{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;if(t===Io){if(n?.startsWith(wo))return e.getFileName(n.slice(20));if(n?.startsWith(Po))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===Io){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof vo&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(wo)?this.referenceId=t.slice(20):t?.startsWith(Po)&&(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!==Io)return;const m=c;if(u){const t=s.getFileName(u),i=J(te(Z(m),t)),r=!!a?.startsWith(wo),o=s.hookFirstSync("resolveFileUrl",[{attributes:f,chunkId:m,fileName:t,format:n,moduleId:p,referenceId:u,relativePath:i}])||zo[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=Bo[n]?.(a,{chunkId:m,snippets:i}),t.accessedDocumentCurrentScript||=Co.includes(n)&&"undefined"!==g),"string"==typeof g&&(l instanceof vo?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(Po)||this.metaProperty?.startsWith(wo)?Ro:ko)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}}const Co=["cjs","iife","umd"],ko={amd:["document","module","URL"],cjs:["document","require","URL",qr],es:[],iife:["document","URL",qr],system:["module"],umd:["document","require","URL",qr]},Ro={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Oo=(e,t,n="URL")=>`new ${n}(${e})${t?"":".href"}`,Do=(e,t,n=!1)=>Oo(`'${Vr(e)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,t),Mo=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},_o=(e,t)=>`require('u' + 'rl').pathToFileURL(${e})${t?"":".href"}`,Lo=(e,t)=>_o(`__dirname + '/${Vr(e)}'`,t),To=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${qr} && ${qr}.tagName.toUpperCase() === 'SCRIPT' && ${qr}.src || new URL('${Vr(e)}', document.baseURI).href)`,zo={amd:(e,t)=>("."!==e[0]&&(e="./"+e),Oo(`require.toUrl('${Vr(e)}'), document.baseURI`,t)),cjs:(e,t)=>`(typeof document === 'undefined' ? ${Lo(e,t)} : ${Do(e,t)})`,es:(e,t)=>Oo(`'${Vr(e)}', import.meta.url`,t),iife:(e,t)=>Do(e,t),system:(e,t)=>Oo(`'${Vr(e)}', module.meta.url`,t),umd:(e,t)=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Lo(e,t)} : ${Do(e,t,!0)})`},Bo={amd:Mo(()=>Oo("module.uri, document.baseURI",!1)),cjs:Mo(e=>`(typeof document === 'undefined' ? ${_o("__filename",!1)} : ${To(e)})`),iife:Mo(e=>To(e)),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:Mo(e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${_o("__filename",!1)} : ${To(e,!0)})`)};function Vo(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}function Fo(e,t){if(Vo(e,t))return!0;const n=e.getHoistedVariable();return void 0!==n&&null!==n.renderBaseName}function jo(e){if(e.scope.context.usesTopLevelAwait)return;let t=e.parent;do{if(t instanceof Dr)return}while(t=t.parent);e.scope.context.usesTopLevelAwait=!0}class Uo extends ws{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e,t,n){const s=[],i=Go(t);for(const t of this.elements)null!==t&&s.push(...t.declare(e,i,n));return s}deoptimizeAssignment(e,t){const n=Go(e);for(const e of this.elements)e?.deoptimizeAssignment(n,t)}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(et)}hasEffectsWhenDestructuring(e,t,n){const s=Go(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(et,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){let s=!1;const i=Go(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}}setAssignedValue(e){super.setAssignedValue(e);for(const e of this.elements)e?.setAssignedValue(vt)}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}Uo.prototype.includeNode=Is;const Go=e=>e.at(-1)===je?e:[...e,Ge];class Ho extends ws{addExportedVariables(e,t){for(const n of this.properties)n.type===Ne?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(et,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=s.type===Ce;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=Ee(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)):ue(i,e,o,a);s&&e.remove(s,this.end-1)}}setAssignedValue(e){super.setAssignedValue(e);for(const e of this.properties)e.setAssignedValue(vt)}}Ho.prototype.includeNode=Ns,Ho.prototype.applyDeoptimizations=Cs;class Wo extends ws{addExportedVariables(e,t){if("var"===this.kind)for(const n of this.declarations)n.id.addExportedVariables(e,t)}deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(et)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=_e){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 Ho||i instanceof Uo)&&r.include(e,t)}}initialise(){super.initialise(),"await using"===this.kind&&jo(this);for(const e of this.declarations)e.declareDeclarator(this.kind)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=_e){if(this.isForInOfHead())this.renderForInOfHead(e,t);else 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.isInSingleStatementPosition()?this.renderSingleStatementDeclaration(e,t,!0===n.isNoStatement):this.renderReplacedDeclarations(e,t,!0===n.isNoStatement)}isForInOfHead(){const e=this.parent;return("ForOfStatement"===e.type||"ForInStatement"===e.type)&&e.left===this}isInSingleStatementPosition(){const{type:e}=this.parent;return!(e===Ie||e===Se||e===ke||"SwitchCase"===e||"ExportNamedDeclaration"===e)}renderForInOfHead(e,t){const n=this.declarations[0];if(n.id instanceof tr&&Fo(n.id.variable,t.exportNamesByVariable))return e.remove(this.start,n.id.start),void n.id.render(e,t);for(const n of this.declarations)n.render(e,t)}renderDeclarationEnd(e,t,n,s,i,r,o,a){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),a||(t+=";"),null===n?t&&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,` ${Re(r,o)};`)}renderReplacedDeclarations(e,t,n){const s=Ee(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let i,r;r=fe(e.original,this.start+this.kind.length);let o=r-1;e.remove(this.start,o);let a,l,c=!1,u=!1,d="";const h=[],p=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof tr&&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}(s,t,h),{exportNamesByVariable:f}=t;for(const{node:n,start:h,separator:m,contentEnd:g,end:y}of s){if(!n.included){ue(n,e,h,y);continue}n.render(e,t),a="",l="";if(!n.id.included||n.id instanceof tr&&Fo(n.id.variable,f))u&&(d+=";"),c=!1;else{if(p&&p===n.id.variable){const s=he(e.original,"=",n.id.end);Oe(p,fe(e.original,s+1),null===m?g:m,e,t)}c?d+=",":(u&&(d+=";"),a+=`${this.kind} `,c=!0)}r===o+1?e.overwrite(o,r,d+a):(e.overwrite(o,o+1,d),e.appendLeft(r,a)),i=g,r=y,u=!0,o=m,d=""}this.renderDeclarationEnd(e,d,o,i,r,h,t,n)}renderSingleStatementDeclaration(e,t,n){const s=Ee(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let i,r;r=fe(e.original,this.start+this.kind.length);let o=r-1;e.remove(this.start,o);let a=!1,l=r,c="";const u=[],{exportNamesByVariable:d,snippets:{_:h,getPropertyAccess:p}}=t;for(const{node:n,start:h,separator:p,contentEnd:f,end:m}of s){if(!n.included){ue(n,e,h,m);continue}n.render(e,t),"system"===t.format&&this.renderSingleStatementSystemExports(n,p,f,e,t,u);let s="";const g=n.id instanceof tr&&Fo(n.id.variable,d);a?c=",":g||(s=`${this.kind} `),r===o+1?e.overwrite(o,r,c+s):(e.overwrite(o,o+1,c),e.appendLeft(r,s)),i=f,r=m,l=null===p?f:p,a=!0,o=p,c=""}if(u.length>0){const n=u[0].getName(p);e.appendLeft(l,`,${h}${n}${h}=${h}(${Re(u,t)},${h}${n})`)}this.renderDeclarationEnd(e,c,o,i,r,[],t,n)}renderSingleStatementSystemExports(e,t,n,s,i,r){const{exportNamesByVariable:o}=i;if(e.id instanceof tr){const a=e.id.variable,l=o.get(a);if(!e.init||!l)return;if(1===l.length){const r=he(s.original,"=",e.id.end);Oe(a,fe(s.original,r+1),null===t?n:t,s,i)}else r.push(a)}else e.id.addExportedVariables(r,o)}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===we){if(e.has(t.id.variable)||Fo(t.id.variable,e))return!1}else{const n=[];if(t.id.addExportedVariables(n,e),n.length>0)return!1}}return!0}}Wo.prototype.includeNode=Ns,Wo.prototype.applyDeoptimizations=Cs;class Ko extends hr{render(e,t,{renderedSurroundingElement:n}=_e){super.render(e,t),n===Pe&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class qo extends ws{declareDeclarator(e){this.isUsingDeclaration="using"===e,this.isAsyncUsingDeclaration="await using"===e,this.id.declare(e,et,this.init||Ts)}deoptimizePath(e){this.id.deoptimizePath(e)}deoptimizeCache(){!this.hasDeoptimizedDisposal&&this.init&&(this.hasDeoptimizedDisposal=!0,this.init.deoptimizePath(tt),this.init.includePath(tt,mt()),this.scope.context.requestTreeshakingPass())}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,et,this.init||Ts)}include(e,t){const{id:n,init:s}=this;this.included||this.includeNode(e);const{disposalCall:i,disposalFunction:r}=this;r&&i&&r.includeCallArgumentsWhenCalledAtPath(et,i,e),s?.include(e,t),n.markDeclarationReached(),t?n.include(e,t):n.includeDestructuredIfNecessary(e,et,s||Ts)}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=he(e.original,"=",o.end);e.remove(l,fe(e.original,t+1))}if(a){if(o instanceof tr&&a instanceof Ko&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?_e:{renderedSurroundingElement:Pe})}else o instanceof tr&&Vo(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}includeNode(e){this.included=!0;const{id:t,init:n}=this;if(n){if(this.isUsingDeclaration||this.isAsyncUsingDeclaration){const t={access:{args:[n],type:0},call:{args:[n],type:2,withNew:!1}};!this.isUsingDeclaration&&this.includeDisposalMethodAndCheckIfKnownFunction(n,Jo,t,e)||this.includeDisposalMethodAndCheckIfKnownFunction(n,Xo,t,e),this.scope.context.requestTreeshakingPass()}if(t instanceof tr&&n instanceof Ko&&!n.id){const{name:e,variable:s}=t;for(const t of n.scope.accessedOutsideVariables.values())t!==s&&t.forbidName(e)}}}includeDisposalMethodAndCheckIfKnownFunction(e,t,{access:n,call:s},i){e.deoptimizeArgumentsOnInteractionAtPath(n,t,at);const r=e.getKnownFunctionAtPath(t,at,this);if(e.includePath(t,i),!r){const n=e.getLiteralValueAtPath(t,at,this);return null!=n&&(e.deoptimizeArgumentsOnInteractionAtPath(s,t,at),e.includeCallArgumentsWhenCalledAtPath(t,s,i)),!1}return this.disposalFunction=r,this.disposalCall=s,r.deoptimizeArgumentsOnInteractionAtPath(s,et,at),!0}}qo.prototype.applyDeoptimizations=Cs;const Xo=[Ke],Jo=[qe];class Yo extends is{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.getMemberVariable(s)?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):Pt(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];if("string"==typeof t)this.getMemberVariable(t)?.deoptimizePath(e.slice(1));else if(!this.areAllMembersDeoptimized){this.areAllMembersDeoptimized=!0;for(const e of this.module.getExportedVariablesByName().values())e.deoptimizePath(tt)}}}getLiteralValueAtPath(e){return e[0]===We?"Module":Et}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.getMemberVariable(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.getMemberVariable(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([Kr],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])=>!ae(e)&&t.included).map(([e,t])=>{const n=oe(e);return this.referencedEarly||t.isReassigned||t===this||t.module&&!t.module.info.isExternal&&t.module.execIndex>this.module.execIndex?[null,`get ${fs(n)}${o}()${o}{${o}return ${t.getName(c)}${d}${o}}`]:[n,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__*/${Kr}(${p},${o}[${e.join(`,${o}`)}])`}else r&&(p=`/*#__PURE__*/Object.defineProperty(${p},${o}Symbol.toStringTag,${o}${mo(l)})`),s&&(p=`/*#__PURE__*/Object.freeze(${p})`);return p=`${a} ${this.getName(c)}${o}=${o}${p};`,"system"===n&&t.has(this)&&(p+=`${u}${Re([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}}}getMemberVariable(e){return this.module.getExportedVariablesByName().get(re(e))}includeNonExplicitNamespaces(){this.nonExplicitNamespacesIncluded||(this.nonExplicitNamespacesIncluded=!0,this.setMergedNamespaces(this.module.includeAndGetAdditionalMergedNamespaces()))}}Yo.prototype.isNamespace=!0;const Zo=e=>Object.create(e,{includePath:{value(t,n){e.includeMemberPath(t,n)}}});class Qo extends is{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 yo||e instanceof Qo;){if(e instanceof yo){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof Qo&&(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 ea{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?J(te(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=ta(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return Vr(this.renormalizeRenderPath?Kt(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function ta(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map(([e,t])=>[e,JSON.stringify(t)]);return n.length>0?t(n,{lineBreakIndent:null}):null}function na(e){return e.endsWith(".js")?e.slice(0,-3):e}function sa(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${na(t)}`:e.id??""}function ia(e,t,n,s,i,r,o,a,l="return "){const{_:c,getFunctionIntro:u,getPropertyAccess:d,n:h,s:p}=i;if(!n)return`${h}${h}${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 ra(a,u[0].imported,l,o,e,c,n,r,s,i)}(e,t,s,o,d)};`;let f="";if(n)for(const{defaultVariableName:e,importPath:n,isChunk:a,name:l,namedExportsMode:u,namespaceVariableName:p,reexports:m}of t)if(m)for(const t of m)if("*"!==t.reexported){const m=ra(l,t.imported,u,a,e,p,s,n,o,d);f&&(f+=h),"*"!==t.imported&&t.needsLiveBinding?f+=`Object.defineProperty(exports,${c}${JSON.stringify(oe(t.reexported))},${c}${ca(m,!1,r,i)});`:"__proto__"===t.reexported?f+=`Object.defineProperty(exports,${c}"__proto__",${c}{${h}${r}enumerable:${c}true,${h}${r}value:${c}${m}${h}});`:f+=`exports${d(oe(t.reexported))}${c}=${c}${m};`}for(const{exported:t,local:n,needsLiveBinding:s}of e){const e=`exports${d(oe(t))}`,o=n;if(e!==o){if(f&&(f+=h),s){f+=`Object.defineProperty(exports,${c}${JSON.stringify(oe(t))},${c}${ca(o,!0,r,i)});`;continue}f+="__proto__"===t?`Object.defineProperty(exports,${c}"__proto__",${c}{${h}${r}enumerable:${c}true,${h}${r}value:${c}${o}${h}});`:`${e}${c}=${c}${o};`}}if(n)for(const{name:e,reexports:n}of t)if(n)for(const t of n)if("*"===t.reexported){if(f&&(f+=h),!t.needsLiveBinding&&a){const t="'__proto__'";f+=`Object.prototype.hasOwnProperty.call(${e},${c}${t})${c}&&${h}${r}!Object.prototype.hasOwnProperty.call(exports,${c}${t})${c}&&${h}${r}Object.defineProperty(exports,${c}${t},${c}{${h}${r}${r}enumerable:${c}true,${h}${r}${r}value:${c}${e}[${t}]${h}${r}});${h}${h}`}const n=`{${h}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!Object.prototype.hasOwnProperty.call(exports,${c}k))${c}${la(e,t.needsLiveBinding,r,i)}${p}${h}}`;f+=`Object.keys(${e}).forEach(${u(["k"],{isAsync:!1,name:null})}${n});`}return f?`${h}${h}${f}`:""}function ra(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=Xr[t]?i:e;return Jr(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:Yr[o(a)])?r:e:`${e}${c(oe(t))}`}function oa(e){return e([["value","true"]],{lineBreakIndent:null})}function aa(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",oa(i)],[null,`[Symbol.toStringTag]:${s}${mo(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${oa(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${mo(i)});`}return""}const la=(e,t,n,s)=>{const{_:i}=s;return t?`Object.defineProperty(exports,${i}k,${i}${ca(`${e}[k]`,!1,n,s,n)})`:`exports[k]${i}=${i}${e}[k]`},ca=(e,t,n,{getDirectReturnFunction:s,getObject:i},r="")=>{const[o,a]=s([],{functionReturn:!0,lineBreakIndent:null,name:null}),l=[["enumerable","true"],["get",`${o}${e}${a}`]];return t&&l.unshift(["configurable","true"]),i(l,{lineBreakIndent:{base:r,t:n}})};function ua(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,Wr,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=Xr[e])):"*"!==t||"*"===i||a||(a=!0,s=Yr[e],c=l),s&&p(c,s,o)}}return`${Qr(d,r,o,a,n,s,i)}${h.length>0?`${h.join(u)}${u}${u}`:""}`}function da(e,t,n){const s=n.find(e=>e.sourcePhaseImport);s&&cn(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:qt(an)}}(e,t,s.importPath))}function ha(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":na(e);var n}const pa=new Set(["node:assert","assert","node:assert/strict","assert/strict","node:async_hooks","async_hooks","node:bench","node:bench/reporters","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:net/promises","net/promises","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 fa(e,t){const n=t.map(({importPath:e})=>e).filter(e=>pa.has(e)||e.startsWith("node:"));0!==n.length&&e(Tt,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${Ft(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const ma=e=>{return t=oe(e),hs.test(t)?t:JSON.stringify(t);var t},ga=(e,t)=>e.split(".").map(t).join("");function ya(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(Tt,Xn(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 ba(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 Ea="_missingExportShim";const xa=({dependencies:e,exports:t})=>{const n=new Set(t.map(e=>oe(e.exported)));n.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&n.add(oe(e.reexported));return n},Aa=(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""},Sa=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",va=(e,t,n)=>$a(e.filter(e=>e.hoisted).map(e=>({name:e.exported,value:e.local})),t,n);function $a(e,t,{_:n,n:s}){return 0===e.length?"":1===e.length?`exports(${JSON.stringify(oe(e[0].name))},${n}${e[0].value});${s}${s}`:`exports({${s}`+e.map(({name:e,value:s})=>`${t}${fs(oe(e))}:${n}${s}`).join(`,${s}`)+`${s}});${s}${s}`}const Pa=(e,t,n)=>$a(e.filter(e=>e.expression).map(e=>({name:e.exported,value:e.local})),t,n),wa=(e,t,n)=>$a(e.filter(e=>e.local===Ea).map(e=>({name:e.exported,value:Ea})),t,n);function Ia(e,t,n){return e?`${t}${ga(e,n)}`:"null"}var Na={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}){fa(h,n),da("amd",o,n);const v=n.map(e=>`'${ha(e.importPath,m.forceJsExtensionForImports)}'`),$=n.map(e=>e.name),{n:P,getNonArrowFunctionIntro:w,_:I}=f;r&&(d||"exports.default"===s[0]?.local)&&($.unshift("exports"),v.unshift("'exports'")),t.has("require")&&($.unshift("require"),v.unshift("'require'")),t.has("module")&&($.unshift("module"),v.unshift("'module'"));const N=sa(m,o),C=(N?`'${N}',${I}`:"")+(v.length>0?`[${v.join(`,${I}`)}],${I}`:""),k=S?`${I}'use strict';`:"";e.prepend(`${l}${ua(n,x,y,b,E,t,a,f)}`);const R=ia(s,n,d,x,f,a,y,A);let O=aa(d&&r,c&&(!0===g||"if-default-prop"===g&&i),u&&E,f);O&&(O=P+P+O),e.append(`${R}${O}${p}`).indent(a).prepend(`${m.define}(${C}(${w($,{isAsync:!1,name:null})}{${k}${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}){da("cjs",o,n);const{_:S,n:v}=p,$=A?`'use strict';${v}${v}`:"";let P=aa(d&&r,c&&(!0===m||"if-default-prop"===m&&i),u&&E,p);P&&(P+=v+v);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=ua(n,b,g,y,E,t,a,p);e.prepend(`${$}${l}${P}${w}${I}`);const N=ia(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:`${ma(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 ${ma(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map(e=>e.imported===e.reexported?ma(e.imported):`${ma(e.imported)} as ${ma(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+=Qr(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 ${ma(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:v}){da("iife",o,n);const{_:$,getNonArrowFunctionIntro:P,getPropertyAccess:w,n:I}=h,N=A&&A.includes("."),C=!m&&!N;if(A&&C&&(us(k=A)||cs.test(k)))return cn(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:qt("configuration-options/#output-extend")}}(A));var k;fa(u,n);const R=ba(n),O=R.map(e=>e.globalName||"null"),D=R.map(e=>e.name);r&&!A&&u(Tt,{code:xn,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:qt(rn)}),r&&(c||"exports.default"===s[0]?.local)&&(m?(O.unshift(`this${ga(A,w)}${$}=${$}this${ga(A,w)}${$}||${$}{}`),D.unshift("exports")):(O.unshift("{}"),D.unshift("exports")));const M=v?`${a}'use strict';${I}`:"",_=ua(n,x,y,g,S,t,a,h);e.prepend(`${l}${_}`);let L=`(${P(D,{isAsync:!1,name:null})}{${I}${M}${I}`;r&&(!A||m&&c||(L=(C?`var ${A}`:`this${ga(A,w)}`)+`${$}=${$}${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(Tt,Xn(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}})(${O.join(`,${$}`)});`;r&&!m&&c&&(T=`${I}${I}${a}return exports;${T}`);const z=ia(s,n,c,x,h,a,y,b);let B=aa(c&&r,!0===f||"if-default-prop"===f&&i,S,h);B&&(B=I+I+B),e.append(`${z}${B}${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}){da("system",r,n);const{_:y,getFunctionIntro:b,getNonArrowFunctionIntro:E,n:x,s:A}=l,{importBindings:S,setters:v,starExcludes:$}=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(oe(e.imported))};`);if(h){const a=[];let l=!1;for(const{imported:e,reexported:t}of h)"*"===t?l=!0:a.push([oe(t),"*"===e?"module":`module${o(oe(e))}`]);if(a.length>1||l)if(l){u||(u=xa({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';":""}`+Aa($,o,l)+Sa(S,o,l)+`${x}${o}return${y}{${v.length>0?`${x}${o}${o}setters:${y}[${v.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+Qr(null,t,o,l,d,h,f)+va(s,o,l)).append(`${c}${x}${x}`+Pa(s,o,l)+wa(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:v,reexportProtoFromExternal:$,strict:P}){const{_:w,cnst:I,getFunctionIntro:N,getNonArrowFunctionIntro:C,getPropertyAccess:k,n:R,s:O}=h,D=f?"f":"factory",M=f?"g":"global";if(r&&!x)return cn({code:xn,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:qt(rn)});da("umd",o,n),fa(u,n);const _=n.map(e=>`'${ha(e.importPath,p.forceJsExtensionForImports)}'`),L=n.map(e=>`require('${e.importPath}')`),T=ba(n),z=T.map(e=>Ia(e.globalName,M,k)),B=T.map(e=>e.name);(r||v)&&(c||r&&"exports.default"===s[0]?.local)&&(_.unshift("'exports'"),L.unshift("exports"),z.unshift(ya(x,M,S,(g?`${Ia(x,M,k)}${w}||${w}`:"")+"{}",h,u)),B.unshift("exports"));const V=sa(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(v){const e=f?"e":"exports";let t;if(!c&&r)t=`${I} ${e}${w}=${w}${ya(x,M,S,`${D}(${z.join(`,${w}`)})`,h,u)};`;else{t=`${I} ${e}${w}=${w}${z.shift()};${R}${a}${a}${D}(${[e,...z].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}${Ia(x,M,k)}${w}=${w}current;${w}return ${e}${O}${w}};${R}${a}})()`}else H=`${D}(${z.join(`,${w}`)})`,!c&&r&&(H=ya(x,M,S,H,h,u));const W=r||v&&c||z.length>0,K=[D];W&&K.unshift(M);const q=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}${D}(${L.join(`,${w}`)})${w}:${R}`:"",Z=`(${C(K,{isAsync:!1,name:null})}{${R}`+Y+`${a}typeof ${j}${w}===${w}'function'${w}&&${w}${j}.amd${w}?${w}${j}(${F}${D})${w}:${R}`+`${a}${X}${H}${J};${R}`+`})(${q}(${C(B,{isAsync:!1,name:null})}{${G}${R}`,Q=R+R+"}));";e.prepend(`${l}${ua(n,E,y,b,A,t,a,h)}`);const ee=ia(s,n,c,E,h,a,y,$);let te=aa(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 Ca(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ka,Ra,Oa,Da,Ma,_a,La,Ta,za,Ba,Va,Fa={};function ja(){if(Ra)return ka;Ra=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 ka={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},ka}function Ua(){return Oa||(Oa=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=ja();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}}(Fa)),Fa}function Ga(){if(Ma)return Da;Ma=1;const e=Ua(),{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}=ja(),g=e=>e===a||e===s,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Da=(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,C=-1,k=0,R=0,O=!1,D=!1,M=!1,_=!1,L=!1,T=!1,z=!1,B=!1,V=!1,F=!1,j=0,U={value:"",depth:0,isGlob:!1};const G=()=>C>=A,H=()=>N.charCodeAt(C+1),W=()=>(w=I,N.charCodeAt(++C));for(;C<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(O=U.isBrace=!0,M=U.isGlob=!0,F=!0,!0===S)continue;break}if(!0!==T&&I===i){if(O=U.isBrace=!0,M=U.isGlob=!0,F=!0,!0===S)continue;break}if(I===p&&(j--,0===j)){T=!1,O=U.isBrace=!0,F=!0;break}}else j++;else z=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&&C===k&&(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 z=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){D=U.isBracket=!0,M=U.isGlob=!0,F=!0;break}}else z=U.backslashes=!0,W();if(!0===S)continue;break}if(!0===x.nonegate||I!==o||C!==k){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 z=U.backslashes=!0,W();continue}break}if(!0===M){if(F=!0,!0===S)continue;break}}else B=U.negated=!0,k++}else{if(v.push(C),$.push(U),U={value:"",depth:0,isGlob:!1},!0===F)continue;if(w===r&&C===k+1){k+=2;continue}R=C+1}}else z=U.backslashes=!0,I=W(),I===l&&(T=!0)}!0===x.noext&&(_=!1,M=!1);let K=N,q="",X="";k>0&&(q=N.slice(0,k),N=N.slice(k),R-=k),K&&!0===M&&R>0?(K=N.slice(0,R),X=N.slice(R)):!0===M?(K="",X=N):K=N,K&&""!==K&&"/"!==K&&K!==N&&g(K.charCodeAt(K.length-1))&&(K=K.slice(0,-1)),!0===x.unescape&&(X&&(X=e.removeBackslashes(X)),K&&!0===z&&(K=e.removeBackslashes(K)));const J={prefix:q,input:b,start:k,base:K,glob:X,isBrace:O,isBracket:D,isGlob:M,isExtglob:_,isGlobstar:L,negated:B,negatedExtglob:V};if(!0===x.tokens&&(J.maxDepth=0,g(I)||$.push(U),J.tokens=$),!0===x.parts||!0===x.tokens){let e;for(let t=0;t<v.length;t++){const n=void 0!==e?e+1:k,s=v[t],i=b.slice(n,s);x.tokens&&(0===t&&0!==k?($[t].isPrefix=!0,$[t].value=q):$[t].value=i,y($[t]),J.maxDepth+=$[t].depth),s>=k&&(P.push(i),e=s)}const t=void 0!==e?e+1:k,n=b.slice(t);P.push(n),x.tokens&&e&&e+1<b.length&&($[$.length-1].value=n,y($[$.length-1]),J.maxDepth+=$[$.length-1].depth),J.slashes=v,J.parts=P}return J},Da}function Ha(){if(La)return _a;La=1;const e=ja(),t=Ua(),{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:v,ONE_CHAR:$,DOTS_SLASH:P,NO_DOT:w,NO_DOT_SLASH:I,NO_DOTS_SLASH:N,QMARK:C,QMARK_NO_DOT:k,STAR:R,START_ANCHOR:O}=E,D=e=>`(${b}(?:(?!${O}${e.dot?P:A}).)*?)`,M=d.dot?"":w,_=d.dot?C:k;let L=!0===d.bash?D(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 z=[],B=[],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),K=(e="",t=0)=>{T.consumed+=e,T.index+=t},q=e=>{T.output+=null!=e.output?e.output:e.value,K(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||z.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(z.length&&"paren"!==e.type&&(z[z.length-1].inner+=e.value),(e.value||e.output)&&q(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?"":$}),Z({type:"paren",extglob:!0,value:H(),output:s}),z.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?"":$)+(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=D(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?C.repeat(r.length):""):0===o?_+(r?C.repeat(r.length):""):C.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=$);continue}}}("["===F&&":"!==G()||"-"===F&&"]"===G())&&(F=`\\${F}`),"]"!==F||"["!==j.value&&"[^"!==j.value||(F=`\\${F}`),!0===d.posix&&"!"===F&&"["===j.value&&(F="^"),j.value+=F,q({value:F});continue}if(1===T.quotes&&'"'!==F){F=t.escapeRegex(F),j.value+=F,q({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=z[z.length-1];if(e&&T.parens===e.parens+1){ee(z.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,q({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};B.push(e),Z(e);continue}if("}"===F){const e=B[B.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"),B.pop();continue}if("|"===F){z.length>0&&z[z.length-1].conditions++,Z({type:"text",value:F});continue}if(","===F){let e=F;const t=B[B.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:v});continue}if("."===F){if(T.braces>0&&"dot"===j.type){"."===j.value&&(j.output=A);const e=B[B.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:k});continue}Z({type:"qmark",value:F,output:C});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,K(F);continue}let e=W();if(!0!==d.noextglob&&/^\([^?]/.test(e)){Q("star",F);continue}if("star"===j.type){if(!0===d.noglobstar){K(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=z.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),K("/**",3)}const a=U()||T.parens>0&&e===")".repeat(T.parens)&&!z.some(e=>"negate"===e.type);if("bos"===t.type&&U()){j.type="globstar",j.value+=F,j.output=D(d),T.output=j.output,T.globstar=!0,K(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=D(d)+(d.strictSlashes?")":"|$)"),j.value+=F,T.globstar=!0,T.output+=t.output+j.output,K(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=`${D(d)}${v}|${v}${n})`,j.value+=F,T.output+=t.output+j.output,T.globstar=!0,K(F+H()),Z({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){j.type="globstar",j.value+=F,j.output=`(?:^|${v}|${D(d)}${v})`,T.output=j.output,T.globstar=!0,K(F+H()),Z({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-j.output.length),j.type="globstar",j.output=D(d),j.value+=F,T.output+=j.output,T.globstar=!0,K(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+=$,j.output+=$)),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:`${v}?`}),!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}).)*?)`,v=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=v(t[1]);if(!n)return;return n+c+t[2]}}},$=t.removePrefix(s,{negated:!1,prefix:""});let P=v($);return P&&!0!==r.strictSlashes&&(P+=`${u}?`),P},_a=g}function Wa(){if(za)return Ta;za=1;const e=Ga(),t=Ha(),n=Ua(),s=ja(),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,Ta=i}function Ka(){if(Va)return Ba;Va=1;const e=Wa(),t=Ua();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),Ba=n}var qa=Ca(Ka());const Xa={ArrayPattern(e,t){for(const n of t.elements)n&&Xa[n.type](e,n)},AssignmentPattern(e,t){Xa[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?Xa.RestElement(e,n):Xa[n.value.type](e,n.value)},RestElement(e,t){Xa[t.argument.type](e,t.argument)}},Ja=function(e){const t=[];return Xa[e.type](t,e),t};function Ya(e,t){return e>>>=0,nl().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 Za=null;function Qa(){return(null===Za||!0===Za.buffer.detached||void 0===Za.buffer.detached&&Za.buffer!==ll.memory.buffer)&&(Za=new DataView(ll.memory.buffer)),Za}function el(e,t){return e>>>=0,function(e){ol+=e.length,ol>=rl&&(il=new TextDecoder("utf-8",{ignoreBOM:!0}),il.decode(),ol=e.length);return il.decode(e)}(nl().subarray(e,e+t))}let tl=null;function nl(){return null!==tl&&0!==tl.byteLength||(tl=new Uint8Array(ll.memory.buffer)),tl}function sl(e,t,n){if(void 0===n){const n=al.encode(e),s=t(n.length,1)>>>0;return nl().subarray(s,s+n.length).set(n),ul=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=nl();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=nl().subarray(i+o,i+s);o+=al.encodeInto(e,t).written,i=n(i,s,o,1)>>>0}return ul=o,i}let il=new TextDecoder("utf-8",{ignoreBOM:!0});il.decode();const rl=2146435072;let ol=0;const al=new TextEncoder;"encodeInto"in al||(al.encodeInto=function(e,t){const n=al.encode(e);return t.set(n),{read:e.length,written:n.length}});let ll,cl,ul=0;async function dl(e){return void 0!==ll?ll:(void 0===cl&&(cl=async function(e){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={__proto__:null,"./bindings_wasm_bg.js":{__proto__:null,__wbg___wbindgen_throw_4c88d8bf264fd984:function(e,t){throw new Error(el(e,t))},__wbg_error_757e9472f8410341:function(e,t){let n,s;try{n=e,s=t,console.error(el(e,t))}finally{ll.__wbindgen_export(n,s,1)}},__wbg_length_186163212ffe79c3:function(e){return e.length},__wbg_new_bb74001155cb8ca8:function(){return new Error},__wbg_prototypesetcall_13162965d1fe7aa3:function(e,t,n){Uint8Array.prototype.set.call(Ya(e,t),n)},__wbg_stack_575c4e0918581b9c:function(e,t){const n=sl(t.stack,ll.__wbindgen_export2,ll.__wbindgen_export3),s=ul;Qa().setInt32((e>>>0)+4,s,!0),Qa().setInt32((e>>>0)+0,n,!0)},__wbindgen_init_externref_table:function(){const e=ll.__wbindgen_externrefs;e.set(0,void 0),e.set(1024,void 0),e.set(1025,null),e.set(1026,!0),e.set(1027,!1)}}};("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 ll=e.exports,Za=null,tl=null,ll.__wbindgen_start(),ll}(n)}(e),cl.catch(()=>{cl=void 0})),cl)}const hl=0===new Uint8Array(new Uint32Array([1]).buffer)[0];function pl(e,t,n){return function(e,t,n,s){try{const a=ll.__wbindgen_add_to_stack_pointer(-16)>>>0,l=+t,c=+n,u=+s,d=sl(e,ll.__wbindgen_export2,ll.__wbindgen_export3),h=ul;ll.parse(a,d,h,l,c,u);var i=Qa().getInt32(a+0,!0),r=Qa().getInt32(a+4,!0),o=Ya(i,r).slice();return ll.__wbindgen_export(i,1*r,1),o}finally{ll.__wbindgen_add_to_stack_pointer(16)}}(e,t,n,hl)}const fl=[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:gl(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:gl(t[e+2],t)}},function(e,t){const n=t[e+2],s=As(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?{[Es]:s}:{},params:gl(t[e+4],t),body:ml(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:bs[t[e+2]],left:ml(t[e+3],t),right:ml(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:ml(t[e+2],t),right:ml(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:ml(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:bs[t[e+2]],left:ml(t[e+3],t),right:ml(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:gl(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:ml(n,t)}},function(e,t){const n=t[e+2],s=As(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{[Es]:s}:{},callee:ml(t[e+4],t),arguments:gl(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:ml(n,t),body:ml(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:ml(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:gl(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:gl(t[e+2],t),id:0===n?null:ml(n,t),superClass:0===s?null:ml(s,t),body:ml(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:gl(t[e+2],t),id:0===n?null:ml(n,t),superClass:0===s?null:ml(s,t),body:ml(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:ml(t[e+2],t),consequent:ml(t[e+3],t),alternate:ml(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:ml(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:ml(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:ml(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:ml(t[e+2],t),test:ml(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:ml(n,t),source:ml(t[e+3],t),attributes:gl(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:ml(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:gl(t[e+2],t),source:0===n?null:ml(n,t),attributes:gl(t[e+4],t),declaration:0===s?null:ml(s,t)}},function(e,t){const n=ml(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:ml(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:ml(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:ml(t[e+2],t),right:ml(t[e+3],t),body:ml(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:ml(t[e+3],t),right:ml(t[e+4],t),body:ml(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:ml(n,t),test:0===s?null:ml(s,t),update:0===i?null:ml(i,t),body:ml(t[e+5],t)}},function(e,t){const n=t[e+2],s=As(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?{[Es]:s}:{},id:0===i?null:ml(i,t),params:gl(t[e+5],t),body:ml(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=As(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?{[Es]:s}:{},id:0===i?null:ml(i,t),params:gl(t[e+5],t),body:ml(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:ml(t[e+2],t),consequent:ml(t[e+3],t),alternate:0===n?null:ml(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:ml(t[e+2],t),value:ml(t[e+3],t)}},function(e,t){const n=t[e+5];return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:gl(t[e+2],t),source:ml(t[e+3],t),attributes:gl(t[e+4],t),...0===n?{}:{phase:bs[n]}}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:ml(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:ml(t[e+2],t),options:0===n?null:ml(n,t),...0===s?{}:{phase:bs[s]}}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:ml(t[e+2],t)}},function(e,t){const n=t[e+2],s=ml(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:ml(n,t),local:s}},function(e,t){const n=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:ml(t[e+2],t),value:0===n?null:ml(n,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:ml(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:ml(t[e+2],t),children:gl(t[e+3],t),closingElement:0===n?null:ml(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:ml(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:ml(t[e+2],t),children:gl(t[e+3],t),closingFragment:ml(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:ml(t[e+2],t),property:ml(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:ml(t[e+2],t),name:ml(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:ml(t[e+3],t),attributes:gl(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:ml(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:ml(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:ml(t[e+2],t),body:ml(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:bs[t[e+2]],left:ml(t[e+3],t),right:ml(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:ml(t[e+3],t),property:ml(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:ml(t[e+2],t),property:ml(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:gl(t[e+3],t),key:ml(t[e+4],t),value:ml(t[e+5],t),kind:bs[t[e+6]]}},function(e,t){const n=As(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{[Es]:n}:{},callee:ml(t[e+3],t),arguments:gl(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:gl(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:gl(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=As(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:gl(t[e+2],t),...n.length>0?{[xs]:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=ml(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}:ml(s,t),value:i,kind:bs[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:gl(t[e+3],t),key:ml(t[e+4],t),value:0===s?null:ml(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:ml(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:ml(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:gl(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:ml(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:gl(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:ml(n,t),consequent:gl(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:ml(t[e+2],t),cases:gl(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:ml(t[e+2],t),quasi:ml(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:gl(t[e+2],t),expressions:gl(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:ml(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:ml(t[e+2],t),handler:0===n?null:ml(n,t),finalizer:0===s?null:ml(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:bs[t[e+2]],argument:ml(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:bs[t[e+3]],argument:ml(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:bs[t[e+2]],declarations:gl(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:ml(t[e+2],t),init:0===n?null:ml(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:ml(t[e+2],t),body:ml(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:ml(s,t)}}];function ml(e,t){const n=t[e],s=fl[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function gl(e,t){if(0===e)return Te;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++){const n=t[e++];s[i]=n?ml(n,t):null}return s}function yl(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 bl extends Dr{constructor(){super(...arguments),this.objectEntity=null}get expression(){return yt(this.flags,8388608)}set expression(e){this.flags=bt(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===ve&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,t){super.include(e,t);for(const n of this.params)n instanceof tr||n.include(e,t)}includeNode(e){this.included=!0,this.body.includePath(tt,e);for(const t of this.params)t instanceof tr||t.includePath(tt,e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ri([],li)}}class El extends ws{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,et,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=gt();(t||s||"="!==o||i.included||i.hasEffectsAsAssignmentTarget(a,!1)||i.hasEffectsWhenDestructuring?.(a,et,r))&&i.includeAsAssignmentTarget(e,t,"="!==o),r.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(tt,e)}initialise(){if(super.initialise(),this.left instanceof tr){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&(this.isConstReassignment=!0,this.scope.context.log(Tt,{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}=_e){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=fe(e.original,he(e.original,"=",r.end)+1);e.remove(a,l),n&&xe(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof tr){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?Oe(n,a,l,e,t):De(n,a,l,c.type!==Pe,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"],`${Re(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,function(e,t,n){return t===Pe||e.type===Pe&&e.start===n}(c,i,a),e,t)}r.included&&r instanceof Ho&&(i===Pe||i===Ae)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(et,this.right),this.scope.context.requestTreeshakingPass()}}class xl extends ws{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(et,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(tt,e)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=_e){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}setAssignedValue(e){this.left.setAssignedValue(e)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(et),this.right.deoptimizePath(tt),this.scope.context.requestTreeshakingPass()}}class Al extends ws{deoptimizePath(e){this.argument.deoptimizePath(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}initialise(){super.initialise(),jo(this)}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(Sl,e)}includePath(e,t){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(t),this.argument.includePath(e,t)}}const Sl=["then"];function vl(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):Et}const $l={"!=":(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},Pl=Symbol("Unassigned");class wl extends ws{constructor(){super(...arguments),this.renderedLiteralValue=Pl}deoptimizeCache(){this.renderedLiteralValue=Et}getLiteralValueAtPath(e,t,n){if(e.length>0)return Et;const s=this.left.getLiteralValueAtPath(et,t,n);if("symbol"==typeof s)return Et;if("in"===this.operator&&this.right.variable instanceof Yo){const[e]=this.right.variable.context.traceExport(String(s));return e instanceof os||e instanceof Qo?Et:!!e}const i=this.right.getLiteralValueAtPath(et,t,n);if("symbol"==typeof i)return Et;const r=$l[this.operator];return r?r(s,i):Et}getRenderedLiteralValue(){return"in"===this.operator&&this.right.variable instanceof Yo?this.renderedLiteralValue!==Pl?this.renderedLiteralValue:this.renderedLiteralValue=vl(this.getLiteralValueAtPath(et,at,this)):Et}hasEffects(e){return"+"===this.operator&&this.parent instanceof Cr&&""===this.left.getLiteralValueAtPath(et,at,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(it,e))}includeNode(e){this.included=!0,"in"===this.operator&&"symbol"==typeof this.getRenderedLiteralValue()&&this.right.includePath(tt,e)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=_e){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))}}wl.prototype.applyDeoptimizations=Cs;class Il extends ws{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 Nl(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(he(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(he(e.original,"(",n.callee.end)+1,n.end-1)}}Il.prototype.includeNode=Ns,Il.prototype.applyDeoptimizations=Cs;class Cl extends ws{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!==vt);if(0!==o.length)if(i===vt)for(const e of o)e.deoptimizePath(tt);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]!==vt){this.returnExpression=$t;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=ze,this.deoptimizableDependentExpressions=Te;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(tt)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==vt&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===vt?Et:t.withTrackedEntityAtPath(e,s,()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n)),Et)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===vt?i:n.withTrackedEntityAtPath(e,i,()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]},$t)}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)}includeCallArgumentsWhenCalledAtPath(e,t,n){const[s,i]=this.getReturnExpression();i||s===vt||n.includedCallArguments.has(s)?wt(t,n):(n.includedCallArguments.add(s),s.includeCallArgumentsWhenCalledAtPath(e,t,n),n.includedCallArguments.delete(s))}}class kl extends Cl{get hasCheckedForWarnings(){return yt(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=bt(this.flags,134217728,e)}get optional(){return yt(this.flags,128)}set optional(e){this.flags=bt(this.flags,128,e)}bind(){super.bind(),this.interaction={args:[this.callee instanceof vo&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return Eo(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(et,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===Ps)return Ps;if(this.optional&&null==this.callee.getLiteralValueAtPath(et,at,this))return!this.annotationPure&&t||Ps;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(et,this.interaction,e))}include(e,t){this.included||this.includeNode(e),t?(super.include(e,!0),t===$s&&this.callee instanceof tr&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.callee.include(e,!1),this.callee.includeCallArgumentsWhenCalledAtPath(et,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}=_e){if(this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),Nl(e,t,this),this.callee instanceof tr&&!this.hasCheckedForWarnings){this.hasCheckedForWarnings=!0;this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(Tt,In(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(Tt,{code:"EVAL",id:s=this.scope.context.module.id,message:`Use of eval in "${Gt(s)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:qt("troubleshooting/#avoiding-eval")},this.start)}var s}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,et,at),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=at){return null===this.returnExpression?(this.returnExpression=$t,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(et,this.interaction,e,this)):this.returnExpression}}class Rl extends ws{createScope(e){this.scope=new wr(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",et,vt)),this.body=new kr(this,this.scope.bodyScope).parseNode(t),super.parseNode(e)}}Rl.prototype.preventChildBlockScope=!0,Rl.prototype.includeNode=Is;class Ol extends ws{deoptimizeCache(){}deoptimizePath(e){this.expression.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===Ps?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)}}Ol.prototype.includeNode=Ns,Ol.prototype.applyDeoptimizations=Cs;class Dl extends ir{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new Ji("this",null,t,et,n,"other")),this.instanceScope=new ir(this,n),this.instanceThisVariable=new Ar(n),this.instanceScope.variables.set("this",this.instanceThisVariable)}findLexicalBoundary(){return this}}class Ml extends ws{createScope(e){this.scope=new Dl(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,tt,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)}}function _l(e){return"symbol"==typeof e?e!==At&&(e===xt||Et):!!e}Ml.prototype.includeNode=Ns,Ml.prototype.applyDeoptimizations=Cs;class Ll extends St{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new Ll(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 Tl extends ws{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return yt(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=bt(this.flags,65536,e)}get hasDeoptimizedCache(){return yt(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=bt(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(tt),this.included&&e.includePath(tt,mt());const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Te;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 Et;const s=this.consequent.getLiteralValueAtPath(e,t,n),i=_l(s);if(i===Et)return Et;const r=this.alternate.getLiteralValueAtPath(e,t,n);return i!==_l(r)?Et:(this.expressionsToBeDeoptimized.push(n),s!==r?i?xt:At: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 Ll([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)}includeCallArgumentsWhenCalledAtPath(e,t,n){if(0===e.length){const e=this.getUsedBranch();e?e.includeCallArgumentsWhenCalledAtPath(et,t,n):(this.consequent.includeCallArgumentsWhenCalledAtPath(et,t,n),this.alternate.includeCallArgumentsWhenCalledAtPath(et,t,n))}else wt(t,n)}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=_e){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=he(e.original,":",this.consequent.end),l=fe(e.original,(this.consequent.included?he(e.original,"?",this.test.end):a)+1);s&&xe(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=_l(this.test.getLiteralValueAtPath(et,at,this));return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}Tl.prototype.includeNode=Ns,Tl.prototype.applyDeoptimizations=Cs;class zl extends ws{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}}zl.prototype.includeNode=Ns,zl.prototype.applyDeoptimizations=Cs;class Bl extends ws{hasEffects(){return!0}}Bl.prototype.includeNode=Is;class Vl extends ws{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(et,kt,e)}}function Fl(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 jl(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}Vl.prototype.includeNode=Is;class Ul extends ws{hasEffects(e){return!!this.test.hasEffects(e)||Fl(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),jl(e,this.body,t)}}Ul.prototype.includeNode=Ns,Ul.prototype.applyDeoptimizations=Cs;class Gl extends ws{hasEffects(){return!1}}Gl.prototype.includeNode=Is;class Hl extends ws{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}}Hl.prototype.needsBoundaries=!0,Hl.prototype.includeNode=Ns,Hl.prototype.applyDeoptimizations=Cs;class Wl extends ws{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 pr){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})}}}Wl.prototype.needsBoundaries=!0,Wl.prototype.includeNode=Ns,Wl.prototype.applyDeoptimizations=Cs;class Kl extends ws{}Kl.prototype.includeNode=Ns,Kl.prototype.applyDeoptimizations=Cs;class ql extends ws{createScope(e){this.scope=new cr(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||Fl(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),jl(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(tt,e)}initialise(){super.initialise(),this.left.setAssignedValue(vt)}render(e,t){this.left.render(e,t,de),this.right.render(e,t,de),110===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t),"system"===t.format&&Me(this.left,this.body,e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(et),this.scope.context.requestTreeshakingPass()}}class Xl extends ws{get await(){return yt(this.flags,131072)}set await(e){this.flags=bt(this.flags,131072,e)}createScope(e){this.scope=new cr(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),jl(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(tt,e)}initialise(){super.initialise(),this.await&&jo(this),this.left.setAssignedValue(vt)}render(e,t){this.left.render(e,t,de),this.right.render(e,t,de),102===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t),"system"===t.format&&Me(this.left,this.body,e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(et),this.right.deoptimizePath(tt),this.scope.context.requestTreeshakingPass()}}class Jl extends ws{createScope(e){this.scope=new cr(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Fl(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),jl(e,this.body,t)}render(e,t){this.init?.render(e,t,de),this.test?.render(e,t,de),this.update?.render(e,t,de),this.body.render(e,t)}}Jl.prototype.includeNode=Ns,Jl.prototype.applyDeoptimizations=Cs;class Yl extends Mr{createScope(e){super.createScope(this.idScope=new ir(e,e.context))}parseNode(e){return null!==e.id&&(this.id=new tr(this,this.idScope).parseNode(e.id)),super.parseNode(e)}onlyFunctionCallUsed(){return this.parent.type===ve&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=_e){super.render(e,t),n===Pe&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Zl extends cr{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s,i)}}const Ql=Symbol("unset");class ec extends ws{constructor(){super(...arguments),this.testValue=Ql}deoptimizeCache(){this.testValue=Et}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 Zl(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new Zl(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===Ql?this.testValue=_l(this.test.getLiteralValueAtPath(et,at,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 this.shouldHoistVariable(t)?t.getName(n):""}))].filter(Boolean).join(", ");if(s){const e=this.parent.type,n=e!==Ie&&e!==Se;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldHoistVariable(e){return e.included&&null===e.renderBaseName&&null==e.getHoistedVariable()?.renderBaseName}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof ec&&e.alternate)return!0;if(e instanceof kr)return!1;e=e.parent}while(e);return!1}}ec.prototype.includeNode=Ns,ec.prototype.applyDeoptimizations=Cs;class tc extends ws{}class nc extends ws{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}}nc.prototype.needsBoundaries=!0,nc.prototype.includeNode=Ns,nc.prototype.applyDeoptimizations=Cs;class sc extends ws{}sc.prototype.includeNode=Ns,sc.prototype.applyDeoptimizations=Cs;class ic{constructor(e){this.interaction={args:[null,e],type:2,withNew:!1}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){Pt(e),2===e.type&&0===t.length&&(Rs(e.args[1])||ks(e.args[1]))&&e.args[1].deoptimizeArgumentsOnInteractionAtPath(this.interaction,[],n)}includeCallArguments(e,t){It(e,t),2===e.type&&(Rs(e.args[1])||ks(e.args[1]))&&e.args[1].includeCallArgumentsWhenCalledAtPath(et,this.interaction,t)}}class rc{deoptimizeArgumentsOnInteractionAtPath(e){Pt(e)}includeCallArguments(e,t){It(e,t)}}function oc(e){return{fileName:e.getFileName(),...e.getPreRenderedChunkInfo()}}class ac extends ws{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 yt(this.flags,268435456)}set shouldIncludeDynamicAttributes(e){this.flags=bt(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(_s(t)||(i=t)instanceof ws&&"AwaitExpression"===i.type)return void(this.localResolution={resolution:n,tracked:!0});var i;if(!Ds(t))return void(this.localResolution={resolution:n,tracked:!1});let r=t,o=this;for(;!r.computed&&r.object===o&&Ms(r.property)&&Os(r.parent);){const e=r.property.name;if(o=r.parent,"then"===e){const e=o.arguments[0];if(void 0===e||Rs(e)||ks(e))return r.promiseHandler=new ic(Zo(n.namespace)),void(this.localResolution={resolution:n,tracked:!0})}else if("catch"===e||"finally"===e){if(Ds(o.parent)){r.promiseHandler=new rc,r=o.parent;continue}if(_s(o.parent))return r.promiseHandler=new rc,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(tt,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,he(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=[...cc[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:oc(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 ea?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?oc(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 ms))return{helper:null,mechanism:null};const t=lc(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=lc(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 lc(e,t,n){return"external"===t?Yr[n(e instanceof ms?e.id:null)]:"default"===t?Wr:null}ac.prototype.applyDeoptimizations=Cs;const cc={amd:["require"],cjs:["require"],system:["module"]};class uc extends ws{}uc.prototype.includeNode=Ns,uc.prototype.applyDeoptimizations=Cs;class dc extends ws{}dc.prototype.includeNode=Ns,dc.prototype.applyDeoptimizations=Cs;class hc extends Zi{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,et,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 pc extends ws{render(e,t,{jsxMode:n}=_e){if(super.render(e,t),["classic","automatic"].includes(n)){const{name:t,value:s}=this,i=t instanceof hc?t.name:`${t.namespace.name}:${t.name.name}`;if("automatic"!==n||"key"!==i){const n=fs(i);i!==n&&e.overwrite(t.start,t.end,n,{contentOnly:!0}),s?e.overwrite(t.end,s.start,": ",{contentOnly:!0}):e.appendLeft(t.end,": true")}s instanceof bo&&"string"==typeof s.value&&e.overwrite(s.start,s.end,JSON.stringify(s.value),{contentOnly:!0})}}}pc.prototype.includeNode=Is;class fc extends ws{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)}}fc.prototype.includeNode=Is;class mc extends fc{}class gc extends fc{}class yc extends ws{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 bc extends ws{}bc.prototype.includeNode=Is;class Ec extends ws{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.expression.includePath(tt,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 xc=/^[ \t]*\r?\n[ \t\r\n]*|[ \t]*\r?\n[ \t\r\n]*$/g,Ac=/[ \t]*\r?\n[ \t\r\n]*/g;class Sc extends ws{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(xc,"").replace(Ac," ")),this.renderedText}}function vc(e){let t=0;for(const n of e)n instanceof Ec&&n.expression instanceof bc||n instanceof Sc&&!n.shouldRender()||t++;return t}function $c(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(tt,i),a.globalName=r}}else a=s.scope.findGlobal(r);return s.scope.context.includeVariableInModule(a,tt,i),a instanceof Ji&&(a.consolidateInitializers(),a.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),a}Sc.prototype.includeNode=Is;class Pc extends ws{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=$c(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:vc(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 Ec&&n.expression instanceof bc||n instanceof Sc&&!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}}}Pc.prototype.applyDeoptimizations=Cs;class wc extends Pc{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 yc)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 pc){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 yc&&e.prependRight(t,"{}, "),e.prependRight(t,"Object.assign("),e.appendLeft(o,")")}}else n||e.appendLeft(o,`, ${r}`)}}class Ic extends Pc{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 Nc extends ws{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 Cc extends ws{}Cc.prototype.includeNode=Is;class kc extends ws{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})}}kc.prototype.includeNode=Is;class Rc extends ws{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=$c("Fragment",!1,t.jsxImportSource,this,e);else{const{fragment:n,importSource:s,mode:i}=t;null!=n&&(this.fragment=n,this.fragmentVariable=$c(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 Oc extends ws{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 Dc extends ws{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,{asSingleStatement:!0}),(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(tt,e)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,fe(e.original,he(e.original,":",this.label.end)+1)),this.body.render(e,t)}}Dc.prototype.applyDeoptimizations=Cs;class Mc extends ws{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return yt(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=bt(this.flags,65536,e)}get hasDeoptimizedCache(){return yt(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=bt(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(tt),this.included&&e.includePath(tt,mt())}const{scope:{context:e},expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Te;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 Et;const s=this.getUsedBranch();if(s)return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n);if(!this.hasDeoptimizedCache&&!e.length){const s=_l(this.right.getLiteralValueAtPath(e,t,n));if("symbol"!=typeof s){if(!s&&"&&"===this.operator)return this.expressionsToBeDeoptimized.push(n),At;if(s&&"||"===this.operator)return this.expressionsToBeDeoptimized.push(n),xt}}return Et}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new Ll([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}=_e){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=he(e.original,this.operator,this.left.end);if(this.right.included){const t=fe(e.original,o+2);e.remove(this.start,t),s&&xe(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!me.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(et,at,this),t=_l(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}}Mc.prototype.includeNode=Ns,Mc.prototype.applyDeoptimizations=Cs;class _c extends ws{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(et,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.includeCallArgumentsWhenCalledAtPath(et,this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(tt,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),Nl(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,et,at),this.scope.context.requestTreeshakingPass()}}class Lc extends ws{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)}getKnownFunctionAtPath(e,t,n){return this.getObjectEntity().getKnownFunctionAtPath(e,t,n)}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(tt,e)}includePath(e,t){this.included||this.includeNode(t),this.getObjectEntity().includePath(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.getObjectEntity().includeCallArgumentsWhenCalledAtPath(e,t,n)}render(e,t,{renderedSurroundingElement:n}=_e){if(n!==Pe&&n!==Ae||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const n=Ee(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)):ue(i,e,o,a);s&&e.remove(s,this.end-1)}}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=li;const t=[];for(const n of this.properties){if(n instanceof $i){t.push({key:je,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(et,at,this);if("symbol"==typeof e){t.push({key:Ye(e)?e:je,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof tr?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){this.protoProp=n,e=n.value instanceof bo&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new ri(t,e)}}Lc.prototype.applyDeoptimizations=Cs;class Tc extends ws{initialise(){const{id:e}=this.scope.context.module;return cn(Jn(un(Kn(this.message)),e))}}class zc extends ws{initialise(){const e=this.start,{id:t}=this.scope.context.module,n=Jn(un(Kn(this.message,e)),t);this.scope.context.error(n,e)}}class Bc extends ws{}Bc.prototype.includeNode=Is;class Vc extends ws{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(gt()):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(zt,On(e,s.id,Ot(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(Tt,Ln(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=ye(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}be(this.body,e,n,this.end,t)}else super.render(e,t)}}Vc.prototype.includeNode=Ns,Vc.prototype.applyDeoptimizations=Cs;class Fc extends or{get method(){return yt(this.flags,262144)}set method(e){this.flags=bt(this.flags,262144,e)}get shorthand(){return yt(this.flags,524288)}set shorthand(e){this.flags=bt(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(gt()))&&(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})}setAssignedValue(e){this.value.setAssignedValue(e)}getPathInProperty(e){return e.at(-1)===je?e:this.computed?[...e,je]:this.key instanceof tr?[...e,this.key.name]:[...e,String(this.key.value)]}}Fc.prototype.includeNode=Ns,Fc.prototype.applyDeoptimizations=Cs;class jc extends ws{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(tt,e)}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||vt)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}jc.prototype.applyDeoptimizations=Cs;class Uc extends ws{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 Cr)||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}=_e){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:u,end:d}of Ee(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&xe(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 ue(l,e,u,d);o&&e.remove(o,this.end)}}Uc.prototype.includeNode=Ns,Uc.prototype.applyDeoptimizations=Cs;class Gc extends ws{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,et,e)}}class Hc extends ws{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:he(e.original,"default",this.start)+7,i=he(e.original,":",s)+1;be(this.consequent,e,i,n.end,t)}}}Hc.prototype.needsBoundaries=!0,Hc.prototype.includeNode=Ns,Hc.prototype.applyDeoptimizations=Cs;class Wc extends ws{createScope(e){this.parentScope=e,this.scope=new cr(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=gt();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&&be(this.cases,e,this.cases[0].start,this.end-1,t)}}Wc.prototype.includeNode=Ns,Wc.prototype.applyDeoptimizations=Cs;class Kc extends Cl{get hasCheckedForWarnings(){return yt(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=bt(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(et,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.includeCallArgumentsWhenCalledAtPath(et,this.interaction,e))}initialise(){super.initialise(),this.args=[vt,...this.quasi.expressions],this.interaction={args:[this.tag instanceof vo&&!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===we){this.hasCheckedForWarnings=!0;const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(Tt,In(e),this.start)}}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,et,at),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=at){return null===this.returnExpression?(this.returnExpression=$t,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(et,this.interaction,e,this)):this.returnExpression}}Kc.prototype.includeNode=Is;class qc extends ws{get tail(){return yt(this.flags,1048576)}set tail(e){this.flags=bt(this.flags,1048576,e)}bind(){}hasEffects(){return!1}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}qc.prototype.includeNode=Is;class Xc extends ws{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Et:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?$t:Zs(Js,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Ys(Js,e[0],t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.expressions)t.includePath(tt,e)}render(e,t){this.scope.context.addIndentExclusionRange([this.start,this.end]),super.render(e,t)}}class Jc extends ir{constructor(e,t,n){super(e,t),this.importDescriptions=n,this.variables.set("this",new Ji("this",null,Ts,et,t,"other"))}addDeclaration(e,t,n,s,i){return this.importDescriptions.has(e.name)&&t.error(qn(e.name),e.start),super.addDeclaration(e,t,n,s,i)}addExportDefaultDeclaration(e,t){const n=new yo(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 qi&&this.accessedOutsideVariables.set(e,n),n}}class Yc extends ws{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,et,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 Nr&&e.thisVariable===t);){if(!(e instanceof ir))return null;e=e.parent}return e}(this.scope,this.variable);n&&n.functionNode.parent instanceof Fc&&n.functionNode.parent.parent instanceof Lc&&n.functionNode.parent.parent.includePath(e,t)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof Jc?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(Tt,{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:qt("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 Zc extends ws{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(tt,e))}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class Qc extends ws{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?$s: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)}}Qc.prototype.includeNode=Ns,Qc.prototype.applyDeoptimizations=Cs;const eu={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Et,typeof:e=>typeof e,void:()=>{},"~":e=>~e},tu=Symbol("Unassigned");class nu extends ws{constructor(){super(...arguments),this.renderedLiteralValue=tu}get prefix(){return yt(this.flags,2097152)}set prefix(e){this.flags=bt(this.flags,2097152,e)}deoptimizeCache(){this.renderedLiteralValue=Et}getLiteralValueAtPath(e,t,n){if(e.length>0)return Et;const s=this.argument.getLiteralValueAtPath(et,t,n);if("symbol"==typeof s){if("void"===this.operator)return;if("!"===this.operator){if(s===At)return!0;if(s===xt)return!1}return Et}return eu[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof tr)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(et,Ct,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(et),this.scope.context.requestTreeshakingPass())}getRenderedLiteralValue(e){return this.renderedLiteralValue!==tu?this.renderedLiteralValue:this.renderedLiteralValue=e?Et:vl(this.getLiteralValueAtPath(et,at,this))}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const s=this.argument instanceof tr&&this.argument.variable?.included;("symbol"==typeof this.getRenderedLiteralValue(t)||this.argument.shouldBeIncluded(e)||s)&&(this.argument.include(e,t),this.renderedLiteralValue=Et)}render(e,t){if("symbol"==typeof this.renderedLiteralValue)super.render(e,t);else{let t=this.renderedLiteralValue;su.test(e.original[this.start-1])||(t=` ${t}`),e.overwrite(this.start,this.end,t)}}}const su=/[\s([=%&*+-/<>^|,?:;]/;nu.prototype.includeNode=Is;class iu extends ws{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(vt)}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?Oe(s,this.start,this.end,e,t):De(s,this.start,this.end,this.parent.type!==Pe,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${Re([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==Pe,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(et),this.argument instanceof tr){this.scope.findVariable(this.argument.name).markReassigned()}this.scope.context.requestTreeshakingPass()}}iu.prototype.includeNode=Is;class ru extends ws{hasEffects(e){return!!this.test.hasEffects(e)||Fl(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),jl(e,this.body,t)}}ru.prototype.includeNode=Ns,ru.prototype.applyDeoptimizations=Cs;class ou extends ws{applyDeoptimizations(){this.deoptimized=!0,this.argument?.deoptimizePath(tt)}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(tt,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 au=["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"],lu=[Tc,zc,Pi,Uo,bl,El,xl,Al,wl,kr,Il,kl,Rl,Ol,Ml,pr,Ko,Tl,zl,Bl,Vl,Cr,Ul,Gl,Hl,Lr,Wl,Kl,Cr,ql,Xl,Jl,_r,Yl,tr,ec,tc,nc,sc,ac,uc,dc,pc,mc,gc,wc,bc,Ec,Ic,hc,Nc,Cc,kc,Rc,yc,Oc,Sc,Dc,bo,bo,bo,bo,bo,bo,Mc,vo,No,ar,_c,Lc,Ho,Bc,Vc,Fc,lr,Rr,jc,Uc,$i,ur,Gc,Hc,Wc,Kc,qc,Xc,Yc,Zc,Qc,nu,iu,Wo,qo,ru,ou],cu=[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=du(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=du(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=As(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=e.params=du(e,s,n[t+2],n);s.addParameterVariables(o.map(e=>e.declare("parameter",et,vt)),o[o.length-1]instanceof Rr),e.body=uu(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=bs[n[t]],e.left=uu(e,s,n[t+1],n),e.right=uu(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=uu(e,s,n[t],n),e.right=uu(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=bs[n[t]],e.left=uu(e,s,n[t+1],n),e.right=uu(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=du(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:uu(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=As(n[t+1],n),e.callee=uu(e,s,n[t+2],n),e.arguments=du(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:uu(e,s,i,n);r?.declare("parameter",et,vt),e.body=uu(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=uu(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]=uu(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=du(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:uu(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:uu(e,s,r,n),e.body=uu(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=du(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:uu(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:uu(e,s,r,n),e.body=uu(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=uu(e,s,n[t],n),e.consequent=uu(e,s,n[t+1],n),e.alternate=uu(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:uu(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=uu(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=uu(e,s,n[t],n),e.test=uu(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:uu(e,s,i,n),e.source=uu(e,s,n[t+1],n),e.attributes=du(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=du(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:uu(e,s,i,n),e.attributes=du(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:uu(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=uu(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:uu(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=uu(e,s,n[t],n),e.right=uu(e,s,n[t+1],n),e.body=uu(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=uu(e,s,n[t+1],n),e.right=uu(e,s,n[t+2],n),e.body=uu(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:uu(e,s,i,n);const r=n[t+1];e.test=0===r?null:uu(e,s,r,n);const o=n[t+2];e.update=0===o?null:uu(e,s,o,n),e.body=uu(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=As(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:uu(e,s.parent,o,n);const a=e.params=du(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",et,vt)),a[a.length-1]instanceof Rr),e.body=uu(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=As(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:uu(e,e.idScope,o,n);const a=e.params=du(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",et,vt)),a[a.length-1]instanceof Rr),e.body=uu(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=uu(e,s,n[t],n),e.consequent=uu(e,e.consequentScope=new Zl(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:uu(e,e.alternateScope=new Zl(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=uu(e,s,n[t],n),e.value=uu(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=du(e,s,n[t],n),e.source=uu(e,s,n[t+1],n),e.attributes=du(e,s,n[t+2],n);const i=n[t+3];e.phase=0===i?void 0:bs[i]},function(e,t,n){const{scope:s}=e;e.local=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=uu(e,s,n[t],n),e.sourceAstNode=ml(n[t],n);const i=n[t+1];e.options=0===i?null:uu(e,s,i,n);const r=n[t+2];e.phase=0===r?void 0:bs[r]},function(e,t,n){const{scope:s}=e;e.local=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=uu(e,s,n[t+1],n),e.imported=0===i?e.local:uu(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=uu(e,s,n[t],n);const i=n[t+1];e.value=0===i?null:uu(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=uu(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e;e.openingElement=uu(e,s,n[t],n),e.children=du(e,s,n[t+1],n);const i=n[t+2];e.closingElement=0===i?null:uu(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.openingFragment=uu(e,s,n[t],n),e.children=du(e,s,n[t+1],n),e.closingFragment=uu(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=uu(e,s,n[t],n),e.property=uu(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.namespace=uu(e,s,n[t],n),e.name=uu(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.selfClosing=!(1&~i),e.name=uu(e,s,n[t+1],n),e.attributes=du(e,s,n[t+2],n)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,n){const{scope:s}=e;e.argument=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.expression=uu(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=uu(e,s,n[t],n),e.body=uu(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=bs[n[t]],e.left=uu(e,s,n[t+1],n),e.right=uu(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=uu(e,s,n[t+1],n),e.property=uu(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=uu(e,s,n[t],n),e.property=uu(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=du(e,s,n[t+1],n),e.key=uu(e,s,n[t+2],n),e.value=uu(e,s,n[t+3],n),e.kind=bs[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=As(n[t],n),e.callee=uu(e,s,n[t+1],n),e.arguments=du(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=du(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=du(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=du(e,s,n[t],n),e.invalidAnnotations=As(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=uu(e,s,n[t+2],n),e.kind=bs[n[t+3]],e.key=0===r?e.value:uu(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=du(e,s,n[t+1],n),e.key=uu(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:uu(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:uu(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=du(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=du(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:uu(e,s,i,n),e.consequent=du(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=uu(e,e.parentScope,n[t],n),e.cases=du(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=uu(e,s,n[t],n),e.quasi=uu(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=du(e,s,n[t],n),e.expressions=du(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=uu(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=uu(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:uu(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:uu(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=bs[n[t]],e.argument=uu(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=bs[n[t+1]],e.argument=uu(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=bs[n[t]],e.declarations=du(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=uu(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:uu(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=uu(e,s,n[t],n),e.body=uu(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:uu(e,s,r,n)}];function uu(e,t,n,s){const i=s[n],r=lu[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=au[i],o.start=s[n+1],o.end=s[n+2],cu[i](o,n+3,s),o.initialise(),o}function du(e,t,n,s){if(0===n)return Te;const i=s[n++],r=new Array(i);for(let o=0;o<i;o++){const i=s[n++];r[o]=i?uu(e,t,i,s):null}return r}const hu={ArrayExpression:Pi,ArrayPattern:Uo,ArrowFunctionExpression:bl,AssignmentExpression:El,AssignmentPattern:xl,AwaitExpression:Al,BinaryExpression:wl,BlockStatement:kr,BreakStatement:Il,CallExpression:kl,CatchClause:Rl,ChainExpression:Ol,ClassBody:Ml,ClassDeclaration:pr,ClassExpression:Ko,ConditionalExpression:Tl,ContinueStatement:zl,DebuggerStatement:Bl,Decorator:Vl,DoWhileStatement:Ul,EmptyStatement:Gl,ExportAllDeclaration:Hl,ExportDefaultDeclaration:Lr,ExportNamedDeclaration:Wl,ExportSpecifier:Kl,ExpressionStatement:Cr,ForInStatement:ql,ForOfStatement:Xl,ForStatement:Jl,FunctionDeclaration:_r,FunctionExpression:Yl,Identifier:tr,IfStatement:ec,ImportAttribute:tc,ImportDeclaration:nc,ImportDefaultSpecifier:sc,ImportExpression:ac,ImportNamespaceSpecifier:uc,ImportSpecifier:dc,JSXAttribute:pc,JSXClosingElement:mc,JSXClosingFragment:gc,JSXElement:wc,JSXEmptyExpression:bc,JSXExpressionContainer:Ec,JSXFragment:Ic,JSXIdentifier:hc,JSXMemberExpression:Nc,JSXNamespacedName:Cc,JSXOpeningElement:kc,JSXOpeningFragment:Rc,JSXSpreadAttribute:yc,JSXSpreadChild:Oc,JSXText:Sc,LabeledStatement:Dc,Literal:bo,LogicalExpression:Mc,MemberExpression:vo,MetaProperty:No,MethodDefinition:ar,NewExpression:_c,ObjectExpression:Lc,ObjectPattern:Ho,PanicError:Tc,ParseError:zc,PrivateIdentifier:Bc,Program:Vc,Property:Fc,PropertyDefinition:lr,RestElement:Rr,ReturnStatement:jc,SequenceExpression:Uc,SpreadElement:$i,StaticBlock:ur,Super:Gc,SwitchCase:Hc,SwitchStatement:Wc,TaggedTemplateExpression:Kc,TemplateElement:qc,TemplateLiteral:Xc,ThisExpression:Yc,ThrowStatement:Zc,TryStatement:Qc,UnaryExpression:nu,UnknownNode:class extends ws{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:iu,VariableDeclaration:Wo,VariableDeclarator:qo,WhileStatement:ru,YieldExpression:ou};class pu extends is{constructor(e){super(Ea),this.module=e}includePath(e,t){super.includePath(e,t),this.module.needsExportShim=!0}}var fu;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(fu||(fu={}));const mu=new WeakMap;function gu(e,t){if(e){const t=mu.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||gu(e)}function yu(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),mu.has(e))return e;if("sections"in e&&(e=function({file:e,sections:t}){const n=[],s=[],i=[],r=[],o=new Map;for(const{map:e,offset:a}of t){const t=yu(e),{sourceRoot:l}=t,c=l?l.endsWith("/")?l:`${l}/`:"",u=t.sources.map((e,n)=>{const s=null==e||q(e)?e:c+e,a=t.sourcesContent?.[n]??null;let l=o.get(s);l||o.set(s,l=[]);let u=l.find(e=>null==a||null==r[e]||r[e]===a);return void 0===u?(u=i.push(s)-1,r.push(a),l.push(u)):r[u]??=a,u}),d=s.length;for(const e of t.names??[])s.push(e);for(const[e,s]of t.mappings.entries()){const t=a.line+e;for(;n.length<=t;)n.push([]);const i=0===e?a.column:0;for(const e of s){const s=e.slice();s[0]+=i,1!==s.length&&(s[1]=u[s[1]],5===s.length&&(s[4]+=d)),n[t].push(s)}}}return{file:e,mappings:n,names:s,sources:i,sourcesContent:r,version:3}}(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 mu.set(i,s),i}function bu(e){return e.id}const Eu=(e,{allowReturnOutsideFunction:t=!1,jsx:n=!1}={})=>function(e){const t=ml(0,e);switch(t.type){case"PanicError":return cn(un(Kn(t.message)));case"ParseError":return cn(un(Kn(t.message,t.start)));default:return t}}(yl(pl(e,t,n))),xu=new Set(["assert","with"]);function Au(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof Lc))return n&&t.module.log(Tt,Vn(t.module.id),s),Le;const i=n.properties.find(e=>xu.has(Su(e)))?.value;if(!i)return Le;if(!(i instanceof Lc))return t.module.log(Tt,(r=t.module.id,{code:gn,message:`Rollup could not statically analyze the options argument of a dynamic import in "${Gt(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),Le;var r;const o=i.properties.map(e=>{const n=Su(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(Tt,Vn(t.module.id),e.start),null)}).filter(e=>!!e);return o.length>0?Object.fromEntries(o):Le}const Su=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function vu(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some(n=>e[n]!==t[n])}var $u="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},Pu={memoryUsage:()=>({heapUsed:0})};let wu=new Map;function Iu(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=Iu(e,t);const n=Pu.memoryUsage().heapUsed,s=$u.now(),i=wu.get(e);void 0===i?wu.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function Cu(e,t=3){e=Iu(e,t);const n=wu.get(e);if(void 0!==n){const e=Pu.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=$u.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function ku(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of wu)e[t]=[s,n,i];return e}let Ru=ys,Ou=ys;const Du=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function Mu(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of Du)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 _u={identifier:null,localName:Ea};function Lu(e,t,n,s,i=new Map,r,o,a){const l=i.get(t);if(l){if(l.has(e))return s?[null]:cn((c=t,{code:"CIRCULAR_REEXPORT",exporter:u=e.id,message:`"${c}" cannot be exported from "${Gt(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 Tu(e,t){const n=Be(t.sideEffectDependenciesByVariable,e,Ve);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof yo?s.getDirectOriginalVariable():s instanceof Qo?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 zu{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 pu(this),this.indentExclusionRanges=[],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,bu).sort()},get implicitlyLoadedBefore(){return Array.from(f,bu).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!==fu.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,safeVariableNames:null,syntheticNamedExports:r}}basename(){const e=Y(this.id),t=Q(this.id);return ds(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){as(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),cn(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 Qo?s=s.getBaseVariable():s instanceof yo&&(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 cn(jn(oe(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 ms)e.set(le(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(Fu))}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const[t,n]of this.getExportedVariablesByName().entries()){const s=n instanceof yo?n.getOriginalVariable():n;if(!n||!(n.included||n instanceof os))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:cn((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${Gt(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}=Le){if(ae(e)){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(ce(e)).getVariableForExportName("*",{importChain:[...n,this.id]})}const l=this.reexportDescriptions.get(e);if(l){const[e,s]=Lu(l.module,l.localName,t,!1,r,[...n,this.id],o,a);return e?(t&&(Bu(e,t,this),this.info.moduleSideEffects&&Be(t.sideEffectDependenciesByVariable,e,Ve).add(this)),this.info.moduleSideEffects&&o?.add(this),a?.add(this),[e]):this.error(Un(oe(l.localName),this.id,l.module.id,!!s?.missingButExportExists),l.start)}const c=this.exportDescriptions.get(e);if(c){if(c===_u)return[this.exportShimVariable];const e=c.localName,n=this.traceVariable(e,{exportOrReexportModules:a,importerForSideEffects:t,searchedNamesAndModules:r,sideEffectModules:o});return n?(t&&(Bu(n,t,this),Be(t.sideEffectDependenciesByVariable,n,Ve).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)||Bu(e,t,n);for(const n of i)Be(t.sideEffectDependenciesByVariable,e,Ve).add(n)}return s}}return this.info.syntheticNamedExports?[Be(this.syntheticExports,e,()=>new Qo(this.astContext,oe(e),this.getSyntheticNamespace()))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}hasTopLevelAwait(){return this.astContext.usesTopLevelAwait}include(){const e=mt();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(){if(this.allExportsIncluded)return;this.allExportsIncluded=!0,this.includeModuleInExecution();const e=mt();for(const t of this.getExportedVariablesByName().values())this.includeVariable(t,tt,e),t.deoptimizePath(tt),t instanceof os&&(t.module.reexported=!0)}includeAllInBundle(){this.ast.include(mt(),!0),this.includeAllExports()}includeModuleInExecution(){this.isExecuted||(gs(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 ms?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){this.indentExclusionRanges=[];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?cn((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.`})):{indentExclusionRanges:this.indentExclusionRanges,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=yu(i),this.sourcemapChain=o.map(e=>e.missing?e:yu(e)),gu(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 B(t,{filename:this.excludeFromSourcemap?null:d}),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),addIndentExclusionRange:e=>this.indentExclusionRanges.push(e),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=>hu[e]||hu.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(re(e)),traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new Jc(this.graph.scope,this.astContext,this.importDescriptions),this.namespace=new Yo(this.astContext);const h={context:this.astContext,type:"Module"};if(e)this.ast=new hu[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 pl(e,t,n)}(t,!1,!1!==this.options.jsx);Ru("generate ast",3),this.ast=(p=e,f=h,m=this.scope,uu(f,m,0,yl(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,bu),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}=Le){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 zu&&"*"===a.name)return e.namespace;const[o,l]=Lu(e,a.name,t||this,n,s,[this.id],i,r);return o||this.error(Un(oe(a.name),this.id,e.id,!!l?.missingButExportExists),a.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:n},{replaceExistingMeta:s=!1}=Le){if(null!=t&&(this.info.moduleSideEffects=t),null!=n&&(this.info.syntheticNamedExports=n),null!=e){if(s)for(const e of Object.keys(this.info.meta))delete this.info.meta[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}"`}}(oe(e)),t)}addExport(e){if(e instanceof Lr)this.assertUniqueExportName("default",e.start),this.exportDescriptions.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof Hl){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=re(e.exported instanceof bo?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 bo){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=re(n instanceof bo?n.value:n.name);this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:re(s instanceof bo?s.value:s.name),module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof Wo)for(const e of t.declarations)for(const t of Ja(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=re(n instanceof tr?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(qn(s),n.local.start);const i="source"===e.phase?rs:n instanceof sc?"default":n instanceof uc?"*":n.imported instanceof tr?n.imported.name:re(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,Le)}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=Ot(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(Tt,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))}hn(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 ms||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=>[Su(e),e.value.value])):Le);var s;const i=this.sourcesWithAttributes.get(e);i?vu(i,n)&&this.log(Tt,Mn(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 "${Gt(a)}" even though it is needed in "${Gt(l)}" to provide JSX syntax. Please check your "jsx" option.`,names:[o],url:qt(Jt)}),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]=Lu(c,e,t,!0,Vu(n),s,a,l);c instanceof ms||d?.indirectExternal?o.add(u):u instanceof Qo?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(Tt,(c=e,u=this.id,d=t.map(([,e])=>e.id),{binding:c,code:"NAMESPACE_CONFLICT",ids:d,message:`Conflicting namespaces: "${Gt(u)}" re-exports "${c}" from one of the modules ${Ft(d.map(e=>Gt(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(Tt,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${Gt(t)}" re-exports "${e}" from one of the external modules ${Ft(s.map(e=>Gt(e)))}, guessing "${Gt(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 ms){const[t]=n.getVariableForExportName("*",{importChain:[this.id]});t.includePath(tt,mt()),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.includePath(tt,mt()),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const{resolution:t}=e;t instanceof zu&&(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 zu&&i!==this&&Tu(e,this);else if(this.graph.needsTreeshakingPass=!0,i instanceof zu&&(i.includeModuleInExecution(),i!==this)){const t=Tu(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(Tt,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${Gt(t)}".`})),this.exportDescriptions.set(e,_u)}tryParse(){try{return Eu(this.info.code,{jsx:!1!==this.options.jsx})}catch(e){return this.error(Jn(e,this.id),e.pos)}}}function Bu(e,t,n){if(e.module instanceof zu&&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 Vu=e=>e&&new Map(Array.from(e,([e,t])=>[e,new Set(t)])),Fu=([e],[t])=>e<t?-1:e>t?1:0,ju=(e,t)=>[e,t].filter(Boolean).join("\n"),Uu=(e,t)=>[e,t].filter(Boolean).join("\n\n");const Gu={amd:Ku,cjs:Ku,es:Wu,iife:Ku,system:Wu,umd:Ku};function Hu(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 yo&&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,nr(t.name,e,t.forbiddenNames)),s.info.safeVariableNames[t.name]=t.renderName}if(n.has(s)){const t=s.namespace;t.setRenderNames(null,nr(t.name,e,t.forbiddenNames))}}}(s,f,p),Gu[i](s,n,t,r,o,a,l,c,u);for(const e of f)e.scope.deconflict(i,d,h)}function Wu(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof ea)&&(t.variableName=nr(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(t instanceof ms||i&&!t.info.syntheticNamedExports)?n.setRenderNames(null,(t instanceof ms?a.get(t):o.get(t)).variableName):t instanceof ms&&n.isSourcePhase?n.setRenderNames(null,nr(t.suggestedVariableName+"__source",e,n.forbiddenNames)):t instanceof ms&&"default"===s?n.setRenderNames(null,nr([...t.exportedVariables].some(([e,t])=>"*"===t&&e.included)?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,nr(ds(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,nr(t.name,e,t.forbiddenNames))}function Ku(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=nr(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=nr(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&Zr(r(t.id),a)?t.namespaceVariableName:nr(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof ms){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=Xr[s]?n.defaultVariableName:n.variableName;Jr(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,Yr[r(t.id)]?n.namespaceVariableName:n.variableName):e.setRenderNames(n.variableName,oe(s))}else{const n=l.get(t);o&&e.isNamespace&&!t.info.syntheticNamedExports?e.setRenderNames(null,"default"===n.exportMode?n.namespaceVariableName:n.variableName):"default"===n.exportMode?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,oe(n.getVariableExportName(e)))}}}function qu(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return cn(Bn("default",o,i))}else if("none"===t&&o.length>0)return cn(Bn("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(Tt,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${Gt(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:qt(Qt)}}(i,n)),t="named")),t}function Xu(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 Ju(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof ms){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),Ju(e,t,n,s,i,r)):t.push(o)}}const Yu="!~{",Zu="}~",Qu=new RegExp(`${Yu}[0-9a-zA-Z_$]{1,16}${Zu}`,"g"),ed=(e,t)=>e.replace(Qu,e=>t.get(e)||e),td=(e,t,n)=>e.replace(Qu,e=>e===t?n:e),nd=(e,t)=>{const n=new Set,s=e.replace(Qu,e=>t.has(e)?(n.add(e),`${Yu}${"0".repeat(e.length-5)}${Zu}`):e);return{containedPlaceholders:n,transformedCode:s}},sd=Symbol("bundleKeys"),id={type:"placeholder"};function rd(e,t,n){return Ht(e)?cn(ts(`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 cn(ts(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return Ht(r)?cn(ts(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r})}function od(e,{[sd]: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 ad=["Object","Promise","module","exports","require","__filename","__dirname",...fo],ld=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function cd(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(Tt,(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:qt("configuration-options/#output-globals")})),e.variableName):void 0);var r,o}class ud{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&&!t.info.syntheticNamedExports||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=ds(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 ud([],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 zu?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 Qo&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>ed(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=se(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=se(s))}while(ie.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=qu(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(ud.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=pd(e)??Ut(e.id)):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 Vr(Kt(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=Y(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=rd("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=od(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=id),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=rd("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=od(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(gd),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,gd),importedBindings:fd(e,gd),imports:Array.from(e.keys(),gd),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.isNativeNamespace(e)?"*":this.exportNamesByVariable.get(e)[0]}isNativeNamespace(e){return this.outputOptions.preserveModules&&e instanceof Yo&&!e.module.info.syntheticNamedExports}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=[];Ju(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 ud&&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),b="es"===o&&new Set(y.map(({exported:e})=>e));let E=y.length>0,x=!1;for(const e of g){const{reexports:t}=e;t?.length&&(E=!0,!x&&t.some(e=>"default"===e.reexported)&&(x=!0),b&&(e.reexports=t.filter(({reexported:e})=>!b.has(e))))}if(!x)for(const{exported:e}of y)if("default"===e){x=!0;break}const{intro:A,outro:S,banner:v,footer:$}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],ju),t.hookReduceValue("footer",e.footer(n),[n],ju),t.hookReduceValue("intro",e.intro(n),[n],Uu),t.hookReduceValue("outro",e.outro(n),[n],Uu)]);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 cn((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(Na[o](p,{accessedGlobals:u,dependencies:g,exports:y,hasDefaultExport:x,hasExports:E,id:l.fileName,indent:d,intro:A,isEntryFacade:a||null!==t&&t.info.isEntry,isModuleFacade:null!==t,log:n,namedExportsMode:"default"!==e,outro:S,snippets:r,usesTopLevelAwait:m},s),v&&h.prepend(v),"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):dd(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof zu){const s=this.chunkByModule.get(n);let i;do{if(i=t.alternativeReexportModules.get(e),i){this.chunkByModule.get(i)!==s&&this.inputOptions.onLog(Tt,kn(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 Qo,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!this.isNativeNamespace(i)){const e=i.module;if(e instanceof zu){const s=this.chunkByModule.get(e);s&&s!==this&&(s.exports.add(i),t.push(i),n&&this.imports.add(i))}else e instanceof ms&&i.included&&t.push(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?dd(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const n of this.getExportNames()){if(ae(n))continue;const s=this.exportsByName.get(n);if(!(s instanceof Qo)){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 Ji){for(const e of s.declarations)if(e.parent instanceof _r||e instanceof Lr&&e.declaration instanceof _r){r=!0;break}}else s instanceof Qo&&(i=o,"es"===e&&(o=s.renderName));t.push({exported:n,expression:i,hoisted:r,local:o,needsLiveBinding:s.isReassigned&&this.exportNamesByVariable.get(s).length>1||s.isTargetOfAssignment&&hd(s)})}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 ms){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?Xr[n(o.id)]&&i.add(a):t.isNamespace&&Yr[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every(ae))&&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 ud||e instanceof ea))}getDynamicImportStringAndAttributes(e,t,n){const{externalImportAttributes:s}=this.outputOptions,i=["es","cjs"].includes(this.outputOptions.format)&&s;if(e instanceof ms){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=Au(n);r=e===Le||ta(e,this.snippets)}return[e||"",r]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?jt(this.fileName):jt(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 ms&&n.isSourcePhase;if(s instanceof ms){if(i=this.externalChunkByModule.get(s),r=n.name,!o&&"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return cn(Qn(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);Be(t,i,Fe).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 zu?{chunk:this.chunkByModule.get(t),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(t),node:n,resolution:t}:t instanceof ms?{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=pd(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(J(e.id.split(md,1)[0])),r=s(this.inputBase),o=Q(i),a=ld.has(o)?i.slice(0,-o.length):i;return q(a)?n&&ne(a).startsWith(n)?a.slice(n.length).replace(/^[/\\]/,""):"/"===r&&"/"!==a[0]?te(r,a.replace(/^[a-zA-Z]:[/\\]/,"/")):te(r,a):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+Y(a)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o;if(ae(s)){const n=ce(s);"defaultOnly"===t(n)&&this.inputOptions.onLog(Tt,es(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof Qo)continue;const a=n.module;if(a instanceof zu){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 cn(Qn(a.id,r,!0));o=e&&("default"!==r||Jr(t(a.id),!0))}}Be(n,i,Fe).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 ea&&!i.moduleSideEffects&&!this.outputOptions.hoistTransitiveImports)continue;const a=i instanceof ea||"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 ea?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof ea&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&cd(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:u&&u.length>0?u:null,isChunk:i instanceof ud,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 ud&&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 F({separator:`${E}${E}`}),A=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=Xu(t.originalCode);if(null!==e)return e}return"\t"}(a,l),S=[];let v="";const $=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&&Co.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(qr),P.accessedDocumentCurrentScript=!1,({source:n}=r),w||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),x.addSource({content:n,indentExclusionRanges:r.indentExclusionRanges}),S.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(P);o.renderFirst()?v+=E+e:x.addSource(new B(e))}const a=t.get(e.scope);if(a)for(const e of a)$.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}}v&&x.prepend(v+E+E),this.needsExportsShim&&x.prepend(`${E}${b} ${Ea}${y}=${y}void 0;${E}${E}`);const I=h?x:x.trim();var N;return o&&0===this.getExportNames().length&&0===n.size&&r(Tt,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${N=this.getChunkName()}".`,names:[N]}),{accessedGlobals:$,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||hd(n)?n instanceof Qo?r.add(n):n.setRenderNames(null,null):n.setRenderNames("exports",oe(t))}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(ad);this.needsExportsShim&&o.add(Ea),t&&o.add("Symbol"),Hu(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.includedNamespaces.has(e))for(const n of e.getExportedVariablesByName().values())n.included&&t.add(n);for(let n of t){n instanceof yo&&(n=n.getOriginalVariable()),n instanceof Qo&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof zu&&(this.checkCircularDependencyImport(n,e),this.isNativeNamespace(n)||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 zu&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function dd(e){return pd(e)??jt(e.id)}function hd(e){return function(e){return e instanceof Ji&&e.declarations.some(e=>e instanceof tr&&e.isDeclarationInDestructuringPattern())}(e)||function(e){return e instanceof Ji&&e.declarations.some(e=>{const t=e.parent;if(!(t instanceof qo)||t.id!==e)return!1;const n=t.parent;return n instanceof Wo&&n.declarations.length>1&&n.isInSingleStatementPosition()})}(e)}function pd(e){return e.chunkNames.find(({isUserDefined:e})=>e)?.name??e.chunkNames[0]?.name}function fd(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 md=/[#?]/,gd=e=>e.getFileName();function*yd(e){for(const t of e)yield*t}function bd(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):Ed(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,h=new Set;l[u]=t,c[u]=d;const p=new Set(e);let f=!1;const m=new Set;for(const e of p){f||=e.hasTopLevelAwait(),Be(r,e,Ve).add(u);const i=n.get(e);if(i&&!m.has(i)){m.add(i);for(const e of i)p.add(e)}for(const t of e.getDependenciesToBeIncluded())t instanceof ms||p.add(t);for(const{node:n}of e.dynamicImports){const{resolution:e}=n;e instanceof zu&&e.includedDynamicImporters.length>0&&(s.has(e)||!o.has(e))&&(h.add(e),n.included&&t.add(e),o.has(e)||(s.add(e),o.add(e),a.push([e])))}for(const n of e.implicitlyLoadedBefore)o.has(n)||(s.add(n),o.add(n),a.push([n])),s.has(n)&&t.add(n)}if(f)for(const e of h)i.add(e),d.add(e);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=xd(n,r),c=xd(i,r);return{awaitedDynamicEntries:a,awaitedDynamicImportsByEntry:c,dynamicEntries:o,dynamicImportsByEntry:l}}(a,s,l,i,c);return{awaitedDynamicImportsByEntry:h,dependentEntriesByModule:r,dynamicallyDependentEntriesByAwaitedDynamicEntry:Ad(Sd(r,d,a,e=>e.includedTopLevelAwaitingDynamicImporters),h),dynamicallyDependentEntriesByDynamicEntry:Sd(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){return e.map(e=>({dependentEntries:t.get(e[0]),modules:e}))}(a,u),y=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,yd([m,g])),b=function(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])Be(t,e,Ve).add(s)}}return i}(y,d,h,c),E=function(e,t,n,s){const i=new Array(s).fill(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])Be(t,e,Ve).add(s)}}return i}(y,p,f,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,b,E);const{chunks:x,sideEffectAtoms:A,sizeByAtom:S}=function(e,t,n,s,i){const r=Object.create(null),o=new Map,a=new Array(e.length+t.length);let l=0n,c=1n,u=0;for(const{dependentEntries:t,modules:d}of e){let e=0n,h=-1n;for(const i of t)e|=1n<<BigInt(i),h&=n[i]|s[i];const p=r[String(e)]||={containedAtoms:0n,correlatedAtoms:h,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(t),modules:[],pure:!0,size:0};for(const e of d)o.set(e,p);const{pure:f,size:m}=vd(d,i);f||(l|=c),a[u++]=m,p.containedAtoms|=c,p.modules.push(...d),p.pure&&=f,p.size+=m,c<<=1n}const d=new Map;for(const{modules:e}of t){for(const t of e)d.set(t,c);const{pure:t,size:n}=vd(e,i);t||(l|=c),a[u++]=n,c<<=1n}const h=Object.values(r);return l|=function(e,t,n,s){const i=new Map;let r=0n;for(const o of e){const{dependencies:e,modules:a}=o;for(const l of a)for(const a of l.getDependenciesToBeIncluded())if(a instanceof ms){if(a.info.moduleSideEffects){const e=Be(i,a,()=>{const e=s;return s<<=1n,r|=e,e});o.containedAtoms|=e,o.correlatedAtoms|=e}}else{const s=t.get(a);if(s)s!==o&&(e.add(s),s.dependentChunks.add(o));else{const e=n.get(a);e&&(o.containedAtoms|=e)}}}return r}(h,o,d,c),{chunks:h,sideEffectAtoms:l,sizeByAtom:a}}(m,g,y,b,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($d),s.sort($d),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return Ou("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=Pd(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),Nd(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),Nd(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 Ou("optimize chunks",3),[...r.small,...r.big]}(x,n,A,S,s).map(({modules:e})=>({alias:null,modules:e}))),o}function Ed(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 ms||n.has(t)||s.add(t)}}function xd(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 Ad(e,t){for(const[n,s]of t.entries())for(const t of s)Be(e,t,Ve).add(n);return e}function Sd(e,t,n,s){const i=new Map;for(const r of t){const t=Be(i,r,Ve),o=n[r];for(const n of o)for(const i of yd([s(n),n.implicitlyLoadedAfter])){const n=e.get(i);if(n)for(const e of n)t.add(e)}}return i}function vd(e,t){let n=!0,s=0;for(const i of e)i.isIncluded()&&(n&&=!i.hasEffects(),s+=t>1?i.estimateSize():1);return{pure:n,size:s}}function $d({size:e},{size:t}){return e-t}function Pd(e,{big:t,small:n},s,i,r){let o=null;for(const a of yd([n,t])){if(e===a)continue;const t=wd(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function wd(e,t,n,s,i){const r=Id(e,t,n,s,i);return r<n?r+Id(t,e,n-r,s,i):1/0}function Id(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 Nd(e,t,n){return e.size<t?n.small:n.big}const Cd=(e,t)=>e.execIndex>t.execIndex?1:-1;function kd(e){e.sort(Cd)}function Rd(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 zu){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 zu&&(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 Od=(e,t)=>t?`(${e})`:e;class Dd{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 Md{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 cn(Zn(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 _d(e){return function(t,n){return n.missing?(e(Tt,(s=n.plugin,{code:Sn,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:qt("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new Md({mappings:[],names:[]},[t])):new Md(n,[t]);var s}}function Ld(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=Z(e)||".",o=n.sourceRoot||".",a=t.map((e,t)=>null==e?null:new Dd(ne(i,o,e),s[t]));r=new Md(n,a)}else r=new Dd(e,t);return s.reduce(i,r)}let Td;const zd=e=>function(e){let t,n;try{const r=ll.__wbindgen_add_to_stack_pointer(-16)>>>0;ll.xxhashBase64Url(r,e);var s=Qa().getInt32(r+0,!0),i=Qa().getInt32(r+4,!0);return t=s,n=i,el(s,i)}finally{ll.__wbindgen_add_to_stack_pointer(16),ll.__wbindgen_export(t,n,1)}}(Vd(e)),Bd={base36:e=>function(e){let t,n;try{const r=ll.__wbindgen_add_to_stack_pointer(-16)>>>0;ll.xxhashBase36(r,e);var s=Qa().getInt32(r+0,!0),i=Qa().getInt32(r+4,!0);return t=s,n=i,el(s,i)}finally{ll.__wbindgen_add_to_stack_pointer(16),ll.__wbindgen_export(t,n,1)}}(Vd(e)),base64:zd,hex:e=>function(e){let t,n;try{const r=ll.__wbindgen_add_to_stack_pointer(-16)>>>0;ll.xxhashBase16(r,e);var s=Qa().getInt32(r+0,!0),i=Qa().getInt32(r+4,!0);return t=s,n=i,el(s,i)}finally{ll.__wbindgen_add_to_stack_pointer(16),ll.__wbindgen_export(t,n,1)}}(Vd(e))};function Vd(e){return"string"==typeof e?"undefined"==typeof Buffer?(Td??=new TextEncoder,Td.encode(e)):Buffer.from(e):e}let Fd="sourceMa";async function jd(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=Bd[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,usedFileNames:p}=await async function(e,t,n,s,i,r,o){const a=[],l=new Map,c=new Map,u=new Map,d=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&d.add(t);const h=await Promise.all(e.map(async({chunk:e,preliminaryFileName:{fileName:i,hashPlaceholder:o},preliminarySourcemapFileName:a,magicString:l,usedModules:c})=>{const u={chunk:e,fileName:i,sourcemapFileName:a?.fileName??null,...await Ud(l,i,c,t,n,s,r)};return{hashAugmentation:o?s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],(e,t)=>e+(t||"")):"",hashPlaceholder:o,preliminarySourcemapFileName:a,transformedChunk:u}})),p=new Set(o[sd]);for(const{transformedChunk:e,hashPlaceholder:t,preliminarySourcemapFileName:s,hashAugmentation:r}of h){const{map:o}=e,h=s?.hashPlaceholder;if(o&&h){const{transformedCode:e}=nd(o.toString(),d);u.set(h,"inline"===n.sourcemap?i(e).slice(0,h.length):Hd(e,s.fileName,h,p,i))}t?(l.set(t,e),c.set(t,Gd(e,n,i,d,u,r))):a.push(e)}return{hashDependenciesByPlaceholder:c,initialHashesByPlaceholder:u,nonHashedChunksWithPlaceholders:a,placeholders:d,renderedChunksByPlaceholder:l,usedFileNames:p}}(r,a,s,n,o,i,t),f=function(e,t,n,s,i,r,o){const a=new Map(n);for(const n of s){const{fileName:s}=e.get(n);let l="";const c=new Set([n]);for(const e of c){const{containedPlaceholders:n,contentHash:s}=t.get(e);l+=s;for(const e of n)c.add(e)}const u=Hd(l,s,n,r,o);i[td(s,n,u)]=id,a.set(n,u)}return a}(h,l,c,d,t,p,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=ed(o,t);const u=ed(a,t);let d=null;c&&(r.sourcemapDebugIds&&(e+=qd(e,c)),d=l?ed(l,t):`${u}.map`,c.file=ed(c.file??"",t),e+=Wd(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?ed(o,t):o,u=null;c&&(r.sourcemapDebugIds&&(s+=qd(s,c)),u=l?ed(l,t):`${a}.map`,s+=Wd(u,c,i,r)),n[a]=e.finalizeChunk(s,c,u,t)}}(h,f,t,u,n,s),Ou("transform chunks",2)}async function Ud(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=yu(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=m?ne(m):h?ne(h):d?ne(d,t):ne(t);a=function(e,t,n,s,i,r){const o=_d(r),a=n.filter(e=>!e.excludeFromSourcemap).map(e=>Ld(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o)),l=new Md(t,a),c=s.reduce(o,l);let{sources:u,sourcesContent:d,names:h,mappings:p}=c.traceMappings();if(e){const t=Z(e);u=u.map(e=>te(t,e)),e=Y(e)}for(const e of n)gu(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&&cn(ts("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&&cn(ts("sourcemapPathTransform function must return a string."))),a.sources[e]=J(t)}Ou("sourcemaps",3)}return{code:c,map:a}}function Gd({code:e,map:t,fileName:n,sourcemapFileName:s},i,r,o,a,l){const{containedPlaceholders:c,transformedCode:u}=nd(e,o);let d=u;if(t&&i.sourcemapDebugIds&&(d+="//# debugId=\n"),t&&"hidden"!==i.sourcemap){let e;if("inline"===i.sourcemap){const{containedPlaceholders:n,transformedCode:s}=nd(t.toString(),o);e=n,d+=`//# ${Fd}=data:application/json,${s}\n`}else{const{containedPlaceholders:r,transformedCode:l}=nd(ed(s??`${n}.map`,a),o);e=r,d+=Kd(l,t,i.sourcemap,i.sourcemapBaseUrl)}for(const t of e)c.add(t)}return l&&(d+=l),{containedPlaceholders:c,contentHash:r(d)}}function Hd(e,t,n,s,i){let r,o;do{o&&(e=o),o=i(e).slice(0,n.length),r=td(t,n,o).toLowerCase()}while(s.has(r));return s.add(r),o}function Wd(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){return"inline"!==s&&n.emitFile({fileName:e,originalFileName:null,source:t.toString(),type:"asset"}),Kd(e,t,s,i)}function Kd(e,t,n,s){const i="inline"===n?t.toUrl():s?new URL(Y(e),s).toString():Y(e);return"hidden"===n?"":`//# ${Fd}=${i}\n`}function qd(e,t){const n=Bd.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 Xd{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===sd?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 cn(ts(`Hashes cannot be longer than 21 characters, received ${n}. Check the "${t}" option.`));const s=`${Yu}${se(++e).padStart(n-5,"0")}${Zu}`;return s.length>n?cn(ts(`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 cn(Fn("output.format",en,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return cn(Fn("output.file",Zt,'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 cn(Fn("output.sourcemapFile",on,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(Tt,Fn("output.amd.id",Yt,'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 jd(t,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){try{await this.pluginDriver.hookParallel("renderError",[e])}catch(t){cn(dn(e,t,"renderError"))}throw 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(Zd(t))return cn(Rn(t));if("placeholder"!==n.type){const{fileName:e}=n;if(e!==t&&Zd(e))return cn(Rn(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)Jd(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 zu){const i=e(s.id,n);"string"==typeof i&&Jd(i,s,t)}return t}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{Eu(t.code,{jsx:!1!==this.inputOptions.jsx})}catch(e){this.inputOptions.onLog(Tt,Nn(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=>hs.test(e):e=>!ie.has(e)&&hs.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`${Od(`${r}${Od(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=fs(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 zu&&(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 Z(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)&&q(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 ms&&s.set(i,new ea(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]})):bd(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){kd(s);const i=new ud(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(Tt,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 ud&&s(t,e);t.add(e)};for(const t of e)n.has(t)||i(t)}}function Jd(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return cn((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${Gt(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}const Yd=/^[a-z]:/i;function Zd(e){if(Yd.test(e))return!0;const t=function(...e){const t=e.filter(Boolean).join("/");if(""===t)return".";const n=H.test(t[0]),s=(n?"/":"")+(ee(t.split(H),n).join("/")||(n?"":"."));return K.test(t)&&!s.endsWith("/")?s+"/":s}(e).replaceAll("\\","/");return".."===t||t.startsWith("../")||"."===t||q(t)}class Qd extends sr{constructor(){super(),this.parent=null,this.variables.set("undefined",new go)}findVariable(e){let t=this.variables.get(e);return t||(t=new qi(e),this.variables.set(e,t)),t}}async function eh(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}=_e)=>(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||Le,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||q(e)||"."===e[0]?async function(e,t,n){return await th(e,t,n)??await th(e+".mjs",t,n)??await th(e+".js",t,n)}(t?ne(Z(t),e):ne(e),n,u):null}async function th(e,t,n){try{const s=await n.lstat(e);if(!t&&s.isSymbolicLink())return await th(await n.realpath(e),t,n);if(t&&s.isSymbolicLink()||s.isFile()){const t=Y(e);if((await n.readdir(Z(e))).includes(t))return e}}catch{}}function nh(e){return 65279===e.charCodeAt(0)?nh(e.slice(1)):e}const sh=(e,t,n=ah)=>{const{onwarn:s,onLog:i}=e,r=ih(n,s);if(i){const e=Vt[t];return(t,n)=>i(t,rh(n),(t,n)=>{if("error"===t)return cn(oh(n));Vt[t]>=e&&r(t,oh(n))})}return r},ih=(e,t)=>t?(n,s)=>{n===Tt?t(rh(s),t=>e(Tt,oh(t))):e(n,s)}:e,rh=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),oh=e=>"string"==typeof e?{message:e}:"function"==typeof e?oh(e()):e,ah=(e,{message:t})=>{switch(e){case Tt:return console.warn(t);case Bt:return console.debug(t);default:return console.info(t)}};function lh(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(Tt,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const ch={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Te,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:Te,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Te,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},uh={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"}},dh={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},hh=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};cn(Fn(`${n}.preset`,s,`valid values are ${Ft(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;cn(Fn(t,n,`valid values are ${s}${Ft(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)},ph=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),fh="at position ",mh="at output position ";const gh={delete:()=>!1,get(){},has:()=>!1,set(){}};function yh(e){return e.startsWith(fh)||e.startsWith(mh)?cn({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):cn({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 bh(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:yu(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=oh(t),null!=n&&hn(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(Tt,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&&ns('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(yu("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}),null!=n&&hn(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&&!function(e){return e.sources.every(e=>null!=e)}(n)?yu({version:3,...Ld(e,t,n,s,_d(i)).traceMappings()}):n}(i,a,o,r,s.onLog);if(!e){return new B(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 cn(Yn(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 Eh="resolveDependencies";class xh{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 eh(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,Sh(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,Le),void 0,!1,!e.resolveDependencies||Eh)).info}addEntryWithImplicitDependants(e,t){return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null,void 0,void 0).then(async n=>{if(Sh(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&&ns('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 ${Gt(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:cn(function(e){return{code:"BAD_LOADER",message:`Error loading "${Gt(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e));i.code=nh(i.code);const r=this.graph.cachedModules.get(e);if(r&&!r.customTransformCache&&r.originalCode===i.code){const e={meta:{...n.info.meta},moduleSideEffects:n.info.moduleSideEffects,syntheticNamedExports:n.info.syntheticNamedExports};if(n.updateOptions(r),!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}])){if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);return void await n.setSource(r)}n.updateOptions(e,{replaceExistingMeta:!0})}n.updateOptions(i),await n.setSource(await bh(i,n,this.pluginDriver,this.options))}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(Gt(s.id),e.id,s):cn(Hn("string"==typeof t?t:Gt(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 zu)return r&&vu(e,l.info.attributes)&&this.options.onLog(Tt,Mn(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof ms)return cn({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 zu(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=$h(u).then(()=>this.pluginDriver.hookParallel("moduleParsed",[c.info]));d.catch(()=>{}),this.moduleLoadPromises.set(c,u);const h=await u;return a?a===Eh&&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 ms))return cn(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${Gt(t)}", but is already an existing non-external module id.`}}(e,t));vu(l.info.attributes,s)&&this.options.onLog(Tt,Mn(l.info.attributes,s,e,t))}else l=new ms(this.options,r,o,a,"absolute"!==i&&q(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?cn(Hn(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 zu&&(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||!q(e.id)||!0===i&&vh(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(vh(e,n,s)||"absolute"),id:i&&s?Ah(e,t):e}}const i=s?Ah(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:vh(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,Au(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,Le,!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===Eh?$h(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?X(t)?cn(function(e,t){return{code:Pn,exporter:e,id:t,message:`Could not resolve "${e}" from "${Gt(t)}"`}}(t,n)):(this.options.onLog(Tt,function(e,t){return{code:Pn,exporter:e,id:t,message:`"${e}" is imported by "${Gt(t)}", but could not be resolved – treating it as an external dependency.`,url:qt("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(Tt,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${Gt(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1,r){const o=await eh(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,Le,!0,Le,r,this.options.fs);if(null==o)return cn(null===s?function(e){return{code:$n,message:`Could not resolve entry module "${Gt(e)}".`}}(e):function(e,t){return{code:En,message:`Module "${Gt(e)}" that should be implicitly loaded before "${Gt(t)}" could not be resolved.`}}(e,s));const a="object"==typeof o&&o.external;return!1===o||a?cn(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:$n,message:`Entry module "${Gt(e)}" cannot be external.`}}(e):function(e,t){return{code:En,message:`Module "${Gt(e)}" that should be implicitly loaded before "${Gt(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof o?o:{id:o},Le),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?(vu(i.attributes,s)&&this.options.onLog(Tt,Mn(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,Le,!1,s,e.info.attributes),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function Ah(e,t){return X(e)?t?ne(t,"..",e):ne(e):e}function Sh(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 vh(e,t,n){return!0===n||"ifRelativeSource"===n&&X(t)||!q(e)}async function $h(e){const[t,n]=await e;return Promise.all([...t,...n])}function Ph(e,t,n,s,i,r,o,a,l){const c=o.sanitizeFileName(e||"asset");return od(rd("function"==typeof o.assetFileNames?o.assetFileNames({get name(){return ns('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',ln,!1,l),e},names:t,get originalFileName(){return ns('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',ln,!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 wh(e,{bundle:t},n){t[sd].has(e.toLowerCase())?n(Tt,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=id}const Ih=new Set(["chunk","asset","prebuilt-chunk"]);function Nh(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return cn(ts(`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 Ch{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&&Ih.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!Ht(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):cn(ts(`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}".`)):cn(ts(`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 cn(wn(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():cn({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?cn({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):cn({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 cn({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return cn(ts(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return cn({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=Nh(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=Bd[t.hashCharacters],s=this.output={bundle:e,fileNamesBySourceHash:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&wh(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{Be(i,n(e.source),Fe).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=zd(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:Nh(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&&wh(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>fu.LOAD_AND_PARSE)return cn({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return cn(ts(`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 cn(ts(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||Ht(e.fileName))return cn(ts(`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=Ph(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 ns('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',ln,!1,e),a},names:a?[a]:[],needsCodeReference:l,get originalFileName(){return ns('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',ln,!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=Ph(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 ns('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',ln,!1,u),a.name},names:r,needsCodeReference:c,get originalFileName(){return ns('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',ln,!1,u),a.originalFileName},originalFileNames:o,source:a.source,type:"asset"}}}function kh(e,t,n,s,i){return Vt[e]<Vt[i]?ys:(i,r)=>{null!=r&&n(Tt,{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=oh(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}const Rh=e;function Oh(e,t,n,s,i,r){const{logLevel:o,onLog:a}=s;let l,c=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(fh)||e.name.startsWith(mh)||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:()=>yh(u),get:()=>yh(u),has:()=>yh(u),set:()=>yh(u)};else l=gh;var u,d;return{addWatchFile(e){n.watchFiles[e]=!0},cache:l,debug:kh(Bt,"PLUGIN_LOG",a,e.name,o),emitFile:i.emitFile.bind(i),error:t=>cn(Yn(oh(t),e.name)),fs:s.fs,getFileName:i.getFileName,getModuleIds:()=>n.modulesById.keys(),getModuleInfo:n.getModuleInfo,getWatchFiles:()=>Object.keys(n.watchFiles),info:kh(zt,"PLUGIN_LOG",a,e.name,o),load:e=>n.moduleLoader.preloadModule(e),meta:{rollupVersion:Rh,watchMode:n.watchMode},parse:Eu,resolve:(t,s,{attributes:i,custom:r,isEntry:o,skipSelf:a,importerAttributes:l}=_e)=>(a??=!0,n.moduleLoader.resolveId(t,s,r,o,i||Le,l,a?[{importer:s,plugin:e,source:t}]:null)),setAssetSource:i.setAssetSource,warn:kh(Tt,"PLUGIN_WARNING",a,e.name,o)}}function Dh(e){return Array.isArray(e)?e.filter(Boolean):e?[e]:[]}function Mh(e){if(e instanceof RegExp)return t=>{const n=J(t),s=e.test(n);return e.lastIndex=0,s};const t=process.cwd(),n=function(e,t){return e.startsWith("**")||q(e)?J(e):J(ne(t,e))}(e,t),s=qa(n,{dot:!0});return e=>{const t=J(e);return s(t)}}function _h(e){return e instanceof RegExp?t=>{const n=e.test(t);return e.lastIndex=0,n}:t=>t.includes(e)}function Lh(e,t){if(e||t)return n=>!e?.some(e=>e(n))&&(!!t?.some(e=>e(n))||!(t&&t.length>0))}function Th(e){return"string"==typeof e||e instanceof RegExp?{include:[e]}:Array.isArray(e)?{include:e}:{exclude:e.exclude?Dh(e.exclude):void 0,include:e.include?Dh(e.include):void 0}}function zh(e){if(!e)return;const{exclude:t,include:n}=Th(e),s=t?.map(Mh),i=n?.map(Mh);return Lh(s,i)}function Bh(e,t){if(!e&&!t)return;const n=zh(e),s=function(e){if(!e)return;const{exclude:t,include:n}=Th(e),s=t?.map(_h),i=n?.map(_h);return Lh(s,i)}(t);return(e,t)=>{let i=!0;return n&&(i&&=n(e)),!!i&&(s&&(i&&=s(t)),i)}}const Vh=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 Fh{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 Ch(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,Oh(n,s,e,t,this.fileEmitter,r)])),i)for(const e of n)for(const n of Vh)n in e&&t.onLog(Tt,Tn(e.name,n))}createOutputPluginDriver(e){return new Fh(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,Gh))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 Be(this.sortedPlugins,e,()=>jh(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=Be(this.compiledPluginFilters.transformFilter,e,()=>Bh(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=Be(this.compiledPluginFilters.idOnlyFilter,e,()=>function(e){const t=zh(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),cn(Yn(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 cn(Yn(t,n.name,{hook:e}))}}}function jh(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&&cn(function(e,t){return{code:yn,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 Gh(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return cn(function(e,t){return{code:yn,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 Wh{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 Kh{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 ot,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=fu.LOAD_AND_PARSE,this.scope=new Qd,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]++}}t&&(this.watchMode=!0,t({closeWatcher:()=>this.pluginDriver.hookParallel("closeWatcher",[]),watchChange:(...e)=>this.pluginDriver.hookParallel("watchChange",e)})),this.pluginDriver=new Fh(this,e,e.plugins,this.pluginCache),this.moduleLoader=new xh(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Wh(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[ss]=!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=fu.ANALYSE,this.sortAndBindModules(),Ou("sort and bind modules",2),Ru("mark included statements",2),this.includeStatements(),Ou("mark included statements",2),this.phase=fu.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 zu?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)gs(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(mt(),!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()||cn(Gn(t))}sortAndBindModules(){const{orderedModules:e,cyclePaths:t}=Rd(this.entryModules);for(const e of t)this.options.onLog(Tt,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(Tt,Un(oe(t.name),e.id,t.module.id,!!s?.missingButExportExists),t.start)}}}function qh(e,t){return t()}const Xh=e;function Jh(e,t,n,s){e=jh("onLog",e);const i=Vt[s],r=(s,o,a=ze)=>{fn(o);if(!(Vt[s]<i)){for(const t of e){if(a.has(t))continue;const{onLog:e}=t,l=e=>Vt[e]<i?ys:n=>r(e,oh(n),new Set(a).add(t));if(!1===("handler"in e?e.handler:e).call({debug:l(Bt),error:e=>cn(oh(e)),info:l(zt),meta:{rollupVersion:Xh,watchMode:n},warn:l(Tt)},s,o))return}t(s,o)}};return r}const Yh=e=>()=>cn(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:qt("plugin-development/#a-simple-example")}}(e)),Zh=Yh("fs.appendFile"),Qh=Yh("fs.copyFile"),ep=Yh("fs.mkdir"),tp=Yh("fs.mkdtemp"),np=Yh("fs.readdir"),sp=Yh("fs.readFile"),ip=Yh("fs.realpath"),rp=Yh("fs.rename"),op=Yh("fs.rmdir"),ap=Yh("fs.stat"),lp=Yh("fs.lstat"),cp=Yh("fs.unlink"),up=Yh("fs.writeFile");var dp=Object.freeze({__proto__:null,appendFile:Zh,copyFile:Qh,lstat:lp,mkdir:ep,mkdtemp:tp,readFile:sp,readdir:np,realpath:ip,rename:rp,rmdir:op,stat:ap,unlink:cp,writeFile:up});const hp=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,pp=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 Dh(e))s instanceof RegExp?n.push(s):t.add(s);return(e,...s)=>t.has(e)||n.some(t=>t.global||t.sticky?-1!==e.search(t):t.test(e))}return()=>!1},fp=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},mp=e=>{const t=e.jsx;if(!t)return!1;const n=hh(t,uh,"jsx",Jt,"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||cn(Fn("jsx",Jt,"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&&cn(Fn("jsx.mode",Jt,'mode must be "automatic", "classic" or "preserve"',r)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},gp=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:1e3},yp=(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[ne(t)]=s;return n=>e[n]??t}return()=>t},bp=e=>{if(!1===e.treeshake)return!1;const t=hh(e.treeshake,ch,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??Te,moduleSideEffects:Ep(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Ep=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&&cn(Fn("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},xp=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,Ap=/^[a-z]:/i;function Sp(e){const t=Ap.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(xp,"_")}const vp=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return cn(Fn("output.file",Zt,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return cn(Fn("output.file",Zt,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},$p=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 cn(Fn("output.format",en,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Pp=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?cn(Fn("output.inlineDynamicImports",tn,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},wp=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return cn(Fn("output.inlineDynamicImports",tn,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return cn(Fn("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},Ip=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return ne(t)},Np=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?cn(Fn("output.amd.id",Yt,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?cn(Fn("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}},Cp=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},kp=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?cn(Fn("output.dir",Zt,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},Rp=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function Op(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return cn({code:mn,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:qt(Qt)});return n||"auto"}const Dp=(e,t)=>(null!=e.externalImportAssertions&&ns('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),Mp=e=>{const t=hh(e.generatedCode,dh,"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}},_p=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},Lp=new Set(["compat","auto","esModule","default","defaultOnly"]),Tp=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||zp(n=t(s)):s in e?e[s]:zp(e[s]=t(s))}return void 0===t?()=>"default":()=>zp(t)},zp=e=>Lp.has(e)?e:cn(Fn("output.interop",nn,`use one of ${Array.from(Lp,e=>JSON.stringify(e)).join(", ")}`,e)),Bp=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return cn(Fn("output.manualChunks",sn,'this option is not supported for "output.inlineDynamicImports"'));if(n)return cn(Fn("output.manualChunks",sn,'this option is not supported for "output.preserveModules"'))}return s||{}},Vp=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),Fp=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},jp=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+"/":cn(Fn("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n},Up=e;function Gp(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=jh("options",await ph(e.plugins)),s=e.logLevel||zt,i=Jh(n,sh(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:kh(Bt,"PLUGIN_LOG",i,n,s),error:e=>cn(Yn(oh(e),n,{hook:"onLog"})),info:kh(zt,"PLUGIN_LOG",i,n,s),meta:{rollupVersion:Up,watchMode:t},warn:kh(Tt,"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 ph(e.plugins),r=e.logLevel||zt,o=Jh(i,sh(e,r),t,r),a=e.strictDeprecations||!1,l=gp(e),c={cache:hp(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:pp(e.external),fs:e.fs??dp,input:fp(e),jsx:mp(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:yp(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:bp(e)};return lh(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(n,t);return Hp(s.plugins,fh),{options:s,unsetOptions:i}}(e,null!==t);(function(e){e.perf?(wu=new Map,Ru=Nu,Ou=Cu,e.plugins=e.plugins.map(Mu)):(Ru=ys,Ou=ys)})(n),await async function(){await dl()}();const i=new Kh(n,t),r=!1!==e.cache;e.cache&&(n.cache=void 0,e.cache=void 0);Ru("BUILD",1),await qh(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=un(dn(e,t,"buildEnd"));throw await i.pluginDriver.hookParallel("closeBundle",[n]).catch(()=>{}),n}throw await i.pluginDriver.hookParallel("closeBundle",[e]).catch(()=>{}),e}try{await i.pluginDriver.hookParallel("buildEnd",[])}catch(e){throw await i.pluginDriver.hookParallel("closeBundle",[e]).catch(()=>{}),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?cn({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Wp(!1,n,s,e,i),get watchFiles(){return Object.keys(i.watchFiles)},write:async e=>o.closed?cn({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Wp(!0,n,s,e,i)};n.perf&&(o.getTimings=ku);return o}(e,null)}function Hp(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function Wp(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 ph(e.plugins);Hp(i,mh);const r=t.createOutputPluginDriver(i);return{...await Kp(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return qh(0,async()=>{const n=new Xd(r,a,t,o,i),s=await n.generate(e);if(e){if(Ru("WRITE",1),!r.dir&&!r.file)return cn({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:qt(Zt)});await Promise.all(Object.values(s).map(e=>i.fileOperationQueue.run(()=>async function(e,t,{fs:{mkdir:n,writeFile:s}}){const i=ne(t.dir||Z(t.file),e.fileName);return await n(Z(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)=>Xp(e)-Xp(t))};var l})}function Kp(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=$p(e),o=Pp(e,t),a=wp(e,o,t),l=vp(e,a,t),c=Mp(e),u=Dp(e,t),d={amd:Np(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:Cp(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:kp(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:Rp(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:Op(e,s),extend:e.extend||!1,externalImportAssertions:u,externalImportAttributes:u,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:Cp(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:_p(e,i),inlineDynamicImports:o,interop:Tp(e),intro:Cp(e,"intro"),manualChunks:Bp(e,o,a),minifyInternalExports:Vp(e,r,i),name:e.name,noConflict:e.noConflict||!1,onlyExplicitManualChunks:e.onlyExplicitManualChunks||!1,outro:Cp(e,"outro"),paths:e.paths||{},plugins:await ph(e.plugins),preserveModules:a,preserveModulesRoot:Ip(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Sp,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:jp(e),sourcemapDebugIds:e.sourcemapDebugIds||!1,sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:Fp(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 lh(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 qp;function Xp(e){return"asset"===e.type?qp.ASSET:e.isEntry?qp.ENTRY_CHUNK:qp.SECONDARY_CHUNK}function Jp(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"}(qp||(qp={}));const Yp=e;export{Yp as VERSION,Jp as defineConfig,Gp as rollup};